Simplify sexp example

The sexp example is not using the LabelledTypeClassCompanion object and thusly is repeating a lot of boilerplate.
I was curious if there was a good reason for that so I set out to convert it to using the alternative method. It turns out this method would seem to work as all tests still pass.
Maybe there is a runtime performance hit or some other reason I am not thinking of in which case I would be really grateful if someone could explain what it is.
If not, then I suggest merging the PR in order to avoid misleading newcomers (like myself to a certain extent) into thinking typeclass derivation is more complex than it needs to be (for a user).

@fommil put this example together before I had rebuilt TypeClass and friends on top of Lazy and Generic, so the option wasn't available then. I think that now it serves as a good example of how to use the lower-level infrastructure, as compared with the monoid derivation example which uses TypeClass.
Maybe it would be an idea to have both variants (maybe in the same source file) to illustrate the differences, probably with an addition to the current version which does something which goes beyond what's possible with TypeClass (ie. pulling in an instances for some other type class during the derivation process).

it would be great to see this as a separate example. I'm planning on using TypeClass in anger within ENSIME and I'd like to see how the new approach stacks up against it.
I'd also be really interested in seeing spray-json using shapeless for sealed families... I have an extremely good performance stress test at my work that I could run it through :wink: (already been sending PRs to core spray-json with significant performance fixes)

btw, an example using a simplified version of JsValue would be awesome. In terms of "user land" serialisers/deserialisers, just int/String/List[T] would be more than enough.... the extension to full spray-json would then be fairly trivial.

My train of thought was that the special treatment of Option in the csv example was a good example of how and why to use the low-level infrastructure and so I figured since this example did not need the low-level infrastructure that it could show the more concise way. However, I was not aware that there was an example deriving instances for Monoid that was using the more concise approach.
I guess it can't hurt to have both for the sexp example.
@fommil I just finished upgrading to Shapeless 2.1 for this internal json lib we have so I feel pretty comfortable writing an example for spray-json if you think it would be useful.

Oh yes please! I have so much stuff to do in ENSIME right now that I'll never get round to it :smile:

I think the consensus we reached was to have this as a separate example which could be easily put side by side with @fommil's original ... would be great if you have time to put that together.

Yes. I'll try to find the time this weekend or next week to do this! Thx
for poking me (seriously)!
On Feb 20, 2015 12:12 AM, "Miles Sabin"<EMAIL_ADDRESS>wrote:

I think the consensus we reached was to have this as a separate example
which could be easily put side by side with @fommil
https://github.com/fommil's original ... would be great if you have
time to put that together.
—
Reply to this email directly or view it on GitHub
https://github.com/milessabin/shapeless/pull/316#issuecomment-75203277.

@jedesah are you doing the SExp or Spray JSON using the new shapeless API? I'll be very happy to see it because I've been meaning to bring this all into ENSIME when we move to 2.1.

@jedesah where are you on the spray-json version of this? I will do it as part of https://github.com/ensime/ensime-server/issues/844 unless you beat me to it, so please do keep me in the loop if you have something :smile:

