Karate removing slash at end of URI for POST methods in Rest API, Can framework allow slash (/) at end of URI.

When using POST method in Rest API in Karate, karate by default removes the last slash(/) if it exists at end of the URI.
It would be better to make it optional as few development framework like Django requires slash at end of the URI. In Django without / at the end throws 405 error.
If / is added at the end the am getting the right response when using in other tools such as postman.

read the last part of https://github.com/karatelabs/karate/issues/1561 - if you have a slash at the end of the url it will be retained, maybe not path. make sure you are on the latest version.

@ptrthomas thanks for your reply, Karate adding a slash at end of url if it is missed but removing slash from the path if it exists. example: '/payment/' karate sends the request as '/payment'. It would be better if Karate does not remove the slash at end of path if added by user. As this is throwing error in some development framework. Please let me know if there is any workaround.

@KannanPSomeswaran my opinion is given in the other thread and you can see a lot of discussion and work has happened on this. I'm considering this as a wontfix you are welcome to contribute a PR and make sure none of the existing tests / functionality is broken. I also personally consider that if a server can't handle a missing slash, that the server is at fault

I'm reopening this, and will implement that if the last path is a forward-slash, it will be appended.  cc @hlemmur

done. I think this is a decent solution + compromise. if the last path is a '/', it will be preserved

1.2.0 released

Hi ,
it seems that the problem is still there:
I am testing karate-gatling v1.2.0 and  a feature contain the following line
Given path 'aerodatamanager/available-aeronautical-dates/
When I run the test
I got an error because the URI was missing the final slash
/aerodatamanager/available-aeronautical-dates
Is there any way to keep the final slash?
Andres

@andresghelarducci please read this https://github.com/karatelabs/karate#path

Hello @ptrthomas,
Regarding Given path 'documents', '/' in Django
Unfortunately, this approach is not working for POST requests in Karate 1.4.0 version.
Could you review and fix this please?

@de147 works fine for me. so follow this process please: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue


[DNM] This is a test PR to trigger CI

Summary
This is a test PR to trigger CI.
Related Issue
None
Changes
bunx npm-check-updates -u && bun install

Testing
I will confirm that GitHub Actions is working correctly.
Other Information

I will confirm that GitHub Actions is working correctly.

OK ✅  0e412fef73e062a2705706f346ec77491522c381


"Toggle Rotate Character In Emote"Setting Not work

No matter how I set the “Toggle Rotate Character in Emote”, I have to hold down ALT to rotate the character.

Oh, thank you for bringing this up. This was on my list to do for one of my recent updates, but I ended up forgetting about it. I'll try to get this added back in soon. Thanks!

Okay, so I feel like I remember this not working for me earlier, but it's working for me now, for whatever reason.
When you set this option to toggle in the config, does the control tips on the top right say "hold" or "toggle"?

The tips is "toggle".When I press Alt once, I can rotate the character, but when I press it again, it doesn’t work, which is different from the previous logic.

I still couldn't replicate your specific issue, but I did run into another issue that could be related. I fixed this and updated the mod to 2.1.12.
Could you test this version and let me know if your issue is fixed?

https://github.com/cmooref17/Lethal-Company-TooManyEmotes/assets/85931842/ffd79eae-2cb9-4fe6-8366-970554a672f1
In the video, I pressed ALT instead of holding it down, maybe this is normal? It’s just different from before, as I used to be able to rotate the character in the emote directly without pressing ALT.

What should happen, is when you emote, you can move and turn. If you press and release alt once, it will not let you turn your character anymore. If you press and release alt again, it should let you turn your character again.
Is this not what's happening in the video?

Sorry, I misunderstood before, but now I understand now


nativescript-stripe still broken

The nativescript-stripe plugin is still broken and missing some changes that I made to the @funder7 branch.
_getAuthenticationDelegate() is returning the incorrect delegate and CreditCardView get card() is missing a call to init().
Please see the following commits:
https://github.com/toby-wollit/nativescript-stripe/commit/863e48faf5291166886d5a0b46a7d7d69c8d1cd8
https://github.com/toby-wollit/nativescript-stripe/commit/a36e17a43b065083d1c855086af799a5df764e47

Nice catch on the delegate I think the moved some stuff in the latest version
it's called cardParams now

@triniwiz I just merged @toby-wollit 's PR, if you need to import those changes

@funder7 added an released


Prepare for additional sensors

