Various fixes for canvas.raster regridding

Fixe for issues mentioned in https://github.com/bokeh/datashader/issues/380
Handles several issues:

Handles ascending/descending x-/y-coordinates correctly (assuming they are always aligned at the center)
Handles both 2D and 3D arrays assuming that the last two DataArray.dims are the y- and x-axis respectively
Handles non rasterio input without xarr._file_data.nodata metadata.
Adds coordinates to returned DataArray
Keeps coordinate names

Further issues:

Still always assumes bin edges as both input and output
Does not address issue slicing the input image according to the canvas x_range and y_range

You can find a notebook with further details here: https://anaconda.org/philippjfr/regridding/notebook

I think the way I've handled ascending and descending coordinates may be incorrect now, the current implementation makes the following assumptions:

If x-coords are ascending it assumes coords describe left edges
If x-coords are descending it assumes coords describe right edge
If y-coords are ascending it assumes coords describe bottom edge
If y-coords are descending it assumes coords describe top edge

This probably doesn't make much sense, but if we decide to switch to bin centers this needs fixing anyway.

Right.  Let's just put this PR on hold until using bin centers is in place, then fix this up to match.

Just rebased this against #392, other than the inverted row/column indices in that PR this now works correctly and as far as I can tell this PR now has everything I need from regridding. I'm no longer sure whether we should handle center-based indexing right away particularly because most datasets I've run across are not bin-center indexed. I'd be happy to clean this PR up a bit, adding unit tests and better docstrings but I'll let @gbrener and @jbednar weigh in first.

Actually given that we cannot rely on any one fixed convention I'd suggest we add an argument to the canvas.raster method to indicate whether the data is indexed by the bin edges or centers.

I think we should consistently use bin-center indexing for our own purposes, whenever we use floating-point indexes, but that we should allow the convention to be declared for the source data, and we should have the default for that assumed convention match whatever the most common value is in practice.  That way most people will get the right plots, and most people who don't care about the 1/2-pixel errors will never worry about it, leaving only a few people ever having to adjust the declared convention.

I think we should consistently use bin-center indexing for our own purposes, whenever we use floating-point indexes, but that we should allow the convention to be declared for the source data, and we should have the default for that assumed convention match whatever the most common value is in practice.

Taking bin edges as input and spitting out bin centers seems like a recipe for confusion. I think if we allow declaring the input convention it would be easiest if the output would just follow that.

Philipp and I discussed further and I think we agreed that Datashader needs to define a consistent output format respected across all of its data types (points, lines, rasters), which I think entails using center-based bins.  So I've asked @gbrener to submit a separate PR switching to center-based bins for rasters, which we can merge before updating and merging this PR.

Okay, I'm happy to update this PR once that's happened.

@gbrener @jbednar I've now updated the code assuming bin centers as input and adding centered coordinates on the output. Greg mentioned something about the nodata attribute, which I don't recall now, that could presumably be resolved here as well. Hopefully I'll have time to add some unit tests on the flight.

Suppose we have to make sure to test with latest xarray which includes Greg's fix for rasterio loading.

@philippjfr I think it might be better to wait on the next xarray release before updating/changing datashader to rely on its new functionality, since the xarray team might still change or remove things before the release.

Good point, you think there's anything we can do to push them to do a release soon? Some of our projects will need it fairly soon.

I'm unfamiliar with their release procedure. Perhaps we can add a feature toggle, which will make it easier to migrate once they do the release?