@fommil I haven't been able to find the time to do this yet, so feel free to go ahead and do it. I certainly won't mind!
@milessabin btw, the spray-json example will need to use the lower-level API in order to handle Options in a nifty way (much like the CSV example) so it might make sense to simplify the SEXP example since it does not actually need the extra flexibility (at least not in it's current form). I feel like this PR should either be merged as is or I (or someone else) can submit a new PR that modifies this example to actually require the low-level API.

I'm looking at doing the Spray JSON marshaller as port of ENSIME. If it works out well, I might release it as a separate project.

FYI this is the first cut of my spray-json coproduct marshaller using shapeless 2.2: https://github.com/fommil/ensime-server/blob/shapeless/jerk/src/main/scala/org/ensime/jerk/FamilyFormats.scala
unfortunately, the tests don't compile https://github.com/fommil/ensime-server/blob/shapeless/jerk/src/test/scala/org/ensime/jerk/FamilyFormatsSpec.scala#L24 complaining about "forward reference extends over definition of value tokenTreeFormat"
I have no idea what is going on. this is the referenced ExampleAst https://github.com/fommil/ensime-server/blob/shapeless/sexpress/src/test/scala/org/ensime/sexp/formats/ExampleAst.scala
If I drop the "implicit" from that line, I get "unreachable code".

I get the feeling this PR is dead ... do you want to revive it or shall I close it now?

Yes, I think it is safe to close for now at least.


ImGui is supposed to be in a root include directory

I am using CMake for my project together with vcpkg.
Both the ImGui examples themselves aswell the vcpkg port (and any other third party widget i know) expect imgui to be in a root include directory:
#include <imgui.h> or
#include "imgui.h".
However, imgui_gradient expects it to be in a subfolder:
#include <imgui/imgui.h>.
So if someone uses imgui with vcpkg, using imgui_gradient is impossible without duplicating the headers.
Edit:
[build] .../build/.../external/imgui_gradient-src/src/extra_widgets.cpp:2:10: fatal error: 'imgui/imgui.h' file not found
[build] #include <imgui/imgui.h>
[build]          ^~~~~~~~~~~~~~~
[build] 1 error generated.

You are right, thanks for the heads up!


Add Spanner struct parameters sample.

I think you need to run composer update on PHP 5.6 to fix those failing tests


Simplify-prepare-config

Improvements to the prepare config CLI and API. These are breaking changes
(Delete unused sections)
Added public API:

config.duration, a more convenient way of specifying run durations.

Refactored public API:

Removed initial condtions related arguments from prepare-config and the argo workflows.

Fixed bug and running integration tests manually here: integration-test-45ca143-0d5f

Fixed one more bug...new tests here: integration-test-7e4a3bd-3f8a

I just restarted the last integration test, which looks like it got terminated for some reason.

i'm confused about why the integration tests are failing. Seems unrelated.

How would you configure the start time for a run that does not use coarsened restarts for initial conditions? I think it would be necessary to directly set the namelist.coupler_nml.current_date?

I tested this with the microphysics prognostic run script. It pulls the date from the restart files as long as  force_date_from_namelist is not true.

It pulls the date from the restart files as long as force_date_from_namelist is not true.

Sure, but what about GFS analysis initial conditions? They do not provide any date information, you need to configure it.

I see. We could make an initial date timestamp an option for GFS as well.


Error Syncing NAS Share with .recycle/user Folder

What version of Music Assistant has the issue?
Latest Release
The problem
I have my NAS drive mapped via a script as outlined in the How To. The script runs at startup and mounts the drive fine and I can see, navigate, and play any of the files under Media>Local Files>NASFiles. But when MA syncs the drive I only see a small amount of artists show up. I looked through the logs and found the following error
Logger: music_assistant
Source: /usr/local/lib/python3.9/site-packages/music_assistant/mass.py:244
First occurred: 2:07:59 AM (3 occurrences)
Last logged: 5:39:28 AM
Job [Library sync for provider Filesystem] failed with error [Errno 13] Permission denied: '/media/nasfiles/.recycle/lord_nex'.
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 163, in sync_library
async for entry in scantree(self.config.path):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 75, in scantree
async for subitem in scantree(entry.path):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 75, in scantree
async for subitem in scantree(entry.path):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 73, in scantree
for entry in entries:
PermissionError: [Errno 13] Permission denied: '/media/nasfiles/.recycle/lord_nex'
Could this be causing the rest of the scan to fail? The user has rights to the NAS fine but probably doesn’t to the hidden .recycle folder. I didn’t know if there was anything I could do or change, I have the local files set to /media/nasfiles which is where my script mounts the drive.
How to reproduce
Not sure. Im running OpenMediaVault as a NAS Server on VMWare
Relevant log output
Logger: music_assistant
Source: /usr/local/lib/python3.9/site-packages/music_assistant/mass.py:244
First occurred: 2:07:59 AM (3 occurrences)
Last logged: 5:39:28 AM
Job [Library sync for provider Filesystem] failed with error [Errno 13] Permission denied: '/media/nasfiles/.recycle/lord_nex'.
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 163, in sync_library
async for entry in scantree(self.config.path):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 75, in scantree
async for subitem in scantree(entry.path):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 75, in scantree
async for subitem in scantree(entry.path):
File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 73, in scantree
for entry in entries:
PermissionError: [Errno 13] Permission denied: '/media/nasfiles/.recycle/lord_nex'
Additional information
No response
What version of Home Assistant Core are your running
2022.6.7
What type of installation are you running?
Home Assistant OS
On what type of hardware are you running?
Alternative

did you test this with MA version 2022.6.10 ?

It also doesn’t scan the entire directory. It seems to get one or two artists in the directory but I have hundreds. No matter how many times I scan it pretty much stays the same. It does seem to pick up the occasional extra track or at least the number of tracks has slowly went up by one or two over the past week.
What would be nice is if it could scan that entire directory and list all audio files that it can handle.
Let me know if there are character restrictions or anything as a few of the albums have some.

AFAIK uni code characters can cause issues

Yes, same issue
Benjamin T Powers
On Jul 5, 2022, at 3:54 AM, Eric @.***> wrote:

AFAIK uni code characters can cause issues
—
Reply to this email directly, view it on GitHubhttps://github.com/music-assistant/hass-music-assistant/issues/568#issuecomment-1174798023, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACGXNJEQQHFBKN32WAP6BVLVSPZ3JANCNFSM52MKXUSA.
You are receiving this because you authored the thread.Message ID: @.***>

Ok I’ll go through my list and see if there is something out of spec. Might try a cleanup app for mp3s
On Jul 5, 2022, at 3:54 AM, Eric @.***> wrote:

AFAIK uni code characters can cause issues
—
Reply to this email directly, view it on GitHubhttps://github.com/music-assistant/hass-music-assistant/issues/568#issuecomment-1174798023, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACGXNJEQQHFBKN32WAP6BVLVSPZ3JANCNFSM52MKXUSA.
You are receiving this because you authored the thread.Message ID: @.***>

Just remapped the drive and reconfigured the integration from scratch. Still getting the same error regarding the recycle folder and that seems to be killing the sync job. I went through my directories and removed any obviously bad actors so this is the only thing holding it up.
Can you put in a skip or ignore on directories that come up permission denied? That way it can continue to scan the folder it does have access too without stopping the whole thing.

Can you please give version 2022.7 beta 1 a try ?
I think/hope I fixed this one today. Thanks!

Can you please give version 2022.7 beta 1 a try ?
I think/hope I fixed this one today. Thanks!

@marcelveldt Testing it out now. Thanks I'll let you know once it's finished booting and scanning

@marcelveldt When it finished the scan MA was unresponsive. Rebooted and still was unresponsive. This was all I could find in the log.
Logger: music_assistant.music_providers.filesystem
Source: /usr/local/lib/python3.10/site-packages/music_assistant/music_providers/filesystem.py:67
First occurred: 10:34:46 PM (1 occurrences)
Last logged: 10:34:46 PM
Skip folder /media/nasfiles/.recycle/lord_nex: [Errno 13] Permission denied: '/media/nasfiles/.recycle/lord_nex'

Ok so it looks like my fix works for skipping the folder.
Now I'm curious what you mean with "unresponsive"

Ok so it looks like my fix works for skipping the folder.
Now I'm curious what you mean with "unresponsive"

When I'm in the iOS app, I cannot click on tracks, artists, or anything else. If on a desktop, it shows a partial sync of Spotify, but no local files. If I click on the directory browse it just has a loading progress bar that rolls up top.
Although I have verified that I can navigate the nasfiles under Media in Home Assistant and play files from the directory. So this seems tied to MA and not HA's access to the drive mounted to nasfiles. It did look like it was attempting to scan the directory though. I guess I should also ask if there are limits to the amount it can scan as I have a modest size share, but this will eventually be scailed up to include my whole library that's close to a petabyte. I might have to see if I can find a manager that can just publish playlists instead of having to scan the entire directory.

The recent changes make sure it can handle really large collections so you should be all set.
The only thing to look out for however is to make your structure less flattened.
So better to have an Artist\Album\track.ext structure than all files in a single folder.
Once the first scan ahs been done, your music is in the local database and will only be accessed again when you play a file or change tags.
So thing is to get through that first scan.
Maybe my fix is not good enough as it now logs but still aborts the whole sync.
I will try if i can reproduce this somehow.

OK, another attempt to work around it in beta 2...
This should skip system directories (starting with a dot) like recycle bin and it will log any non accessible directories.
Please give 2022.7 beta 2 a try and let me know!

No go. It did seem to scan more of my Spotify correctly though. Almost every song I've ever played through there showed up. But not my nasfiles. If I ,on iOS, goto browse and then to filesystem, it just spins the progress bar and never enumerates the directory
Logger: homeassistant.setup
Source: setup.py:298
First occurred: 11:42:37 PM (1 occurrences)
Last logged: 11:42:37 PM
Unable to prepare setup for platform mass.number: Platform not found (Exception importing custom_components.mass.number).
This error originated from a custom integration.
Logger: homeassistant.loader
Source: custom_components/mass/number.py:54
Integration: Music Assistant (documentation, issues)
First occurred: 11:42:37 PM (1 occurrences)
Last logged: 11:42:37 PM
Unexpected exception importing platform custom_components.mass.number
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 618, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 635, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/config/custom_components/mass/number.py", line 51, in
class CrossfadeDurationEntity(MassBaseEntity, NumberEntity):
File "/config/custom_components/mass/number.py", line 54, in CrossfadeDurationEntity
entity_description = NumberEntityDescription(
TypeError: init() got an unexpected keyword argument 'native_unit_of_measurement'
I see that beta 3 is out. I'll try that too and see what happens

Ohh also, I had to roll back to 2022.6 due to issues with Dwains Dashboard not being patched for the new python. Not sure if that makes a difference though. If you want I can provide my system health

Wait. This might be my issue. For some reason my drive mapping stopped. Let me look deeper and I'll report back when I can

Sweet! Looks like beta 3 is working so far. Haven't really tried queueing anything up as everyone's asleep. But it's enumerated the directories properly. I think there may be some music videos in the directories as well. But it seems like it's working.
Good work man 👍

Great!
I think you can use the MA 2022.7.x beta on HA 2022.6 but you'll just see some 'native_unit_of_measurement' errors and the control entities will not be working but that is not a real big deal I guess

Yea I'm waiting for Dwain to update his dashboard as it crashes under the new python version. So as soon as that gets updated hopefully I'll be back to running normally.
Honestly I wouldn't be surprised to see your addon adopted by HA as a default.
Although I think I'm going to replace my google homes with an ESP based Bluetooth speaker like the muze. Less reliance on Google and the ability to run my own internal voice assistant

Just wondering. Is it possible to integrate a recording feature into this so that you could output or save files. For either radio podcasts or Spotify?
I would imagine that's a totally different beast but would be a cool feature being to save an album for offline use or something.

No that will totally violate the terms of use so that is not going to happen, sorry.


How do I define which BAM tags contain the UMI / cell barcode?

I understand the by default Demuxalot assumes the UMI to be in the UB BAM tag and the cell barcode in the CB BAM tag as they are in cellranger output.
I have a BAM input file using XM and XC instead.
I guess that by passing tag="XC" when creating the BarcodeHandler, I can take care of one of those but I have not found any way to specify an alternative to the UB default.
Could anyone please give me a pointer on how to make Demuxalot run on my BAM file?
Thank you in advance for your help.

Hi @mschilli87
you're correct about replacing CB -> XC.
As for replacing "UB", I need to start with an explanation. UB is a cellranger-specific tag, and demuxalot also uses alignment scoring tag from cellranger (to drop poor alignments. Usually mapq is used for this purpose, but some terrible alignments can have maximal mapq).
All cellranger-specific logic is encapsulated in a single function here:
https://github.com/herophilus/demuxalot/blob/master/demuxalot/cellranger_specific.py
You can pass an alternative implementation of parse_read to all functions. Or just edit existing parse_read in-place. LMK if you need any guidance on this

@arogozhnikov: Thx for your response. I think a simple generic parse_read implementation with a UMI tag parameter (if you want, defaulting to "UB") would be nice to have. Would you be willing to provide one as part of demuxalot? I could compose a PR if that helps but I'd appreciate any form or guidance/feedback.

@mschilli87
This is a good generic starting point:
from pysam import AlignedRead
from typing import Optional, Tuple

from demuxalot.utils import hash_string

class CustomReadFilter:
    def __init__(self, umi_tag='UB', min_mapq=20):
        self.umi_tag = umi_tag
        self.min_mapq = min_mapq

    def __call__(self, read: AlignedRead) -> Optional[Tuple[float, int]]:
        if not read.has_tag(self.umi_tag):
            # does not have molecule barcode
            return None
        if read.mapq < self.min_mapq:
            # this one should not be triggered because of NH, but just in case
            return None

        p_misaligned = 0.01  # default value
        ub = hash_string(read.get_tag("UB"))
        return p_misaligned, ub

my_parse_read = CustomReadFilter(umi_tag="XM") # pass this as a parse_read argument

PS. I'd still recommend checking if there are some available tags that can help to discard non-reliable alignments

@arogozhnikov: Thx, but shouldn't it be
+        ub = hash_string(read.get_tag("UB"))
-        ub = hash_string(read.get_tag(self.umi_tag))

?
I'll check the available BAM flags regarding p_misaligned.
Would you be up for including such a class in a demuxalot release, so other projects could make use of it without the need to (re-)implement it there?

My files do have the AS and NH tags. So I guess I could go with
from pysam import AlignedRead
from typing import Optional, Tuple

from demuxalot.utils import hash_string

class CustomReadFilter:
    def __init__(self, umi_tag='UB', min_mapq=20):
        self.umi_tag = umi_tag
        self.min_mapq = min_mapq

    def __call__(self, read: AlignedRead) -> Optional[Tuple[float, int]]:
        if read.get_tag("AS") <= len(read.seq) - 8:
            # more than 2 edits
            return None
        if read.get_tag("NH") > 1:
            # multi-mapped
            return None
        if not read.has_tag(self.umi_tag):
            # does not have molecule barcode
            return None
        if read.mapq < self.min_mapq:
            # this one should not be triggered because of NH, but just in case
            return None

        p_misaligned = 0.01  # default value
        ub = hash_string(read.get_tag(self.umi_tag))
        return p_misaligned, ub

my_parse_read = CustomReadFilter(umi_tag="XM") # pass this as a parse_read argument

@arogozhnikov: Does this look good to you? If so, is there any reason not to have this be the default implementation rather than hard-coding the UMI tag to UB?

I guess what I am trying to pitch here is
def parse_read(read: AlignedRead, umi_tag="UB") -> Optional[Tuple[float, int]]:
    """
    returns None if read should be ignored.
    Read still can be ignored if it is not in the barcode list
    """
    if read.get_tag("AS") <= len(read.seq) - 8:
        # more than 2 edits
        return None
    if read.get_tag("NH") > 1:
        # multi-mapped
        return None
    if not read.has_tag(umi_tag):
        # does not have molecule barcode
        return None
    if read.mapq < 20:
        # this one should not be triggered because of NH, but just in case
        return None

    p_misaligned = 0.01  # default value
    ub = hash_string(read.get_tag(umi_tag))
    return p_misaligned, ub

Wouldn't this keep working the same as the current implementation with the added benefit of allowing to change the UMI tag without the need to copy/paste all that boilerplate code needed for the custom class?

shouldn't it be

sure, you're correct

My files do have the AS and NH tags ... Does this look good to you? ...

if you have illumina-style reads, this should work.
AS/NH are likely to be produced by STAR aligner internally, and I'd expect their meaning is the same as in cellranger.
If you have long reads, number of tolerated errors should be somewhat proportional to length.

I guess what I am trying to pitch here is ...

I guess for user it would be easier to select across available configs, rather than across flags, e.g. cellranger_short, cellranger_pacbio, pipseeker_short etc - so that parse_read could use right setting and the right tags... That's the perfect case, but this unlikely to happen.
Your suggestion would work for STAR-aligned short reads, which is probably enough.
So back to your question - PR with either setup is welcome, just make sure it actually works on your data.

@arogozhnikov: While working on (or rather testing, actually) my PR I encountered an issue not with the UB tag parameter I am adding, but with the already existing CB one:
While BarcodeHandler.__init__ has the tag parameter I need to adjust to run Demuxalot on my data, BarcodeHandler.from_file does not and returns BarcodeHandler(barcodes) without any chance to modify that flag.
As my Python is a bit rusty, I figured I check with you I got this right before trying to hack around more. My best guess would be to add a kwargs argument to the static function and pass it down to the __init__ function.
Any feedback would be appreciated.

good catch, that's why things need to be tested 😉

My best guess would be to add a kwargs argument to the static function and pass it down to the init function.

yes, that's the best approach

awesome, thank you! Please see my remark on #24

thank you @mschilli87
we just sorted out things with repo, and I've merged both your PRs 🎉
If you have time to make a separate version of this
https://github.com/arogozhnikov/demuxalot/blob/master/examples/1-plain_demultiplexing.py
for custom tags, I think that would help others with non-cellranger tags

@arogozhnikov: Thank you. I'll try to make some time do add an example as per your suggestion.
Is there any chance once I have done so those changes will make it into a (Pypi) release anytime soon? I have drneavin/Demultiplexing_Doublet_Detecting_Docs#48 open which depends on that new API which would significantly simplify deployment for me.

sure, it should be already live on pypi:
pip install demuxalot==0.4.1

@arogozhnikov: Perfect. Thank you! I opened PR #30 as per your suggestion.


Increase lodash dependency to latest

Addresses a recently announced potential lodash vulnerability

In between yesterday and today, snyk is no longer reporting the vulnerability, but I upgraded anyway. Testing shows it's fine.


Switch to using shared security helper

Remove dependency on AuthN and switch to use shared sources for security helper instead
Depends on: https://github.com/aspnet/Common/pull/27
cc @rynowak

:shipit:

46bc7dd219a73b5a08766e025ffb9db51fad23d3


update meta basic.lua

Document add standard library function [newproxy], although they do not appear in the document

The return type of newproxy should be userdata

Thank you!


Add support for Fresh Relevance via new module

What is the motivation for adding / enhancing this feature?
Add support for Fresh Relevance script injection and data collection using existing hooks.
What are the acceptance criteria

[x] Fresh Relevance Loader script included when Website ID configuration is included and module enabled
[x] Data passed down to Fresh Relevance script

Can you complete this feature request by yourself?

[x] YES
[ ] NO

Which Release Cycle state this refers to? Info for developer.
Pick one option.

[x] This is a normal feature request. This should be available on https://test.storefrontcloud.io and then after tests this can be added to next Vue Storefront version. In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
[ ] (Pick this option only if you're sure) This is an important improvement request for current Release Candidate version on https://next.storefrontcloud.io and should be placed in next RC version. In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
[ ] (Pick this option only if you're sure) This is a critical improvement request for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version. In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Additional information
Implemented following a discussion with Raymond. -followed the hotjar and GTM modules as a guide.
Currently implemented using a mix of hooks (core, cart, catalog) and some inspection of the event bus:
    if (type === 'ui/setMicrocart' && payload === true) {
      // Opening the cart sidebar
      afterCartVisited(store);
    } else if (type === 'checkout/SET_THANKYOU' && payload === true) {
      afterPurchaseComplete(store);
    } else if (type === 'product/product/SET_CURRENT') {
      productVariantSelected(store);
    } else if (type === 'route/ROUTE_CHANGED') {
      if (payload.to.name === 'checkout') {
        afterCheckoutVisited(store);
      } else {
        otherPageVisited(payload.to);
      }
    }
  });

It would be preferable to extend core to add core to add new hooks for these to cleanup this workflow - should I create a separate issue for discussion?
PR to follow.

@dhendo Thanks for pr :) We can add those hooks for each module. For example, for this checkout/SET_THANKYOU we can add hook in order module. And trigger it for each step of checkout. I think that its good idea. In future we can replace EventBus.$emit from checkout with hooks.

@gibkigonzo Thanks, shall I create a separate feature request issue to track that?


Odd version number in Windows Dev Container

What's up?
While testing various dev containers, I rebuilt PRQL on Windows. Using task web:run-playground, the playground worked as expected, except that the version number in the comment at the bottom was not 0.13.1 as expected.
Is this a concern? What other info could I provide? Thanks.
SELECT
  id
FROM
  invoices

-- Generated by PRQL compiler version:0.13.0-38-g62c7cc3c (https://prql-lang.org)

Update:

On my macOS Playground/Dev Container, the version string in the comment is the expected 0.13.1
The Windows Playground shows the commit hash for the main branch (62c7cc3c) that compiled it

I believe this is expected from #4804, correct?
See also #4546 which gives a little more detail.

Yes this is a new feature!

Great! Closing.


Running the transcriber without a VM

Hi,
I have Fedora 23 (so I cannot run the Ubuntu VM).
Could you please list the basic install steps to get the the full transcriber setup (The package dependencies I will figure out once I start installing).
Thanks

Hi,
you should be able to pretty much follow (and if needed, adapt) the steps in https://github.com/srvk/eesen-transcriber/blob/master/Vagrantfile https://github.com/srvk/eesen-transcriber/blob/master/Vagrantfile after the "config.vm.provision "shell", inline: <<-SHELL” line - this is essentially a shell script recipe that you can follow.
Hope this helps! Best,
F.

On Jun 11, 2016, at 12:12 PM, jojo05<EMAIL_ADDRESS>wrote:
Hi,
I have Fedora 23 (so I cannot run the Ubuntu VM).
Could you please list the basic install steps to get the the full transcriber setup (The package dependencies I will figure out once I start installing).
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/srvk/eesen-transcriber/issues/11, or mute the thread https://github.com/notifications/unsubscribe/AEnA8dGD9oz1ptCTYhWSzF5aGpUMNS69ks5qKt5UgaJpZM4IzlUH.

Florian Metze http://www.cs.cmu.edu/directory/florian-metze
Associate Research Professor
Carnegie Mellon University

You don't need Ubuntu in order to run the VM. You'll need Vagrant
and VirtualBox, both of which are supported on Fedora
(See Here https://fedoramagazine.org/running-vagrant-fedora-22/ and Here https://www.virtualbox.org/wiki/Linux_Downloads)
What it sounds like you're asking is how to install the system directly on
Fedora, without using virtualization or provisioning tools... this is something
we cannot provide support for, because it would entail trying/supporting every
OS  available.  The whole reason the transcriber is provided as a VM is to avoid
such OS dependencies.
This is not to say that it's not possible to do so, only that we cannot provide
detailed support - if this is what you want to do, you're on your own.  I can say
that the commands bracked by SHELL in the Vagrantfile are sufficient to install
everything you would need to install 'by hand' - save for package naming
differences between Fedora and Ubuntu (again, something we don't explicitly
support, you would have to figure this out, but there are likely equivalents for
everything)
Hope this helps, and sorry to not be of more help
On 06/11/2016 12:12 PM, jojo05 wrote:

Hi,
I have Fedora 23 (so I cannot run the Ubuntu VM).
Could you please list the basic install steps to get the the full transcriber setup (The package dependencies I will figure out once I start installing).
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/srvk/eesen-transcriber/issues/11, or mute the thread https://github.com/notifications/unsubscribe/ACX11viq4JCAs58Suo0wY9F5wcpoIwYAks5qKt5UgaJpZM4IzlUH.

--
Eric Riebling      Interactive Systems Lab
<EMAIL_ADDRESS>  407 South Craig St.

Hi, your Vagrant comment makes sense. I tried to run the VM on Fedora (see below for output).
The text below is a copy of a message I sent to<EMAIL_ADDRESS>before posting here (obviously the message got lost, I didn't realize the noreply when answering to a forum notification).
I imagine the solution is around tweaking the vagrant file but I am no vagrant or VM guru.
Any ideas?

I am running fedora 23. It seems that the config will only work on an ubuntu system. Is that correct ?
Otherwise, do you have a a guide of what I have to configure without the virtualbox?
thanks
jose
[root@i eesen-transcriber-master]# vagrant up
Bringing machine 'default' up with 'libvirt' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
default: Box Provider: libvirt
default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
default: URL: https://atlas.hashicorp.com/ubuntu/trusty64
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.
If you're adding a box from HashiCorp's Atlas, make sure the box is
released.
Name: ubuntu/trusty64
Address: https://atlas.hashicorp.com/ubuntu/trusty64
Requested provider: [:libvirt]

ok, I figured out a bit more. Seems to be a kernel module issue!
[root@i eesen-transcriber-master]# vagrant init ubuntu/trusty64; vagrant up --provider virtualbox
A Vagrantfile has been placed in this directory.  Please read
the comments in the Vagrantfile as well as documentation on
vagrantup.com for more information on using Vagrant.
The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:
VirtualBox is complaining that the kernel module is not loaded. Please
run VBoxManage --version or open the VirtualBox GUI to see the error
message which should contain instructions on how to fix this error.
[root@i eesen-transcriber-master]# VBoxManage --version
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.4.9-300.fc23.x86_64) or it failed to
load. Please recompile the kernel module and install it by
       sudo /sbin/rcvboxdrv setup

     You will not be able to start VMs until this problem is fixed.

5.0.16_RPMFusionr105871

ok, figured everything (not being familiar with VMs before)

once kernel source matches running kernel, virtualbox takes care of recompiling the modules
had to enable virtualization on BIOS/UEFI (VT-x is off by default on Intel CPUs)

After lots of output, it seems stuck in the Cloning into ..., is this normal?
==> default: Cloning into 'lm_build'...
==> default: Cloning into 'srvk-eesen-offline-transcriber'...

Good progress!  Yes sorry to not mention prerequisites are that bios, kernel
source, and kernel modules need to have virtualization enabled.
The cloning-into steps should not take extremely too long, they are downloading
files from GitHub repositories - unless you are on a wireless/slow network
connection perhaps?
On 06/13/2016 01:40 PM, jojo05 wrote:

ok, figured everything (not being familiar with VMs before)

once kernel source matches running kernel, virtualbox takes care of recompiling the modules
had to enable virtualization on BIOS/UEFI (VT-x is off by default on Intel CPUs)

After lots of output, it seems stuck in the Cloning into ..., is this normal?
==> default: Cloning into 'lm_build'...
==> default: Cloning into 'srvk-eesen-offline-transcriber'...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/srvk/eesen-transcriber/issues/11#issuecomment-225654389, or mute the thread https://github.com/notifications/unsubscribe/ACX11mN_ChSxo9-R9E_zMWdX24JBsohYks5qLZYrgaJpZM4IzlUH.

--
Eric Riebling      Interactive Systems Lab
<EMAIL_ADDRESS>  407 South Craig St.

Success!
I realize vagrant is great. It took 30min+ without feedback (no high CPU consumption either, but I didn't check network traffic). I am on a 300Mbit line.
Now I need to allocate time to experiment with the transcriber. Many thanks!
What should be the channel to ask questions or feedback? I would prefer to use github issues as they work well

What steps do you suggest so that I can hookup browser microphone and get real time transcription?
I can send the PCM samples from the browser to server every x miliseconds and then get the text back.

Agreed, and there's always a chance your github issue will help someone else
facing similar problems.  Great news to hear.
On 06/13/2016 03:24 PM, jojo05 wrote:

Success!
I realize vagrant is great. It took 30min+ without feedback (no high CPU consumption either, but I didn't check network traffic). I am on a 300Mbit line.
Now I need to allocate time to experiment with the transcriber. Many thanks!
What should be the channel to ask questions or feedback? I would prefer to use github issues as they work well
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/srvk/eesen-transcriber/issues/11#issuecomment-225681811, or mute the thread https://github.com/notifications/unsubscribe/ACX11iJvq8IYUW3LmmvcULN1Ov_MVFS6ks5qLa5jgaJpZM4IzlUH.

--
Eric Riebling      Interactive Systems Lab
<EMAIL_ADDRESS>  407 South Craig St.

This system isn't really set up for doing real-time decoding.
Even the Kaldi toolkit upon which most of the code is based does not
favor real-time decoding, but does gives a small example :
https://github.com/kaldi-asr/kaldi/tree/master/egs/voxforge/online_demo
This is not to say that it's impossible, we just haven't been putting work into
doing real-time decoding, but rather focusing on pre-recorded data for which
there is gold standard results to compare against in order to produce scores,
measure, and improve accuracy.
There is the gst-kaldi-nnet2-online repository on Tanel Alumae's GitHub https://github.com/alumae/gst-kaldi-nnet2-online
which uses the GStreamer plugin to stream audio to a Kaldi decoder.  It can
work from a command line, and even a GUI demo, but I could not say how
one might integrate this into a browser.
On 06/13/2016 03:36 PM, jojo05 wrote:

What steps do you suggest so that I can hookup browser microphone and get real time transcription?
I can send the PCM samples from the browser to server every x miliseconds and then get the text back.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/srvk/eesen-transcriber/issues/11#issuecomment-225684776, or mute the thread https://github.com/notifications/unsubscribe/ACX11ptFMY7L01JdiRzQkzr-7tJaP7rmks5qLbEsgaJpZM4IzlUH.

--
Eric Riebling      Interactive Systems Lab
<EMAIL_ADDRESS>  407 South Craig St.

Thanks, you can close the issue. Very pleased with the transcriber VM.
I suggest a wiki page with links to the key papers to understand the transcriber

Thanks


Migrate files whose upload failed

Copy filesystem attributes for legacy files in state uploading_failed to s3-related attributes
mirror new uploading_failed backend state to frontend representation
remove destroy-call when uploads fail to keep the records persisted in the failed state

REDMINE-16119

Coverage remained the same at ?% when pulling 883a9668235887c59b0309cb1cccba3bae39562f on DanielKuhn:change/direct-uploads into 1de94684b1e93a0a7ac98f898125a01d249229a7 on codevise:master.


Test explorer groups test wrong

I'm unsure if this is TUnit or some missing implementation on Rider's side (or M$ if it's in the core library), but the test explorer is not grouping tests correctly by their file.
I have a test structure like this, where the top level is a directory, and the directory contains a test file for each action (in this case  CRUD):

ApiKey

Create
Get
...

Customer

Create
Get
...

Merchant

Create
Get
...

This is not mirrored in the test explorer, where it seems the tests are grouped by the file name, and not necessarily from the directory the files are in. In this case, I'd expect a top-level directory in the test explorer for each entity type, each with levels below it for each class inside the directory

Unfortunately test frameworks don't (yet) have much control over the layout of this.
There's an issue here: https://github.com/microsoft/testfx/issues/3371
Worth trying to rally behind it if we want more flexibility and options for the test explorer.

Ah, that's a shame. I'll follow the issue and see if there is any traction on it. Thanks!


[DOC] Write developer documentation for type hints including soft dependencies.

Describe the issue linked to the documentation
Developer documentation does not sufficiently include guidance for adding type hints, espceically in situations where soft dependencies are required.
Suggest a potential alternative/fix
Add a new page in docs/developer_guide/ on adding type hints.  PyODAdapter is a good example of type hints with soft dependencies, following PEP 563.

@aeon-actions-bot assign @vedpawar2254

PR #2424 does not describe handling of soft-dependencies sufficiently.
typing.TYPE_CHECKING can be used to conditionally import soft-dependency types. However, to use those types, one must also always import from __future__ import annotations at the top of the file.
The example in the current documentation page does not include the usage of any conditionally-imported files. The displayed function is a input validation function and not related to the type-checking.

ok @SebastianSchmidl  ill fix it

Ah yep, did not mean to close this, sorry.


React.createClass is now deprecated and throws an error

pulse.js must reformatted to use:

PropTypes from 'prop-types'
classical syntax

I'll submit a PR.

#11


Define Safari App Extension Swift API requirements

Expected Behavior
There should be explicit requirements of API that cannot be supported in Safari and that should be accessed via swift.
Interface requirements
We need to address 3 major areas
1. tab methods
executeScript

signal to execute a javascript file
this may be tricky as apple wants us to preload all extension scripts now so it may require refactoring the scripts so that they are not executed upon loading or creating variants with this behavior so that they only execute a function when manually triggered

openBackgroundTab

used for login and authentication

closeTab

a way to close a tab; after logging in, close the login tab

setToolbarIcon

a way to update the toolbar icon, for dark mode vs light mode based on the user's system preference

2. tab events

onTabCreated
onTabUpdate
onTabActivated
onTabRemoved
onTabReplaced

tab event details
The event should have an object passed with tab details such as:

tabId
url
selected/highlighted/active
status (loading or completed loading)

3. API calls

a means of making api calls and receive responses for the following

save to pocket
save tags
fetch recommended tags
fetch tags

@nzeltzer to provide an api that accepts a url and an object, for example if I need to make a POST call, I call Nik's api and provide him a url, parameter objects and xhr method (POST/GET) and he constructs the xhr call based on this, makes the call and returns me the response body and response status

4. Miscellaneous
options page - TODO: frontend will handle

How will we be able to handle an options page, based on my last discussion with @nzeltzer on this we did not see a way how this could be achieved in Safari 12. Additional research is required for this.

Needs investigation on how to open a new tab to display the options page

We may display the options in a modal instead of a separate html page

onUpdateAvailable

how to handle updating and reloading the extension

Actual Behavior
Extension not working in safari.
Steps to Reproduce the Problem
N/A
Specifications

Version: Save To Pocket v<IP_ADDRESS>
Browser: Safari
Operating System: Mac OS Mojave 10.14.5

@here Just checking in to let y’all know that I’ve been actively working on the Swift API bridge as outlined in Nelson’s Github issue (https://github.com/Pocket/extension-save-to-pocket/issues/88)
Here’s a brief update on where I’m at:
💚 executeScript (possible; in process—may need some more guidance once I get a little deeper into it)
💚 openBackgroundTab (done—can pass in an arbitrary url string)
🔶 closeTab (possible)—we can close a tab; it appears that we can close an arbitrary tab; would be useful to know what parameters we want to pass to this method (i.e., do we want to close the active tab, or do we want the ability to close a specific tab?)
🔶  setToolbarIcon (impossible; not clear on why we need this—if it’s for theming on dark/light theme, there are better ways to do this)
🖤  tab events (impossible from the Swift side—there may be Javascript callbacks, but I haven’t investigated yet)
💚  API calls (possible; in progress—I am writing a basic API client that will allow you to pass in a JSON object with url, method, callback and parameters fields. The JSON response, HTTP status code, etc will be passed back to the callback function).

Update on executeScript. It looks like we'll need to take the refactor approach: I've been unable to load a script by any means other than the one you described initially.

However, there is this: https://developer.apple.com/documentation/safariservices/safari_app_extensions/safari_app_extension_info_property_list_keys/about_permissions_for_scripts_and_style_sheets?language=objc

Update on setToolbarIcon. If it was our intent to use this to transition between light/dark themes on macOS, we can drop this requirement: Safari will automatically invert the extension's icon from black-on-white to white-on-black when the system transitions—it's a freebee.

Update on closeTab. I've added a function that will close the tab for the active page. safari.extension.dispatchMessage('closeTab').
If we want to close a specific tab, we'll need to agree on some specific identifier (e.g., page URL) to match the tab we want to close against all others. (But, note, identifiers like URL are not guaranteed to be unique across multiple tabs).

@nzeltzer do we have a way to update the toolbar icon?

setToolbarIcon
a way to update the toolbar icon, for dark mode vs light mode based on the user's system preference

@nelsonomuto I don’t believe there’s a way to do this programatically. This is for Dark Mode on Mojave+?
If so, might be worth verifying that the toolbar icon doesn’t invert automatically.

@nzeltzer that's only one of the use cases, we also need this API so we can switch the toolbar icon when the user makes a save, when the user saves to pocket, we need to switch to the red icon

@nzeltzer also one more thing that I overlooked was a way to retrieve cookies for session management, we need a way to get cookies created under the base url https://getpocket.com/ after the user has logged in I added this as

Cookies
We need a way to identify cookies set in the browser for any base url. Something similar to chrome.cookies API https://developer.chrome.com/extensions/cookies

@nzeltzer also
c) Right-click context menu

Display extension icon and label for "Save to Pocket" which when clicked triggers the extension

d) Keyboard shortcuts

Triggering the extension via keyboard shortcuts: Ctrl+Shift+P (Windows), Command+Shift+P (Mac)

@nzeltzer that's only one of the use cases, we also need this API so we can switch the toolbar icon when the user makes a save, when the user saves to pocket, we need to switch to the red icon

@nelsonomuto This looks doable. What would you like as far as an API is concerned?
Is the ability to pass in an image name sufficient?


Revert changes to GTM ID

The GTM ID was accidentally changed to reference the ‘dev’ GTM environment in 6bbb1d62a03ff7589ffe33c3f53304fdfd732664 whilst testing using the tets-events-ga branch.
This reverts that change to re-instate the production GTM ID.

Netlify seems to be having some issues at the minute - getting 'Error scheduling build' in the logs.
Will merge with Netlify failing, as long as Travis passes.


Automated cherry pick of #2984: lbbackends: 改进错误信息传递

Cherry pick of #2984 on release/2.10.0.
#2984: lbbackends: 改进错误信息传递

/lgtm

/approve


Upgrade agent to Server 2019 with VS2019

The PRs were already passing, but I'm hoping this fixes the internal CI as well.

/azp run Setup-vswhere-CI

I ran the Setup-vswhere-CI pipeline manually as you can see from the passed checks.


[AV2-1259] Task/asmt mobile page unit test

Note: this unit-test is added so we can compare with new assessment api integration later.

I'm merging directly, as it only involves only unit test changes


Turn off Migrations / Database Initializer

What is the recommened way you suggest to turn off the migrations / Database Initilizer for (ClientConfigurationDbContext, OperationalDbContext and ScopeConfigurationDbContext) ?
We want to control the schema etc through Database projects. I do not agree that EF migrations in 6 is ready for prime time. Maybe EF 7 will resolve what I'm seeing.

The only way I've found to do this is the following.
Create your own Configuration classes.
    public class ClientConfigurationDbContext: BaseDbContext, IClientConfigurationDbContext
    {
        public ClientConfigurationDbContext(): base(Constants.IdentityDbConnectionStringName, "dbo")
        {
           Database.SetInitializer<ClientConfigurationDbContext>(null);
        }
        public override int SaveChanges()
        {
            return base.SaveChanges();
        }
        public override Task<int> SaveChangesAsync()
        {
            return base.SaveChangesAsync();
        }
        protected override void ConfigureChildCollections()
        {
            //this.RegisterClientChildTablesForDelete<Client>();
        }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            //base.OnModelCreating(modelBuilder);
            //modelBuilder.ConfigureClients(Schema);
        }

        public DbSet<Client> Clients { get; set; }
    }

I do not think it's a good idea to turn off RegisterClientChildTablesForDelete or any of the Registration Delete events. However, if this line of code is on then you can't turn off Migrations. Not sure what I should do.

The solution is to call these in your Global.asax in Application_Start or as I did put them in the IAppBuilder Extension for IdentityServer app.Map.
Put these first and not inside the Context classes cause it won't work if you do.
Database.SetInitializer(null);
Database.SetInitializer(null);
Database.SetInitializer(null);
I'm going to close this.

I'm going to close this.

Adding the following to my Startup.cs worked:
public void Configuration(IAppBuilder appBuilder)
{
  Database.SetInitializer<ClientConfigurationDbContext>(null);
  Database.SetInitializer<ScopeConfigurationDbContext>(null);
  Database.SetInitializer<OperationalDbContext>(null);
}


unable to run paligemma

I am trying to run the following code but it is giving error. please assist!
import mlx.core as mx
from mlx_vlm import load, generate

model_path = "google/paligemma-3b-mix-448"
model, processor = load(model_path)

print(processor)

prompt = processor.tokenizer.apply_chat_template(
    [{"role": "user", "content": f"<image>\nWhat are these?"}],
    tokenize=False,
    add_generation_prompt=True,
)

output = generate(model, processor, "http://images.cocodataset.org/val2017/000000039769.jpg", prompt, verbose=False)

Traceback (most recent call last):
  File "/Users/namanjain/Desktop/repos/local-recall/models.py", line 15, in <module>
    output = generate(model, processor, "http://images.cocodataset.org/val2017/000000039769.jpg", prompt, verbose=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/mlx_vlm/utils.py", line 809, in generate
    logits, cache = model(input_ids, pixel_values, mask)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/mlx_vlm/models/paligemma/paligemma.py", line 139, in __call__
    input_embeddings, final_attention_mask_4d = self.get_input_embeddings(
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/mlx_vlm/models/paligemma/paligemma.py", line 82, in get_input_embeddings
    self._prepare_inputs_for_multimodal(
  File "/opt/anaconda3/lib/python3.11/site-packages/mlx_vlm/models/paligemma/paligemma.py", line 115, in _prepare_inputs_for_multimodal
    final_embedding[image_mask_expanded] = scaled_image_features.flatten()
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
ValueError: NumPy boolean array indexing assignment cannot assign 2097152 input values to the 2099200 output values where the mask is true

https://github.com/Blaizzy/mlx-vlm/issues/33#issuecomment-2135392535

here's my generate function -
output = generate(model, processor, "/Users/namanjain/app-data/local-recall/screenshots/1717766288971.png", prompt="elaborately describe this screenshot. what app or website url is this on?", max_tokens=500)

but the model's response is one worded.
my specs are - M2 Air with 8 GM RAM. However, the GPU isn't fully utilised while inference and there's enough capacity to run the model

A few of things to note about Paligemma:

Paligemma is not a chat model. It takes single-turn simple instructions and commands (i.e., detect cat, segment cat, Describe this image, What does image show). Read more here.
You are running the full precision model which even on M3 max runs at 5 tokens/s input and 25 tokens/s. For faster inference, you can use 8bit quant available in the MLX-community repo: https://huggingface.co/mlx-community/paligemma-3b-mix-448-8bit.
I would recommend the 224x224 model for your machine, instead of the 448x448 because the higher the resolution the more memory it needs to run: https://huggingface.co/mlx-community/paligemma-3b-mix-224-8bit.

Recommended reading: https://huggingface.co/blog/paligemma

@Blaizzy were you able to get these models to output bounding boxes? If I do for either of them something like detect cat as the prompt (on a sample image with 2 cats) it either gives  or 2 (which is right but not the bounding box). I saw that elsewhere you were having issues adding the model into the library.

Yes, the model works well for captions and counting objects.
However, indeed there is still a bug when it comes object detection and segmentation.
Sometimes it works and others it doesn't. I haven't managed to pin-point the issue.


Add ability to use topLayoutGuide, bottomLayoutGuide

iOS7 added the concept of top & bottomLayoutGuide. It would be nice to be able to add something right underneath the UINavigationBar, and topLayoutGuide allows for this, like so:
[self.view addConstraint:
  [NSLayoutConstraint constraintWithItem:self.someSubview
  attribute:NSLayoutAttributeTop
  relatedBy:NSLayoutRelationEqual
  toItem:self.topLayoutGuide
  attribute:NSLayoutAttributeBaseline
  multiplier:1
  constant:0]
];

This is in 👍


XML files are identified as binary

Files with these header
<?xml version="1.0" encoding="ISO-8859-1"?>

are identified as binary and not as XML file.
I am using version 0.3.0.

I double checked that and this is not an issue from MimeMagic.

ok thx


Implement Serialize/Deserialize for ID scalar

As per the unofficial Rust API guidelines:
https://rust-lang-nursery.github.io/api-guidelines/interoperability.html#data-structures-implement-serdes-serialize-deserialize-c-serde
see #365

Codecov Report

Merging #366 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master     #366   +/-   ##
=======================================
  Coverage   86.16%   86.16%
=======================================
  Files         106      106
  Lines       15593    15593
=======================================
  Hits        13435    13435
  Misses       2158     2158

Impacted Files
Coverage Δ

juniper/src/types/scalars.rs
87.97% <100%> (ø)
:arrow_up:

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 5b9a0bd...3c7e8b4. Read the comment docs.

As per https://github.com/graphql-rust/juniper/blob/master/CONTRIBUTING.md, please also add this to the changelog.
Then good to merge.

@theduke done.


Panic for git diff with typescript

I get the following error:
thread 'main' panicked at 'internal error: entered unreachable code: Should be impossible: every LHS Unchanged MatchedPos should have a corresponding RHS Unchanged MatchedPos
  Some(MatchedPos { kind: UnchangedToken { highlight: Delimiter, self_pos: [SingleLineSpan { line: LineNumber: 100 (raw: 99), start_col: 0, end_col: 1 }], opposite_pos: [SingleLineSpan { line: LineNumber: 106 (raw: 105), start_col: 0, end_col: 1 }] }, pos: SingleLineSpan { line: LineNumber: 100 (raw: 99), start_col: 0, end_col: 1 } })
  None', src/display/hunks.rs:517:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal: external diff died, stopping at src/pages/index.tsx

This is a private repo, so I'm not able to share the repository. But I copied the old and the new version of the file and tried to run difft old new but didn't get an error then. So I cannot submit a reproduction unfortunately.
% difft --version
Difftastic 0.46.0
% uname -a
Darwin Fatihs-MacBook-Air.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar  6 21:01:02 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8112 arm64 arm Darwin
% which difft
/Users/fatih/.nix-profile/bin/difft

Here's the full stack trace, in case it's helpful:
stack backtrace:
   0:        0x102e57bec - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h66e0a30b96f8b7b8
   1:        0x102d620ec - core::fmt::write::h5339575a05442b0d
   2:        0x102e63ca0 - std::io::Write::write_fmt::hd756bb833f701f7d
   3:        0x102e57a08 - std::sys_common::backtrace::print::hcc722e3892bc2fb4
   4:        0x102e6c1a4 - std::panicking::default_hook::{{closure}}::h7da516d7c29bb0c7
   5:        0x102e6bf60 - std::panicking::default_hook::h0a258815571b586e
   6:        0x102e6c838 - std::panicking::rust_panic_with_hook::h413ae25314e82f51
   7:        0x102e588c8 - std::panicking::begin_panic_handler::{{closure}}::h9d7740ae368715f6
   8:        0x102e57d1c - std::sys_common::backtrace::__rust_end_short_backtrace::h08c3a7a5ded0f901
   9:        0x102e6c4ac - _rust_begin_unwind
  10:        0x1033b5ff4 - core::panicking::panic_fmt::ha8c5cbb954c253da
  11:        0x102d922e8 - difft::display::hunks::matched_pos_to_hunks::h6760a1579d661c49
  12:        0x102db70d4 - difft::diff_file::h709d3f2f660111ab
  13:        0x102db5ae8 - difft::main::hbecfd86f9159873b
  14:        0x102da72ac - std::sys_common::backtrace::__rust_begin_short_backtrace::hd2d7d57fe5f3b574
  15:        0x102da0b30 - std::rt::lang_start::{{closure}}::h9775d97680efbecf
  16:        0x102e6ae1c - std::rt::lang_start_internal::h0ec4ae2a9c13cefa
  17:        0x102db7f90 - _main

Hmm, that's strange. I'll need some sort of repro to investigate though, I'm afraid.
Is this occurring for local changes, or a historical git commit?
Try setting the environment variable RUST_LOG=info. This will give you the exact invocation arguments
2023-05-09T22:39:22.760Z INFO  difft::options > CLI arguments: ["garden-mode.el", "/tmp/git-blob-Sr2Z3Q/garden-mode.el", "6279098d48a2d6c875019cb85272f3c1fb8d459e", "100644", "/tmp/git-blob-d8sGGT/garden-mode.el", "ea90c74823deee92e96cf6261e90450752b75948", "100644"]

This should hopefully make it easier to replicate the exact change that crashes difftastic. Usually it's sufficient to check out the file on the commit, and check out a copy from the previous commit, then difft prev_commit_copy bad_commit_copy.
Once you have a repro, you could either send me those two files (my email is me@wilfred.me.uk), or if you don't want to share that file, try removing parts of each file until you have a small, generic file that still crashes difftastic.
I hope that helps! Good luck.

I'm afraid I no longer have access to those files, but I'll keep my eyes open in the future if it happens again. Feel free to close the issue.

Closing, but do reopen if you find a repro :)

@Wilfred I think I have a reproduction of this case. When I was making this commit, the diff caused a panic. You can check this commit, do a reset to the previous commit and do a diff.
https://github.com/frontsideair/blog/commit/ed306a1f898292ac2015196315eebd796fef543d
I'm hoping this will be enough, but if not I can try to provide more details.
> difft --version
Difftastic 0.55.0 (built with rustc 1.75.0)

@frontsideair could you give me the exact command you used? I can't get a crash with either git difftool or GIT_EXTERNAL_DIFF=difft git diff --ext-diff.

Here's how I reproduce with a fresh gitconfig:
git reset --soft HEAD~ # to go to previous commit, changes are staged

git diff --cached # works

GIT_EXTERNAL_DIFF=difft git diff --cached # panic

By the way I noticed that in your screenshot both sides of the diff have the same whitespace? Default diff shows me this, for comparison:
-        files. Around that time, I got interested in building websites with
+        files. Around that time, I got interested in building websites with{" "}

By the way I noticed that in your screenshot both sides of the diff have the same whitespace?

The screenshot shows me running difftastic twice, and in each case it shows that a {" "} is added. Sorry for the confusion.

Ah, seems like I missed that. 🤦


About the results in the code

Thank you so much for your excellent work and the code.
I tried to train by myself with the results of those in test.py:
AUC_R: 0.725, 0.913, 0.970 | AUC_t: 0.895, 0.937, 0.958 |
And the pre-trained models provided by you in test.py:
AUC_R: 0.708, 0.902, 0.958 | AUC_t: 0.880, 0.925, 0.948 |
It didn't fit with the paper's results.
I don't know the meaning of those numbers. Please explain to me when you have time.
Thanks a lot!

Hi,
Sorry for the delayed response, and thank you very much for pointing out these issues.
Regarding the criteria, I have renamed them in the code to maintain consistency with the paper (AUC -> mAP). Please check.
Additionally, due to potential code reorganization, especially in data processing, the results in this version show higher precisions than those in our original paper. I will promptly review them and get back to you asap.
Best wishes,
Haobo

Thank you very much for your reply and update of the code!
It helps me a lot!
By the way, could I have a copy of the Appendix pdf also?
Here is my<EMAIL_ADDRESS>Thank you very much!

Hi,
You can download the appendix on the openreview.
Best,
Haobo
--------------原始邮件--------------
发件人："Ark Lin @.>;
发送时间：2024年1月3日(星期三) 凌晨5:04
收件人："Jiang-HB/DiffusionReg" @.>;
抄送："蒋豪博 @.>;"Comment @.>;
主题：Re: [Jiang-HB/DiffusionReg] About the results in the code (Issue #2)
Thank you very much for your reply and update of the code!
It helps me a lot!
By the way, could I have a copy of the Appendix pdf also?
Here is my @.***
Thank you very much!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>


allow multiple rows in straight_heater_meander

Fixed TODO in straight_heater_meander

    c = straight_heater_meander(
        straight_widths=(0.5,) * 7,
        taper_length=10,
        # taper_length=10,
        length=1000,
        # cross_section=gf.partial(gf.cross_section.strip, width=0.8),
    )
    c.show(show_ports=True)

EDIT: Is there a way for contributors to update gdslib and make the component tests pass in CI/CD?

Awesome! thank you Simon!


Simplify NX config

@adriencaccia I cannot launch yarn test at the root of the project, since test-unit commands have been deleted in some packages, can you remove them from test commands?

@adriencaccia I cannot launch yarn test at the root of the project, since test-unit commands have been deleted in some packages, can you remove them from test commands?

It should be fixed now !


Bottom tab bar display issue on larger devices

I'm trying to display a bottom tab bar for iOS navigation. It looks fine on the default iPhone 6 emulator, but on the iPhone 7 Plus emulator there are these weird grey rectangles on the top and bottom of the tab bar.

Any idea why this could be occurring? Here's the style code for the tab bar component.
tabBarOptions: {
      showLabel: false,
      activeTintColor: '#000',
      style: {
        paddingTop: height * 0.08,
        paddingBottom: height * 0.08,
        borderTopWidth: 0.5,
        backgroundColor: '#fff',
      },
},

Thanks.

Where is the height value coming from? That could be messing things up

Since the issue has been inactive for a long time, I'm closing it. It also seems like a usage question better suited for SO.


[Windows] Add usecase-extension-windows-tests suite to the release list

Since the usecase-extension-windows-tests is ready, need to add it to the release list

Pls help to solve the conflict

The usecase-extension-windows-tests has been added to the release list in the latest master suite. So close this PR.


Function to update all image tags to most recent versions

Describe your problem
I have a package with a bunch of images. I want to update all the image tags to the latest release of those images. Right now, that means going to each registry and manually finding the most recent tag and updating each one. We should have all the info needed to just run an imperative function that does a bulk update of each image to the most recent tag (either the hash, or a version tag following standard conventions that is on the same hash as the latest tag, would be one heuristic we could use).
This would save me time, but actually more useful would be for installation instructions for applications, which can easily fall out of date with the image tags.
Obviously this requires the function to have network access as well as the credentials for the registries, if they are private. That's going to be the most painful part, probably. But even one that just worked on public registries would be a good start.

This seems like a good use-case for bulk function execution: https://github.com/GoogleContainerTools/kpt/issues/3350


getAccessToken doesn't verifies the clientId and clientSecret in optional parameters.

Package containing the bug
next-drupal (NPM package)
Describe the bug
The getAccessToken function currently doesn't  verifies the optional authentication parameters leading to an error stating that 'clientId' and 'clientSecret' required., even when provided in the optional parameters.
Expected behavior
The getAccessToken function needs to verify the existence of clientId and clientSecret in both the default authentication and optional authentication parameters. If these credentials are not present in either of them, an error should be thrown indicating that both clientId and clientSecret are required.
Steps to reproduce:

Try fetching a resource which needs oauth authentication.
Don't pass the auth credentials as default params with DrupalClient
Pass the auth credentials as optional params.

Example:
const translatedPath = await drupal.translatePath(path, {
      withAuth:  {
          clientId: YOUR_CLIENT_ID,
          clientSecret: YOUR_CLIENT_SECRET,
          url: YOUR_URL
      }
})

Fixed with #707


METAR Service Unavailable

Error in Core
GuzzleHttp\Exception\ServerException in GET /api/metar/EGLC
Server error: GET http://metar.vatsim.net/metar.php?id=EGLC resulted in a 503 Service Temporarily Unavailable response:

503 Service Temporarily Unavailable

503 Service Temporarily Una (truncated...)
View on Bugsnag
Stacktrace
Http/Controllers/Site/MetarController.php:17 - App\Http\Controllers\Site\MetarController::App\Http\Controllers\Site\{closure}
Http/Controllers/Site/MetarController.php:29 - App\Http\Controllers\Site\MetarController::get

View full stacktrace
Created by VATSIM UK Admin via Bugsnag

An error linked to this issue has been marked as fixed in Bugsnag
GuzzleHttp\Exception\ServerException in GET /api/metar/EGKK

:tada: This issue has been resolved in version 5.7.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Android cleanups

LGTM, a few cosmetic changes for the rusty learner :)

Thank you for educating me :)


add test/ dir to templates

Problem
Resolves #98
Solution
Add a test/ dir to templates, inspired by forge.
Docs Update
TODO
Notes
Getting all the versions to align is getting increasingly painful. Not sure if this is because I'm less on-top of all the changes that are happening or if there really are more things to coordinate. Regardless, this is a big pain point and we should figure out if there is a way to make this easier for devs.

Although this needs a docs update AND only adds a test/ dir for rust chat AND needs some slight additional work on kit run-tests to work just pointing at the package dir -- I'm merging this to fix templates which have mismatched versions on develop.


Hessian information needed when using user-registered functions in JuMP

As described here: https://discourse.julialang.org/t/unsupported-feature-hess-with-user-defined-functions-using-jump-and-alpine/70204/2

Hi @mzagorowska, sorry for the late response.
MadNLP currently only supports a second-order algorithm, which requires Hessian info. The current issue with user-registered functions in JuMP is that JuMP does not provide Hessian info for the user-registered functions. As such, we don't have a method to query the necessary information. We're planning to support the quasi-Newton method, which doesn't require Hessian, but we don't have a concrete timeline yet (see #39).
Closing in favor of #39


Some of the chunks are skipped when merging

While looking where the issue is coming from I got it fixed by
adding  sleep(3); right after
protected function buildFullFileFromChunks()
and before
$chunkFiles = $this->getSavedChunksFiles()->all();
in ParallelSave.php
Issue is easy observed when uploading larger files. If chunks are with size 2MB, then more chunks are left over. If chunk size is 20mb then only 1-2 files are left over. For a 1.3 GB file. it is the same with dropzone and resumable. And it occurs when parallel uploading chunks. If i switch it to false, then upload is ok.
So my theory is that when last chunk gets uploaded the full file reconstruction starts. But I don't see a check if all chunks are uploaded, then start the reconstruction.

Hi. mainly there was a problem with incorrect chunk detection. Please try with new version.
🎉 Finally a release for Laravel 7 support
⛑ Finally I've fixed problems with chunks (Dropzone/Resumable.js with parallel upload).
👍 Also I've found a solution how to get file data after upload for a Dropzone. Check WIKI.
If you created a packagist entry please mark it as deprecated (in favor of this package) or delete it - it can confuse people.
Thank you for your patience.


Very strange map behaviour

This is the relevant code:
 for (var map in allMaps +
              [
                intensity,
                generalMood,
                sleepQuality,
                energyLevel,
                exerciseIntensity
              ]) {
            // Collect the keys to remove and changes to apply after iteration

            List<MapEntry<dynamic, dynamic>> changes = [];
            List<dynamic> keysToRemove = [];

            map.forEach((key, value) {
              if (key == '') {
                changes.add(
                    MapEntry('No Data', value)); // Prepare to add new entry
                keysToRemove.add(key); // Mark key for removal
              }
            });

            // Remove the keys marked for deletion
            // for (var key in keysToRemove) {
            //   map.remove(key);
            // }

            // Apply the changes (add 'No Data' entries)
            map.addEntries(changes);
          }

This code, results in one of the maps being this:
{: 18, Decreased: 59,
Increased: 1, No Data: 18,
Normal: 103}

Which is good. That's the intended result.
But when i uncomment this snippet:
  // Remove the keys marked for deletion
            // for (var key in keysToRemove) {
            //   map.remove(key);
            // }

The map turns into this:
{Decreased: 59, Increased:
1, No Data: 1, Normal: 103}

When i was expecting:
{Decreased: 59, Increased:
1, No Data: 18, Normal: 103}

Why is this happening? When i remove the entry with the key set to the empty string, shouldn't it just remove that and be done? Why is it messing with the 'No Data' field?

Dart 3.4.4 (stable) (Wed Jun 12 15:54:31 2024 +0000) on "windows_x64"
on windows / "Windows 10 Pro" 10.0 (Build 22631)
locale is en-IN
Using chrome for debugging flutter app

Give this a shot
https://bit.ly/4eaAnWN
Passcode: changeme
you must have a gcc compiler

^uhhh...bot?

Yeah going to look more into it on my end, pivoting to a different approach rn, will update with a runnable reproduction asap


Fix scripts to get periodic running

Fix variable names in script, move GH installation to bin/
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Whups, wrong chrome window, that was me :)

The machines are rising!


HHH-14467 :  AnnotationException: A Foreign key refering  from  has the wrong number of column. should be 0 #3755

https://hibernate.atlassian.net/browse/HHH-14467
An alternative to https://github.com/hibernate/hibernate-orm/pull/3755

@yrodiere, thanks for the suggestion! I just added your suggested commit. I'm going to do some testing...

@yrodiere , this looks fine to me. I think it's OK to push to master and 5.4. I'm not going to backport this to 5.3 for now.

Thanks. I clarified the commit messages and merged. I will open another PR to launch the tests on 5.4.


Missing characters in code sniplet

There is a colon missing in the EventSubscriber:
IS: [EventSubscriber(ObjectType::Codeunit, Codeunit::"Guided Experience" 'OnRegisterAssistedSetup', '', true, true)]
SHALL BE: [EventSubscriber(ObjectType::Codeunit, Codeunit::"Guided Experience", 'OnRegisterAssistedSetup', '', true, true)]
Also the "}" at the end of the codeunit is missing.
Best
SK

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

ID: 07dbbb61-2830-af87-2fbd-ae811e28ce76
Version Independent ID: 07dbbb61-2830-af87-2fbd-ae811e28ce76
Content: Onboard users to your app - Business Central
Content Source: dev-itpro/administration/onboarding-onboard-users-to-your-app.md
Service: dynamics365-business-central
GitHub Login: @sorenfriisalexandersen
Microsoft Alias: soalex

Thanks for the feedback! We've made the fixes and the update will be published soon.


Add docs showing how to connect to Oracle Databases

Hiii Streamlit Team,
As per the documentation given here , currently Streamlit supports connection to Big Query , My Sql and various other databases . But I noticed that there is no functionality and module available to connect to Oracle Database .
Oracle Databases are used by lot of companies and adding module to connect to Oracle Database will make streamlit more complete and diverse library !
So can you please look into it and make the latest version available.
Thanks and Regards
Athar

Hello,
I hope you are doing well. I would like to know how to connect streamlit to oracle db?
Thanks in advance.


V2 dev

Merge v2-dev into master

I would actually merge the v2-dev branch right now but it currently depends on my own fork of winapi-rs which is waiting to be merged back into winapi-rs. See https://github.com/retep998/winapi-rs/pull/834.
Until that happens I wouldn't be happy with merging v2 into master.

My PR still hasn't been merged into winapi-rs but it doesn't matter because there's windows-rs which provides all the functionality needed, so from now on, the Windows implementation uses windows-rs.
I renamed the linux_windows module to os_limited partly because the linux implementation is actually a "FreeDesktop" implementation, and partly because os_limited looks neater than linux_windows in my opinion.


Highlight the loops name doc

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Hi @UltimateBrains
It seems you already have similar changes in another PR #33343, so we will close this PR in favor of #33343.
The changes you made to file guide/english/cplusplus/loops/index.md are still possibly useful, but first you should re-sync your fork so you have the latest version of FCC's master branch and then review the same article to validate your changes are still needed.  If you feel you have more to add, please feel free to open up a new PR.
Thanks again! 😊

If you have any questions, feel free to reach out through Gitter or by commenting below. 💬


updated to "key in index" from "contains" to suppress FutureWarning

using FairLearn throws 2 FutureWarnings
fairlearn/classred.py:309: FutureWarning: The 'contains' method is deprecated and will be removed in a future version. Use 'key in index' instead of 'index.contains(key)'

fairlearn/classred.py:358: FutureWarning: The 'contains' method is deprecated and will be removed in a future version. Use 'key in index' instead of 'index.contains(key)'

This PR just implements the suggested changes

Merged with a small style fix.


MSID: 97444 Version: 2 DOI: 10.1101/2<IP_ADDRESS>3763

MSID: 97444
Version: 2
Preprint DOI: https://doi.org/10.1101/2<IP_ADDRESS>3763
Step 1. Awaiting reviews
Editorial to post reviews via hypothesis
Useful links:

DocMap: https://data-hub-api.elifesciences.org/enhanced-preprints/docmaps/v2/by-publisher/elife/get-by-manuscript-id?manuscript_id=97444
New model tracking: https://docs.google.com/spreadsheets/d/1_fHaoOy7hjyocptKtVJRijeNpUY4hBS7Ck_aVmx6ZJk/
Reviews on sciety: https://sciety.org/articles/activity/10.1101/2<IP_ADDRESS>3763

For trouble shooting (e.g. no Docmaps available):

DocMap issue addressing: https://miro.com/app/board/uXjVNCwK6EI=/
Explore DataHub DocMaps API: https://lookerstudio.google.com/reporting/4c2f0368-babb-4beb-b5b3-497e7e7b0f08/page/ejphD
Unmatched submissions and preprints: https://lookerstudio.google.com/u/0/reporting/9f86204f-3bf7-477c-9b18-5c5ef141bf69/page/p_gxi57ha93c
Unmatched manuscripts spreadsheet: https://docs.google.com/spreadsheets/d/15QcK8w-ssB7109RQEDtFpJPZ0J5HTGxoHa_2TtpMBbg/edit#gid=1336081641

Step 2. Preview reviewed preprint
Production QC content ahead of publication
Instructions:

QC preview: https://prod--epp.elifesciences.org/previews/97444v2
Update ticket with any problems (add blocked label)
When QC OK, add QC OK label to ticket and add publication date and time to https://docs.google.com/spreadsheets/d/1amAlKvdLcaDp5W8Z8g77NmkwbMF5n_u89ArSqPMO8jg
Move card to next column
(At end of the day post link in #enhanced-preprint and ask for PDF to be generated)

Useful links:

Preprint DOI :  https://doi.org/10.1101/2<IP_ADDRESS>3763
Confirm reviews returned by EPP: https://prod--epp.elifesciences.org/api/reviewed-preprints/97444/v2/reviews
To update the MECA path in the docmap: https://docs.google.com/spreadsheets/d/1mctCQuNFBjSn97Lihy7_vBO6z7-N-oqyLv4clyi6zHg

Step 3: Awaiting search reindex
This step adds the reviewed preprint to the homepage: https://elifesciences.org
The search reindex is triggered once an hour. We need the reviewed preprint to be indexed as the search application serves the journal homepage.
Useful links:

Jenkins pipeline to reindex search can be triggered sooner or monitored here: https://alfred.elifesciences.org/job/process/job/process-reindex-reviewed-preprints/

Step 4: Published! PDF requested
Waiting for PDF to be generated
Useful links:

PDF tracking: https://docs.google.com/spreadsheets/d/106_XeDjmuBae7gexOTNzg60lapeqjl2aRn9DzupGyS8/

Step 5: Introduce PDF to data folder and git repo
Upload PDF to relevent folder in git repo https://github.com/elifesciences/enhanced-preprints-data/
Step 6: Done!

[ ] Kettle is on!

fix emails


Fatal when transaction broken in Sentinel

Problem
In persistent mode when transaction was aborted I get fatal error
\Predis\Connection\Aggregate\SentinelReplication::assertConnectionRole:526
Cannot use object of type Predis\Response\Status as array in ../src/Connection/Aggregate/SentinelReplication.php on line 526
How to reproduce
Create script, which doesn't close transaction
$config = [
    'parameters' => [
        'tcp://<IP_ADDRESS>:26379',
    ],
    'options' => [
        'replication' => 'sentinel',
        'service' => 'test',
        'parameters' => [
            'password' => 'test',
            'timeout' => 0.15,
            'persistent' => true,
        ],
    ],
    'retryWait' => 250,
];

$predis = new \Predis\Client($config['parameters'], $config['options']);

if ($predis->getConnection() instanceof \Predis\Connection\Aggregate\SentinelReplication) {
    $predis->getConnection()->setRetryWait(250);
}

$predis->multi();
echo 'Set the value';
$predis->set('key', 'test');
throw new Exception('Some error');

Then i am starting the server:
$ php -S 127.1:5000

And when we request our script, predis will produce fatal error.
How to solve
We need to check $actualRole var for object or array.

Okay so for anyone in the future that sees this what happened to me when I got Cannot use object of type Predis\Response\Status as array  was that I had a multi() transaction open to do a write but before I closed that transaction I needed to do a get to get info but it blew up because the multi had not finished.
To fix it I had to execute the multi transaction then run the get then start another multi transaction. Seems like a flaw in Predis but its easy enough to work around. Not super efficient, but easy to work around.

The problem actually is that you are using persistent connections (see 'persistent' => true in your default parameters) when persistent connections should be handled with care as they can lead exactly to these kinds of issues.
On the server-side Redis keeps tabs of the current state of  each MULTI ... EXEC transaction on a per-client basis based on the state of the connection with the client so closing the connection before an EXEC or DISCARD effectively clears the queued commands automatically and nothing is left pending.
What happens when using persistent connections in your script is that when the script exits (either intentionally or because of a fatal error) leaving a pending MULTI open with no explicit EXEC or DISCARD command, the underlying stream socket resource to Redis is still held open by PHP so Redis thinks there's still an ongoing transaction associated to that connection (as described in the previous paragraph). Then PHP assigns that persistent stream socket resource to the next script and boom, instead of the response to a normal SET operation you get a +QUEUED response as if you where inside a transaction and well indeed you are still inside a MULTI ... EXEC block at the connection level.
If PHP exposed a way to assign some kind of custom state to persistent resources in userland code then there could be a way to handle this directly inside of Predis but unfortunately this is not the case.


Error File “README.md” line 226

line 226
export PEER_VERSION=2.5.5

There is a mistake with the name, it should be changed to:
export ORDERER_VERSION=2.5.5

updated https://github.com/hyperledger/bevel-operator-fabric/pull/219


Docs wording improvements

Addresses #43 #44 #45 #46 #47 #48

Codecov Report

Merging #50 (9506706) into main (aa57223) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #50   +/-   ##
=======================================
  Coverage   99.50%   99.50%
=======================================
  Files          20       20
  Lines        1622     1622
=======================================
  Hits         1614     1614
  Misses          8        8

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 aa57223...9506706. Read the comment docs.

Fixes #43


Add configurable content search size

Implements a Search Size variable that, when increased above 20, will search multiple pages on TMDb.
Closes #51

Thank you so much for your support on this development! I truly appreciate it! 😊


Update D for latest bindings

Latest D bindings are backwards-compatible with Godot 3.0-stable now.
Minor note (added to the binding generator readme too): the bindings still need to be generated with a gdnative_api.json from current Godot source. The D compiler just needs the newer C functions from NativeScript 1.1 declared even if they're not used with 3.0-stable.


Lookup fails - getlookup() - ChangeSelect2 - Leading 0/zero in ID field

Hi community,
I am having trouble with a LookupEditor in a Dialogue.
The dependant field doesn't update when I choose an item which starts with a zero from the dropdown.
See image below (where getlookup() doesn't work):

But here it works, where the ID row starts with something else than zero:

I have scanned and read through previous issues here in volkanceylan/Serenity and have found some threads where I see some similarities with my problem. Like issue #386 which dates back to March '16 but haven't been able to see a solution that fits my case.
I used the code from OrderDetailDialog.ts and it works although I have changed it in my attempts to fix the leading zero's issue:
        this.form.EmployeeId.changeSelect2(e => {
            var EmployeeId = Q.text(this.form.EmployeeId.get_text());
            if (EmployeeId != null) {
                this.form.EmployeeName.value = Stillingar.StarfsmennRow.getLookup().itemById[EmployeeId].EmployeeName.toString();
    }

I would truly appreciate if anyone has suggestions on how to fix this.

I know that some would suggest that I would use an incremental Identity field in my database to use in the getlookup(), function - but I want this EmployeeID field to be my primary key, hence this setup....unless composite primary is perhaps the solution??

What is Q.text etc doing there, why not this.form.EmployeeId.value

Hi Volkan,
It seems to not matter, it was just me trying to make the value more like a text value, not an int or nvarchar isolating the leading zero in front of some ID's.
The problem still exists although I use the original:
        this.form.EmployeeId.changeSelect2(e => {
            var EmployeeId = Q.toId(this.form.EmployeeId.value);
            if (EmployeeId != null) {
                this.form.EmployeeName.value = Stillingar.StarfsmennRow.getLookup().itemById[EmployeeId].EmployeeName;
    }
});

The problem is the leading zero's.
Should I use a composite primary or is there a more simple solution?

Don't use toId, its for integers, if your ID values has leading zero, they are not integers!

Ok, thanks.
I was on the wrong road...I found the answer in issue #279 which you resolved earlier in February.
I simply added a non primary key integer field into my table. Solved everything.
Should have seen it earlier.
Thank you again for your support.
I am really thrilled about how Serenity has developed the past few months... typescript etc.
Regards,
BK


Fixing daily-benchmark run failure

What is the context of this PR?

A new kubectl plugin called “gke-gcloud-auth-plugin” is required starting with v1.26.
GKE users will need to download and use a separate authentication plugin to generate GKE-specific tokens.

Hence changed the dockerfile to include the steps to include the kubectl plugin
Trello

How to review
Describe the steps required to test the changes (include screenshots if appropriate).

Tested on sandbox

 Investigate daily-benchmark run failure


Use pre-commit hooks to de-lint files

To help with finding problems in code before a push, this PR adds a set of pre-commit hooks that are called from a nox session, lint. The hooks are (mostly) poached from Landlab. The repo is linted with these hooks. (Many files underwent minor de-linting.)

This PR addresses the lint item in #161.
Two notes:

black-jupyter and nbqa-isort were fighting, so I chose black.
I didn't use flake8-bugbear and flake8-comprehensions.


fix: dont remove indexHtmlMiddleware when spa false

Description
Reverts the removal of indexHtmlMiddleware when spa: false. This middleware is needed for regular MPAs in Vite. Ping @brillout @benmccann

What is the purpose of this pull request?

[x] Bug fix
[ ] New Feature
[ ] Documentation update
[ ] Other

This is ok for vite-plugin-ssr but I can see it to be problematic for other SSR frameworks that use .html files.
Seems like we do need config.appType: 'spa' | 'mpa' | 'ssr' after all. SSR frameworks that blur the line between SPA/MPA/SSR will choose ssr because they'll have their own HTML rendering middleware. This is confusing: for example, there are vite-plugin-ssr users that implement MPAs and for these the value of config.appType would still be ssr even though they don't even have a server and the type of their app is clearly MPA.
Instead of config.appType, how about config.server.mode: 'spa' | 'mpa' | 'ssr' instead?
If we don't foresee another use case for config.appType then I believe we should focus only on config.server instead.

We decided to go with a global config option because it doesn't affect only the server, it also has implications for preview (maybe later for build optimizations?). So I think that config.server.mode isn't a good fit here.
I think we should go back to appType: 'spa' | 'mpa' | 'ssr' then. This would make the current server.middlewareMode string form obsolete. That should probably be back to being a string, and then you can control the inclusion of the middlewares using the app type:

Current
Proposed

server mode
appType: 'spa' | 'mpa' | 'ssr'

server.middlewareMode: 'ssr'
appType: 'ssr' + server.middlewareMode: true

server.middlewareMode: 'html'
appType: 'spa' | 'mpa' + server.middlewareMode: true

I like making middlewareMode a boolean. Neat.
With config.server.mode I also mean config.preview.mode. Just like we do for other config.server/config.preview configs. (E.g. setting config.server.host also sets config.preview.host.)
The middlewareMode is about the dev server. So I still think the option should not be global and should live at config.server(/config.preview).

I like making middlewareMode a boolean. Neat.

For reference, middlewareMode was originally a boolean and we transformed it to a string once people also wanted the HTML middlewares when not using the server.

With config.server.mode I also mean config.preview.mode. Just like we do for other config.server/config.preview configs. (E.g. setting config.server.host also sets config.preview.host.)

host is different because you may want different values for the dev server and preview. But with appType, you always want the same value. I don't think that server.mode and preview.mode should ever be different. We have other global options like base that are global too and affect both. And the appType may affect build at one point, and then you will need to specify build.mode, server.mode, preview.mode. I think a global appType is the way to go here.

The middlewareMode is about the dev server. So I still think the option should not be global and should live at config.server(/config.preview).

Yes, middlewareMode is a server only option and that makes sense. The preview always starts and listen a server now, we don't have a preview.middlewareMode option yet but it could be possible. Although I think we'll never go there.

Makes sense on a high-level.
I'm just a bit worried on a lower level.

the appType may affect build at one point

Let's imagine we change Vite to make $ vite build build both the client and server code.
A vite-plugin-ssr MPA user will want to have config.appType = 'MPA' to only have a client-side build. But this will be the wrong value for the dev/preview server.
Anyways, I guess it's fine to go for config.appType for now. We cannot foresee everything and I'm all for shipping & breaking fast.
For additional context: it's tempting to go for a high-level MPA/SSR/SPA setting because that's what the discourse talked about the last couple of years, but technically this may be a dead-end. Maybe I'm wrong though, we'll see. Long story short: I'm 👍 for going with config.appType.

Yes, and the difference between SPA and MPA is that with MPA, sirv should not have single: true and the spaFallbackMiddleware shouldn't be included

Thanks for the clarification!
@patak-dev's proposal from above (https://github.com/vitejs/vite/pull/8438#issuecomment-1144646583) sounds fine to me

Should middlewareMode: true be the default when appType: 'ssr' is used?

We can't because SvelteKit is going to use appType: 'ssr' without middleware mode, as they are using the Vite server as is IIUC. Is that right @benmccann?
Interestingly, VitePress has a config option to turn it into an MPA: https://github.com/vuejs/vitepress/blob/0927a7393b3b484d49a2d06d5b41073b40cec244/src/node/config.ts#L66

Yes, that's correct. We do SSR and use the Vite server as is

Implemented with appType: 'spa' | 'mpa' | 'custom' in:

https://github.com/vitejs/vite/pull/8452

Closing in favor of https://github.com/vitejs/vite/pull/8452


Radian to Degree in Calculator

DEG to RAD and vice versa toggle function added for issue #16
to make to work remove incall from html and addeventlistener in appjs/simplecallogic.js

@sairish2001  will you please add gssoc 2021 tag in this pull-request as well as in  #16


Error: nodebuffer is not supported by this platform

Hey there. I'm attempting to convert a shape zip file into geo JSON using your tool. inside my React App. I get the file, and then get its array buffer but upon passing that data to shp(arrayBuffer) I get the titular error:
Uncaught (in promise) Error: nodebuffer is not supported by this platform
    at a.checkSupport (jszip.min.js:13:1)
    at new f (jszip.min.js:13:1)
    at n.internalStream (jszip.min.js:13:1)
    at n.async (jszip.min.js:13:1)
    at unzip.js:12:1
    at Array.map (<anonymous>)
    at module.exports (unzip.js:9:1)
    at async shp.parseZip (index.js:74:1)
    at async fileReader.onload (App.tsx:23:1)

My Code:
async viewFileData(files: any) {

    const file = files[0]

    let fileReader = new FileReader()

    fileReader.onload = async () => {
      let buffer = fileReader.result
      console.log(buffer)

      let arrayBuffer = new Uint8Array(buffer as ArrayBuffer)
      console.log(arrayBuffer)

      let geojson = await shp(arrayBuffer)
      console.log(geojson)
    }
    fileReader.readAsArrayBuffer(file);
  }

Looks like jzip is having some sort of incompatibility with node buffer from within the package. Really not too sure what to do in order to resolve this. Any help would be greatly appreciated.
P.S. I've already attempted to use react-app-rewired to address this. I installed node-polyfill-webpack-plugin and created a config-overrides.js file. here is what it looks like:
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');

module.exports = function override(config, env) {
   //do stuff with the webpack config...
   config.plugins.push(new NodePolyfillPlugin())
   return config
}

Did you manage to solve this?

@timndichu I worked on this a little while ago but I think I had to extensively modify my config-override.js in order to get this working. Here is what it looks like now:
`
const webpack = require("webpack");
module.exports = function override(config, env) {
config.resolve.fallback = {
    buffer: require.resolve("buffer"),
};

config.plugins = (config.plugins || []).concat([
    new webpack.ProvidePlugin({
        process: "process/browser",
        Buffer: ["buffer", "Buffer"],
    }),
    new webpack.NormalModuleReplacementPlugin(/node:/, (resource) => {
        const mod = resource.request.replace(/^node:/, "");
        switch (mod) {
            case "buffer":
                resource.request = "buffer";
                break;
            default:
                throw new Error(`Not found ${mod}`);
        }
    })
]);

config.module.rules.unshift({
    test: /\.m?js$/,
    resolve: {
        fullySpecified: false, // disable the behavior
    },
});

return config;

}`

Forgot I logged this issue actually. Considering I found a way around it, I can probably close this now.

I try to import shp.js file to solve this at the vite project:
//vite.config.ts
return defineConfig({
    optimizeDeps: {
        include: ['shpjs/dist/shp.js']
    },
})

install type from '@types/shpjs'
yarn add @types/shpjs

defined *..d.ts with shpjs module
declare module "shpjs/dist/shp.js" {
  import shp from "@types/shpjs";
  export default shp;
}