Add usage of "ENABLE" type refgisters to check if a register is in used by the stove model (and not only a "brand generic register".
Helpfull to not create sensor and other entities not available on the stove.

I’m currently on vacation, so cannot check, but have you found any case where the enable register is actually useful?
I found that either the register is there and it is enabled (even when my stove doesn’t have the feature), or the register is just not there. That makes checking this enable register useless.

If found many of them on my Nobis stove :
thermostat_contact_1_enable / thermostat_contact_1_get
"thermostat_contact_1_enable": {           "app_image_name": "default",           "reg_key": "thermostat_contact_1_enable",           "reg_name": "Termostato contatto DX visibile",           "reg_name_app": "Termostato DX Enable",           "reg_key_group": "thermostat_contact_1",           "reg_type": "ENABLE",           "offset": 105,           "eeprom": false,           "is_word": true,           "big_endian": false,           "formula": "#/1024",           "formula_inverse": "#*1024",           "format_string": "{0}",           "set_min": 0,           "set_max": 1,           "readonly": false,           "mask": 1024,           "is_hex": false,           "is_temperature": false,           "use_app": true,           "display_dashboard": false,           "display_manage": false,           "display_info": false,           "use_cat": true,           "display_order": 0,           "step": 1,           "use_history": true,           "use_history_output": true,           "with_sign": false,           "from_char_code": false,           "notify_on_change": false,           "is_test": false,           "value_raw": "0",           "value": 0         },
vent_rear_enable / vent_rear_set :
        "vent_rear_enable": {           "app_image_name": "default",           "reg_key": "vent_rear_enable",           "reg_name": "Vent. Rear Enable",           "reg_name_app": "Vent. Rear. Enable",           "reg_key_group": "vent_rear",           "reg_type": "ENABLE",           "offset": 107,           "eeprom": false,           "is_word": true,           "big_endian": false,           "formula": "#/16",           "formula_inverse": "#*16",           "format_string": "{0}",           "set_min": 0,           "set_max": 1,           "readonly": false,           "mask": 16,           "is_hex": false,           "is_temperature": false,           "use_app": true,           "display_dashboard": false,           "display_manage": false,           "display_info": false,           "use_cat": true,           "display_order": 0,           "step": 1,           "use_history": true,           "use_history_output": true,           "with_sign": false,           "from_char_code": false,           "notify_on_change": false,           "is_test": false,           "value_raw": "0",           "value": 0         },

I have a doubt on a specifi register :
real_wood_power_enable / real_wood_power_get
I have an hybrid Unica 10 (wood/pellet), And real_wood_power_enable is currently set as DISABLE. I fear it switch only switch to ENABLE once wood fire have been dectected. In this case it will not detected at the init.
But it's easy to solve by note providing an enable_key. There may be the risk to creat the real_power_wood_get entity on a non-wood stove, but I need diagnosis from another Nobis pellet-only stove to compare if this register is present on pellet-only stove.
And in worst case, the entity could still be deactivated by user.

I've added a commit to check if the "enable_key" register exist. If not, the enable_key is ignored and the entity created. Usefull if not all brand/models use sames "optionnals" parameters...

I also found that the value of an enable register is not always 0 or 1. This needs a bit more investigation.
        "temp_air_palm_enable": {
          "app_image_name": "default",
          "reg_key": "temp_air_palm_enable",
          "reg_name": "T. Amb. Palmare Enable",
          "reg_name_app": "Temp. Palm. Enable",
          "reg_key_group": "temp_air_palm",
          "reg_type": "ENABLE",
          "offset": 1,
          "eeprom": false,
          "is_word": false,
          "big_endian": false,
          "formula": "#",
          "formula_inverse": "#",
          "format_string": "{0}",
          "set_min": 0,
          "set_max": 255,
          "readonly": false,
          "mask": 65535,
          "is_hex": false,
          "is_temperature": false,
          "use_app": false,
          "display_dashboard": false,
          "display_manage": false,
          "display_info": false,
          "use_cat": true,
          "display_order": 0,
          "step": 1,
          "use_history": true,
          "use_history_output": true,
          "with_sign": false,
          "from_char_code": false,
          "notify_on_change": false,
          "is_test": false,
          "value_raw": "43",
          "value": 43
        },

There is also entries with enable values specified.
        "canalization_1_temp_air_enable": {
          "app_image_name": "default",
          "reg_key": "canalization_1_temp_air_enable",
          "reg_name": "Canalizzazione 1 Temperatura aria visibile",
          "reg_name_app": "Can. 1 Temp.",
          "reg_key_group": "canalization_1_temp_air",
          "reg_type": "ENABLE",
          "offset": 32817,
          "eeprom": true,
          "is_word": false,
          "big_endian": false,
          "formula": "#",
          "formula_inverse": "#",
          "format_string": "{0}",
          "set_min": 0,
          "set_max": 2,
          "readonly": false,
          "mask": 65535,
          "is_hex": false,
          "is_temperature": false,
          "use_app": true,
          "display_dashboard": false,
          "display_manage": false,
          "display_info": false,
          "use_cat": true,
          "display_order": 35,
          "step": 1,
          "use_history": true,
          "use_history_output": true,
          "with_sign": false,
          "from_char_code": false,
          "notify_on_change": false,
          "is_test": false,
          "enable_val": [
            {
              "value": 1
            },
            {
              "value": 2
            }
          ],
          "value_raw": "0",
          "value": 0
        },

For now I followed a more generic approach, and just check every register if it is enabled or not. If we need to customize at a later point we can implement your approach with the enable_key. See #56

I propose to close this one for now. We can reopen a new one once needed.

Things seems more complicated than expected...
Cold weather yesterday, i've start back the stove. When switching from pellets to woods, i've seen a new parameter appearing on Nobis-Fi app ("livre"->book? I thing bad translation from Italian...). Was not there last winter. One other hand, the mixed pellet/wood stove is a new model and I have one of the firsts models... Unfortunately it was not possible to check deeper this time (no access to my computer).
I fear that the "enable" register is used to make the setting available or not in the app and could change during stove usage.
We have to understand how it should be handled in HA : totally ignore "enable" parameters when creating entities? Ignore only for entities that have been identified switching to enabled/disabled during stove usage? Create entities but disabling entities in HA depending on enable register status (is it even possible?)?
Nb : no hurry, it's more important to stabilize the v0.2 now 😉.


Nulled event in onPress callback

https://facebook.github.io/react/docs/events.html#event-pooling

The SyntheticEvent is pooled. This means that the SyntheticEvent object will be reused and all properties will be nullified after the event callback has been invoked.

+1

+1

Closing in favour of #87


SNOW-1335071: add method DataFrame.transform

Apply a function/callable to Snowpark DF
What is the current behavior?
df = func1(df)
df = func2(df)
# or
df = func2(func1(df))

What is the desired behavior?
df = df.transform(func1).transform(func2)
How would this improve snowflake-snowpark-python?
Make Snowpark code more consistent
References, Other Background
.transform() is available in pySpark
https://api-docs.databricks.com/python/pyspark/latest/pyspark.sql/api/pyspark.sql.DataFrame.transform.html

thanks for your feedback! we will look into supporting this transform function call.
cc: @sfc-gh-yixie @sfc-gh-jdu @sfc-gh-aalam this is for feature parity with pyspark.


build warning

LibClamAV Warning: Cannot dlopen libclamunrar_iface: file not found - unrar support unavailable
when docker build

do you need unrar support?

Is that unrar for un-rar a rar file then scan it.? it's not nessary


Onboard keypair commands

Onboard key-pair commands:

create
delete
describe
list
update

We should add the new command group in the Available Services section in the README, in the IaaS row


command line dotnet new mvc

I have "netcoreapp2.2" and "AspNetCore version 2.2.0" and when I run "dotnet new mvc" it is not installing bootstrap and bower. Is there any extra command to do that?

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

ID: 0b952f8a-18e1-4843-0741-6ca877fb303a
Version Independent ID: d80dfb96-bc86-a960-abec-255dd907d04d
Content: dotnet new command - .NET Core CLI
Content Source: docs/core/tools/dotnet-new.md
Product: dotnet-core
GitHub Login: @mairaw
Microsoft Alias: mairaw

As Rick mentions above, Bower is deprecated. As such, there's no package manager being used to "install" client-side assets such as Bootstrap. The files are simply included by the project template in the wwwroot\lib folder.
Replacement solutions for Bower include npm or LibMan.

I can't see the AccountController when I create MVC application with this command:
dotnet new mvc --auth SingleOrg

You need to scaffold Identity now. See https://docs.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity?view=aspnetcore-2.2&tabs=visual-studio


Region collapse '...' painted at wrong location

Open BCEditor.Editor.Base, the 'TBCBaseEditor = class' line should be visible without scrolling, collapse it, and the '...' gets painted on the same line as 'interface'

This is fixed today.


RF Bridge Local Not Working

I use the RF Bridge (black one) with various devices. Mostly door sensors and buttons.
I have added buttons to the Bridge and when I press them some Home Asssistant scripts run.
I have realized that this does not work without internet.
Has anyone else dealed this issue ? The bridge is supposed to support LAN which I have enabled in the ewelink app.

https://github.com/AlexxIT/SonoffLAN/issues?q=RF+Bridge


Postgres datastore calls can repeatedly fail if they fail once

Slightly related: #310
We had an issue where local media was coming up as not found when attempting to /download it. I did a manual select in the database and the media did exist with the correct ID and origin.
The error for the failing media was obscured, and due to #236 it wasn't possible to find out exactly why the media wasn't found but by following the logic in https://github.com/turt2live/matrix-media-repo/blob/5df7dcfd8684fcca7099d16effe66f38574e2287/controllers/download_controller/download_controller.go#L258-L273 I could see that the media was failing to be found in the DB.
After restarting the media repo, the media started working again so I have a theory that either the failure was being cached (but as per logs, it did look like it was at least executing the above lines when it was trying to fetch the media) or the database connection to postgresql dropped and wasn't recovered. Because we do not log the err response from db.Get, it's not clear what went wrong.
This has affected a small number of our media repo instances, so would like to see what we can do to help.

Today we also found that the call to GetEstimatedSizeOfDatastore also started failing repeatedly, which caused the media repo to effectively become vegetative until we restarted it.
INFO[2021-03-17 10:13:35.845 Z] Doing federated GET to https://matrix-federation.matrix.org:443/_matrix/media/r0/download/matrix.org/GpiYiabpTrGsmbcUpebZyHlQ?allow_remote=false with host matrix-federation.matrix.org:443
INFO[2021-03-17 10:13:35.914 Z] Persisting downloaded media                   nocontext=true worker_blockForMedia=true worker_requestId="remote_download:matrix.org_GpiYiabpTrGsmbcUpebZyHlQ" worker_requestMediaId=GpiYiabpTrGsmbcUpebZyHlQ worker_requestOrigin=matrix.org
WARN[2021-03-17 10:13:35.914 Z] Not streaming remote media download request due to request for a block  nocontext=true worker_blockForMedia=true worker_requestId="remote_download:matrix.org_GpiYiabpTrGsmbcUpebZyHlQ" worker_requestMediaId=GpiYiabpTrGsmbcUpebZyHlQ worker_requestOrigin=matrix.org
INFO[2021-03-17 10:13:35.914 Z] Finding a suitable datastore to pick for remote_media  nocontext=true worker_blockForMedia=true worker_requestId="remote_download:matrix.org_GpiYiabpTrGsmbcUpebZyHlQ" worker_requestMediaId=GpiYiabpTrGsmbcUpebZyHlQ worker_requestOrigin=matrix.org
ERRO[2021-03-17 10:13:35.914 Z] Error persisting file: failed to pick a datastore: none available  nocontext=true worker_blockForMedia=true worker_requestId="remote_download:matrix.org_GpiYiabpTrGsmbcUpebZyHlQ" worker_requestMediaId=GpiYiabpTrGsmbcUpebZyHlQ worker_requestOrigin=matrix.org
ERRO[2021-03-17 10:13:35.915 Z] Unexpected error locating media: failed to pick a datastore: none available  allowRemote=true contentLength=0 contentType="" filename="" host=vector.modular.im mediaId=GpiYiabpTrGsmbcUpebZyHlQ method=GET queryString="" remoteAddr=<IP_ADDRESS> requestId=REQ-63488 resource=/_matrix/media/r0/download/matrix.org/GpiYiabpTrGsmbcUpebZyHlQ server=matrix.org usingForwardedHost=false

From looking at this, the cache is not indefinite. Errors are cached for about 30-60s before an attempt is made to try again. The database errors not being recorded is definitely an issue though.
The error handling in the mentioned block (and a nearby similar block) is indeed a bit off: it should have an else on that no-rows check to assume the error is fatal and skip download (since it won't persist anyways).


When resuming after pause, few chunks remain pending

Once upload is started, if user pauses it and then resumes, 3 (actually number of simultaneousUploads) chunks remain stale in pending state. Pieces reach the server, but when after resume all other parts are finished, they remain pending.
Looking at the code, the FlowFile.abort method does something wrong?
    /**
     * Abort current upload
     * @function
     */
    abort: function (reset) {
      this.currentSpeed = 0;
      this.averageSpeed = 0;
//      var chunks = this.chunks;
      if (reset) {
        this.chunks = [];
      }

      // NOTE: once below loop commented out, everything seems to be working
      //each(chunks, function (c) {

      // NOTE: ok, here it supposed to cancel the chunks in the wire. but does it really matters?
      // NOTE: if chunk is left in the wire, it is probably will reach server, let it finish
      // NOTE: if chunk still not entered the wire (xhr.send not called yet), check if upload is not paused
      // NOTE: right before send once more.
      // NOTE: otherwise, in most cases it is really meaningless to explicitly canceling the chunks
      //  if (c.status() === 'uploading') {
      //    c.abort();

      // NOTE: why? :)
      //    this.flowObj.uploadNextChunk();
      //  }
      //}, this);
    },

If file is stopped/paused, we have stop every chunk upload also. This is how file upload and resume works, it must be instant.
 this.flowObj.uploadNextChunk(); - this is the tricky part. For every stopped chunk, we continue to upload other chunks in a queue if they are not paused. Without this, one paused file would pause upload of other files too.

I found the same problem. The way I saw the issue is that the chunk.preprocessState is set to 1 once the preprocessing is complete. Then the chunk is paused the state is back at pending, but the preprocessState is still 1. I think that is correct, because it prevents the preprocess code from running again.
I fixed the issue by removing the check for chunk.preprocessState === 0 when looking for pending chunks.


Policy Head Softmax Applied Twice

The softmax function is applied twice in the network's policy head; it should only be applied once.  Also note that the output size of the policy is hard-coded to 9, rather than a variable size representing the shape of the board.

Resolved.


issue trying to add simple node

I observe this by adding a simple v3Create node. Not sure if I am doing something wrong.
[ERROR 21:22:13]: getInputWidget() got an unexpected keyword argument 'pinAnnotations'
Traceback (most recent call last):
File "/home/k/projects/PyFlow/PyFlow/App.py", line 221, in onRequestFillProperties
toolInstance.assignPropertiesWidget(propertiesFillDelegate)
File "/home/k/projects/PyFlow/PyFlow/Packages/PyFlowBase/Tools/PropertiesTool.py", line 58, in assignPropertiesWidget
propertiesFillDelegate(self.propertiesWidget)
File "/home/k/projects/PyFlow/PyFlow/UI/Canvas/UINodeBase.py", line 1271, in createPropertiesWidget
self.createInputWidgets(inputsCategory)
File "/home/k/projects/PyFlow/PyFlow/UI/Canvas/UINodeBase.py", line 1290, in createInputWidgets
w = createInputWidget(inp.dataType, dataSetter, inp.defaultValue(), inp.getInputWidgetVariant(), pinAnnotations=inp._rawPin.annotationDescriptionDict)
File "/home/k/projects/PyFlow/PyFlow/UI/Widgets/InputWidgets.py", line 128, in createInputWidget
pinInputWidget = factory(dataType, dataSetter, defaultValue, widgetVariant, **kwds)
TypeError: getInputWidget() got an unexpected keyword argument 'pinAnnotations'

Mine works fine. Check if you are using last version. And as i understand you are under linux?

Yes, i have it on ubuntu as well


Benchmarking guidelines

I'm writing this as a guide on how to make contributed benchmarks "more valid" and actually measure what they are supposed to. Note that as of current state benchmarks in this repo don't follow them.

make sure to benchmark for small collections(<4 elems), they are the most common
make sure to include sizes which are not "magical" for your collection. E.g. Degrees of 2. I propose to standardise on those sizes: 0, 1, 2, 3, 4, 7, 8, 15, 16, 17, 39, 282, 73121, 7312102.
Use Blackhole.consume instead of returning a value from a method
Use Blackhole.consume to ensure that data you are accessing is actually accessed
don't use foreach as a way to run multiple iterations of benchmark. Use a hand-written while cycle and @OperationsPerInvocation, eg https://github.com/DarkDimius/DelayingArrays/blob/rewrite/src/main/scala/me/d_d/delaying/Benchmarks.scala#L151
If you are accessing the same data in every benchmark iteration, eg. list.head, make sure to have a set-up run to ellide it from memory. This is hard to get right and this is why I recommend to not include such benchmarks.
If you are accessing random data, make sure not to use random number generator provided in Java. It's slow. You'll be benchmarking RNG instead of your collection. Use this one instead: https://github.com/DarkDimius/DelayingArrays/blob/rewrite/src/main/scala/me/d_d/delaying/Benchmarks.scala#L58
make sure you're not measuring boxing\string allocation. It may be slower than the actual operaion being performed in benchmark.
best way to ensure this, read assembly resulting from JIT-ting your code;

If you want to get reliable numbers when running on your machine , make sure that you have:

a physical machine. Getting reliable number in vitalized environment is hard;
everything that can do some background computation disabled, including:

cron;
ntpd;
OS updates, not only installation, but even checks for updates;
web browsers\music
filesystems and SSD drives can sometimes do operations that are similar to garbage collection in VM. Make sure not to use them(I recommend launching entire OS in ramdisk).

cpu fixed to the same speed:

disabled turbo-boost
cpu scheduler fixed to a fixed frequency
to ensure that cpu doesn't clockdown due to overheating, fix it to a lower frequency,
disable hpet.

absence of memory swapping.

Additions and suggestions are welcome.

Mostly I think this is good advice.  A few quibbles:

Some collections are heavily used with small numbers of elements (e.g. List).  Others only make sense if you plan to have a larger number.
There's nothing wrong with returning values from methods.  Most of the time I find this gives me lower error than using Blackhole.consume.  But the value must depend on the element in the collection in a nontrivial way.  For instance, .length on a String is fine thing to sum up in a benchmark.
Instead of repeatedly accessing head or trying to elide it from memory (a process that usually makes timing too unreliable to be worth anything), create an array and benchmark accessing the head of each thing.  (For bonus points: you can choose which cache level you're going to pull from based on the size of the array.)
Don't use the RNG listed for anything important.  It's fine for "kind of random" random access.  The distribution is awful, though.  Better is to scramble an index array in random order as part of setup, then benchmark how long it takes to walk the index array in order as a correction.  (Generally: pretty close to zero.)  This has the advantage of letting you set up particular patterns also if you want (e.g. walk up by 10s, etc.).

There's nothing wrong with returning values from methods. Most of the time I find this gives me lower error than using Blackhole.consume. But the value must depend on the element in the collection in a nontrivial way. For instance, .length on a String is fine thing to sum up in a benchmark.

There's a pleora of what to get it wrong. The notion of depend changes over vm implementations and even versions of the same vm. That's why I propose to use a reliable way to make sure computations are actually performed which doesn't require reading assembly.

For instance, .length on a String is fine thing to sum up in a benchmark.

I know a VM for which this might be false depending on a benchmark as it can do deep speculations on values. Graal.

It's fine for "kind of random" random access. The distribution is awful, though

I'm not convinced. Would you elaborate?

There's lots of stuff to get wrong with microbenchmarking, including trying to benchmark extremely inexpensive operations with overhead that dominates.  Blackhole.consume used to, at least, take a few ns as opposed to the < 1 ns you usualy get from a field lookup plus arithmetic operation.
So it's not exactly more reliable, it just shifts what you need to worry about, and renders more things unobservable.  I suppose that it's a better default, but I wouldn't select it when the person writing the benchmark has some reason to think that some real operation is reasonably appropriate.
Also, if Graal is really good at deeply speculating on values but Blackhole.consume prevents the speculation is that actually more representative of running real code?  Again, I'm not sure it's really better, just different.
Most of the time these things are going to matter much less than your microbenchmark being run in the wrong optimization context and without the normal GC load.
As far as the RNG goes, uhm, have you checked what it does mod 8, for instance?

(I mean--you haven't even implemented it right.  If you do implement it right, it's still pretty lousy, especially with differences which matter due to caching effects at least on array lookups.)

There's lots of stuff to get wrong with microbenchmarking, including trying to benchmark extremely inexpensive operations with overhead that dominates. Blackhole.consume used to, at least, take a few ns as opposed to the < 1 ns you usualy get from a field lookup plus arithmetic operation.

My benchmarks suggest that Blackhole.consume takes measurably less time than a single memory access. If we're benchmarking collecitons, we're mostly benchmarking memory accesses.

Also, if Graal is really good at deeply speculating on values but Blackhole.consume prevents the speculation is that actually more representative of running real code?

Because we shouldn't be benchmarking the rare "good" case of our collection. We should provide collections that are guaranteed to perform well in common case, when optimizations fail.

Fair enough.  Maybe consume used to be slower?  As long as it's fast, it doesn't much matter.  (Also--benchmarking in-cache and out-of-cache small collections are two different things.  Both come up a lot in real-world applications.)

(I mean--you haven't even implemented it right. If you do implement it right, it's still pretty lousy, especially with differences which matter due to caching effects at least on array lookups.)

If you mean that I didn't go into longs as the benchmark suggests then yes. I'm not arguing that my RNG is the best RNG. I'm trying to see your reasoning behind your critique of using fast RNGs here. Or did you argue that this particular one is bad one?

This is a particularly bad choice given the behavior for modulus of small powers of two.  A fast RNG is in principle fine; the trick is to get one that doesn't make you measure something other than what you think you're measuring.  If you care about random stride length, none of the LCGs are safe.  If you just care about hitting arbitrary elements, some LCGs are safe, but the particular implementation you chose (mod 2^32 instead of 2^32-1) is really not good for small powers of two.

OK, I agree.
It was fine in my case given that magical numbers for that collection
aren't powers of two, but I see your reasoning in general.
I'll update the guideline to your suggestion with an array.
On 30 March 2017 02:17:49 Ichoran<EMAIL_ADDRESS>wrote:

This is a particularly bad choice given the behavior for modulus of small
powers of two.  A fast RNG is in principle fine; the trick is to get one
that doesn't make you measure something other than what you think you're
measuring.  If you care about random stride length, none of the LCGs are
safe.  If you just care about hitting arbitrary elements, some LCGs are
safe, but the particular implementation you chose (mod 2^32 instead of
2^32-1) is really not good for small powers of two.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/scala/collection-strawman/issues/54#issuecomment-290264710

Very nice  recommendations by @DarkDimius and @Ichoran!
I'd like to build upon this list with some more points/questions (just food for thought):

use for-loops for initialization of collections/streams, because higher-order combinators used there may turn megamorphic and skew the actual results, e.g., [0]
Blackhole is indeed not needed when returning from a method in principle, but since I haven't witnessed a case of weird dependencies myself, I have to accept @DarkDimius's good point
size does matter [1]: for functional arrays, we have to use large arrays and measure iteration costs, use small for some collection ops (instantiations) and large (to measure copying costs)
use specialized and reference types and control optimizations for autobox elimination on the JVM -XX:-EliminateAutoBox to distinguish between scala specialization and JVM autoboxing (just in case)
measure on the millisecond scale, nanoscale if needed. What about flops/sec? would it be better to make hypotheses about flops/sec and then test via benchmarking? [7]
should we use macro-benchmarks?: e.g., port various from RiverTrail [2] as Niko does in Rayon [3].
use variable-sized data to stress TLAB allocation ratio (also relevant -XX:MinTLABSize) [8]
we should able to do detailed cache analysis, how do we investigate data alignment to multiples of cache line sizes?
what do you think about a series of benchmarks with escalating difficulty e.g., in Views: sum, sum_squares, sum_squares_even, cartesian_product, many_maps, many_filters, dot_product, flatMap_after_zipWith, zipWith_after_flatMap, flat_map_take, zipWith_flat_mapped (I have drafted an example in a new repo here [9])
be able to to benchmark the same collections for various versions of scalac and/or dotty versions and/or JVM as Aleksey does [4] would be nice starting point for a benchmark suite in the CI
benchmark (extensively) for any "dynamically-typed” optimizations, e.g., like in stream characteristics as in Java 8 Streams [5]
should we pollute the type profile for worst case scenarios? what information this will give to collections' developers? [6] (will be needed in the future to test context-dependency/call-site/link-time opt in dotty)
for memory footprint investigations measure using Memory Analyzer (MAT), VisualVM, Solaris Studio Performance Analyzer, the latter has different characteristics concerning non-biased Java/native profiling
what could be other directions for microbenchmarking collection operations apart from lookups, concatenation, construction, deconstruction and transformations from one datatype to the other?

BTW, do you know whether we have support for JMH's -perfasm (printing assembly) profiler in MacOS?
References

PaulSandoz/lambda-devoxx13
Arrays of Wisdom of the Ancients
RiverTrail
Rayon
Arrays of Wisdom of the Ancients:Historical Perspective
Characteristics
MethodData and Profile pollution
Performance in Numerical Computing
JVM Anatomy Park #4: TLAB allocation
biboudis/stream-benchmarks

use for-loops for initialization of collections/streams, because higher-order combinators used there may turn megamorphic and skew the actual results, e.g., [0]

That's the exact opposite of what you want. You actually want it to become megamorhic because this is the common case.

should we pollute the type profile for worst case scenarios? what information this will give to collections' developers?

I'd say a strong "yes"

BTW, do you know whether we have support for JMH's -perfasm (printing assembly) profiler in MacOS?

Linux only.

Linux only.

Doesn't it work if you build hsdis https://github.com/AdoptOpenJDK/jitwatch/wiki/Building-hsdis ?

@lrytz, there is no perf on mac. You are able to get assembly printout, but it won't include hardware counters.
Related: https://groups.google.com/forum/#!topic/mechanical-sympathy/am3EB0SrBFg https://twitter.com/shipilev/status/690298532058808320

Ah yes, thanks. I remember now seeing this tweet :)


N_PROCESSES_PER_DATA_SOURCE should be user-configurable, per DataSource

Detailed Description
For example, "heavy" DataSources like NWP and Satellite might want more processes than "light" DataSources.
This is in Manager.py.
See issue #311 for context.

As per #311, we're not using multiple processes per datasource, so no need to make N_PROCESSES_PER_DATA_SOURCE configurable (because it doesn't exist!)


The word 'values' is displayed with partial highlighting in "Taints and Tolerations" page

https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/

the word "values" is displayed as "value" "s" and only the word "value" is highlighted. I think it was probably intended that the whole word "vaules" be displayed in bold or gray text.

Page reported in issue: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
/language en

I think it was probably intended that the whole word "vaules" be displayed in bold or gray text.

My guess is: the author meant to have value in monospace, but didn't spot how jarring “values” is when you read it
/language en
If my guess is right then it's not really a bug, more an opportunity to make the page more readable.

/retitle The word 'values' is displayed with partial highlighting in "Taints and Tolerations" page

(when the text in question was added, the fonts and styling may have been quite different)

I will try to help and suggest changes via PR to make this more readable.
/assign

@steve-hardman are you working on it?

/assign

Looks like a fix was merged as part of https://github.com/kubernetes/website/pull/44539
/close


property placeholder support in application.conf

Enhancement
Support for property placeholders in application.conf.
One use case is to provide a standardized Kubernetes deployment for different systems.
In the systems themselves, only the bootstrap-brokers specification changes.
This could be set as an environment variable in the deployment. The environment variable would then be used in the application.conf and no system-specific configuration files would be required.
  clusters = [
    {
      name = "my-kafka-cluster"
      bootstrap-brokers = "${BOOTSTRAP_BROKERS}"
      topic-whitelist = [
        ".*"
      ]
      ....
	}
  ]

Additional context
If I missed something to support this use case in other ways, I would be glad to here about it.

Maybe I'm missing something but this is already possible, we are using kafka-lag-exporter like this.
We have an application.conf with ${BOOTSTRAP_BROKERS} in the contents. BOOTSTRAP_SERVERS is specified in our helm chart/application set.

Unfortunately, I don't know anything about helm. Is the property perhaps replaced by helm during the deployment? My use case is that the application.conf must be loaded by the kafka-lag-exporter with the property placeholder and the kafka-lag-exporter than replaces the property with the Environemt variable value. At least this did not work in my test.

@Philippus could you help me with same kind of issue? I need similar solution for configuration of adminClientProperties and consumerProperties.
My configuration looks like:
consumerProperties:
    ssl.endpoint.identification.algorithm: "https"
    security.protocol: "SASL_SSL"
    sasl.mechanism: "SCRAM-SHA-256"
    sasl.jaas.config: |-
                      org.apache.kafka.common.security.scram.ScramLoginModule required
                      username="kafka-lag-exporter"
                      password="${kafka_lag_exporter_password}";
But it does not look that it resolves the password. It works well when I configure the password in clear text.


Provide alternative options for call?

I've tried to make the paper call for the last two or three weeks, but was unable to do so due to caretaking responsibilities.
Is there another option for joining the discussion more actively? A second date for a call? Alternating weeks over an alternative date/time?
(I think this may also be interesting for members of the community who want to make co-authorship but cannot meet the required regular participation.)
Not urgent to solve, unless you plan on meeting over the holidays ;).
Happy end of year 🌟!

How about a poll starting in January?

And here's the poll:
https://terminplaner6.dfn.de/en/p/a2ac3bc0d23f715b165ab443c9399d94-546968
Note that I expect we have to reschedule again after deRSE24. also due to the start of the new semester.

General comment, since now is the scheduling: I notice that often the meetings at the current timeslot run for around two hours or even open-ended. Zoom-ing for 2h or more every week is a bit exhausting and leaves less time for actual action. I think it would be beneficial to restrict ourselves to the proposed 1h per slot.

Also notifying people over here:
Meeting Notes:
https://pad.gwdg.de/s/pVBQ3Sh7Z

General comment, since now is the scheduling: I notice that often the meetings at the current timeslot run for around two hours or even open-ended. Zoom-ing for 2h or more every week is a bit exhausting and leaves less time for actual action. I think it would be beneficial to restrict ourselves to the proposed 1h per slot.

Follow-up, as we now had a 1h meeting: I used the extra time to already do most of what I had to do for the next meeting, as I still had energy and time! :smile: I think we can do it and it will help us a lot :hugs:

Closing this, since we now have:

a new date
notes
and hopefully, soon a mailing list.

And we need to tidy up the issue list....

So we now have a mailing-list: https://lists.uni-wuerzburg.de/mailman/listinfo/teachingrse


LongPress not working on Android if using EventHandler rather than Command

Hello,
Is it possible something has been modified within this area and having this impact.
Tested in Android 6, 7 & 8.
I'm compiling against the latest SDK (API 27).
Working fine in iOS.
I haven't gone through all the testing yet, specifically grab the latest sources and compile the sample to see how it goes. I will.
Just wanted to quickly ask, if by any chance this points to something in your mind.

Hello,
I just tried on a device using API 24 and it worked for me. Don't remember changing anything there lately.

Alright then, I'll review my environment and make some further tests.
Thanks for this prompt response.

Ok now I remember: a long time ago I had to change the source code of the renderer for Android, because I wasn't using the MapLongPressCommand, only a regular event handler:
        public void ActivateLongPress()
        {
            MyMap.MapLongPress += MyMap_MapLongPress;
        }

This was working fine in iOS (and still do) but wasn't on Android.
I had to change the TK.CustomMap\TK.CustomMap.Android\TKCustomMapRenderer.cs
From
        private void OnMapLongClick(object sender, GoogleMap.MapLongClickEventArgs e)
        {
            if (this.FormsMap == null || this.FormsMap.MapLongPressCommand == null) return;

            var position = e.Point.ToPosition();
            this.MapFunctions.RaiseMapLongPress(position);
        }

to
        private void OnMapLongClick(object sender, GoogleMap.MapLongClickEventArgs e)
        {
            if (this.FormsMap == null) return;

            var position = e.Point.ToPosition();
            this.MapFunctions.RaiseMapLongPress(position);
        }

Do you think you could integrate such a change so that we are not forced to use the Command pattern?
Thanks

Since quite some time there are events available for literally everything.
https://github.com/TorbenK/TK.CustomMap/blob/f0c9d004081df6371b7a8d7925674e3459772bb8/TK.CustomMap/TK.CustomMap/TKCustomMap.cs#L33

I know. And that's what I'm using since the beginning.
But on Android, the event wasn't raised because of the test:
this.FormsMap.MapLongPressCommand == null
i.e. even if the event handler is set, the event is not raised if the command is not set.
That's precisely my point.

Just a question :
Why do you need to use handler prior to command ?

Because I’m reusing some old design.
I know the Command pattern should now be used in favor of events handler to decouple things...
But I don’t have time to redesign it just now.
But hey, if events handler are supported (a good thing !) I suppose they should work consistently, shouldn’t they?

Well yes it is supposed to work consistently. I had some probs two with design and was implementing handlers. I refactored it by using the messaging center in my viewModel (in a command or property) to handle design changes/animation (with a service injected with dependency service called in the subscribe method of messaginCenter). For gesture recognization I'm using MR.Gestures package and it works for me so perhaps you got some prob in your gesture implementation ... ?

I don’t think so.
Again the shared code is working fine in iOS and doesn’t in Android unless I remove the test shown earlier in the renderer which seems to me to be a pretty simple fix.

And having had a further look, of course it seems the case for several events on the Android renderer where the Command is checked against null before raising the event.
Again, that means that the event won't be raised if only the event handler has been set without setting the corresponding Command.
e.g.
private void OnUserLocationChange(object sender, GoogleMap.MyLocationChangeEventArgs e)
        {
            if (e.Location == null || this.FormsMap == null || this.FormsMap.UserLocationChangedCommand == null) return;

            var newPosition = new Position(e.Location.Latitude, e.Location.Longitude);
            this.MapFunctions.RaiseUserLocationChanged(newPosition);
        }

@nbsoftware
You are absolutely right. Those are bugs and need to be fixed, which I did just now.

Great! Thanks @TorbenK
Do you think you'll publish a 1.6.1 nuget package with just that or should I still build my app from sources waiting for it? Actually I need to release a version of my app today... :/

I just published it just for you. Should be available any time soon.

Awsome!! Thanks


How to add this library in Laravel 5?

Please help me to add this library in Laravel 5
Thanks

Did you experience any error when integration this library with Laravel ?
What exactly do you want to do ?

HI @kaushikandani. The best way to add a 3rd party library to your Laravel project is through a Service Provider. We do not provide Service Providers for different frameworks out of the box (though we may in the future).
Laravel offers really good documentation on creating your own service providers. It's a pretty simple process!
I would suggest a Service Provider to create an instance of Google\Cloud\ServiceBuilder rather than one for each of the different APIs that Google Cloud PHP supports.
If you run into any issues, share your code and we'd be glad to help!

Currently i used this library with core php
now i want to develop same in laravel

@kaushikandani did you have any luck following the instructions in my previous comment?

I have same issue ...
What is difference between registering service provider and usage direct from vendor folder class that i need? In my case: Google\Cloud\Vision\VisionClient;
Under condition that i need usage of this class only in  one controller?
Beside, why none explained where to configure credentials because when used it throws:
'Could not load the default credentials. '
Cool, but where to define them ?
readme.md is short and almost unusable ...

Hi @iggori,
Using Google Cloud PHP directly is fine, but a ServiceProvider lets you do things the "laravel way", and helps with dependency injection and other things you might value.
Our documentation guide on Authentication will help with obtaining your account credentials. The easiest way to authenticate is with the Application Default Credentials, but you can also pass a keyfile directly into the class:
use Google\Cloud\Vision\VisionClient;

// Application Default Credentials are configured using an environment variable.
// When this environment variable is set, you should be authenticated automatically when you create the class!
putenv('GOOGLE_APPLICATION_CREDENTIALS=/path/to/application-credentials.json');

$vision = new VisionClient();

// You can pass a keyFilePath into the constructor:
$vision = new VisionClient([
    'keyFilePath' => '/path/to/application-credentials.json'
]);

// Finally, you could pass the keyfile json into the constructor:
$vision = new VisionClient([
    'keyFile' => json_decode(file_get_contents('/path/to/application-credentials.json'), true)
]);

We're always looking to improve our documentation. Could you provide any more information on where you think we should focus on making our documentation more useful?

@jdpedrie Hi! tnx for reply i just setting up https://github.com/pulkitjalan/google-apiclient
I have defined json file and set:
$client = Google::getClient(); // so here no problems seems I'm authenticated.
Then i call:
$vision = Google::make('vision');
after I'm calling:
// Annotate an image, detecting faces.
$image = $vision->image(
fopen('https://upload.wikimedia.org/wikipedia/commons/e/e6/Bleeding_finger.jpg', 'r'),
['faces']
);
    $annotation = $vision->annotate($image);

exception is thrown:
Call to undefined method Google_Service_Vision::image()

@iggori,
That library uses google/apiclient, which is different from this library, which on packagist is called google/cloud. Confusing, I know. :-/
Google Cloud PHP doesn't offer framework-specific providers currently, and a quick search of packagist didn't turn up any bridges yet.
To install this library and use it directly, run this command in your terminal:
$ composer require google/cloud

Then you can follow the instructions I shared above to get started.
A quick example (using Application Default Credentials, so if you want to provide a keyFile, modify as needed):
use Google\Cloud\Vision\VisionClient;

$vision = new VisionClient();

$image = $vision->image(fopen('https://upload.wikimedia.org/wikipedia/commons/e/e6/Bleeding_finger.jpg', 'r'),['faces']);

$annotations = $vision->annotate($image);

@jdpedrie
Seems It works now form your sample. At least i got api response:
image-annotator::Bad image data.: Image processing error!
What is proper way to give google vision url to file?
I'm trying to replicate this py sample given here:
http://stackoverflow.com/questions/35804081/can-google-vision-api-accept-external-image-url
Because I don't want to store images on Google cloud or upload them i just want to give url location and get repose is it safe content (no p*rn or violence content)?
Tnx.

You may have mixed results using fopen across domains. You're probably better off using curl to fetch from a different server. Of course make sure you have permission from the owner of the other domain before pulling from their server.
Using Curl:
$url = $imageLocation;
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, false);
$data = curl_exec($curl);
curl_close($curl);