@gbrener As far as I can tell your xarray conda package contains an old version (https://github.com/pydata/xarray/commit/22ff955d53e253071f6e4fa849e5291d0005282a) without your rasterio fix. So the tests on this PR will continue failing.

@jbednar @gbrener Ready to review. I'll restart the tests once Greg's new xarray build is up.

@jbednar Ready to merge once tests pass and you've reviewed it.

Looks good apart from minor naming issue and conflicts to resolve.

@jbednar Updated the terminology and rebased the PR.


send authentication header on route

I am trying to create a restricted area with the app-router. The router defaults to the login page and if i have a valid auth-token it let's me proceed to the other pages. That's working fine.
But how can i send the auth-token to the import destinations i have defined in my app-router setup?
<app-router id="router">
<!-- private routes requiring valid x-auth-token -->
  <app-route path="/" import="/api/home" element="api-home"></app-route>
  <app-route path="/settings" import="/api/settings" element="api-settings"></app-route>
<!-- public routes -->
  <app-route path="/login-page" import="/login-page"></app-route>
  <app-route path="*" import="/login-page"></app-route>
</app-router>

I have thought of the state-changed event, but could not find out if the app-router has any header property or function to utilize.
Any ideas appreciated!

Where do you get the auth-token to start? Is that checked in a state-changed event handler?

On the /login-page i have an ajax-form calling /signin which returns the token. The token is saved in a global variable; an additional variable (loggedIn) is set to true. I've got an event listener on root like this:
document.addEventListener('polymer-ready', function() {
  var router = document.querySelector("#router");

  router.addEventListener('before-data-binding', function(e) {
    var g = document.querySelector('#globals');
    if (!g.loggedIn && e.detail.path != '/login-page') {
      e.preventDefault();
      router.go('/login-page', {replace: true});
    }
  });
});

Under g.token i can access the token...

Is there an ajax call to populate the globals element? You could manually initialize the router after the globals element has been populated. https://erikringsmuth.github.io/app-router/#/api#init

Sorry - been quite busy these days. I had a look at the code and guess it's not really possible to send an Auth Header with the app-route because the component simply creates and  tag and does not make an XHR/Ajax call or anything similar.
For the moment i got around it, because it is actually not required. Now i simply load page templates without authentification and populate it with private data from Ajax calls – which support sending header data. So, by design, i got rid of the problem. But i don't know if this approach is universal and can be recommended in general...
Still, thanks for looking into this problem!


OTP Support?

Hello!
Pass supports otp through pass-otp.
Would this be possible for gopass?

Use gopass totp.
https://github.com/justwatchcom/gopass/blob/master/main.go#L267

To be fair this is not yet in the latest release.
So either use the current master branch to build gopass yourself or wait patiently until we release the next version. :wink:

Thank you and good, then I don't have to feel dumb! Seems like it's included when installing with go get.

Oh, I'm sorry. I was under the impression that this is already released. Thanks for pointing that out @metalmatze


how do you stop the song from starting until you want to start it?

What is your question?
So basically, I wanted to make a little mini menu before you start a song. But I couldn't get it to stop and then start again.
I used code from the Cutscene script to try and test this, but nothing seemed to work. The song just either freezes indefinitely or just plays normally.
Here is the code

What am I getting wrong here?

You forgot startCountdown()

You forgot startCountdown()

what do you mean?

The countdown needs to start again when the timer finishes

so where would I put startCountdown()?

when the timer finishes

Also return Function _Stop is in the wrong if branch, you don't even need the else

Hey it works now! Thanks a lot!


Add explanation and practice for dictionaries, tuples etc.

Higher level, for people that want to practice their coding

I'll close this once I do a pull request with the features

Done in commit fbea3c5


feat: add GetRecipe API to describe Recipes returned by other APIs

Issue #, if available:
Description of changes:
feat: add GetRecipe API to describe Recipes returned by other APIs
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

We need tests for the new API

I added some tests.


Issue clean install using maven for ctakes-ytex

I was wondering if anybody had any advice for me on the following error, I am trying to clean install from the head of the main branch in git.
Below are my commands; this error start with commit d998331c1cfef48d792c78a8d3c1670498a8b925
The commands below work for the previous commit a97258b01d455f7816994070cf64deb311b29acc
steps to reproduce
git clone the ctakes repo
mvn clean install -ff -DskipTests=true;
error message
/root/projects/ctakes/ctakes-ytex/scripts/build-setup.xml:149: The following error occurred while executing this line:
[ERROR] /root/projects/ctakes/ctakes-ytex/scripts/data/build.xml:148: The following error occurred while executing this line:
[ERROR] /root/projects/ctakes/ctakes-ytex/scripts/data/build.xml:531: Warning: Could not find file /root/projects/ctakes/ctakes-ytex/scripts/data/${project.basedir}/conn.xml.template to copy.
mvn -v
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 1.8.0_282, vendor: AdoptOpenJDK, runtime: /opt/java/openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.10.147+", arch: "amd64", family: "unix"

Hi Scott,
Thanks for the report - especially the setup, failure message and commit details.  Would you mind copying it into the GitHub issues area?  https://urldefense.com/v3/__https://github.com/apache/ctakes/issues__;!!NZvER7FxgEiBAiR_!r_NQsbbnDqD-QGMwq_ofjWAsCeeR1pGVKoB2EVnideNr2t6t24yCwJmoibSXDSf6F40_bEadTeF5AGH5NItUpOBViKAQtNUFoJM9wlumGFqmeqbv-A$
I think that I know what happened ...
The pom files for several modules used ${basedir} instead of the preferred ${project.basedir}.  I updated them to standard.  I also changed ${basedir} in the ytex scripts and apparently, they don't have substitution for that expression.  I will have it fixed in a few minutes and try again.
Sean

I just checked in the revert on ctakes-ytex/scripts/data/build.xml
Packaging works on my machine, but it had also worked for all previous tests so reopen if this is still an issue.
Sean

I tested and it works now for me, thank you!


Button's custom color property

Hi there!
I've added some new colors to theme.palette. And primary, secondary buttons have own classes like MuiButton-outlinedPrimary based on variant value.
When i override Button color property component with my own palette colors MuiButton-outlinedPrimary and etc. classes disappear. Therefore hover background-color styles disappear,
and I don't know how to add suitable background-color with opacity.
Perhaps the solution is to add a hover property to buttons, but how to convert HEX to RGBA like rgba(83, 109, 254, 0.08)
Differences between default Button and custom, as you can see hover color is different

Custom button

@michaeldaineka Do you have a reproduction?

reproduction

https://codesandbox.io/s/strange-butterfly-istbo?fontsize=14

It seems OK? What's the issue? Maybe you could try to simplify the reproduction?

Thanks. It seems OK. What's the issue? Maybe you could try to simplify the reproduction?

My question is:
How to correctly I can override color prop with my custom theme.palette[myCustomColors] to make button looks like a native button without any classes overrides.
'Cause of if u take a look native button have a MuiButton-[variant]Primary class, that adds a border and color property to :hover button.

Therefore, i don't know how to override buttons with my custom colors to make it look like a native, because of disappearing MuiButton-[variant]Primary class, so i have to write the styles manually in classes prop ?

@michaeldaineka Could you describe the API you want to use and the corresponding visual output? It would help us to understand what problem you try to solve.

If I understand this correctly it's basically a request for dynamic colors in buttons.
More or less a dupe of https://github.com/mui-org/material-ui/issues/13875
In the code you're only overwriting the default style.
Have a look at https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Button/Button.js#L21 if you want to check how it's done in core.
A for now simpler variant would be to wrap the button with a custom theme provider, providing the palette you want to use inside your button.

@sakulstra Thanks.


Can not select MUI Autocomplete options while using renderOption

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Current behavior 😯
We can not Select option while using renderOption.
   <Autocomplete
          id="free-solo-demo"
          freeSolo
          options={suggestion}
          // onSelectCapture={(e)=>{console.log(e)}}
          getOptionLabel={(option: any) =>
            `${option.name} ${option.companyName}`
          }
          selectOnFocus={true}
          renderOption={(option: any) => {
            console.log("option");
            console.log(option);
            return
{`${option.key}`}
;
          }}
          onChange={(event, value) => HandleUserProfile(value)}
          renderInput={(params) => (
            <TextField
              {...params}
              placeholder="Search..."
              onChange={handleChange}
            />
          )}
        />

Here is complete codesandbox link
https://codesandbox.io/s/distracted-bassi-tqm7e?file=/src/App.tsx:2137-2857

Expected behavior 🤔
While using renderOption we should able to select option while giving custom style to options.
Steps to reproduce 🕹
codesandbox.io link
https://codesandbox.io/s/distracted-bassi-tqm7e?file=/src/App.tsx:81-94
Context 🔦
No response
Your environment 🌎

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

I'm not a contributor, but I ran into something similar recently.
The renderOption signature is (props, option) and this props argument contains an onClick handler that is responsible for recording the selection.
So you'd need to change the code to`
renderOption={(props: any, option: any) => {
  console.log("option");
  console.log(option);
  return
{`${option.key}`}
;
}}

Thank You @zhzhang.

The tip by @zhzhang helped to fix the selection issue, but the fact that it sets the props to the custom inner element changes its display. Is there any other way to overcome this?
My case is:
                renderOption={(props, hotel) =>
                        <ListItemText
                          {...props}
                          primary={hotel.code}
                          secondary={
                              <React.Fragment>
                                <Typography
                                    component="span"
                                    variant="body2"
                                    style={{ display: 'inline' }}
                                >
                                    hotel.name
                                </Typography>
                              </React.Fragment>
                          }
                        />

As can be seen, the primary and secondary appear next to eachother instead of on top of eachother, due to the change of the ListItemText props:

The tip by @zhzhang helped to fix the selection issue, but the fact that it sets the props to the custom inner element changes its display. Is there any other way to overcome this?
My case is:
                renderOption={(props, hotel) =>
                        <ListItemText
                          {...props}
                          primary={hotel.code}
                          secondary={
                              <React.Fragment>
                                <Typography
                                    component="span"
                                    variant="body2"
                                    style={{ display: 'inline' }}
                                >
                                    hotel.name
                                </Typography>
                              </React.Fragment>
                          }
                        />

As can be seen, the primary and secondary appear next to eachother instead of on top of eachother, due to the change of the ListItemText props:

There is probably a better way to solve this, but i had the same issues, and I solved that by doing the following:
    <ListItemText
          {...props}
          primary={option.name}
          secondary={option.address}
          sx={{ flexDirection: "column", alignItems: "normal !important" }}
        />

The tip by @zhzhang helped to fix the selection issue, but the fact that it sets the props to the custom inner element changes its display. Is there any other way to overcome this?
My case is:
                renderOption={(props, hotel) =>
                        <ListItemText
                          {...props}
                          primary={hotel.code}
                          secondary={
                              <React.Fragment>
                                <Typography
                                    component="span"
                                    variant="body2"
                                    style={{ display: 'inline' }}
                                >
                                    {hotel.name}
                                </Typography>
                              </React.Fragment>
                          }
                        />

As can be seen, the primary and secondary appear next to eachother instead of on top of eachother, due to the change of the ListItemText props:

Apologizes but it is not clear what is the problem and in which case. On the issue description itself, the problem is that the props are not being spread. For the other comments, please open new issue with a clear description and reproduction.

The sx prop solution from @rafaelfaria works for me but are there any other solutions available for this issue?

I'm not a contributor, but I ran into something similar recently. The renderOption signature is (props, option) and this props argument contains an onClick handler that is responsible for recording the selection. So you'd need to change the code to`
renderOption={(props: any, option: any) => {
  console.log("option");
  console.log(option);
  return
{`${option.key}`}
;
}}

Tks a lot, this have made me scratch me head for hours

It's also mentioned in the breaking changes when migrating from v4 to v5 under the AutoComplete component header https://mui.com/material-ui/migration/v5-component-changes/

I'm not a contributor, but I ran into something similar recently. The renderOption signature is (props, option) and this props argument contains an onClick handler that is responsible for recording the selection. So you'd need to change the code to`
renderOption={(props: any, option: any) => {
  console.log("option");
  console.log(option);
  return
{`${option.key}`}
;
}}

Thank you @zhzhang

thank you so much @zhzhang this helped so much, saved tons of time!!

Im migrating from the material-ui 4 version to the 5.15.4 and have the same problem. If I pass the renderOption function the onChange function is not firing on adding options. Its firing only on deleting them. Like I see in the comment above, I need to wrap an option into a  tag and to pass the {...props} to it. But I have spent 3 days to find it because there is nothing about this new behavior in the mui5 docs. Please, look into the issue once more. It is not fixed and is not described or I did not find the solution description in the official docs. Thanks.

I'm not a contributor, but I ran into something similar recently. The renderOption signature is (props, option) and this props argument contains an onClick handler that is responsible for recording the selection. So you'd need to change the code to`
renderOption={(props: any, option: any) => {
  console.log("option");
  console.log(option);
  return
{`${option.key}`}
;
}}

Awesome this worked thank you very much

I spent a lot of time too. Thank you @zhzhang, his answer helped me, but i needed to style my option, to make them more custom and complicated.
renderOption={(props, option) => {
  return (

                  <Typography  variant='body1'>
                    {option.name}
                  </Typography>
                  <Typography  variant='caption'>
                    {option.status}
                  </Typography>

  );
}}

If you need to style option, you have to wrap your option code in li with {...props}  and in span with your styles.


Update project's structure

Enhancement/Feature
Project files are a bit messy rn. I'd suggest creating a cog folder and dynamically loading the cogs to add scalability to the project.
I can work on this if approved

Hey @Batucho , I did realise this and therefore there is a similar issue already present #35 . Currently every command is in music.py and it needs to be modulated asap. But currently I am waiting on certain issues to get completed and then move on to modulation. I would like you to wait a couple more days and then we will move on with this part.

Seems like a good idea. Mention me when you think it should be done.

@Batucho if you are willing to work on this issue, we can start, but let's have a small discussion on how to proceed with this here!

There shouln't be any big/breaking changes. I might push some code formatting if I may, do you want me to do this in a different pr?


requirements: Remove Thumbor

Thumbor and tc-aws have been dragging their feet on Python 3 support for years, and even the alphas and unofficial forks we’ve been running don’t seem to be maintained anymore.  Depending on these projects is no longer viable for us.

Posted a few comments; otherwise lgtm.  @mateuszmandera FYI -- this will be a useful resource when we add a new thumbnailing system.

Merged, thanks @andersk!


SWDEV-411064 - check if image is supported before running image specific tests

Change-Id: I62b3f7489f2f33b4b4e02f42a46e66c8940f2277

This PR has been merged in internal repo.


Improve Build of Man-pages

This PR extends make man. See each commit for details. The driving force is to allow me to extend osbuild.org to automatically pull documentation from the respective osbuild repositories and deploy documentation to osbuild.org.
I know this touches Makefiles and, thus, triggers all our feelings. I tried to document everything, keep crazy features out, and just make sure the make-rules are solid and work under all circumstances. Ask me if anything is unclear.
Lastly, this extends the CI to actually build the man-pages. This will make us catch any formatting errors (or Makefile corruptions) much earlier. Yey!

We now have man page generation both in osbuild.spec and Makefile. How do we make sure they stay in sync? Could we call the make target from osbuild.spec? (Asking because I was wondering the same about make install target in osbuild-composer.)

Yes, the intention was to use make man from the specfile as well. I now implemented it and will append it to the PR.


Failed to update prices - System.ArgumentException: totalHours

Hi,
Likely something lame causing this issue, but I just can't figure out what.
I'm running teslamate and agile on my Synology DS218+ i a docker container. I assume the issue is related to the TimeZone variable or local DS system time somehow?
teslamateagile:
image: mattjeanes/teslamateagile:latest
restart: always
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- TeslaMate__UpdateIntervalSeconds=300
- TeslaMate__GeofenceId=3
- TeslaMate__EnergyProvider=Energinet
- Energinet__Region=DK1 # See below Energinet regions section
- Energinet__Currency=DKK # See below Energinet currencies section
- Energinet__VAT=1.25 # Optional: VAT multiplier. In this example 25%
- Energinet__FixedPrices__TimeZone=Europe/Copenhagen # Optional: IANA (tz database) time zone code, used for below times
- Energinet__FixedPrices__Prices__0=00:00-00:00=1.42 # Fixed Transport
And I get the follow output when starting teslamate manually:
docker-teslamateagile-1  | info: TeslaMateAgile.PriceService[0]
docker-teslamateagile-1  |       Price service is starting
docker-teslamateagile-1  | info: TeslaMateAgile.PriceService[0]
docker-teslamateagile-1  |       Using energy provider Energinet
docker-teslamateagile-1  | info: Microsoft.Hosting.Lifetime[0]
docker-teslamateagile-1  |       Application started. Press Ctrl+C to shut down.
docker-teslamateagile-1  | info: Microsoft.Hosting.Lifetime[0]
docker-teslamateagile-1  |       Hosting environment: Production
docker-teslamateagile-1  | info: Microsoft.Hosting.Lifetime[0]
docker-teslamateagile-1  |       Content root path: /app/
docker-teslamateagile-1  | fail: TeslaMateAgile.PriceService[0]
docker-teslamateagile-1  |       Failed to update prices
docker-teslamateagile-1  |       System.ArgumentException: totalHours (Parameter 'Total hours do not equal 24, currently 0')
docker-teslamateagile-1  |          at TeslaMateAgile.Services.FixedPriceService.GetFixedPrices(FixedPriceOptions options) in /src/TeslaMateAgile/Services/FixedPriceService.cs:line 123
docker-teslamateagile-1  |          at TeslaMateAgile.Services.FixedPriceService..ctor(IOptions1 options) in /src/TeslaMateAgile/Services/FixedPriceService.cs:line 18 docker-teslamateagile-1  |          at TeslaMateAgile.Services.EnerginetService..ctor(HttpClient client, IOptions1 options) in /src/TeslaMateAgile/Services/EnerginetService.cs:line 23
docker-teslamateagile-1  |          at lambda_method1(Closure, IServiceProvider, Object[])
docker-teslamateagile-1  |          at Microsoft.Extensions.Http.DefaultTypedHttpClientFactory1.CreateClient(HttpClient httpClient) docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.HttpClientBuilderExtensions.AddTransientHelper[TClient,TImplementation](IServiceProvider s, IHttpClientBuilder builder) docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.HttpClientBuilderExtensions.<>c__DisplayClass13_02.b__0(IServiceProvider s)
docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context) docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context) docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.b__0(ServiceProviderEngineScope scope)
docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
docker-teslamateagile-1  |          at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
docker-teslamateagile-1  |          at TeslaMateAgile.PriceService.DoWork() in /src/TeslaMateAgile/PriceService.cs:line 57
docker-teslamateagile-1  | info: TeslaMateAgile.PriceService[0]
docker-teslamateagile-1  |       Waiting 300 seconds until next update

Hey, if you only have the one fixed price you can set this natively within the TeslaMate interface under geofences and you don't need TeslaMateAgile.
However if you still want to use it you can try 2 things:

Set the time range to 00:00 - 24:00 (untested)
Add another range e.g. 00:00-12:00 and 12:00-00:00

Hey Matt,
Setting the time range to 00:00 - 24:00 seems to work fine and solved the problem :)
I use the "Energinet__FixedPrices__Prices__0" for the static expenses pr. kWh. To my understanding TesmaMateAgile adds the hourly cost for raw electricity (reported by EnergiNet API) to the FixedPrice.
A quick test seems to (somewhat ish) match up with this.
If I enable the "Logging__LogLevel__Default=Debug" to see the calculations made, where can I find this log?
Thanks for quick reply!

Ah I see! The log goes to stdout so you should be able to view this with the docker logs just like you've posted above

I completely misread your config as I'd just woken up when I saw this 😁 I just saw fixed price and presumed you were using that provider

Well, before the morning coffee (or alike) all mistakes are forgiven! :)
Thanks - I found the logs pr. instructed. I need to do some digging with the EnergiNet numbers vs. my supplier/operators hourly numbers. It's close but no cigar as they say.
Thanks a lot Matt for your assistance! And keep up the good work!

Haha true, okay fantastic! I'm gonna close this issue but let me know if you have any more questions 🙂


Support multiple exit codes

..with more specific error enums.
Still a draft because for the most part this will never return 4 or 5 (IO or Database errors).
Fixes #217.

I don't feel strongly about it, but I'm not too sure about just having Result<..., Error> in methods as it's not too clear what Error type it is (e.g std::io::Error?). Would it maybe make sense to re-export Error from the crate root and use Result<..., crate::Error>? Or maybe name it CliError?
Aside from that, looks good!

redrafted to use crate::Error as suggested!


Search View/Advanced Search/Menuing Updates

Our advanced search listing and fields interface needs to be tweaked and refined.

Important
Before you work on this, make sure you read the following two articles about working UI pull requests for concrete5 version 9:
concrete5 Bedrock: A Foundation for concrete5 and concrete5 Themes
https://documentation.concrete5.org/developers/appendix/concrete5-bedrock-a-foundation-for-concrete5-and-concrete5-themes
Submitting User Interface Pull Requests for concrete5 Version 9
https://documentation.concrete5.org/tutorials/submitting-user-interface-pull-requests-for-concrete5-version-9

Important

All the dialog screenshots here have an older version of the file manager underneath them. Ignore the stuff beneath the dialogs. The only screenshots of the actual file manager/page search/etc... interface that matters are the ones without the dialog boxes over them.
We are removing the right click from the file manager as part of this. Instead you can left click to go to a file detail page (if you're in the dashboard file manager) or click on the menu launcher to launch the menu (see screenshots.)
You will have to extensively work on the search base.js and the file-manager.js files in order to make some of these changes.
A lot of the dialog updates should be pretty easy, because the dialog is already updated with the outer shell in the release/9.0.0 branch.

Some of this is being handled by #8592

A pull request for this is and a lot of file manager rethink is now open here:
https://github.com/concrete5/concrete5/pull/8632


BUG - Shouldn't need to reselect prefilled category

Describe the bug
When adding a tweet link, the category field is automatically populated with the first category created, which is fine (although maybe should be the most recently created category). However, the app doesn't seem to know that and then wants you to select a category again.
To Reproduce
Steps to reproduce the behavior:

Add one or more categories
Add a tweet link
Tap Save
Uh oh alert displays saying you must select a category

Expected behavior

After tapping Save, return to the Category list view. If you then navigate to the category in which you added the link, the linked tweet should display.

Screenshots

Device Info (please complete the following information):

Device: iPhone14 Pro simulator
OS: iOS 16.0
App Version: 1.1?

Additional Context
From discussion with @mikaelacaron, "pretty sure it’s due to iOS 16, cause it used to link you to a new list, and push a new view, but now the context menu instead comes up"

@mikaelacaron Changed my mind... please do assign me, although right now I have no idea how to fix this 😆

No worries! Neither do I 😂

@mikaelacaron looking into this a little, AddURLView() shows the alert when selectedCategory.name is an empty string. I added a print statement to learn a little more. Both that and the "Got single category" print aren't working as expected:
✅ Got single category: nil
✅ Got single category: nil
Picker: the selection "AWSCategory(id: "69D8E3D4-3FC6-4E9C-85B9-9C97C42600B6", name: "", imageName: Optional("folder"), tweets: Optional(Amplify.List<brain_marks.AWSTweet>), categoryThumbnail: nil)" is invalid and does not have an associated tag, this will give undefined results.
Picker: the selection "AWSCategory(id: "69D8E3D4-3FC6-4E9C-85B9-9C97C42600B6", name: "", imageName: Optional("folder"), tweets: Optional(Amplify.List<brain_marks.AWSTweet>), categoryThumbnail: nil)" is invalid and does not have an associated tag, this will give undefined results.

I'm wondering if I should wait until you kill off AWSAmplify and see if that resolves this issue. What do you think?

hmmmm, that's interesting the category name is empty, the model will still look the same as AWSCategory as the new one that I'll be making, but maybe it'll be best to wait until AWS is gone

The category name shouldn't be seen as empty there though (for example, in the screencap above, we see the category name "Education Generally") which makes me wonder if it's better to wait until AWS is gone. If so, may I pick another issue? Sorry for the assigning/unassigning hassle :/

No worries!

I can have a look, if you like


Should Builder methods return self?

In thinking about the ergonomics of the library, would it be nice for Builder methods -- e.g. FileDialogBuilder.set_default_path -- to return self?
This would allow method chaining turning, e.g.
let mut dialog = FileDialogBuilder::new();
dialog.set_title("Pick a file");
let file = dialog.pick_file().await;

into
let file = FileDialogBuilder::new()
    .set_title("Pick a file")
    .pick_file()
    .await;

All builders (I think) are now non-consuming so it's a bit more tricky to do that, we cannot just return Self from methods, since we borrow &mut self.
But I'm thinking we can just make the final method take an &self instead of self since we never need ownership of the builder anyway 🤔 it just feels a bit weird to have the final method of a builder take &self but that's alright I guess

Update, it makes total sense for the final methods of each builder to only take immutable references to the builder bc all the js methods have to clone anyway

Looks much more ergonomic now :)

Merged 😄


Incorrect docs for comparator argument of argrelextrema

In the documentation for scipy.signal.argrelextrema, the comparator argument is described as follows:

comparator : callable
Function to use to compare two data points. Should take 2 numbers as arguments.
[Emphasis added]

In reality, the comparator function must take two arrays, and not two numbers. The documentation should probably reflect this.

Thanks for the report @jbradt. Should be fixed by gh-6608.


Update operating-system-manager (OSM) to v1.3.3

What this PR does / why we need it:

Update operating-system-manager (OSM) to v1.3.3

What type of PR is this?
/kind cleanup
Does this PR introduce a user-facing change? Then add your Release Note here:
NONE

Documentation:
NONE

/assign @kron4eg @ahmedwaleedmalik

/cherry-pick release/v1.7

/retest
/approve
/lgtm


Fix database name case issue

NOTE: Goes in after #1293 Refator token type selection.
Ensure Realm files in the protected area have normalised names (all lower case).
When removing an account, delete all matching files (upper and lower case).
Can lead to multiple databases and false-negatives otherwise.
The wallet will self-correct once this PR goes through, and it resolves some update issues seen previously.

Can't use 'equalsIgnoreCase' because we're dealing with matching between a full path eg /0/data/data/io.stormbird.wallet/files/0x2A4bbC32(...)-db-.xml and an Address eg 0x2a4bbc32(...)


https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage

Request type

[ ] Please close this issue, I accidentally submitted it without adding any details
[ ] New documentation
[x] Correction or update

Details
I'm looking for more information about behavior when multiple listeners is registered, especially in what order they will fire.
Right now, the only info in this regard is:

If you have more than one onMessage listener in the same document, then only one may send a response.

This is consistent with the Chrome documentation.

issue - this means the order in which they will fire is important - but it's not mentioned that it will be in the order they were registered (which would make most sense)
issue - it's not clear what happens to the other listeners - I think the first one that returns a Promise / true or calls sendResponse will stop execution of the other listeners, right?

Acceptance criteria

[ ] onMessage page is updated to clarify what happens when multiple event listeners have been registered.

Thanks! I'm here.

Pinged Tom, Rob, and Luca for advice on the answer to this query.

The whole extensions messaging system is one of the worst API designs I've had the displeasure of working with.
Because of this, we're purposefully not specifying API details missing from Chrome's public docs, as their own implementation and/or docs might change at any point to contradict us, which could introduce incompatibilities we might not be able to address without breaking existing Firefox extensions.
Therefore, the order of listeners invoked is implementation detail, and may change in the future.

issue - it's not clear what happens to the other listeners - I think the first one that returns a Promise / true or calls sendResponse will stop execution of the other listeners, right?

Last time we tested in Chrome (and how we currently implemented in Firefox), this was not the case.  All listeners which received the message could respond, but only the first result was returned to the caller.
...
Our general recommendation, one which might be worth including in our docs, is that extensions generally shouldn't be listening and responding to same kinds of messages in multiple places.

Thanks @zombie for the explanation. It makes sense.
But let's add this info to the docs:

order in which multiple listeners will fire is not guaranteed
make sure only one callback send response - here maybe advice users NOT to use async function as this will always return a Promise which will prevent other listeners to handle the message. This is what cased some hard to find bugs in my addon.

@irenesmith

Maybe we should consider raising that number as well, since we're working on 70.

We probably want to stick to version 60, I understand this to be the current ESR version.

I have added a note to the page:

Avoid creating multiple onMessage listener for the same type of message, as the order in which multiple listeners will fire is not guaranteed. Where you want to guarantee the delivery of a message to a specific end point, use the connection-based approach to exchange messages.

Please let me know if this addresses the issue of further changes are needed. Thank you!

I think that’s fine but listener in the first sentence should be plural.
(Nitpicking, I know)
On Thu, Oct 10, 2019 at 11:53 AM rebloor<EMAIL_ADDRESS>wrote:

I have added a note to the page:
Avoid creating multiple onMessage listener for the same type of message,
as the order in which multiple listeners will fire is not guaranteed. Where
you want to guarantee the delivery of a message to a specific end point,
use the connection-based approach to exchange messages.
Please let me know if this addresses the issue of further changes are
needed. Thank you!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mdn/sprints/issues/1809?email_source=notifications&email_token=AABO6WRMVJ5DTFOYPTX6KTLQN5FYNA5CNFSM4IBT3RE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA43G6Q#issuecomment-540652410,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABO6WWEAI77XXMLUEUT3WLQN5FYNANCNFSM4IBT3REQ
.

Returning a Promise is now preferred as sendResponse will be removed from W3C spec. The popular webextension-polyfill library has already removed the sendResponse function from its implementation.

this seems to be contrary to your suggested change, or am I missing something?

Actually I'm the author of those lines :)
But it's not what I meant. Returning a Promise is totally fine - for the cases when response is expected. But making the whole function async will return Promise every time (!!!) which will prevent other message handlers from responding.
This can happen even if you have only one message handler per context, for example if content script tries to send message to the pop-up script but instead receives empty message from background script.
Maybe not the best example, but there is multiple others (I had an iframe loaded in pop-up which needed communicate with the parent pop-up and it wasn't working because background script was capturing all those messages with its async function.

I think that’s fine but listener in the first sentence should be plural. (Nitpicking, I know)

@irenesmith hardly a nitpick! Thanks for picking up

@icl7126 I am slightly confused by your references to "async function" as I don't think there is such a function in method, do you just mean "while it's behaving asynchronously"? I'm afraid I am struggling to understand what you mean, I'm wondering if it makes the most sense to ask you to suggest any changes needed to the current documentation.

@rebloor sorry for the confusion :)
This is what I mean:
browser.runtime.onMessage.addListener(async (data, sender) => {
  if (data.type === 'handle_me') return 'done';
  // WARNING: this event handler will consume every message it receives, because the function is defined as `async`
});

Whereas:
browser.runtime.onMessage.addListener(data, sender) => {
  if (data.type === 'handle_me') return Promise.resolve('done');
  // no surprises here, this method returns a Promise ONLY when needed
});

Will not consume messages meant for other handlers.
I hope it makes sense now :)

@icl7126 So, at the end of the [addListener syntax](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage#addListener syntax) we could add a warning:
Do not call addListener using the async function, as in:
browser.runtime.onMessage.addListener(async (data, sender) => {
  if (data.type === 'handle_me') return 'done';
});

as the listener will consume every message it receives, effectively blocking all other listeners from receiving and processing messages.
If you want to take an asynchronous approach, use a promise instead, as in:
browser.runtime.onMessage.addListener(data, sender) => {
  if (data.type === 'handle_me') return Promise.resolve('done');
});

@rebloor Yes, sounds good.

@icl7126  I have added the note to the documentation, have all the documentation items on this issue been addressed?

@rebloor yes, thank you for your help!


add moonriver support

closes #896
Depends on :

https://github.com/oceanprotocol/market/pull/898
https://github.com/oceanprotocol/ocean.js/pull/1054
https://github.com/oceanprotocol/ocean.js/pull/1059

Depends on :

https://github.com/oceanprotocol/market/pull/898
https://github.com/oceanprotocol/ocean.js/pull/1054

Just setting as a draft until all deps are fullfiled

Just a note so we don't forget: since Moonriver uses Blockscout-based explorer (and also the other new networks) we have to adapt the logic for the ExplorerLink component as some URL slugs are different between Etherscan-based and Blockscout-based explorers.

Great, so over at our database of networks Moonriver uses the network key wrong (supposed to be mainnet or testnet) https://github.com/ethereum-lists/chains/pull/345 which in the end results for our list in:

So I guess we need to hack in specific detection for moonriver, or we go over to ethereum-lists/chains and fix the source but most likely will take a while

There we go, this is what new users to Ocean Market will see:

But this what returning users will get even if they never touched the network selection, as we save all user preference on first visit in localStorage so they have the old default preference:

If we want to have it preselected in that case too we need to add its to the existing localStorage data so some small data migration so to speak

Not sure if we need a "migration", but just a small picture:  how to activate moonriver

all good, we can approve this


can not use route

route usage is not possible.
error:
time="2023-07-10T07:50:23+02:00" level=error msg="failed to update routes, err: open /proc/sys/net/ipv4/ip_forward: read-only file system" file="engine.go:677"

Managed to get the Netbird version update. Are you still having issues using route?


Expose how user is active

Adds method to determine if user has been explicitly activated, as
opposed to via a percentage or group

This looks like a useful addition, @reneklacan what do you think?

Agree, 👍 ... Thank you!

rollout 2.2.4 including this change has been released

@reneklacan thanks!


How can I flip the axes of a line chart?

Codepen:
https://codepen.io/anon/pen/KjXYKa

What is the behavior you expect?
if i have a line chart with the following data (xaxis numeric, yaxis string/category):

series: [{
    data: [{
        x: 54,
        y: 'Apple'
    }, {
        x: 66,
        y: 'Orange'
    }],
}]

I expect the chart to render the series

What is happening instead?
the chart doesn't render the series.

What error message are you getting?
none

@junedchhipa is this feasible?

Sorry, flipped axis on line chart is not possible currently.
It is not even on the roadmap due to the complexities involved in achieving it.


Custom policy definition metadata with different data types

Issue Template
Prerequisites

[x] I am running the latest version
[x] I checked the documentation and found no answer
[x] I checked to make sure that this issue has not already been filed

Context

When custom policy definition metadata contain different data types, module failes on coealesce function.

Module Version: 2.8.2
Terraform Version:
AzureRM Provider Version:

# add code here
  policy_metadata = {
    version  = "1.0.0"
    category = "Network"
    owner    = "Security"
    alzCloudEnvironments = [
      "AzureCloud",
      "AzureChinaCloud",
      "AzureUSGovernment"
    ]
  }

Expected Behavior

Definition module should handle metadata with different data types correctly.
Current Behavior

Failing on error
Call to function "coalesce" failed: all arguments must have the same type.
Possible Solution

Use try() function instead coelesce() on https://github.com/gettek/terraform-azurerm-policy-as-code/blob/main/modules/definition/variables.tf#L108
Failure Information (for bugs)

Steps to Reproduce

Failure Logs

Hi @jgrexa, did some digging and came across this: https://github.com/hashicorp/terraform/issues/25014
Try updating the locals validation (variables.tf line 108) to the below and try again, let me know if this helps and I'll fix in the next release:
locals {
   metadata     = coalesce(null, var.policy_metadata, try((local.policy_object).properties.metadata, merge({ category = local.category }, { version = local.version })))
}


copier update?

Is your feature request related to a problem? Please describe.
I am a little frustrated that this repository is supposed to be a template, yet the content gets changed by your personal all-repos along with your other repositories.
Describe alternatives you've considered

Add a CI that automatically opens PRs to follow updates easier ?
Provide a way to subscribe your all-repos PRs ?
(If you think this is a hassle then there would be no meaning using copier.)

Additional context
I have already created about 20~30 packages using this template and it is very tedious (and nearly impossible) to run copier update manually for each repository. Thanks in advance
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Are you willing to resolve this issue by submitting a Pull Request?

[ ] Yes, I have the time, and I know how to start.
[ ] Yes, I have the time, but I don't know how to start. I would need guidance.
[ ] No, I don't have the time, although I believe I could do it if I had the time...
[X] No, I don't have the time and I wouldn't even know how to start.

@browniebroke recently brought Cruft to my attention.
It strive to solve the problem you mention.
I've only used it with Cookiecutter templates but i wonder if it
ll work with copier
or perhaps there's a similar tool for copier

I am a little frustrated that this repository is supposed to be a template, yet the content gets changed by your personal all-repos along with your other repositories.

It's a project template for -first and foremost- my own needs, and yes, I change a lot of stuff here as I change it into my other repos. I don't understand why changes made here with (or without) all-repos are preventing running copier update.

If you think this is a hassle then there would be no meaning using copier.

To add to my previous point, I don't really make use of copier update as a number of my repos were either created by hand or generated when this template was still a cookiecutter template (without copier). My intention with changing cookiecutter to copier was to make use of the update feature but I haven't got around to move to that fully yet, and by the sounds of it, it seems like it has some rough edges...

I have already created about 20~30 packages using this template and it is very tedious (and nearly impossible) to run copier update manually for each repository. Thanks in advance

The all-repos tool has a autofix_lib.run(...) which enables you to run any command on all your repos. I'm not sure whether it would work, but have you tried to run it with autofix_lib.run("copier", "update")?
All in all, this is a template for my own needs first and you're free to not use it. Happy to review ideas brought up by the community but at the end of the day, the decision to integrate a feature will come down to whether I'll use it myself. Sorry if this sounds selfish, but I don't intend to support every use case under the sun here.


Getting the left & right coordinates

Using keys such as Control+Shift+mouse, is there a way to draw a box on the graph using mouse (similar to #27), and then when the mouse is released it triggers an event to provide us with the left & right ( and top & bottom) coordinates?
Example:

This is possible through a plugin, refer to https://github.com/maurizzzio/function-plot/blob/master/lib/plugins/definite-integral.js#L37-L62 and the file itself on info on how to implement it, in the lines highlighted after the box is drawn a and b are the left and right coordiantes


feat: Update .editorconfig

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


Schematica Printer not working

first of all great mod
the mod works for my friend and I got him to send me his files for the mod but the printer doesn't work for me but does for him any ideas why?

Are you using it on the same server? Are you able to turn it on at all?

yes we are and the mod loads the schematics just won't print them for me

Does it not work for both of you? Are you on a server? If you are, could you test it in a SP world?

it works for 2 of my friends but not me and I have the config set the same as them too.
We are on ftb infinity evolved server where I am head moderator

Sorted it

What was the issue?


New command: site apppermission add

Usage
site apppermission add [options]
Description
Adds a permission object to a site.
Options

Option
Description

-u, --siteUrl <siteUrl>
The site collection url

-p, --permission <permission>
Permission to site, (read, write or read and write)

-i, --appId [appId]
App Id

-n, --appDisplayName [appDisplayName]
App display name

-o, --output [output]
Output type. json,text. Default text

--verbose
Runs command with verbose logging

--debug
Runs command with debug logging

Remarks
Pass in appId and/or addDisplayName, use both for best performance avoiding the extra lookup
Grah api docs
https://docs.microsoft.com/en-us/graph/api/site-post-permissions?view=graph-rest-1.0&tabs=http
Initial spec discussion: #2169

Let's use -u as the short option for the URL to align with other commands. Other than that we're ready to go. Thank you for the spec! 👏

Hi @waldekmastykarz
Can I work on this?

Please do! Appreciate your help 👏


Stratify the queue by progress

A* is a great search algorithm for routing, but unfortunately in a state search space, it acts too much like a BFS and results in an explosion of states that runs the system out of resources, and even if we did have enough resources, would probably take too long to generate interesting solutions. When the graph gets larger, this problem will only get worse.
One solution to this problem is to prioritize getting solutions not guaranteed to be optimal:

We have a few dedicated threads to taking existing states and looking for greedy solutions, but they are fairly ineffective due to the upper bound.
Our old "score" heuristic took progress into account.
Or we could add more variety to the way in which we select states from the queue.

This idea would involve tracking elements in multiple priority queues in the Queue struct. This could be done via:

Separate queues, aka stratification. We have n queues that are essentially buckets, and elements get distributed to the bucket that corresponds with how many required items they've collected/how many locations they've visited. We can then provide both a standard way to get the element of min estimation, or the next at a particular level. And likely we would have to customize selection of elements for eviction.
Multiple orderings. Internally, the queues would be heaps of indexes into a single vector of elements. Popping the min of any heap would result in the full $O(log\ n)$ heapify, probably not great for performance.

The initial implementation just gets the minimum element at the lowest tier, but this seems to be causing a lot of retrieving from the database once the min element in the lowest tier is old enough. We ought to make the default pop_min and peek_min get the min element from any tier. And possibly we could evict the whole tier into the db.


weight file

Hi guys
Could not load image 'mmod_human_face_detector.dat'.
TGA image type not supported
the weight file for cnn face detector of dlib does not work for me....it just pop up syntax error in the line of code which is situated below the weight file

Fill out the issue template.

I just use this sample age detection script inside which a cnn based face detection run first.... then when I try to execute it gives syntax error.
error occur at this line:
detector = cnn_face_detection_model_v1(args["weight_cnn"]
img_size = 64  ( syntax error cames here when I execute......)
This is the script :
import cv2
import dlib
import numpy as np
from wide_resnet import WideResNet
args = {
"weight": "/home/ame/Downloads/weights.28-3.73.hdf5",
"depth": 16,
"width" : 8,
"margin" : 0.4,
"weight_cnn" : "/home/ame/Downloads/mmod_human_face_detector.dat"
}
def draw_label(image, point, label, font=cv2.FONT_HERSHEY_SIMPLEX,
font_scale=1, thickness=2):
size = cv2.getTextSize(label, font, font_scale, thickness)[0]
x, y = point
cv2.rectangle(image, (x, y - size[1]), (x + size[0], y), (255, 0, 0), cv2.FILLED)
cv2.putText(image, label, point, font, font_scale, (255, 255, 255), thickness)
def main():
cap = cv2.VideoCapture(0)
depth = args["depth"]
k = args["width"]
weight_file = args["weight"]
margin = args["margin"]
detector = cnn_face_detection_model_v1(args["weight_cnn"]
img_size = 64
model = WideResNet(img_size, depth=depth, k=k)()
model.load_weights(weight_file)
while True:
ret, img = cap.read()
if not ret:
raise RuntimeError("Failed to capture image")
input_img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
img_h, img_w, _ = np.shape(input_img)
detected = detector(input_img, 1)
faces = np.empty((len(detected), img_size, img_size, 3))
if len(detected) > 0:
for i, d in enumerate(detected):
x1, y1, x2, y2, w, h = d.left(), d.top(), d.right() + 1, d.bottom() + 1, d.width(), d.height()
xw1 = max(int(x1 - margin * w), 0)
yw1 = max(int(y1 - margin * h), 0)
xw2 = min(int(x2 + margin * w), img_w - 1)
yw2 = min(int(y2 + margin * h), img_h - 1)
cv2.rectangle(img, (x1, y1), (x2, y2), (255, 0, 0), 2)
cv2.rectangle(img, (xw1, yw1), (xw2, yw2), (255, 0, 0), 2)
faces[i, :, :, :] = cv2.resize(img[yw1:yw2 + 1, xw1:xw2 + 1, :], (img_size, img_size))
results = model.predict(faces)
predicted_genders = results[0]
ages = np.arange(0, 101).reshape(101, 1)
predicted_ages = results[1].dot(ages).flatten()
for i, d in enumerate(detected):
label = "{}, {}".format(int(predicted_ages[i]),
"F" if predicted_genders[i][0] > 0.5 else "M")
draw_label(img, (d.left(), d.top()), label)
cv2.imshow("result", img)
key = cv2.waitKey(30)
if key == 27:
break
if name == 'main':
main()

img_size = 64
^
SyntaxError: invalid syntax

Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 699, in runfile
execfile(filename, namespace)
File "/usr/lib/python3/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 88, in execfile
exec(compile(open(filename, 'rb').read(), filename, 'exec'), namespace)
File "/home/ame/Downloads/Zip/Test folder/age-gender-estimation-master/demo.py", line 26
img_size = 64
^
SyntaxError: invalid syntax

Hi davis !!
I think you are not confortable with my question. i am sorry if it was confusing...

Have you tried putting a closing parenthesis at the end of the line that
precedes the detection of the syntax error? This looks like a python
question, nothing to do with dlib.
On Fri, 7 Sep 2018 08:43 3073<EMAIL_ADDRESS>wrote:

Hi davis !!
I think you are not confortable with my question. i am sorry if it was
confusing...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/davisking/dlib/issues/1472#issuecomment-419352677,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AdflWkE2EaQlxOi7-gdfGhazbEszHmamks5uYiOngaJpZM4Wdbwc
.

Thank you !!! I am on to it ...


prometheus-surfboard-exporter: init at 2.0.0

Motivation for this change
Haven't tested the nixos module yet (will try to tomorrow), but I tested running the exporter standalone and a curl of the metric page got me all my surfboard cable modem stats.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

nitpick for commit message:
nixos/prometheus-surfboard-exporter: add service

Looking at the code, doesn't look like it writes any files. Everything is stdout or the http socket opened. I've removed the work dir and private tmp attributes. I also fixed the commit message on service commit to prefix with nixos/

@disassembler I adjusted the commit that adds the module, to work with the new prometheus exporters module (and also rebased this on the current master).

@WilliButz can you open a pull request?

Success on x86_64-linux (full log)
Attempted: prometheus-surfboard-exporter
Partial log (click to expand)
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/x9d90m3pyqsdq73dkrx3iq8yq7p1isqb-surfboard_exporter-2.0.0-bin/bin
patching script interpreter paths in /nix/store/x9d90m3pyqsdq73dkrx3iq8yq7p1isqb-surfboard_exporter-2.0.0-bin
checking for references to /build in /nix/store/x9d90m3pyqsdq73dkrx3iq8yq7p1isqb-surfboard_exporter-2.0.0-bin...
shrinking RPATHs of ELF executables and libraries in /nix/store/xjnikwhsq09fk262pcjfay797wxv67mr-surfboard_exporter-2.0.0
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/xjnikwhsq09fk262pcjfay797wxv67mr-surfboard_exporter-2.0.0
/nix/store/xjnikwhsq09fk262pcjfay797wxv67mr-surfboard_exporter-2.0.0/share/go/src/github.com/ipstatic/surfboard_exporter/after_success.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
checking for references to /build in /nix/store/xjnikwhsq09fk262pcjfay797wxv67mr-surfboard_exporter-2.0.0...
/nix/store/x9d90m3pyqsdq73dkrx3iq8yq7p1isqb-surfboard_exporter-2.0.0-bin

Success on x86_64-darwin (full log)
Attempted: prometheus-surfboard-exporter
Partial log (click to expand)
/private/tmp/nix-build-surfboard_exporter-2.0.0.drv-0/go /private/tmp/nix-build-surfboard_exporter-2.0.0.drv-0
/private/tmp/nix-build-surfboard_exporter-2.0.0.drv-0
post-installation fixup
strip is /nix/store/kdff2gim6417493yha769kh00n63lnrw-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/zbix4n1ipswnya1l7shp67r0d9ipwq53-surfboard_exporter-2.0.0-bin/bin
patching script interpreter paths in /nix/store/zbix4n1ipswnya1l7shp67r0d9ipwq53-surfboard_exporter-2.0.0-bin
strip is /nix/store/kdff2gim6417493yha769kh00n63lnrw-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/qy8ck7rf6prk1zc98p04c1naill576xc-surfboard_exporter-2.0.0
/nix/store/qy8ck7rf6prk1zc98p04c1naill576xc-surfboard_exporter-2.0.0/share/go/src/github.com/ipstatic/surfboard_exporter/after_success.sh: interpreter directive changed from "/bin/bash" to "/nix/store/r8bx3qf1bpncb14i9gzma4vr089pc3pv-bash-4.4-p19/bin/bash"
/nix/store/zbix4n1ipswnya1l7shp67r0d9ipwq53-surfboard_exporter-2.0.0-bin

Success on aarch64-linux (full log)
Attempted: prometheus-surfboard-exporter
Partial log (click to expand)
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/n34lzfiky5aviycxfy5g27azgnrj5qpr-surfboard_exporter-2.0.0-bin/bin
patching script interpreter paths in /nix/store/n34lzfiky5aviycxfy5g27azgnrj5qpr-surfboard_exporter-2.0.0-bin
checking for references to /build in /nix/store/n34lzfiky5aviycxfy5g27azgnrj5qpr-surfboard_exporter-2.0.0-bin...
shrinking RPATHs of ELF executables and libraries in /nix/store/5anw43shi54yjz9x2h8c6xgmfa7xgvna-surfboard_exporter-2.0.0
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/5anw43shi54yjz9x2h8c6xgmfa7xgvna-surfboard_exporter-2.0.0
/nix/store/5anw43shi54yjz9x2h8c6xgmfa7xgvna-surfboard_exporter-2.0.0/share/go/src/github.com/ipstatic/surfboard_exporter/after_success.sh: interpreter directive changed from "/bin/bash" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/bash"
checking for references to /build in /nix/store/5anw43shi54yjz9x2h8c6xgmfa7xgvna-surfboard_exporter-2.0.0...
/nix/store/n34lzfiky5aviycxfy5g27azgnrj5qpr-surfboard_exporter-2.0.0-bin


Use existing pool connection postgresql pg

Hi @tgriesser, I have been using an existing postgres connection in my app with the node module PG, now I'am using Knex, Is there some way to use PG pool?
Tks

Currently there is not. If such a feature is requested, please open a seperate issue.


suspicious DOIs exist that are not redirected by https://doi.org

In trying out all DOIs available in BatLit v0.1 , many redirected, however some did not. In total over 4.2k, and only about 28 DOIs causes a not found (404).

count
status
description

4202
302
temporary redirect

28
404
not found

2
301
permanent redirect

1
000
unknown

@ajacsherman @myrmoteras Please advise on how you'd like to prevent suspicious DOIs to propagate into Zenodo, possibly creating misdirected links .
404	https://doi.org/10.1007/s10393-017-1245-x;
404	https://doi.org/10.11694/pamj.supp.2<IP_ADDRESS>17
404	https://doi.org/10.32032/eid2206.160021
404	https://doi.org/10.1684/vir.2011.0418
404	https://doi.org/10.1371/currents.outbreaks.07992a87522e1f229c7cb023270a2af1
404	https://doi.org/10.1159/isbn.978-3-318-04030-2
404	https://doi.org/10.1644/09-MAMM-A-325.1.Key
404	https://doi.org/10.1002/path
404	https://doi.org/10.1182/blood-2014-02-514745.So
404	https://doi.org/10.1002/A
404	https://doi.org/10.4172/jgb.1000102
404	https://doi.org/10.1128/mBio.00164-10.Editor
404	https://doi.org/10.1371/journal.
000	pone.0200303
404	https://doi.org/10.1261/rna.046011.114.ing
404	https://doi.org/10.3201/eid1706.101355
404	https://doi.org/10.1007/s13398-014-0173-7.2
301	https://doi.org/10.3201/eid0703.010312
404	https://doi.org/10.1038/ncomms2343.Functional
404	https://doi.org/10.1016/j.immuni.2011.06.005.Skin-Resident
404	https://doi.org/10.1002/jcla
301	https://doi.org/10.1172/JCI200423215
404	https://doi.org/10.1128/AEM.70.5.2823
404	https://doi.org/10.1172/32108.of
404	https://doi.org/10.1124/pr.58.3.10.
404	https://doi.org/10.1101/gr.191049.115.Freely
404	https://doi.org/10.1002/pbc
404	https://doi.org/10.2307/2346101
404	https://doi.org/10.1128/CDLI.11.2.344
404	https://doi.org/10.1146/annurev.ecolsys.36.102003.152
404	https://doi.org/10.1124/jpet.105.095976.stic

Some of these links (like https://doi.org/10.1007/s10393-017-1245-x) bring you to the data source. For the ones that are broken links, I would recommend omitting them. Donat?

Can you find where https://doi.org/10.1684/vir.2011.0418 came from? The name of the paper, please?

Would you provide where https://doi.org/10.1159/isbn.978-3-318-04030-2 came from? The citation please?

Searching by the DOI is not producing results. Would you share whatever citations you have associated with these corrupt links?

I was successful with https://doi.org/10.3201/eid0703.010312 [https://doi.org/10.3201%2Feid0703.010312] and https://doi.org/10.11694/pamj.supp.2<IP_ADDRESS>17 [https://doi.org/10.11604/pamj.supp.2<IP_ADDRESS>17] if you need a examples.

@ajacsherman you can use https://refindit.org/ to search for DOI by entering eg the title etc.

Would you provide where https://doi.org/10.1159/isbn.978-3-318-04030-2 has this https://karger.com/books/book/920/Virus-Infections-in-Bats found by searching via google

I don't have the titles associated with the corrupt links

Can you find where https://doi.org/10.1684/vir.2011.0418 came from? The name of the paper, please?

This DOI was part of batlit v0.1, but is no longer present in batlit v0.2 .
v0.1 -
preston ls -anchor hash://sha256/6ba3d79cf1fd6349012cb4e527b6727b3e41e140489fa9c02f132e2cdd88d189\
 | grep hasVersion\
 | grep items?\
 | preston cat\
 | jq -c .[]\
 | grep "10.1684/vir.2011.0418"\
 | jq .

yielded:
{
  "key": "UP3ETFVG",
  "version": 691,
  "library": {
    "type": "group",
    "id": 5435545,
    "name": "Bat Literature Project",
    "links": {
      "alternate": {
        "href": "https://www.zotero.org/groups/bat_literature_project",
        "type": "text/html"
      }
    }
  },
  "links": {
    "self": {
      "href": "https://api.zotero.org/groups/5435545/items/UP3ETFVG",
      "type": "application/json"
    },
    "alternate": {
      "href": "https://www.zotero.org/groups/bat_literature_project/items/UP3ETFVG",
      "type": "text/html"
    }
  },
  "meta": {
    "createdByUser": {
      "id": 6296343,
      "username": "deeannreeder",
      "name": "",
      "links": {
        "alternate": {
          "href": "https://www.zotero.org/deeannreeder",
          "type": "text/html"
        }
      }
    },
    "creatorSummary": "Talbi and Bourhy",
    "parsedDate": "2011-09-01",
    "numChildren": 1
  },
  "data": {
    "key": "UP3ETFVG",
    "version": 691,
    "itemType": "journalArticle",
    "title": "Dog rabies in Africa through genetic, spatial and temporal analysis of the isolates",
    "creators": [
      {
        "creatorType": "author",
        "firstName": "Chiraz",
        "lastName": "Talbi"
      },
      {
        "creatorType": "author",
        "firstName": "Herve",
        "lastName": "Bourhy"
      }
    ],
    "abstractNote": "This work illustrates the studies that have provided a better understanding of the genetic and geographic structure of dog rabies virus and the dynamics of rabies in domestic dogs in Africa, the second largest continent most affected by this disease. These investigations are a key element to control the disease and identify effective strategies for eliminating rabies locally, nationally as well as internationally and could drastically reduce human deaths caused by this disease. They also allow for the first time the investigation of the role of humans in the canine rabies virus spreading.",
    "publicationTitle": "Virologie",
    "volume": "15",
    "issue": "",
    "pages": "307-318",
    "date": "September 1, 2011",
    "series": "",
    "seriesTitle": "",
    "seriesText": "",
    "journalAbbreviation": "Virologie",
    "language": "",
    "DOI": "10.1684/vir.2011.0418",
    "ISSN": "",
    "shortTitle": "",
    "url": "",
    "accessDate": "",
    "archive": "",
    "archiveLocation": "",
    "libraryCatalog": "ResearchGate",
    "callNumber": "",
    "rights": "",
    "extra": "",
    "tags": [],
    "collections": [
      "DZKBQXJR"
    ],
    "relations": {
      "owl:sameAs": "http://zotero.org/groups/2719577/items/5VD54MKG"
    },
    "dateAdded": "2024-03-07T00:46:26Z",
    "dateModified": "2024-03-07T00:46:26Z"
  }
}

Would you provide where https://doi.org/10.1159/isbn.978-3-318-04030-2 came from? The citation please?

also exists in v0.1, but not in v0.2
preston ls --anchor hash://sha256/6ba3d79cf1fd6349012cb4e527b6727b3e41e140489fa9c02f132e2cdd88d189 | grep hasVersion | grep items? | preston cat | jq -c .[] | grep "10.1159/isbn.978-3-318-04030-2" | jq .

yielded
{
  "key": "GELIBCEP",
  "version": 608,
  "library": {
    "type": "group",
    "id": 5435545,
    "name": "Bat Literature Project",
    "links": {
      "alternate": {
        "href": "https://www.zotero.org/groups/bat_literature_project",
        "type": "text/html"
      }
    }
  },
  "links": {
    "self": {
      "href": "https://api.zotero.org/groups/5435545/items/GELIBCEP",
      "type": "application/json"
    },
    "alternate": {
      "href": "https://www.zotero.org/groups/bat_literature_project/items/GELIBCEP",
      "type": "text/html"
    }
  },
  "meta": {
    "createdByUser": {
      "id": 6296343,
      "username": "deeannreeder",
      "name": "",
      "links": {
        "alternate": {
          "href": "https://www.zotero.org/deeannreeder",
          "type": "text/html"
        }
      }
    },
    "creatorSummary": "Sulkin and Allen",
    "parsedDate": "1974",
    "numChildren": 0
  },
  "data": {
    "key": "GELIBCEP",
    "version": 608,
    "itemType": "journalArticle",
    "title": "Virus infections in bats",
    "creators": [
      {
        "creatorType": "author",
        "firstName": "S E",
        "lastName": "Sulkin"
      },
      {
        "creatorType": "author",
        "firstName": "R",
        "lastName": "Allen"
      }
    ],
    "abstractNote": "",
    "publicationTitle": "Monographs in virology",
    "volume": "8",
    "issue": "0",
    "pages": "1-103",
    "date": "1974",
    "series": "",
    "seriesTitle": "",
    "seriesText": "",
    "journalAbbreviation": "",
    "language": "",
    "DOI": "10.1159/isbn.978-3-318-04030-2",
    "ISSN": "0077-0965",
    "shortTitle": "",
    "url": "",
    "accessDate": "",
    "archive": "",
    "archiveLocation": "",
    "libraryCatalog": "",
    "callNumber": "",
    "rights": "",
    "extra": "PMID: 4367453\nISBN: 0077-0965 (Print) 0077-0965 (Linking)",
    "tags": [],
    "collections": [
      "DZKBQXJR"
    ],
    "relations": {
      "owl:sameAs": "http://zotero.org/groups/2446996/items/L845NLV5"
    },
    "dateAdded": "2024-03-06T17:28:04Z",
    "dateModified": "2024-03-06T17:28:04Z"
  }
}

however, no such record was found in v0.2.
@ajacsherman curious to hear why this record no longer exists. . .

I was successful with https://doi.org/10.3201/eid0703.010312 [https://doi.org/10.3201%2Feid0703.010312] and https://doi.org/10.11694/pamj.supp.2<IP_ADDRESS>17 [https://doi.org/10.11604/pamj.supp.2<IP_ADDRESS>17] if you need a examples.

Hey @ajacsherman - thanks for sharing  your examples.
From what I can tell, the suspicious DOIs that you could no longer find have been deleted from the Zotero group somehow.
This is consistent with finding 10.3201/eid0703.010312 in v0.2 as well as in v0.1.
preston ls --algo md5 --anchor hash://md5/be692b93a8edde4c4269be9e7d4ec1d7 | grep hasVersion | grep items? | preston cat | jq -c .[] | grep "10.3201/eid0703.010312" | jq .

{
  "key": "UNPAII9M",
  "version": 405,
  "library": {
    "type": "group",
    "id": 5435545,
    "name": "Bat Literature Project",
    "links": {
      "alternate": {
        "href": "https://www.zotero.org/groups/bat_literature_project",
        "type": "text/html"
      }
    }
  },
  "links": {
    "self": {
      "href": "https://api.zotero.org/groups/5435545/items/UNPAII9M",
      "type": "application/json"
    },
    "alternate": {
      "href": "https://www.zotero.org/groups/bat_literature_project/items/UNPAII9M",
      "type": "text/html"
    },
    "attachment": {
      "href": "https://api.zotero.org/groups/5435545/items/6GC4864A",
      "type": "application/json",
      "attachmentType": "application/pdf",
      "attachmentSize": 76993
    }
  },
  "meta": {
    "createdByUser": {
      "id": 6296343,
      "username": "deeannreeder",
      "name": "",
      "links": {
        "alternate": {
          "href": "https://www.zotero.org/deeannreeder",
          "type": "text/html"
        }
      }
    },
    "creatorSummary": "Yob et al.",
    "parsedDate": "2001-06",
    "numChildren": 2
  },
  "data": {
    "key": "UNPAII9M",
    "version": 405,
    "itemType": "journalArticle",
    "title": "Nipah virus infection in bats (order Chiroptera) in peninsular Malaysia",
    "creators": [
      {
        "creatorType": "author",
        "firstName": "J. M.",
        "lastName": "Yob"
      },
      {
        "creatorType": "author",
        "firstName": "H.",
        "lastName": "Field"
      },
      {
        "creatorType": "author",
        "firstName": "A. M.",
        "lastName": "Rashdi"
      },
      {
        "creatorType": "author",
        "firstName": "C.",
        "lastName": "Morrissy"
      },
      {
        "creatorType": "author",
        "firstName": "B.",
        "lastName": "van der Heide"
      },
      {
        "creatorType": "author",
        "firstName": "P.",
        "lastName": "Rota"
      },
      {
        "creatorType": "author",
        "firstName": "A.",
        "lastName": "bin Adzhar"
      },
      {
        "creatorType": "author",
        "firstName": "J.",
        "lastName": "White"
      },
      {
        "creatorType": "author",
        "firstName": "P.",
        "lastName": "Daniels"
      },
      {
        "creatorType": "author",
        "firstName": "A.",
        "lastName": "Jamaluddin"
      },
      {
        "creatorType": "author",
        "firstName": "T.",
        "lastName": "Ksiazek"
      }
    ],
    "abstractNote": "Nipah virus, family Paramyxoviridae, caused disease in pigs and humans in peninsular Malaysia in 1998-99. Because Nipah virus appears closely related to Hendra virus, wildlife surveillance focused primarily on pteropid bats (suborder Megachiroptera), a natural host of Hendra virus in Australia. We collected 324 bats from 14 species on peninsular Malaysia. Neutralizing antibodies to Nipah virus were demonstrated in five species, suggesting widespread infection in bat populations in peninsular Malaysia.",
    "publicationTitle": "Emerging Infectious Diseases",
    "volume": "7",
    "issue": "3",
    "pages": "439-441",
    "date": "2001 May-Jun",
    "series": "",
    "seriesTitle": "",
    "seriesText": "",
    "journalAbbreviation": "Emerging Infect. Dis.",
    "language": "eng",
    "DOI": "10.3201/eid0703.010312",
    "ISSN": "1080-6040",
    "shortTitle": "",
    "url": "",
    "accessDate": "",
    "archive": "",
    "archiveLocation": "",
    "libraryCatalog": "PubMed",
    "callNumber": "",
    "rights": "",
    "extra": "PMID: 11384522\nPMCID: PMC2631791",
    "tags": [
      {
        "tag": "Animals",
        "type": 1
      },
      {
        "tag": "Antibodies, Viral",
        "type": 1
      },
      {
        "tag": "Chiroptera",
        "type": 1
      },
      {
        "tag": "Malaysia",
        "type": 1
      },
      {
        "tag": "Paramyxoviridae Infections",
        "type": 1
      },
      {
        "tag": "Paramyxovirinae",
        "type": 1
      },
      {
        "tag": "Seroepidemiologic Studies",
        "type": 1
      }
    ],
    "collections": [
      "DZKBQXJR"
    ],
    "relations": {
      "owl:sameAs": "http://zotero.org/groups/2446996/items/PAA8W8JH"
    },
    "dateAdded": "2024-03-06T17:26:09Z",
    "dateModified": "2024-03-06T17:26:09Z"
  }
}

@ajacsherman so, as far as I can tell, if you can't find suspicious DOIs via Zotero, they have been either removed or updated.
Please note that doi 10.3201/eid0703.010312 made it to the list, because they had a 301 redirect instead of an expected 302 redirect. In other words, the doi url https://doi.org/10.3201/eid0703.010312 did redirect, only with an unusual redirect code 301.
Please holler if you'd like me to clarify by voice chat, happy to do so.
If you managed to get through all suspicious DOIs for this issue #5 , please feel free to close this issue.
Thanks for all your careful curation work.

Good morning, I was replacing the DOIs I could find that were problematic. If I can't find the links you provided, I assume I have fixed them.  I should have kept a list of the ones I edited.

@ajacsherman Thanks for your efforts. Does that also include the DOIs in #4 ? For some reason, the #4 reference to a DOI value associated with https://www.zotero.org/groups/5435545/bat_literature_project/items/2WK8GVE9 didn't change yet.
I'd be happy to re-run the check for the v0.3 release of batlit. Please let me know when would be a good time to run.
Alternatively, I can re-run the DOI check on batlit v0.2 and include the links to their associated Zotero records.
Please let me know what works best for you.

Here's a list of some of the 404 (not redirected DOIs) and their associated Zotero URLs.

suspicious doi
Zotero record URL

10.1371/journal. pone.0200303
https://www.zotero.org/groups/bat_literature_project/items/TE5RIWRU

10.1007/s10393-017-1245-x;
https://www.zotero.org/groups/bat_literature_project/items/ZUHUHEHZ

10.11694/pamj.supp.2<IP_ADDRESS>17
https://www.zotero.org/groups/bat_literature_project/items/RDMWKGTG

10.32032/eid2206.160021
https://www.zotero.org/groups/bat_literature_project/items/4A7PYESU

10.1371/currents.outbreaks.07992a87522e1f229c7cb023270a2af1
https://www.zotero.org/groups/bat_literature_project/items/JT3HBLUQ

10.1644/09-MAMM-A-325.1.Key
https://www.zotero.org/groups/bat_literature_project/items/LL5T2AXJ

10.1002/jcla
https://www.zotero.org/groups/bat_literature_project/items/MMJLU8M9

@ajacsherman happy to hear that the list of 404 DOIs and their associated Zotero links helped.
There's the other list with likely malformed DOIs also in related issue at #4 . Did you include these in addition to the DOIs that did not resolve?

We can always catch others in the next review. . . I am sure that many things have changed. I see these reviews like maintaining a garden . . . always weeds to be pulled, plants to be cared for, and new plants to be planted.

I love this analogy!

closing this issue to make room for fresh doi review.


AssertionError: Torch not compiled with CUDA enabled

Describe the bug
Using the pre-trained model for inference on a CPU machine. It's a GPU-trained model and I am assuming it should work on a CPU machine if I change the device to cpu. I did change the device to cpu in inference.py and I am getting this error
Reproduction

What command or script did you run?

python /cbn/CBNetV2/demo/image_demo.py /cbn/1.jpg /cbn/CBNetV2/cascade_mask_rcnn_cbv2_swin_small_patch4_window7_mstrain_400-1400_adamw_3x_coco.py /cbn/CBNetV2/cascade_mask_rcnn_cbv2_swin_small_patch4_window7_mstrain_400-1400_adamw_3x_coco.pth

Did you make any modifications on the code or config? Did you understand what you have modified?
changed the device = CPU in inference.py

Environment

Please run python mmdet/utils/collect_env.py to collect necessary environment information and paste it here.

fatal: not a git repository (or any of the parent directories): .git
sys.platform: linux
Python: 3.8.10 (default, Jun 23 2021, 15:19:53) [GCC 8.3.0]
CUDA available: False
GCC: gcc (Debian 8.3.0-6) 8.3.0
PyTorch: 1.9.0+cpu
PyTorch compiling details: PyTorch built with:
  - GCC 7.3
  - C++ Version: 201402
  - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v2.1.2 (Git Hash 98be7e8afa711dc9b66c8ff3504129cb82013cdb)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.9.0, USE_CUDA=0, USE_CUDNN=OFF, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=ON, USE_OPENMP=ON,

TorchVision: 0.10.0+cpu
OpenCV: 4.5.3
MMCV: 1.3.14
MMCV Compiler: GCC 8.3
MMCV CUDA Compiler: not available
MMDetection: 2.14.0+

You may add addition that may be helpful for locating the problem, such as

this is inside a docker container, installed CPU version of torch
is it possible to use GPU model in a CPU machine for inference?

Error traceback
Traceback (most recent call last):
  File "/cbn/CBNetV2/demo/image_demo.py", line 49, in <module>
    main(args)
  File "/cbn/CBNetV2/demo/image_demo.py", line 27, in main
    model = init_detector(args.config, args.checkpoint, device=args.device)
  File "/cbn/CBNetV2/mmdet/apis/inference.py", line 51, in init_detector
    model.to(device)
  File "/home/demo/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 852, in to
    return self._apply(convert)
  File "/home/demo/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 530, in _apply
    module._apply(fn)
  File "/home/demo/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 530, in _apply
    module._apply(fn)
  File "/home/demo/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 530, in _apply
    module._apply(fn)
  [Previous line repeated 2 more times]
  File "/home/demo/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 552, in _apply
    param_applied = fn(param)
  File "/home/demo/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 850, in convert
    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
  File "/home/demo/.local/lib/python3.8/site-packages/torch/cuda/__init__.py", line 166, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

@CharlesNJ It's ok. You need to specify the device as the CPU, and some algorithms do not support cpu inference, you can refer to https://github.com/open-mmlab/mmdetection/blob/master/docs/get_started.md#install-without-gpu-support

I have not seen Cascade Mask Rcnn in the list, so I am assuming it should work. Would you help me understand what am I missing that I am getting this error, please?

Hello,
I am facing similar issue. I want to inference my GPU trained cascade mask rcnn model on CPU but could not understand how to do it.
Here is my enviroment.
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
sys.platform: linux
Python: 3.7.12 (default, Jan 15 2022, 18:48:18) [GCC 7.5.0]
CUDA available: False
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.10.2+cpu
PyTorch compiling details: PyTorch built with:

GCC 7.3
C++ Version: 201402
Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
Intel(R) MKL-DNN v2.2.3 (Git Hash 7336ca9f055cf1bfa13efb658fe15dc9b41f0740)
OpenMP 201511 (a.k.a. OpenMP 4.5)
LAPACK is enabled (usually provided by MKL)
NNPACK is enabled
CPU capability usage: AVX2
Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.10.2, USE_CUDA=0, USE_CUDNN=OFF, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=ON, USE_OPENMP=ON,

TorchVision: 0.11.3+cpu
OpenCV: 4.1.2
MMCV: 1.4.4
MMCV Compiler: GCC 7.5
MMCV CUDA Compiler: not available
MMDetection: 2.20.0+ff9bc39
I also tried to open the link provided above but it says Page Not Found.
Please help me out regarding this
Thanks in advance


fixed the collector online/offline bug in zookeeper

The commit code in ClusterZKDataMonitor's 'process' method,fixed the collector online/offline bug. By 'client.getChildren(event.getPath(), true);', collector can't get the deleted node. In fact,ClusterZKDataMonitor listening zookeeper 'onNodeChanged' event by use 'if (listeners.containsKey(event.getPath()))'.

Coverage remained the same at 17.583% when pulling b61f590dcb4da2da2ea37504be29f3aa4bf30ae3 on zhangkewei:dev/3.2.1 into 7834d7bdb934fb3ca48c2465318661a885ddcb7b on wu-sheng:dev/3.2.1.


[CWA vs. Luca]: Promotion of the CWAs "Check-in" functionality ...

Hello, everyone,
We have many entries here that ask whether the CWA can scan Luca codes, under what conditions, etc. - with links to the corresponding FAQs. For example here: https://github.com/corona-warn-app/cwa-documentation/issues/719#issuecomment-964021259.
Due to the 'new political will' (https://github.com/corona-warn-app/cwa-wishlist/issues/352#issuecomment-973107941) to rely more on the CWA (because some problems with Luca were recognized / contracts expire / etc.), from my point of view it would be desirable to use the check-in functionality and the creation of corresponding QR codes in particular to actively promote for gastronomy / event organizers etc.
And, although generating the (own) check-in QR codes seems easy to me, maybe putting a small video (if it doesn't already exist) online or something similar.
I could imagine that many are not even familiar with the CWA's "Check-In" functionality.
And that for many there is an inner hurdle, now, according to Luca, to create a new QR code 'again', to have to worry again, to have to 'familiarize' again, to research ... and as a result, not knowing whether that will work.
I would like to see my proposal not only limited to 'organizers' (events, gastronomy, ...), but also to be extended to doctors, practices, health-related / health-near services, etc. (see below).
Expected Benefits
To initiate and facilitate the change from Luca to CWA's "Check-In", which is also desirable for many reasons (security, privacy, (contract-) costs, etc.).
Summarized benefit with the CWA:
Everyone who goes to a practice, to their doctor or who uses 'body-near services' should be able to log in at the practice entrance using the CWA Check-In.
In order to also record infections in these areas / places via CWA 'people in one place at the same time'. For their own health and well-being, but also for those working on site! And last but not least, contain the corona pandemic!
With that in mind, please more publicly viewable advertisements or whatever with that purpose.
Joachim.

I would like to extend my above post regarding "Marketing for the CWA" and its check-in functionality to other professional groups. Namely, for example, to doctors, practices and others working in the health system.
As I already described here (5th paragraph), practice employees - here in a hospital - were not at all interested in the patient's vaccination status. Current experiences with two practices, one in the jaw area (operations etc.) and an ear, nose and throat practice also show no interest, no controls, and even a lack of inquiries.
Yes, it can be the case that 'you have to treat patients anyway', which seems to make a corresponding control superfluous. But we currently have 7-day incidences of over 1,000! And the impression that is still conveyed from the health system is: It can't be that bad if even doctors, practices, etc. do not carry out any checks.
Based on the already existing Check-In functionality of the CWA and the fact that people can also be warned who were simply in the same place at the same time - e.g. in the doctor's waiting room - I would like to urgently encourage, and even demand, that The check-in function of the CWA must also be used here in practices. This, too, obviously requires marketing; you could also say: almost only marketing.
At the same time, I would like to suggest a revision on the CWA main screen under “Are you planning an event?” Which formulates the focus of “Event” (= organizer) in a much more general way, so that it becomes clear that this is where all the places where people come together are meant. Of course, the heading would also have to be changed.
The medical professional representatives, the RKI, politics, etc. should of course also be on board!
(I could imagine Karl Lauterbach, for example, could be helpful.)

PS:
If we are now also thinking about a general vaccination requirement in Germany - but at least for certain professional groups / fields of activity / places of activity etc. - wouldn't it be even more appropriate to use the existing CWA “Check-In” in areas beyond pure event “Check-In”? (See above textual, but probably still incomplete, proposed amendment.)
Because the advantage of the CWA “Check-In” is the possible detection and “increased risk” warning when people were in one place, at the same time or at different / overlapping times (aerosol transmission and infection possibilities, even if the virus emitter is no longer on site) and a positive corona test was later carried out in this group of people.
If we are convinced of the benefits of the CWA and its "Check-In" functionalities, then we have to expand and enable these "Check-Ins" to all relevant areas as quickly as possible in order to get the greatest possible benefit - not just sometime in the future! In particular, but not only, at times of large-scale 7-day incidences of over 1,000 and daily new infections of over 70,000 and corresponding death rates.
In this context I would like to say thank you to the developers of the CWA and the associated team (including the posters here on GitHub). At the same time, knowing that nobody will be bored here, I personally consider nevertheless the above text adjustments to be urgently required. Simply to make the "Check-In" functionality and its possibilities clear on the side of the CWA main screen and to encourage its use.

(Sorry, but this topic, the wasted opportunities and all the trappings are really annoying to me. And I am not directly or indirectly affected by Corona disease. But when we are already moving patients to other federal states with the rescue services and air force then I don't know what still has to happen in order to consistently use even the smallest, already existing, options.
And think not only of the patients, but also of doctors, nurses, ..., in short, of everyone working in the healthcare system, some of whom have been working at their limits for round about 1¾ years. Not to mention those affected by Covid, their relatives and dead. I also leave out economic aspects here.
And whoever thinks today that the pandemic will end in the foreseeable future, one can only wish that they are right. However, the chances of this are rather bad, because new variants are already on the rise and whether the hope that the virus will die itself will be fulfilled, is, like many things currently, unfortunately just a wish.)

In this sense.


Support Minio module as integration

Summary
Minio module should be installed from integrations
Motivation
Minio stack is heavy. so if user doesn't want minio module then stack installation should be optional
Proposal
minio should be installed from integrations whenever user needs.
AB#212

Duplicate of #2265


Test Issue created at Fri, 21 Jan 2022 02:19:30 GMT

Test issue body  Fri, 21 Jan 2022 02:19:30 GMT

Comment on issue at Fri, 21 Jan 2022 02:19:32 GMT


Just do "Get Gelocation id" one time, not on every Iteration-Cyrcle

The new API limits the Calls to 50/day. So we need to be sparing with the requests. the geolocation id actually only needs to be read the first time for requesting the forecasts. After that, the value can be used again for each forecast request.

I wanted to write a new issue, but this one I think this explains the behaviour i wanted to report:

Hi @cdellasanta
Per iteration cycle I did 3 requests:

getToken
get geolocationId (is needed for getting forecast)
get forecast (delivers the final forecast)

So I do 3 calls per iteration. Where I assume that the "getToken" call is not really counted as a request.
I did a fix today. now the geolocation id is read only 1x and reused afterwards. So in the actual version (current master branch in Github) 49 forecast calls should be possible. I am currently testing this and, if successful,  I will make a new release 0.9.1.

resolved with release 0.9.1