$image = $vision->image($data, ['faces']);
$annotation = $vision->annotate($image);

@jdpedrie If you checked out my previous comment I tryied to explain I'm trying to replicate feeding google vision with URL not with content.
We speak about milions of files that are stored on Amazon S3 and many of them are about 10Mb each.
Google vision is expansive already. I'm trying to avoid additional Amazon Data Transfer costs that can cost fortune to send every file to G.
Here guy explained sample with external URL usage via pyton:
http://stackoverflow.com/questions/35804081/can-google-vision-api-accept-external-image-url
python label_sample.py -u "https://upload.wikimedia.org/wikipedia/commons/e/e6/Bleeding_finger.jpg"
Is it rings any bell how this can be replicated via PHP?

Cloud VIsion accepts the image data as a string, or as a Google Cloud Storage object. To annotate images elsewhere on the internet (including Amazon S3), you'll first need to download them, as my previous example using curl demonstrates.
There is no way to ask Cloud Vision to pull the image from the internet for you.

@jdpedrie Tnx.
For others this is sample class that works on Laravel 5.2 if someone needs tnx to @jdpedrie :
`<?php
namespace App\Http\Controllers;
use Google\Cloud\Vision\VisionClient;
class PlayGround extends Controller
{
public function hello(){
    // Application Default Credentials are configured using an environment variable.
    // When this environment variable is set, you should be authenticated automatically when you create the class!
    $path = base_path('folder/name_of_json.json');
    putenv('GOOGLE_APPLICATION_CREDENTIALS='.$path);

    $vision = new VisionClient();

    // You can pass a keyFilePath into the constructor:
    $vision = new VisionClient([
        'keyFilePath' => $path
    ]);

    // Finally, you could pass the keyfile json into the constructor:
    $vision = new VisionClient([
        'keyFile' => json_decode(file_get_contents($path), true)
    ]);

    $url = 'http://paraschopra.com/blog/wp-content/uploads/2012/11/evil_toddler_small.png';
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HEADER, false);
    $data = curl_exec($curl);
    curl_close($curl);

    $image = $vision->image($data, ['faces']);
    $annotation = $vision->annotate($image);

    dd($annotation); // you can return values at this point

}

}`

Glad to help. Let us know if there's anything else!

@jdpedrie Is there real need to have new VisionClient(); 3x ?

No, I was just showing you the different ways you could set it up. Use the one that makes sense for you. Your example uses the keyFilePath, so only keep that.
ApplicationDefaultCredentials:
$vision = new VisionClient();

Key File path:
$vision = new VisionClient([
    'keyFilePath' => $path
]);

Key File JSON:
$vision = new VisionClient([
    'keyFile' => $json
]);

@jdpedrie  Got it now! Big tnx!


feat: use custom tag instead of custom version for MS electron releases

Refs https://github.com/microsoft/vscode-electron-prebuilt/pull/24

Yeah I thought about that, but that approach makes it bit harder since we need to bump distro everytime the buildid changes. Additionally it keeps the version updates in the public repo.

Fyi for node.js I am going with an approach where the version and checksums are part of the product.json:
https://github.com/microsoft/vscode/pull/184877/files#diff-285888428ebaab4e7985b695829cc9e47f98d2857505070ccacae3432b7b11dcR85-R88

Why not upload the Sha sums to release assets ex: https://github.com/electron/electron/releases/download/v25.1.0/SHASUMS256.txt and download from their for validation ?

Sanity run: https://monacotools.visualstudio.com/Monaco/_build/results?buildId=219010&view=results


⚠ Bofrost.lu has degraded performance

In 68476c5, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1767 ms

Resolved: Bofrost.lu performance has improved in 1d4a849 after 37 minutes.


bug: type not inferred correctly

Bug Report
Cairo version: v2.0.1 cf142a28e

Current behavior:
This does not compile:
fn do_it() -> bool {
    true
}

fn main() {
    let (v1, v2) = {
        if (do_it()) {
            return (true, 1_u256);
        }
        (false, 2_u256)
    };
}

The reported error is
error: Unexpected return type. Expected: "()", found: "(core::bool, core::integer::u256)".
 --> ternary.cairo:8:20
            return (true, 1_u256);
                   ^************^

Error: Compilation failed.

Expected behavior:
The code should compile. When running, the values of v1, v2 should be true, 1_u256.

the function main returns the unit type - the issue is you are calling return of (true, 1_u256).
fn do_it() -> bool {
    true
}

fn main() {
    let (v1, v2) = {
        if (do_it()) {
            return;
        }
        (false, 2_u256)
    };
}

would have worked.


BTCPayServer error 502 Bad Gateway (nginx/1.14.2)

Happening with  new installs, didn't reproduce on updates.
$ sudo systemctl status btcpayserver
fail:Configuration: No Database option was configured.

to fix run:
$ echo "sqlitefile=sqllite.db" | sudo tee -a /home/btcpay/.btcpayserver/Main/settings.config

or edit /home/btcpay/.btcpayserver/Main/settings.config manually.
This line is not kicking in because the setting.config is not present before btcpayserver is first run.
https://github.com/rootzoll/raspiblitz/blob/c395e3a6d438c2da16a231dc172c79e7cf3cbd22/home.admin/config.scripts/bonus.btcpayserver.sh#L476

No need to restart the service after having corrected this config file?

@we-do-it-lu
yes, use:
sudo systemctl restart btcpayserver

PR #2043 was merged - final testing if this fixes the problem

Ok fixed it on my test setup ... keeping open for final testing when closer to release.

Looks good on testing for v1.7. Closing issue.


python-vtk for wily and xenial

I flattened the rule since it has been the same since lucid and we don't support anything older.

http://packages.ubuntu.com/xenial/python-vtk

+1

Ran into a snag with this one: https://github.com/ros-perception/perception_pcl/issues/44#issuecomment-197653379


Rename podfans to truefans

Thank you and Happy Christmas Dave to you and your family.  I really hope we get a chance to meet in 2024.

On 24 Dec 2023, at 14:14, Dave Jones @.***> wrote:
Merged #318 https://github.com/Podcastindex-org/web-ui/pull/318 into master.
—
Reply to this email directly, view it on GitHub https://github.com/Podcastindex-org/web-ui/pull/318#event-11332567815, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2URYXLMAMK6TCBGSSQU3LYLA2DHAVCNFSM6AAAAABBABGYFOVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRGMZTENJWG44DCNI.
You are receiving this because you authored the thread.


too complex methods

Is your feature request related to a problem? Please describe.
Some methods have high complexity and poor readability. Refactorization of them is required.
Some of the methods are:

PINN.train
PINN.span_pts

solved in #104


In Azure v2.0 endpoint, do I need to change knownClientApplications ?

In Azure v2.0 endpoint, to let the middle-tier service access the downstream API, do I need to change manifest file and modify knownClientApplications ?  (mentioned in v1.0: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-on-behalf-of)
From Application registration portal, "knownClientApplications" can not be changed and save.
error:
One or more properties contains invalid values. Request ID: 8607e00e-1656-4d92-a3f1-249c157d5426, Timestamp: 04/15/2018 06:52:22

@jingdabao Thanks for the feedback! We are currently investigating and will update you shortly.

@navyasric  As mentioned in the following document: Azure Active Directory application manifest

Valid values for this are:

So, if I enter a [GUID] value, I get the following:

Are these steps correct?

@Mike-Ubezzi-MSFT @jingdabao Sorry for delay in response. The Azure AD v2.0 app model allows for applications to be registered with multiple components as described here. As a result, the client and middle-tier can be registered under a single App ID and the scopes which need consent can be configured for that app. As such, the knownClientApplications step does not apply to Azure AD v2.0 app model. This is the relevant article for OBO flow in Azure AD v2.0.

@SaurabhSharma-MSFT and @Mike-Ubezzi-MSFT - I think this issue can be closed based on @navyasric 's response.


Using SQLite views

Hi.
I want to use SQLite views to optimize queries. Is there any example of using it?
Explanation: in the example requery generates only 2 queries:
select count(*) from Person
select id, UUID, address, age, birthday, email, name from Person order by lower(name)

But if I add one field (linked entity) to the person_item layout, for example person.address.city:
<TextView
    android:id="@+id/address"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
<EMAIL_ADDRESS>
Then requery generates many queries (2 per record):
select count(*) from Person
select id, UUID, address, age, birthday, email, name from Person order by lower(name)

select address from Person where id =?
select id, city, country, line1, line2, state, zip from Address where id = ?
select address from Person where id =?
select id, city, country, line1, line2, state, zip from Address where id = ?
...

You can mark an @Entity with @View to indicate it maps to a view not a table. However requery can't automatically generate views at this time, that has to be defined in your table create script. Alternatively you could also lazily map fields using RxJava Observables in code.

Thanks, Nikhil.


Add Flatpak

This is an in-progress PR for a Flatpak build of ALVR for the Steam Flatpak. At the moment, it doesn't actually succeed because it can't find several dependencies, such as x264 and Cuda. It also targets the stable release at the moment, but that can be changed if needed.
Right now, the Flatpak pulls dependencies over the network during the build process. Ideally, the dependencies should be supplied within the manifest as to allow an offline build if needed. However, the Flatpak Cargo Generator script for generating the source manifests for all of the Cargo modules does not seem to work with Cargo modules fetched from Git repositories. If the script is updated to support this usecase, then the manifest should be updated to include the dependencies.

I've added x264, but the linker cites a ton of undefined references and fails to compile alvr_server.

this needs to be moved into xtask and I think it would be fine to just leave lto off

Documentation regarding the build of flatpak should go in "Build from source" page in the wiki.

I added a dedicated Flatpak wiki page. I feel that while building it could go into "Build from source", it would be better to have all the Flatpak information centralizing in one location where its shortcomings are listed, just so it isn't scattered across the wiki.

I'm going to merge in it's current state within the next 24 hours, though for the desktop file we couldn't you just cp the file to correct location or use install?

I'm going to merge in it's current state within the next 24 hours, though for the desktop file we couldn't you just cp the file to correct location or use install?

A script could be provided that copies the file and then launches the ALVR Dashboard, but it would have to run via the terminal once. The desktop file can't be copied to the host during the install as far as I know, and that just seems to be a limitation of Flatpak.

it seems like you can do it using build-commands aka
      "build-commands": [
        "install -Dm644 flatpak/io.github.TTimo.GtkRadiant.desktop /app/share/applications/io.github.TTimo.GtkRadiant.desktop",
      ],
      ```
      https://github.com/flathub/flathub/pull/3682/files
      as in example, can you not do this?

That's not possible since /app/share/applications is read-only, and Flatpak creates all the symlinks to the desktop files when the application is installed, not an extension.

Ok then I guess it will stay as is

Thanks for your work, please take a break and enjoy you have done something that many alvr contributors have thought was impossible, ;D


Allow more flexible join conditions

I'd like to update tests instead of adding ones, but that would require #12.

PR #12 depends on the deep clone PR which is not yet updated.

Also, there's PHPDoc missing for the added $operator parameter.

Damn. Elephant oversight. Sorry!

PR #12 depends on the deep clone PR which is not yet updated.

No, it doesn't.


refine error message caused by internal kafka failures

Though this is indeed an internal error, the message is quite unfriendly to read. The error is user-facing. We should refine it and let users immediately know the cause and how to fix.
dev=> create materialized view ad_mv as select * from ad_source;
ERROR:  RPC error: GrpcStatus(Status { code: Internal, message: "internal error: Meta data fetch error: BrokerTransportFailure (Local: Broker transport failure)", metadata: MetadataMap { headers: {"content-type": "application/grpc", "risingwave-error-bin": "CAESX2ludGVybmFsIGVycm9yOiBNZXRhIGRhdGEgZmV0Y2ggZXJyb3I6IEJyb2tlclRyYW5zcG9ydEZhaWx1cmUgKExvY2FsOiBCcm9rZXIgdHJhbnNwb3J0IGZhaWx1cmUp", "date": "Thu, 23 Jun 2022 05:48:12 GMT", "content-length": "0"} }, source: None })

Internal Error: The connection to Kafka brokers ("<IP_ADDRESS>:29092") is broken, please check its availability.

fixed by https://github.com/singularity-data/risingwave/pull/4227


Ability to append hostnames when generating certificates

Something like
template.DNSNames = append(template.DNSNames, hosts)

to cert_common.go
Thanks

This would be a good feature to have! A bit buried right now so won't be able to implement, but happy to review a PR if you are up for it.

I will try and put a PR up for you

Hi,
I had actually had already created this feature but hadn't had time to clean it up and push it till now. I required it so the FluxCD Helm Operator could talk to Tiller as it requires to talk to Tiller via its service rather than port forwarding like the Helm client does.
I originally used append(template.DNSNames, hosts) but felt it was probably better to add it to the x509.Certificate template rather than appending but happy to change that back if prefer it to be appended.


Add mouse move events.

Signed-off-by: Gordon Smith<EMAIL_ADDRESS>

Hi @GordonSmith!
First off, apologies for the delay in getting back to you on this.
Secondly, nice PR, I can understand the need for mousemove events. Because this is a new feature, could you please write a unit test for this?
Thanks!

@aendrew - where are the unit tests?  Also do you have a mechanism for testing mouse events already?

@GordonSmith tests are in /spec. Here is an example.

This doesn't seem very useful for most users and is outdated. Closing; please add a valid use-case or demonstrate appetite for this feature and I'll consider reopening.


Set up API

[x] Define API schemas
[ ] Authorize users as a middleware
[ ] Call API from index.html

Codecov Report

Merging #2 (11bb9a6) into main (cb35004) will decrease coverage by 29.70%.
The diff coverage is 70.29%.

@@             Coverage Diff              @@
##              main       #2       +/-   ##
============================================
- Coverage   100.00%   70.29%   -29.71%
============================================
  Files            2        8        +6
  Lines           12      101       +89
============================================
+ Hits            12       71       +59
- Misses           0       30       +30

Impacted Files
Coverage Δ

firebase.py
0.00% <0.00%> (ø)

main.py
0.00% <0.00%> (-100.00%)
:arrow_down:

mclauncher/app.py
76.47% <76.47%> (ø)

mclauncher/api/v1/app.py
88.88% <88.88%> (ø)

mclauncher/__init__.py
100.00% <100.00%> (ø)

mclauncher/api/v1/__init__.py
100.00% <100.00%> (ø)

mclauncher/api/v1/schema.py
100.00% <100.00%> (ø)

tests/test_app.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


[HOLD for payment 2024-05-20] [$250] Create automated tests for Workspace Taxes page

Problem
New API commands introduced as part of the Simplified Collect project don't have automated tests, which can lead to bugs and unexpected behavior when these commands are updated.
Solution
Add automated tests for the commands below:

[ ] Test OpenPolicyTaxesPage
[ ] Test SetPolicyCustomTaxName
[ ] Test SetPolicyCurrencyDefaultTax
[ ] Test SetPolicyForeignCurrencyDefaultTax
[ ] Test CreatePolicyTax
[ ] Test SetPolicyTaxesEnabled
[ ] Test RenamePolicyTax
[ ] Test UpdatePolicyTaxValue
[ ] Test DeletePolicyTaxes

Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01aabb7c33e3cc9759
Upwork Job ID:<PHONE_NUMBER>135184896
Last Price Increase: 2024-04-24

Issue OwnerCurrent Issue Owner: @zanyrenney

@dukenv0307 please complete the steps above, feel free to DM me when that is complete for the payout/ close out of th issue.

@dukenv0307 @tienifr i have invited you to the job

resent @dukenv0307 please can you check again!

bump @dukenv0307

payment summary
paid @dukenv0307 $250 via upwork
paid @tienifr $250 via upwork.

Hey @tienifr we can do this moving forward but as you've already been paid for this one via Upwork, we'll need to keep that as the payment method here to avoid additional work / audit in refunding and reissuing payments. thanks for your understanding!


Exception has been thrown by the target of an invocation

Tweetinvi is throwing exception on Rate Limit tracking and application stopped working

Duplicate of #713

Closing as it is will be taken care of as part of the #713.


Better error/backtracking for tactics

It would be nice to

have actual exceptions instead of string messages
have more control on backtracking, with different kinds of errors (catcheable or not, failing more than one level, etc).

+1, obviously :)

I'm about to push support for using actual exception as errors, using a predefined exception TacticFailure : string -> exn for every old error. It seems to work well, but with a limitation regarding native compilation.
(pseudocode)
exception NewExn

[@plugin]
let tau1 () = raise NewExn; 1

let tau2 () =
    try tau1 ()
    with | NewExn -> 2
         | _ -> 3

This code would actually return 3 since the natively-raised NewExn gets turned into a TacticFailure "uncaught exception: NewExn" at the boundary.
To properly handle this, we would need an extensible mapping between F* and OCaml exceptions. Currently this only works for TacticFailure. If you raise an exception from within a natively-compiled metaprogram that is not caught, it will become a TacticFailure with a string representation of it.
This seems as complicated as translating arbitrary datatypes, which we also should do, but haven't yet.

In any case: (1) is fixed by these changes. For (2) I think that's readily implementable in userspace, and I wouldn't, a priori, like to do it within the compiler.

Merged now. Changing to an enhacement for the native embedding of exceptions. So I would mark (2) as "won't fix", but please feel free to disagree.


[Feature Request] More reactions options

I was playing with this bot and the emojis features are something different that the other bots and I like it so much! ❤
I would love to see something like that done on the bot! On "!nowplaying" command under the "source;name" it was nice to have a "Next in queue: name of the music" and have reactions to play/pause the music and to skip. Something like on that printscreen.

Also I would like to have the now playing as the latest mensage so people can use the reactions to interact to the bot, so maybe you need to implement "bot deletes its own/others messages (configurable)" first. So people can add more music to the queue but keep the nowplaying always on the bottom. When the music ends maybe is better to delete the nowplaying message,

Great job with the bot, different and original from what I seem so far 🥇

Also I was searching on suggested features to add saw "Repeat-One (repeat only the currently-playing song)" maybe that is also a good thing to add on now playing with the play/pause and next button.

Very good idea, it would be very useful and would save a lot of time by reducing the number of commands send in the channel.
I would love to see this in this project !

Any plans to add this in the near future?


use precise repo for up through xenial

"support" up through xenial by using precise repo

I also created a JIRA to support these distributions in CDAP when we create the repository. We'll need to visit this at some time in the future.
https://issues.cask.co/browse/CDAP-7832


Sema: Implicit conversion for single-expression closures of Never type

Description: When we moved from the @noreturn attribute to the Never return type, we lost a bit of functionality. Since Never is just an ordinary type, the type checker did not allow a single-expression closure to contain a Never-returning expression unless the closure type itself returned Never. This precludes using single expression closures for callbacks in certain situations. This patch adds a new rule, similar to the existing rule for dropping the return type of a single-expression closure.

Scope of the issue: This has been affecting people in the wild while migrating code from Swift 2 to Swift 3.

Risk: Low. The change has a bit of churn to repurpose the Void-conversion code and removes a flag; a careful reading should show the changes are equivalent.

Tested: New test added.

Radar: rdar://problem/28269358

Reviewed by: @DougGregor

@swift-ci Please test

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - e680e4dd851bb00194c97641ba448f1c5f4a0e5c
Test requested by - @slavapestov

@swift-ci Please test

@swift-ci Please test


Package.getActivationCommands is deprecated.

Use activationCommands instead of activationEvents in your package.json
Commands should be grouped by selector as follows:
  "activationCommands": {
    "atom-workspace": ["foo:bar", "foo:baz"],
    "atom-text-editor": ["foo:quux"]
  }

Package.getActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:808:9)
Package.hasActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:733:20)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:185:24)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:163:15)
Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:177:12)
PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:355:14)

+1

+1

+1

I've tried this: https://github.com/amoussard/sftp-deployment/pull/60 but to no avail.

+1

+1

Hi guys,
This issue is fixed.


bug: gRPC Connection is closed before opened stream

In what area(s)?

/area runtime

/area operator

/area placement

/area docs

/area test-and-release

What version of Dapr?

1.9
Expected Behavior
When discovering pluggable components the reflect client expects to be reseted before grpc connection is closed, this will release unused resources like gRPC streams. Currently this is handled when the object is gargabe collected, as some languages doesn't handle well the connection being closed first, this will prevent some errors and improve memory management and gc pressure.
Actual Behavior
gRPC connection is closed before closing stream.
Steps to Reproduce the Problem
Discover a pluggable component implemented with .NET and check the following error:
info: Grpc.AspNetCore.Server.ServerCallHandler[14]
      Error reading message.
      System.IO.IOException: The request stream was aborted.
       ---> Microsoft.AspNetCore.Connections.ConnectionAbortedException: The HTTP/2 connection faulted.
         --- End of inner exception stack trace ---
         at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
         at System.IO.Pipelines.Pipe.GetReadAsyncResult()
         at System.IO.Pipelines.Pipe.DefaultPipeReader.GetResult(Int16 token)
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2MessageBody.ReadAsync(CancellationToken cancellationToken)
         at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
         at Grpc.AspNetCore.Server.Internal.PipeExtensions.ReadStreamMessageAsync[T](PipeReader input, HttpContextServerCallContext serverCallContext, Func`2 deserializer, CancellationToken cancellationToken)
fail: Grpc.AspNetCore.Server.ServerCallHandler[6]
      Error when executing service method 'ServerReflectionInfo'.
      System.IO.IOException: The request stream was aborted.
       ---> Microsoft.AspNetCore.Connections.ConnectionAbortedException: The HTTP/2 connection faulted.
         --- End of inner exception stack trace ---
         at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
         at System.IO.Pipelines.Pipe.GetReadAsyncResult()
         at System.IO.Pipelines.Pipe.DefaultPipeReader.GetResult(Int16 token)
         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2MessageBody.ReadAsync(CancellationToken cancellationToken)
         at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
         at Grpc.AspNetCore.Server.Internal.PipeExtensions.ReadStreamMessageAsync[T](PipeReader input, HttpContextServerCallContext serverCallContext, Func`2 deserializer, CancellationToken cancellationToken)
         at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
         at Grpc.AspNetCore.Server.Internal.HttpContextStreamReader`1.<MoveNext>g__MoveNextAsync|9_0(ValueTask`1 readStreamTask)
         at Grpc.Reflection.ReflectionServiceImpl.ServerReflectionInfo(IAsyncStreamReader`1 requestStream, IServerStreamWriter`1 responseStream, ServerCallContext context)
         at Grpc.Shared.Server.DuplexStreamingServerMethodInvoker`3.Invoke(HttpContext httpContext, ServerCallContext serverCallContext, IAsyncStreamReader`1 requestStream, IServerStreamWriter`1 responseStream)
         at Grpc.Shared.Server.DuplexStreamingServerMethodInvoker`3.Invoke(HttpContext httpContext, ServerCallContext serverCallContext, IAsyncStreamReader`1 requestStream, IServerStreamWriter`1 responseStream)
         at Grpc.AspNetCore.Server.Internal.CallHandlers.DuplexStreamingServerCallHandler`3.HandleCallAsyncCore(HttpContext httpContext, HttpContextServerCallContext serverCallContext)
         at Grpc.AspNetCore.Server.Internal.CallHandlers.ServerCallHandlerBase`3.<HandleCallAsync>g__AwaitHandleCall|8_0(HttpContextServerCallContext serverCallContext, Method`2 method, Task handleCall)

Release Note

RELEASE NOTE:

/assign


[Idea] Calendar display of day's tweets, link to day's tweet stream

On top of having the prompt of the day, you have a stream of that day's tweets below. Maybe have a calendar, with each day linked to its stream of tweets.

Source

This is unlikely tp happen anymore due to impending Twitter API paywall.


Paused clock message addition.

Adding a message when the clock is paused.
When I played with my friends, the clock suddenly stopped and no one understood why. It took us a little time to understand that when you click it, it stops.
I added a message that indicates that the clock is paused and that it can be "unpaused" by clicking on it again.
Currently, only English and Hebrew have translated messages, but all the translation JSON files have the required added fields. All there's left to do is to translate it.

Would it be simpler to use a pause symbol? It's a shame nothing seems to be getting merged here


Update pubsub-quickstart.md to fix components path flag

change resources path to components path
Thank you for helping make the Dapr documentation better!
Please follow this checklist before submitting:

[ ] Commits are signed with Developer Certificate of Origin (DCO - learn more)
[ ] Read the contribution guide
[ ] Commands include options for Linux, MacOS, and Windows within codetabs
[ ] New file and folder names are globally unique
[ ] Page references use shortcodes instead of markdown or URL links
[ ] Images use HTML style and have alternative text
[ ] Places where multiple code/command options are given have codetabs

In addition, please fill out the following to help reviewers understand this pull request:
Description

Issue reference

@greenie-msft


Installing teamspeak not working because of license agreement showing up

Describe the bug
When adding teamspeak_client to environment.systemPackages and then running nixos-rebuild switch, at some point the license agreement of teamspeak shows up in the console and I couldn't find a way to accept it. Because of this, the installation is stuck forever at this point with no instructions how to continue.
To Reproduce

add teamspeak_client to environment.systemPackages
run nixos-rebuild switch

Expected behavior
The last command should complete and teamspeak should be installed on my system.
Screenshots

Additional context
I've tried both stable and unstable, but got the same result for both.
Metadata
 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.71, NixOS, 19.09pre192418.e19054ab3cd (Loris)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3`
 - channels(patrik): `"nixos-19.09pre190978.8d1510abfb5"`
 - channels(root): `"nixos-19.09pre192418.e19054ab3cd"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
  - teamspeak_client

I can reproduce this.
Seem like the sandbox changed lately and the less command doesn't get the q from echo -e 'q\ny' | sh -xe $src.
I will submit a PR with a fix.


[BUG] Not possible to use this app since latest version

Describe the bug
If the app wasn't successfully configured before downloading the new version from AppStore, we get locked out, we're just stuck on a screen that shows that our endpoint isn't updated to the latest version (since it doesn't have an endpoint configured, this is very much expected).
I tried removing the app and restarting the phone, but that doesn't seem to clear the app data.
Expected behavior
We need a way to clear the app data and start all over again.
Screenshots

Smartphone (please complete the following information):

Device: iPhone 14 Pro
OS: 17.5.1
Version of Container: N/A
Version of iGotify: 1.3.0

#72

I have the same result with an iPad that didn't have iGotify installed ever. Once installed it shows the same issue

Update is accepted and live

Fix works on one device / instance where i left the app as it was. On another device / instance where i deleted the app on ios and reinstalled it, the app stills hangs on the blue screen where it can't find a latest version instance. I'm not able to reenter the urls etc. of gotify and igotify...

Closed duplicate of #72


Support for s containing MathML

Firefox supports embedding MathML objects using the <object> tag, with mime type application/mathml+xml.  Chromium doesn't support this, so it would be great to use MathJax for this.
This topic was discussed on the mailing list some time ago: https://groups.google.com/forum/#!msg/mathjax-users/5VOt3rJXHms/X1_ovYTCm5MJ, and led to a wiki page in MathJax-docs (https://github.com/mathjax/mathjax-docs/wiki/External-MathML-files-with--object--does-not-work-with-MathJax), but the solution posted there is for MathJax v2.
The feature request is for MathJax to replace <object>s with type  application/mathml+xml  with its own rendering.
Here is an example:

input.mml<?xml version="1.0" encoding="UTF-8"?>
<math xmlns="http://www.w3.org/1998/Math/MathML" alttext="1+2" display="block">
  <mrow>
    <mn>1</mn>
    <mo>+</mo>
    <mn>2</mn>
  </mrow>
</math>

HTML source code<object type="application/mathml+xml" data="input.mml"></object>

Alternatives: Including MathML directly works fine, but it's not as convenient for reusing math.

If you are willing to change the type to type="text/html" (which renders essentially the same in Firefox, and allows other browsers to at least load the MathML document and try to display it), then you can use
<script>
MathJax = {
  options: {
    renderActions: {
      objects: [5, (doc) => {
        const objects = Array.from(document.querySelectorAll('object[type="text/html"]'));
        const jax = doc.inputJax[0];
        for (const object of objects) {
          const mml = ((object.contentDocument || {}).documentElement || {});
          if (String(mml.nodeName).toLowerCase() === "math") {
            object.parentNode.replaceChild(document.importNode(mml, true), object);
          }
        }
      }]
    }
  }
}
</script>
<script id="MathJax-script" async<EMAIL_ADDRESS>
to have MathJax v3 replace the objects by the MathML they contain, and then process that MathML as through it were in the main document originally.
It you leave it as type="application/mathml+xml", then it will work in Firefox (with the native Firefox MathML rendering replaced by MathJax's rendering), but will not work in Chrome or other browsers.

Thanks! This snippet is perfect.  I have updated the wiki page.


[RNN/LSTM]concatenation error during invoke()

1. System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux
TensorFlow installation (pip package or built from source): pip
TensorFlow library (version, if pip package or github SHA, if built from source):

2. Code
I converted pytorch model to tensorflow using onnx. The output of converted tensorflow model is exactly as expected.
The following is the pytorch model code:
    def __init__(self, device: Union[str, torch.device]=None, verbose=True, weights_fpath: Union[Path, str]=None):
    super().__init__()
    self.lstm = nn.LSTM(mel_n_channels, model_hidden_size, model_num_layers, batch_first=True)
    self.linear = nn.Linear(model_hidden_size, model_embedding_size)
    self.relu = nn.ReLU()
    if device is None:
        device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
    elif isinstance(device, str):
        device = torch.device(device)
    self.device = device

    # Load the pretrained model'speaker weights
    if weights_fpath is None:
        weights_fpath = Path(__file__).resolve().parent.joinpath("pretrained.pt")
    else:
        weights_fpath = Path(weights_fpath)

    if not weights_fpath.exists():
        raise Exception("Couldn't find the voice encoder pretrained model at %s." %
                        weights_fpath)
    start = timer()
    checkpoint = torch.load(weights_fpath, map_location="cpu")
    self.load_state_dict(checkpoint["model_state"], strict=False)
    self.to(device)

    if verbose:
        print("Loaded the voice encoder model on %s in %.2f seconds." %
              (device.type, timer() - start))

def forward(self, mels: torch.FloatTensor):
    _, (hidden, _) = self.lstm(mels)
    embeds_raw = self.relu(self.linear(hidden[-1]))
    return embeds_raw / torch.norm(embeds_raw, dim=1, keepdim=True)

I then converted the tesorflow .pb model to tensorflow lite using the code:
import tensorflow as tf
converter = tf.lite.TFLiteConverter.from_saved_model("test_new1")
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.experimental_new_converter=True
converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS,tf.lite.OpsSet.SELECT_TF_OPS]
tfmodel = converter.convert()
open('test_new1/saved_lite.tflite', 'wb').write(tfmodel)

I then tried to infer using the tflite model using the following code:
import tensorflow as tf
interpreter = tf.lite.Interpreter(r'test_new1/saved_lite.tflite')
input_details = interpreter.get_input_details()
output_details= interpreter.get_output_details()
interpreter.set_tensor(input_details[0]['index'],dummy_input)
interpreter.invoke()

The output of the input_details and output_details is:
[{'name': 'serving_default_actual_input_1:0',
  'index': 0,
  'shape': array([  1, 160,  40], dtype=int32),
  'shape_signature': array([ -1, 160,  40], dtype=int32),
  'dtype': numpy.float32,
  'quantization': (0.0, 0),
  'quantization_parameters': {'scales': array([], dtype=float32),
   'zero_points': array([], dtype=int32),
   'quantized_dimension': 0},
  'sparsity_parameters': {}}]
[{'name': 'StatefulPartitionedCall:0',
  'index': 154,
  'shape': array([  1, 256], dtype=int32),
  'shape_signature': array([ -1, 256], dtype=int32),
  'dtype': numpy.float32,
  'quantization': (0.0, 0),
  'quantization_parameters': {'scales': array([], dtype=float32),
   'zero_points': array([], dtype=int32),
   'quantized_dimension': 0},
  'sparsity_parameters': {}}]

The size of the dummy_input is [1,160,40]
The error I am getting is:
 tensorflow/lite/kernels/concatenation.cc:158 t->dims->data[d] != t0->dims->data[d] (296 != 1)Node number 3 (CONCATENATION) failed to prepare.Node number 48 (WHILE) failed to invoke.
Can anyone help me out with the this issue as I am converting a pretrained pytorch model to tflite. The issue I am facing is during the conversion of tensorflow to tflite because till tensorflow it is perfectly working fine.

Hi @Raj-Gohil!
Could you confirm that input shape for both original model and lite model is [1,160,40] . If not same , you can resize the input tensor in lite model to shape of original model.
Would it possible to share a toy model/ Colab gist too.
Thank you!

Hello @mohantym,
The input shape is [1,160,40]
If you want i can share the .pb file.

Ok @Raj-Gohil !
Did you check the fusion code lab instructions ? Please share the model file too.
Thank you!

test_new1.zip
This is the folder which has the .pb and .tflite model.
Please check it out and I did not get what exactly is to be done according to the fushion code lab instructions.
If you can share a code snippet of what needs to be done in python... it would be great.

Do you have updates on this @mohantym

@Raj-Gohil
I was able to reproduce concatentation.cc error with above method. Proposed idea on Fusion code lab was like below.
( But it was throwing dimension mismatch)
run_model = tf.function(lambda x: model(x))
BATCH_SIZE = 1
STEPS = 160
INPUT_SIZE = 40
concrete_func = run_model.get_concrete_function(
    tf.TensorSpec([BATCH_SIZE, STEPS, INPUT_SIZE], model.inputs[0].dtype))

# model directory.
MODEL_DIR = "keras_lstm"
model.save(MODEL_DIR, save_format="tf", signatures=concrete_func)

converter = tf.lite.TFLiteConverter.from_saved_model(MODEL_DIR)
tflite_model = converter.convert()

Attached gist for reference.
Thank you!

Hello @sachinprasadhs .... do we have any update on this?

Hi @Raj-Gohil
As this comment suggests, the issue can be while authoring the model. Can you please check the input shape compatibility with the channels while converting to tensorflow?
Thanks.


Getting the CAM for BiT

Hi.
I am trying to get CAM for a particular variant of the BiT (Big Transfer) family of ResNets. I think I am providing the the target_layer name correctly however I am unable to make it work.
Here's how the last portion of the model looks like:
(norm): GroupNormAct(
    32, 6144, eps=1e-05, affine=True
    (act): ReLU(inplace=True)
  )
  (head): ClassifierHead(
    (global_pool): SelectAdaptivePool2d (pool_type=avg, flatten=False)
    (fc): Conv2d(6144, 1000, kernel_size=(1, 1), stride=(1, 1))
  )
)

Here's the error I am getting:
KeyError                                  Traceback (most recent call last)
<ipython-input-13-f63345257370> in <module>()
      1 model = timm.create_model('resnetv2_101x3_bitm', pretrained=True).eval()
----> 2 cam_extractor = CAM(model, fc_layer='fc')
      3
      4 # Get your input
      5 img = read_image("welsh-corgi-1581119_960_720.jpg")

/usr/local/lib/python3.7/dist-packages/torchcam/cams/cam.py in __init__(self, model, target_layer, fc_layer, input_shape)
     62                 raise ValueError("unable to resolve `fc_layer` automatically, please specify its value.")
     63         # Softmax weight
---> 64         self._fc_weights = self.submodule_dict[fc_layer].weight.data
     65
     66     def _get_weights(self, class_idx: int, scores: Optional[Tensor] = None) -> Tensor:

KeyError: 'fc'

The main code:
model = timm.create_model('resnetv2_101x3_bitm', pretrained=True).eval()
cam_extractor = CAM(model, fc_layer='fc')

Here's the Colab Notebook to reproduce the issue.

Hi @sayakpaul :wave:
There are two things to consider:

simply put, the fc_layer in your model is not named "fc" in your model state_dict but "head.fc". So that's the easy fix :)
In the last release, I actually added an automatic layer name resolution both for the target_layer (which you are using since you didn't pass a value), but also for the fc_layer (so if you don't specify it, it will find "head.fc" by itself)

Let me you still encounter issues!

Thank you for your reply. I will update the comment after I have had a chance to review it.

I followed the first suggestion but the activation map that comes out is not suitable for plotting. Here's the Colab Notebook.
Once this is worked out I can submit a PR making a fully runnable Colab Notebook including the implementation algorithms that might make it easier for folks to try out this awesome piece of work.

I'll investigate, the tricky part here is that there is no FC in the model but a final conv1x1 layer!
And the base CAM method requires a FC, I'll try to make it compatible

Thank you so much!

@sayakpaul if you try again with "head.fc", it should work now ;)

Just tried it out but the issue still persists. You can verify this with the Colab Notebook as noted here: https://github.com/frgfm/torch-cam/issues/68#issuecomment-825525591.

But in order to try this, you need to install the project from source (I don't release & publish to pypi every commit :))
Try replacing:
pip install torchcam

by
git clone https://github.com/frgfm/torch-cam.git && git pull && pip install -e torch-cam/. --upgrade

Hope this helps!

Works like a charm now.
Could you update here in this thread when you have a chance to release a new version? I would be happy to work on the following:

Once this is worked out I can submit a PR if you'd like with a fully runnable Colab Notebook including the implementation algorithm. This might make it easier for folks to try out this awesome piece of work.

@sayakpaul I'll try!
But feel free to open a PR at anytime :ok_hand: (do you mean the notebook to be showcasing how to use timm? or is the purpose different?)

No no. I want to work on a Colab Notebook to make it easier for folks to get started with torch-cam and the algorithms it implements. The Colab Notebook would essentially be what I am currently doing inside the notebook (will include torchvision models to reduce the dependency cycle) but with different algorithms that torch-cam provides off-the-shelf.
Let me know if anything is unclear.


Invalid link in notation login error message

What is not working as expected?
The troubleshooting link in the error message of notation login is not working (404 Not Found).

Error: failed to log in to docker.io: the credential could not be saved because a credentials store is required to securely store the password. See https://notaryproject.dev/docs/how-to/registry-authentication/

Looks like the corresponding page has been moved to https://notaryproject.dev/docs/user-guides/how-to/registry-authentication/.
What did you expect to happen?
The error message should be updated with the correct link.
How can we reproduce it?
Run notation login on a Linux machine with no credentials store installed.
Describe your environment
Notation installation method : wget
OS version: Ubuntu 18.04.4 LTS (WSL)
Shell type: Bash on Windows
What is the version of your Notation CLI or Notation Library?
Version:     1.0.0
Go version:  go1.20.7
Git commit:  80e3fc4e2eeb43ac00bc888cf41101f5c56f1535

I will investigate a redirection solution for this broken link.

IMO we should avoid adding link in CLI and instead maintain error message FAQ in the https://notaryproject.dev/ website. This way we can update/archive FAQ without much effort

@priteshbandi Thanks for your advice. From my observation, the common practice is to use versioned URL in the CLI/GUI. The root cause of this issue is the Notary Project website lacks of version control so we can't use a versioned permanent doc link in CLI.
We are working on supporting version control in the the Notary Project website  https://github.com/notaryproject/notaryproject.dev/issues/350


:sparkles: Export Applications to issue manager

Creates tickets when exporting applications (through migration waves) against Issue Manager (Jira for now).
[
  {
    "id": 1,
    "createUser": "admin",
    "updateUser": "",
    "createTime": "2023-05-03T11:33:46.870598326Z",
    "kind": "Improvement",
    "reference": "",
    "link": "",
    "parent": "bugproj",
    "error": true,
    "message": "",
    "status": "",
    "lastUpdated": "2023-05-03T12:16:18.099211391Z",
    "fields": {},
    "application": {
      "id": 1,
      "name": "App1"
    },
    "tracker": {
      "id": 1,
      "name": "Sam"
    }
  },
  {
    "id": 2,
    "createUser": "admin",
    "updateUser": "",
    "createTime": "2023-05-03T11:33:46.870850248Z",
    "kind": "Improvement",
    "reference": "",
    "link": "",
    "parent": "bugproj",
    "error": true,
    "message": "",
    "status": "",
    "lastUpdated": "2023-05-03T12:16:18.314930287Z",
    "fields": {},
    "application": {
      "id": 2,
      "name": "App2"
    },
    "tracker": {
      "id": 1,
      "name": "Sam"
    }
  },
.../...
]

Resolves https://github.com/konveyor/tackle2-ui/issues/590

- resource:
    id: 1
    createuser: admin.noauth
    createtime: 2023-05-04T10:22:48.262349-04:00
  name: instance-sam
  url: http://slucidi.atlassian.net/
  kind: jira-cloud
  message: '401 Unauthorized: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>401</status-code><message>Client
    must be authenticated to access this resource.</message></status>: request failed.
    Please analyze the request body for more details. Status code: 401'
  connected: false
  lastupdated: 2023-05-05T10:13:55.206217-04:00
  metadata: {}
  identity:
    id: 1
    name: jira-sam

This is what my tracker looks like @gildub

Opened https://github.com/konveyor/tackle2-ui/issues/858. LGTM


{"message":"Forbidden"} 403 error

I can't access the website anymore, the message {"message":"Forbidden"} is shown as plain text in the page and nothing else.
Using Chrome, Firefox and Windows 10

Yeah sorry. I've received some abuse in the last few days causing my lambda bill to skyrocket. I've temporarily shut down while I move over to something that's not going to cost me a fortune if someone abuses it. Should be a no more than a couple more days. I'll update when this is done.

This took longer than I anticipated, but burner.kiwi is back up.


Changed order of looping arrays closes#1207

Closes https://github.com/softlayer/sl-ember-components/issues/1207

I have reviewed this change and it is ready to merge.

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from the review on Reviewable.io

Reviewed 1 of 1 files at r1.
Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.

Comments from the review on Reviewable.io


Update README.md

@ankursinghprime thanks for submitting this PR!


Warning: The set-output command is deprecated and will be disabled soon

GitHub Actions displays this warning:

The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Related issue: https://github.com/aws-actions/configure-aws-credentials/issues/521

Superseded by https://github.com/aws-actions/aws-cloudformation-github-deploy/issues/80