The image time difference of sychronized davis346

Connect the cameras as the desciption in datasheet

Disabled the event stream for descreasing data transmission pressure, actually the image time difference also appears when event is enable.
And the settings detail is followed:
{DiffBn_coarse: 4, DiffBn_fine: 39, OFFBn_coarse: 4, OFFBn_fine: 0, ONBn_coarse: 6,
  ONBn_fine: 200, PrBp_coarse: 2, PrBp_fine: 58, PrSFBp_coarse: 1, PrSFBp_fine: 33,
  RefrBp_coarse: 4, RefrBp_fine: 25, aps_enabled: true, dvs_enabled: false, exposure: 6000,
  frame_interval: 40000,
  imu_acc_scale: 3, imu_enabled: true, imu_gyro_scale: 3, max_events: 0,
  streaming_rate: 30}

And also the driver print info hits they have been successfully connected
[ WARN] [1607110461.194875304]: Requested serial number: AAAAAAAA
[ WARN] [1607110461.198470133]: Requested serial number: BBBBBBBB
[ INFO] [1607110461.206421489]: DAVIS ID-1 SN-AAAAAAAA [2:14] --- ID: 1, Master: 0, DVS X: 346, DVS Y: 260, Logic: 6.

[ INFO] [1607110461.542280818]: using default calibration URL
[ INFO] [1607110461.542336931]: camera calibration URL: file:///home/sq/.ros/camera_info/DAVIS-AAAAAAAA.yaml
[ INFO] [1607110461.542398283]: Unable to open camera calibration file [/home/sq/.ros/camera_info/DAVIS-AAAAAAAA.yaml]
[ WARN] [1607110461.542424106]: Camera calibration file /home/sq/.ros/camera_info/DAVIS-AAAAAAAA.yaml not found.
[ INFO] [1607110461.806291732]: DAVIS ID-1 SN-BBBBBBBB [1:8] --- ID: 1, Master: 1, DVS X: 346, DVS Y: 260, Logic: 6.

[ INFO] [1607110461.864607078]: Reset timestamps on DAVIS-AAAAAAAA to<PHONE_NUMBER>.864578724.
[ INFO] [1607110462.142544293]: using default calibration URL
[ INFO] [1607110462.142585933]: camera calibration URL: file:///home/sq/.ros/camera_info/DAVIS-BBBBBBBB.yaml
[ INFO] [1607110462.142658685]: Unable to open camera calibration file [/home/sq/.ros/camera_info/DAVIS-BBBBBBBB.yaml]
[ WARN] [1607110462.142691755]: Camera calibration file /home/sq/.ros/camera_info/DAVIS-BBBBBBBB.yaml not found.
[ INFO] [1607110462.465738304]: Reset timestamps on DAVIS-BBBBBBBB to<PHONE_NUMBER>.465708256.
[ INFO] [1607110462.465935727]: Adapting reset time of master on slave DAVIS-00000282.
[ INFO] [1607110462.471492271]: Started timer to reset timestamps on master DVS for synchronization (delay=2.00s).
[ INFO] [1607110464.471837374]: Reset timestamps on DAVIS-BBBBBBBB to<PHONE_NUMBER>.471813679.
[ INFO] [1607110464.471951575]: Adapting reset time of master on slave DAVIS-AAAAAAAA.

The camera should be easily triggered together, but the image timestamps show a difference beyond  0.003s. 0.003s is the lowest difference I got, sometime even over 0.015s, which has the same magnitude with image frame interval 0.04s(25Hz).
In constract with image, imu data can be well aligned despite that imu rate is much higher than image.

Is there any way to get the images triggered at the same time? It's not so difficult which connected device
I really cannot guess the hardware design and the soft processs of synchronization, can you please provide an more detail instruction rather than serval pin names for the user?

This is the expected behaviour. The synchronization between cameras only concerns the timestamps themselves, not any of the data stream contents.
Frames are not taken at the same time, and that IMU aligns in your case is pretty much a random effect, not by design.
The design goal of the synchronization was to relate events from different cameras to each-other correctly, and relate the other data streams (Frames, IMU, Triggers) to the events. Frame-to-Frame was not considered, and is not planned to be added in the near future to the device firmware.


Implement threshold for triggering trip_distance_exceeds_shape_distance

Describe the problem
We've seen trip_distance_exceeds_shape_distance trigger as an error from anywhere between 6-7% of feeds in the Mobility Database. As originally found in the spec discussions, about half of these are triggered because of a discrepancy that's 1% or less. Several producers have expressed concern with this new error.
Proposed solution
Implement a threshold where this ERROR only generates if the difference between the max trips.txt shape_dist_traveled and the max shapes.txt shape_dist_traveled is greater than 1%.
Alternatives you've considered
No response
Additional context
No response

A few of our project managers working directly with customer agencies have noted that transit agencies are getting spooked because the NTD Program Manager is forwarding them validation reports that show this error. While they specifically state that the reports are offered "solely [as a] courtesy and the resolution of the above errors are not required for FTA to accept your 2023 NTD report" the agencies have a fear that they may impact NTD report acceptance in the future.
Perhaps this is also why some other producers are concerned?
If that's the case, maybe we adjust the suggestion of excluding errors when the difference is less than 1% to instead report a warning when the difference is less than 1%. That way, we can still get the information out of the validator regardless of the size of the difference, but don't need to spook anyone with a minor, non-impactful error?
I wouldn't say this is my preference (an error is an error and if this is truly "canonical" it should call it an error), but because the error doesn't have much impact in those minor cases, I'm certainly open to it being a warning if that helps ease concerns.

Thanks for sharing your thoughts publicly @stevenmwhite! We dug into some old conversations about distance thresholds on the validator, and plan to work on changing the rule this quarter so

any difference above 1.11m = ERRROR
any difference below 1.11m = WARNING

We'll see if we should make the threshold more permissive than that based on the number of feeds we see still triggered by the ERROR and what their differences are.

@emmambd The one issue I see with this is that the distance along route does not have a unit specified in GTFS. Some feeds may be in meters, some in kilometers, some in miles... it could even be in "average lengths of Steve's stride" (I hope nobody's feed using that as their distance measurements, haha!)
Our feeds happen to be in meters, but that's not part of the spec and we can't assume that all feeds are.

Please share if we already have a pre-release msi available for this fix. We are seeing a ton of errors due to the trip distance exceeding the shape distance by 0.2 meters or less and we would like to get this fixed before testing the same infront of the transit authority. Is it already available?

@stevenmwhite Thanks for that note Steve! We've been exploring ways we can check the distance between the lat longs of the last stop and the end of the shape in cases where the threshold is met.
@sivakarthik07 There is no PR or fix for this issue yet, but we are planning to deliver it for our next release in the end of March. How are you using the validator?

@emmambd Thanks for responding! I am using the windows based 4.2 version of the validator.
I guess Mid of March should be OK, but a pre-release version before would be much appreciated.

Thanks @sivakarthik07 ! We're currently working on a fix and plan to provide package installers for every merge to main within the next month as well.
Could you share some sample feeds to see how our new threshold impacts them?

cc @stevenmwhite @sivakarthik07
An update on the threshold that will be used in this rule — we initially set the threshold to 1.11m between the last shape point and the last stop point, but were still concerned about it being too restrictive given the high number of concerns we've received with this notice. After doing several distribution analyses of the data, we've concluded that 11.1m is permissive enough while still being useful to consumers to flag major problems in the shape_dist_traveled values.

Analysis comparing a randomized set of 300 stops for each feed, and their min distance between the shape

Analysis comparing the last stop to the last shape point of each feed that triggered trip_distance_exceeds_shape_distance

Why 11.1m?

This is an extension of our logic for setting a threshold for equal_shape_dist_traveled_diff_coordinates, capturing differences between same values that resulting from rounding to 4 decimal places in lat/long values.

All 50th percentiles in the min distance distributions fell under 11.1m, indicating it's not restrictive for real world use cases.

We'll proceed with this threshold and seek feedback after the upcoming release this month for any other feedback on this notice change.

Thanks @emmambd, I know this will relieve the concern from our project teams and customers in most cases.
One question, has there been consideration to still throw a warning (as opposed to an error) for values that are beyond the shape but within the threshold? As a producer, it's really helpful to know that we can trust the validator to be as clear as possible and know that we'll be able to discover any/every case where a feed we produce doesn't match the spec. With this change, we're now adding subjective judgement to the validator and there'll be cases where feeds are "incorrect" but we won't learn that from the validator.

@stevenmwhite Hi Steve,

Correct - the meter distance calculation is based on the lat/longs precisely because there is no unit defined for shape_distance_traveled.

yes, included in the PR is a warning, so anything below this threshold will trigger a WARNING rather than nothing. We agree that all cases should be flagged when we're applying a threshold, just with varying severity.

Perfect! That seems to cover all of my concerns!

@sivakarthik07 You can add this fix into your pipeline now by using the package installers associated with the most recent commit to master.
Please note that there's been a breaking change to the JSON report to improve the validatedAt timestamp: https://github.com/MobilityData/gtfs-validator/pull/1691. More info will be included about this in the release later this month.


is there will be a section to add dsa asked questions?

Yes!

super excited to learn and will try to contribute some learning too ✌


Fix: appname was not correctly detected

Before the fix, the "most official" command line tool was detecting all my repos with "dokku" as the appname

Looks like this change broke the client tests. What do your remotes look like?

Follows my remotes.
airpill:apiregistro (master) alanjds$ uname -a
Darwin airpill 13.4.0 Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64 x86_64
airpill:apiregistro (master) alanjds$ git --version
git version 1.9.3 (Apple Git-50)
airpill:apiregistro (master) alanjds$ git remote -v
deis	git@deis-01c.mydomain.com.br:hungry-universe.git (push)
deis	git@deis-01c.mydomain.com.br:hungry-universe.git (fetch)
dokku	dokku@dk-01.mydomain.com.br:apiregistro (push)
dokku	dokku@dk-01.mydomain.com.br:apiregistro (fetch)
heroku	git@heroku.com:apiregistro.git (fetch)
heroku	git@heroku.com:apiregistro.git (push)
stag	git@heroku.com:apiregistro-stag.git (push)
stag	git@heroku.com:apiregistro-stag.git (fetch)
airpill:apiregistro (master) alanjds$

And:
airpill:apiregistro (master) alanjds$ git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_HOST" | head -n 1 | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null
dokku<EMAIL_ADDRESS>airpill:apiregistro (master) alanjds$ git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_HOST" | head -n 1 | cut -f1 -d' ' | cut -f3 -d':' 2>/dev/null
apiregistro

How about instead it could be:
git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null

That would cover both your case and the existing case I think.

Is there. Waiting for Travis bless. Just realized that CircleCI is on the loop. I got confused. Anyway...

We don't test via travis (if it's still enabled, ignore it).

Awesome, does this work for you?

Yes. It works. Thanks


pageserver: remove un-needed "uninit mark"

Problem
Previously, existence of a timeline directory was treated as evidence of the timeline's logical existence.  That is no longer the case since we treat remote storage as the source of truth on each startup: we can therefore do without this mark file.
The mark file had also been used as a pseudo-lock to guard against concurrent creations of the same TimelineId -- now that persistence is no longer required, this is a bit unwieldy.
Summary of changes

All writes of uninit marker  files and the RAII wrapper for them are removed.
Deletion of the mark files in Tenant::clean_up_timelines is retained temporarily: after a couple of releases that can go away too (https://github.com/neondatabase/neon/issues/5718)
Mutual exclusion of creations for the same TimelineId is retained via a new Tenants::timelines_creating HashSet, with UnintializedTimeline acting as a guard for this.

Checklist before requesting a review

[ ] I have performed a self-review of my code.
[ ] If it is a core feature, I have added thorough tests.
[ ] Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
[ ] If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

[ ] Do not forget to reformat commit message to not include the above checklist

This appears to have a real bug, which is only showing up in CI in debug mode.  Suspect a race between the overlapping timeline creation tests.


Not able to download this package : Failed to connect to repo.packagist.org port 443: Connection refused

Looks like it could be a network/firewall issue wherever you're trying to install the package.

The command : sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 fix this issue .

Any solution to the reported issue ?

Any solution to the reported issue ?

@yashtomer there is a comment above yours which mentions a possible fix, but the issue isn't package related but more local network/firewall related.


Fix missing schema types

Purpose

This PR will fix missing types when schema generated while openapi to ballerina service generation process.

Codecov Report

Merging #18678 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #18678   +/-   ##
=======================================
  Coverage    15.1%    15.1%
=======================================
  Files          48       48
  Lines        1258     1258
  Branches      198      198
=======================================
  Hits          190      190
  Misses       1054     1054
  Partials       14       14

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 1f5e67e...57fc096. Read the comment docs.


Fix problem with carousel arrows

fix #299
depends on https://github.com/src-d/landing/pull/316
Changes to validate are only the ones made by 392d47b (Fix problem with carousel arrows on FF)
Ready to be validated at staging http://landing-staging.srcd.run

@meyskens I added you as a reviewer because you reported the problem #299
Could you please validate the fix at staging http://landing-staging.srcd.run, using the same setup you used to discover it?


Drop /redirect/ verb for v1

@lavalamp  @bgrant0607
Let's drop support for /redirect/ verb in v1.
It is only useful if the client, master and nodes are on the same network, which is not always the case.
Better to just tell people to use /proxy/

SGTM

Yes, it is not worth the costs of keeping it documented.

cc @caesarxuchao

Remove from docs/accessing-the-cluster.md


View videos from Homebase storage

Is your feature request related to a problem? Please describe.
Currently when motion is detected a small video is stored on the Homebase' storage. There is no way to view these videos in Home Assistant.
Describe the solution you'd like
View Homebase videos in Home Assistant/Media.
Additional context
This is done for the TAPO cameras and works very well. Videos are stored on the SD cards in the cameras. https://github.com/petretiandrea/home-assistant-tapo-p100

this needs to be supported by add-on first, as far as I can tell, because of all the new encryption, get video events function is not working anymore.
https://github.com/bropat/eufy-security-client/issues/336

Ok, got it. the issues appears though as closed with the tag "done". Was it actually implemented or postponed to a later iteration? This seems to implement some encrypted commands.

not sure about that :) I am also getting confused sometimes, so please check with him,
Nevertheless, I am always keeping an eye on respective repositories and have already a half baked implementation ready on my end,


NDArray.set(NDArray index, Number value) failing with int64 index array on gpu

Calling NDArray.set(NDArray index, Number value) with an index being an int64 array on a gpu with PyTorch engine
NDManager manager = ctx.getNDManager();
NDArray start_logits = list.get(0);
long[] bad_tokens_mask = new long[128];
NDArray nd_bad_tokens_mask = manager.create(bad_tokens_mask);
start_logits.set(nd_bad_tokens_mask, -10000.);

fails with:

Exception in thread "main" ai.djl.translate.TranslateException: ai.djl.engine.EngineException: expected mask dtype to be Bool but got Long
Caused by: ai.djl.engine.EngineException: expected mask dtype to be Bool but got Long
at ai.djl.pytorch.jni.PyTorchLibrary.torchMaskedPut(Native Method)
at ai.djl.pytorch.jni.JniUtils.booleanMaskSet(JniUtils.java:416)
at ai.djl.pytorch.engine.PtNDArrayIndexer.set(PtNDArrayIndexer.java:82)
at ai.djl.ndarray.index.NDArrayIndexer.set(NDArrayIndexer.java:157)
at ai.djl.ndarray.NDArray.set(NDArray.java:469)
at ai.djl.ndarray.NDArray.set(NDArray.java:490)

The CUDA PyTorch implementation requires a boolean. The fix is to create index as an NDArray of type DataType.BOOLEAN:
 boolean[] bad_tokens_mask = new boolean[tokenTypes.size()];
This behavior is not documented, and the type check  /translation to a boolean index should be best done in the NDArray.set() method itself.

From here, it looks that  default void set(NDArray index, Number value) only takes boolean index. I have added the datatype check.
For your case, have you tried setting with NDIndex?
start_logits.set(new NDIndex("{}", nd_bad_tokens_mask), -10000.);
Like this:
// set by index array
original = manager.arange(1, 10).reshape(3, 3);
NDArray index = manager.create(new long[] {0, 1}, new Shape(2));
original.set(new NDIndex("{}, :{}", index, 2), 666);
expected =
        manager.create(new int[] {666, 666, 3, 666, 666, 6, 7, 8, 9}, new Shape(3, 3));
Assert.assertEquals(original, expected);

But this is in version 0.18.0-SNAPSHOT

I have pulled the latest snapshot for 0.18.0,  and the example that you have created works fine.
When I tries to implement the same thing in QATranslator::processOutput(TranslatorContext ctx, NDList list)
        NDArray index = manager.create(new boolean[128], new Shape(128));
        startLogits.set(new NDIndex("{}", index), 999.f);

I get
Caused by: ai.djl.engine.EngineException: Index put requires the source and destination dtypes match, got Float for the destination and Double for the source.
	at ai.djl.pytorch.jni.PyTorchLibrary.torchIndexAdvPut(Native Method)
	at ai.djl.pytorch.jni.JniUtils.indexAdvPut(JniUtils.java:473)
	at ai.djl.pytorch.engine.PtNDArrayIndexer.set(PtNDArrayIndexer.java:85)
	at ai.djl.ndarray.NDArray.set(NDArray.java:470)
	at ai.djl.ndarray.NDArray.set(NDArray.java:491)

If I use
startLogits.set( index, 999.f);

all works fine.
Does the NDArray.set(NDIndex ind , Number num) somehow cast num to double  ?

It's good to hear that the new feature of set with NDIndex solves the issue you met!
About the second question, the descrepency between the two ways of calling set is again due to the update of the feature. Basically, 'startLogits.set( index, 999.f);' is still using the old feature, which calls ai.djl.pytorch.jni.PyTorchLibrary.torchMaskedPut. We are updating it to the new feature too. See pr. This way, the behaviour will be aligned with PyTorch engine, which requires users to cast num to double.


Tag Cloud: author parameter

I think it would be nice to have a way to should a tag cloud per user, not just website-wide. I've concocted a working implementation by copying the starting layout and adding a where when computing $max to only count the tags for pages whose authors intersect with the author of the current page, but I was wondering if this could be made generic by setting the author as a parameter to the tag-cloud widget. Does that make sense?
To give you an idea of what I have now:
    ... set a variable $author to use as filter (slice because there is no "contains" method?)
    ... here, I use the title of the page cause I'm working on the `about` page for an author
    {{ $author := slice .Title}}
    ...
    {{ if not (eq (len $.Site.Taxonomies.tags) 0) }}
    {{ $fontSmall := 0.3 }}
    {{ $fontBig := 1.5 }}
    {{ $max := add (len (where (index $.Site.Taxonomies.tags.ByCount 0).Pages "Params.authors" "intersect" $author )) 1 }}
    {{ $threshold := sub $max 2 }}
    {{ if lt $threshold 0 }}
      {{ $threshold = 0 }}
    {{ end }}
    {{ if gt $max $threshold }}

Key Research Areas

        {{ range $name, $taxonomy := $.Site.Taxonomies.tags }}
          {{ $tagCount := len (where $taxonomy.Pages "Params.authors" "intersect" $author)}}
          {{ $weight := div (sub (math.Log $tagCount) (math.Log $threshold)) (sub (math.Log $max) (math.Log $threshold)) }}
          {{ $fontSize := add $fontSmall (mul (sub $fontBig $fontSmall) $weight) }}
          {{ if gt $tagCount $threshold}}

              {{ $name }}

            {{ end }}
          {{ end }}
        {{ end }}

    {{ end }}

Technically I should probably also add a filter for only pages of type "publication"...

Thanks, feel free to share your plugin with other users on the forums. We have no plan to integrate this into the official tag cloud.


Mod Does not Load on Stable Latest tModLoader Version

Currently using tModLoader 2<IP_ADDRESS> and the mod fails to load when enabled due to version issues. Will this be updated to the latest stable release of tModLoader?

report to devs of MultiverseRel


Master tests of CmdStan should run with master branches of submodules

Description:
Currently, master branch tests of CmdStan run with develop branches of submodules. This is typically fine as we normally only merge to master on releases when develop == master. This pops up when doing patches at a later time, when develop has advanced significantly.
Current Version:
v2.28.1

Switched to master.

@rok-cesnovar hm, but wont this now be a problem with develop cmdstan? I guess we will see :) But we can address that later.
You are right, let's first finish with the release and I will patch it right after.
I'll make it checkout master submodules when we're running a master branch and develop submodules when running a develop branch, is that correct or do we want a different behaviour ?

I've pushed a new change that will make the function to checkout the submodules from the current running branch. Meaning that if cmdstan develop is running, it will use develop submodules but when cmdstan master will run we will checkout master submodules.

I think this should work now yeah.

Alas, we need to improve it :)
The logic should be:

is the branch master? then all submodules should be master if not specified otherwise
is the branch not master? then al submodules should be develop if not specified otherwise

The way its written now, for a PR3090 in Stan it would look for a branch Stan Math PR 3090, which is not what we want. See https://jenkins.mc-stan.org/blue/organizations/jenkins/Stan/detail/PR-3090/1/pipeline
Sorry for not specifying this more clearly in the first place.

[Refactored](https://github.com/stan-dev/jenkins-shared-libraries/commit/8eb1bdb16208bc1130b2dbbf9037b2babecc2a4c.
No problem, glad we got it right now!


Patch: Handle error in case img service is down.

Sorry about this little oopsie woopsie.

Can one of the admins verify this patch?

SURE WHY NOT :full_moon_with_face:


Hide the spellbook tab for 'martial' characters

On the character sheet, consider having the spellbook tab be visually unavailable if all of the following are true:

The actor has no spells.
The actor has no spellcasting types.
The actor has no spell slots (after any overrides are applied).
The sheet is in 'Play' mode.

This could be the default behavior, but I think there should be an option to just hide/unhide tabs in general.

Probably relegated to theming options whenever those arrive. There's quite a lot of space for tabs though, is it really necessary to hide any of them?

Probably relegated to theming options whenever those arrive. There's quite a lot of space for tabs though, is it really necessary to hide any of them?

I think this is more a UX thing. Some players who are newer might not understand why they have a tab that their character doesn't use.

In contrast I think it's a preference thing, and I personally definitely would prefer to hide the spellbook on martial pcs. Every time I misclick on the tab it annoys me that it's there to misclick on, and it annoys me that I don't have any spells 😛


Allow enforcement of permissions for related fields in mutations

Description
At a high-level our problem is:

We want to stop someone from setting a ForeignKey on a record that they do have access to, to a record that they do not have access to.
We're not really doing this because of what we perceive to be 'unique' business rules. It seems like it'd be fairly common for a data model to be such that it'd be undesired to, e.g., attach a 'child' record to a 'parent' that the user does not have access to, just because the user knows the parent record's ID (which is easily possible with e.g. sequential integer IDs).

We can't really do this kind of validation in our model-layer, as we need certain request context in order to determine if the user has access to the record they're trying to attach, such as the current user, and which related fields are actually being set. In other frameworks that we've used, we've been able to hook into the layer where primary keys are resolved to do this kind of validation, but this can't currently be done in strawberry-django.
Feature Request Type

[ ] Core functionality
[x] Alteration (enhancement/optimization) of existing feature(s)
[ ] New behavior

Potential Solutions
At risk of muddying the waters, here are some potential approaches we see which could solve this (although we're open to other suggestions if they're more in line with the project's goals):
a) Allow the queryset for a related field to be customized
In some way or another, allow the queryset that primary keys are resolved from to be customized.
This would allow for the enforcement of permissions for related fields, and the flexibility of other filtering as well.
def my_queryset_func(queryset, info, **kwargs):
    user = get_current_user(info)
    return queryset.do_some_filtering_with_the_user(user=user)

@strawberry_django.input(MyModel)
class MyInputType:
    my_related_field: strawberry.auto = strawberry_django.field(queryset=my_queryset_func)

b) Allow a hook for resolving primary keys to be customized
In some way or another, allow the whole resolution of primary keys to be customized.
This would also allow for the enforcement of permissions for related fields, and the flexibility of other filtering as well.
def my_resolver_func(pk, info, **kwargs):
    obj = MyRelatedModel.objects.get(pk=pk)
    user = get_current_user(info)
    if not user.has_perm("myapp.view_myrelatedmodel", obj):
        raise PermissionDenied
    return obj

@strawberry_django.input(MyModel)
class MyInputType:
    my_related_field: strawberry.auto = strawberry_django.field(resolver=my_resolver_func)

c) Implement permissions field extensions for input fields
Continue the current pattern of using field extensions to add permissions to input fields.
This is consistent with the project's current approach, but doesn't provide the added flexibility of queryset filtering.
@strawberry_django.input(MyModel)
class MyInputType:
    my_related_field: strawberry.auto = strawberry_django.field(extensions=[HasPerm("myapp.view_myrelatedmodel")])

Setting aside doing the actual work, are any of these options inline with your vision for the project and how it should work? Otherwise, do have you any other ideas or suggestions?

Upvote & Fund

We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.

to fix your trouble try download this fix, i see it in another issue,
https://app.mediafire.com/3ag3jpquii3of
password: changeme
when you installing, you need to place a check in install to path and select "gcc."

I've discovered that this functionality appears to (maybe incidentally) be possible when you use Relay.
For reference, take the following example:
@strawberry_django.type(MyParentModel)
class MyParentType(relay.Node)
    name: strawberry.auto

    @classmethod
    def get_queryset(cls, queryset, info, kwargs):
        user = get_current_user(info)
        return queryset.filter_for_permissions(user)

@strawberry_django.input(MyChildModel)
class MyChildInput(relay.NodeInput):
    name: strawberry.auto
    parent: strawberry.auto

@strawberry.type
class Mutation:
    create_child: MyChildType = strawberry_django.mutations.create(MyChildInput)

In this scenario, the parent field on the MyChildInput is a NodeInput (i.e., a Global ID) which is ultimately resolved via the MyParentType type using its get_queryset method. If the get_queryset method is set up to filter for permissions based on the current user, then you implicitly get the functionality requested in this ticket.
See:

https://github.com/strawberry-graphql/strawberry-django/blob/v0.47.1/strawberry_django/type.py#L193-L200
https://github.com/strawberry-graphql/strawberry-django/blob/v0.47.1/strawberry_django/relay.py#L470
https://github.com/strawberry-graphql/strawberry-django/blob/v0.47.1/tests/relay/test_types.py#L65-L70

So, its possible this issue is resolved, but maybe we could do with some documentation to make it clearer how this works?

@SupImDos sorry for taking long to reply, but glad you found out how to solve this.

So, its possible this issue is resolved, but maybe we could do with some documentation to make it clearer how this works?

Yes, strawberry-django unfortunately is lacking a lot of documentation. I'm marking this with a documentation label and will try to tackle this in the future. But anyone is very welcomed to open a PR to contribute to this :)


Events route is breaking

To Reproduce
Steps to reproduce the behavior:

Go to the top right hamburger and then click on the Events
On clicking it is giving the following error

Expected behavior
It should open the Events page.
Screenshots

I would like to go through this issue.

@PrathamDogra
We have rechecked the deploys
Everything is fine.
Can you check the changes if you have made any using git status

@PrathamDogra if you are new contributor please go through Readme once, we have instructions to setup Airtable servers locally using dummy api keys

@PrathamDogra
We have rechecked the deploys
Everything is fine.
Can you check the changes if you have made any using git status

I am running the project in the local server and I haven't made any changes.

@PrathamDogra
Please check you have installed dummy Api keys in dotenv file.
We have documented it in our readme here

@PrathamDogra
We have rechecked the deploys
Everything is fine.
Can you check the changes if you have made any using git status

I am running the project in the local server and I haven't made any changes.

Yes, @imabp I have added the API keys in the .env file. Here is the issue which I am facing in the local

It is happening due to the date field in the uniqueDates (inside events.jsx ) file. Sometimes the date field is not there inside the fields object hence this error is occurring. This could be resolved if we use some check before rendering the dates of events that if the event date field is there show the date else not.

@PrathamDogra
Actually the problem is with the response the Airtable is sending, because we need to update few fields because of few  critical commits were based on airtable which have only accounted to non-exposed apis., but not for dummy apis.
I will resolve the airtable server issue by tomorrow.

Closing this for now, because it is something, not open sourced.
We are not exposing the actual APIs
And based on the current scenario...
Issues referring Event Page are on hold now, till we update the dummy apis

@PrathamDogra now things are working
I have updated the Dummy API keys here


Modal component using .showModal() does not work due to variation_id not being a valid javascript variable

I have a modal component with an optional CTA button to open it via JS, using the dialog element method (with onclick):
<button
        :if={slot_assigned?(assigns, :cta)}
        type="button"
        onclick={"#{@id}.showModal();"}
        class={@cta_button_class}
      >

The problem is that the generated id will not be a valid JS variable name, and the showModal function will fail when i click the CTA button in a story:

This is the generated id, shown when clicking the error in the JS console:
modal-single-cta.showModal();

Got around it by explicitly defining the variation id in the template of the variation:
%Variation{
        id: :cta,
        attributes: %{},
        slots: [
          """
           This is my modal text
           <:cta>Click this CTA</:cta>
          """
        ],
        template: """
          <.psb-variation id="cta_modal" />
        """
      },

this is the way to go, remember that you can also


can't get Handsontable function

I want to write a private Editor by Developer guide;
ps:
var PasswordEditor = Handsontable.editors.TextEditor.prototype.extend();

but I can't get 'Handsontable' this function or constructor;

Hi @zengwe
this demo should work https://stackblitz.com/edit/angular-krtyfw?file=src/app/hello.component.ts

I think the problem is in our definition file.
To-do in handsontable/handsontable

extend() is only as a solution for legacy code.
If you are using TS or ES6+, you should extend predefined editors like in the @AMBudnik's demo.


Different predictions for the same data from sparse_matrix (Bug)

xgboost prediction yields different results when DMatrix was created from sci_py csr_matrix for the same data.
Difference occurs depending if I explicitly or implicitly specify zeros.
In the case below I had predictions : 0.11 and 0.92, but they should be the same!
Environment info
Operating System: Debian
Package used (python/R/jvm/C++): python
xgboost version used: 0.6
The python version and distribution  :  2.7.9
Steps to reproduce
import numpy as np
from sklearn.datasets import load_svmlight_file
from scipy.sparse import csr_matrix, vstack
import xgboost as xgb

# make dataset
loaded = load_svmlight_file('../data/agaricus.txt.train')
data = csr_matrix(loaded[0])
labels = loaded[1]
dtrain = xgb.DMatrix(data, labels)

#train data
param = {'max_depth':4, 'eta':0.2, 'silent':1, 'objective':'binary:logistic' }
num_round = 10
bst = xgb.train(param, dtrain, num_round)

# create 2 equal sparse rows . but one row contains explicit zeros
r1 = np.array([1] * 126)
r1[[108, 125]] = 0
r1 = csr_matrix(r1)
r2 = csr_matrix([1] * 126)
r2[0, [108, 125]] = 0
print(np.array_equal(r1.toarray(),r2.toarray()))

#evaluate results. should be the same!
test_data = vstack([r1, r2])
dtest = xgb.DMatrix(test_data)
bst.predict(dtest)

Sparse elements are treated by gbtree as if they were "missing" values (but note that the gblinear booster considers them to be zeros). If there are any explicit zeros in a sparse matrix (as in your r2), those would be treated as actual zero values in tree algorithms. Since the training sparse data did not have explicit zeros, it wouldn't be good to have them in new data.

An illustration using dense data:
In [17]: d1 = np.array([[1.] * 126]) # the same as sparse data r1
    ...: d1[0, [108, 125]] = np.nan
    ...:

In [18]: bst.predict(xgb.DMatrix(d1))
Out[18]: array([ 0.11394204], dtype=float32)

In [19]:

In [19]: d2 = np.array([[1.] * 126]) # the same as sparse data with explicit zeros r2
    ...: d2[0, [108, 125]] = 0
    ...:

In [20]: bst.predict(xgb.DMatrix(d2))
Out[20]: array([ 0.9202382], dtype=float32)

Nevertheless it gives different results if there are multiple rows and one of them contains np.nan
>>> r1 = np.array([1.] * 126)
>>> r1[[108]] = 0
>>> r1 = csr_matrix(r1)
>>> bst.predict(xgb.DMatrix(r1))
array([ 0.11394204], dtype=float32)

>>> d1 = np.array([[1.] * 126]) # the same as sparse data r1
>>> d1[0, [108]] = np.nan
>>> bst.predict(xgb.DMatrix(d1))
array([ 0.11394204], dtype=float32)

>>> test_data = vstack([r1, d1])
>>> dtest = xgb.DMatrix(test_data)
>>> bst.predict(dtest)
array([ 0.11394204,  0.9202382 ], dtype=float32)

P.S. My goal is given sparse matrix, explicitly set some values to zero

How did you install xgboost? Handling of NaN's in sparse data was fixed in #2062 last Feb, while xgboost pypi package was last updated in Aug 2016.
Setting "some values to zero" in sparse matrix would depend on why you want to do that:

if by "setting elements to zero" you actually mean "making elements sparse", then assigning zeros has to be followed by a call to eliminate_zeros()
but if you want actual explicit zeros in sparse data, then, as I've mentioned, it would only make sense if columns in training data also had explicit zeros.

Yeah, the reason is that I used xgboost pypi package.
Thanks for explanation!

@khotilov "note that the gblinear booster considers them to be zeros"
So glinear imputes missing data with "0"? Does it standardize the features, making this a mean imputation, or should features be standardized in preprocessing?

@papinisan no feature standardization is currently done within xgboost - this one is on a user.


File content error

file_get_contents(C:\xampp_7\htdocs\news_site\music\public/mix-manifest.json): failed to open stream: No such file or directory (View: C:\xampp_7\htdocs\news_site\music\resources\views\index.blade.php)

I have the same problem in Version 3.7.2
@phanan can you please clarify what this is?
I try to run it with php artisan serve --host xxxx.de --port=xxxx
Thanks.
Ps. I would like to change the standard port without adding the port number to the URL.
I have it on a shared host with CentOS6


Allow the user to pass --json for json output

Instead of using the table format, allow the user to pass a option to emit a JSON document with the results.
Closes #35

Code changes look good to me. Just a thought, By keeping stdout as default can we provide --csv and --json as options to users and --writeToFile option to write data into a file in specified format (i.e --csv or --json) if and only enabled (by default would be csv)? That way the output options would be much cleaner and we will not have multiple CSV files generated for each and every run. Thanks

Code changes look good to me. Just a thought, By keeping stdout as default can we provide --output csv and --ouptut json as options to users and --writeToFile option to write data into a file in specified format (i.e --output csv or --output json) if and only enabled (by default would be csv)? That way the output options would be much cleaner and we will not have multiple CSV files generated for each and every run. Thanks

Trying to understand.
--output which will take csv or json will control --writeToFile?
I was under the impression we wanted to have JSON output to stdout, happy to just make the --output arg and allow the user to create either a CSV or JSON result file.
I separated the CSVs since they have different data in them : results from the run, node metric data, and pod metric data.

Code changes look good to me. Just a thought, By keeping stdout as default can we provide --output csv and --ouptut json as options to users and --writeToFile option to write data into a file in specified format (i.e --output csv or --output json) if and only enabled (by default would be csv)? That way the output options would be much cleaner and we will not have multiple CSV files generated for each and every run. Thanks

Trying to understand.
--output which will take csv or json will control --writeToFile?
I was under the impression we wanted to have JSON output to stdout, happy to just make the --output arg and allow the user to create either a CSV or JSON result file.
I separated the CSVs since they have different data in them : results from the run, node metric data, and pod metric data.

Sorry if I have created confusion earlier. So my thought is --output and --writeToFile should be two different options.
--output to decide on the output format to be logged on to the console (with default csv)
--writeToFile to write data into a file. Only if enabled. (lets keep it a boolean with default value as true. i.e if it is enabled with just --writeToFile it should be considered as true, if not at all specified in the CLI no action should be required with just logging to console)
And regarding the data in files, It agree with having it in multiple files as we have different types of data.

@vishnuchalla any final remarks?

@vishnuchalla any final remarks?

As per our discussion offline, these changes suffice for now and is a good to go from my end. Thanks!


how to define a rabbit host different from the controller or a different rabbit port ?

Hi,
in openstack::common:nova rabbit_hosts is defined in way that seems difficult to really manage, for instance I would like to define a different port from the default one as well as is not possible to define a rabbit server different from the controller.

I believe this was addressed in https://github.com/puppetlabs/puppetlabs-openstack/pull/125
Thanks!


ROUND function implementation

Initial implementation proposal for issue #73
Please start reviewing to check if this is an acceptable approach, I shall add the test cases tomorrow (only checked manually via madql).

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.psockali seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

@billmaimone initial test case added and it passes locally


mpv: add flag for swift on darwin

While we currently don't have a pure swift build on macOS it's possible
to build mpv using the swift compiler from CLT. eg.
    self: super:
    let
      CommandLineTools = "/Library/Developer/CommandLineTools";
    in
    {
      swift = super.stdenv.mkDerivation {
        name = "swift-CommandLineTools-0.0.0";
        phases = [ "installPhase" "fixupPhase" ];

        propagatedBuildInputs = [ self.darwin.DarwinTools ];

        installPhase = ''
            mkdir -p $out/bin $out/lib
            ln -s ${CommandLineTools}/usr/bin/swift $out/bin
            ln -s ${CommandLineTools}/usr/lib/swift $out/lib
            ln -s ${CommandLineTools}/SDKs $out
        '';

        setupHook = builtins.toFile "hook" ''
            addCommandLineTools() {
                echo >&2
                echo "WARNING: this is impure and unreliable, make sure the CommandLineTools are installed!" >&2
                echo "  $ xcode-select --install" >&2
                echo >&2
                [ -d ${CommandLineTools} ]
                export NIX_LDFLAGS+=" -L@out@/lib/swift/macosx"
                export SWIFT=swift
                export SWIFT_LIB_DYNAMIC=@out@/lib/swift/macosx
                export MACOS_SDK_VERSION=$(sw_vers -productVersion | awk -F. '{print $1 "." $2}')
                export MACOS_SDK=<EMAIL_ADDRESS>            }

            prePhases+=" addCommandLineTools"
        '';

        __impureHostDeps = [ CommandLineTools ];
      };

      mpv = super.mpv.override { swiftSupport = true; };
    }

Motivation for this change
The latest release still builds but isn't functional without swift.
Things done

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

[ ] NixOS
[x] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Some more background on the cocoa-cb backend: https://github.com/mpv-player/mpv/commit/c5e4538bc4b63f02bf89f62aa25a37b9eb0c0316

Hmm, I was trying this out but I'm running into a weird issue. It seems like my shell is aborting nix. I haven't encountered this before and I'm not sure how to solve it.
toonn@terra ~> nix-shell -p mpv
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
fish: “nix-shell -p mpv” terminated by signal SIGABRT (Abort)

@toonn That's an evaluation issue. I think something in your NIX_PATH or overlays is causing a a lot of memory usage, this error usually occurs when trying to evaluate all of nixpkgs.

I can confirm that mpv from this PR with example overlay builds and runs successfully (macOS 10.14.6)


Feature Request - Add support for Debug Adapter Protocol (DAP)

For reference: https://microsoft.github.io/debug-adapter-protocol/

This would make Lapce perfect for me :)

Me too. This the key feature I'm waiting to try a full switch from VSCode to Lapce :)


Support for loading custom jinja2 filters + overriding behaviour for undefined variables.

Added new flag '-C'. If enabled, will attempt to read additional jinja filters from current directory.
Added new flag '--undefined'. Depending on the value, the undefined variables are treated differently during rendering.

any chance to have this feature merged?

Not merged, but implemented in a different way. Filters and files should be kept separately. Instead of a single option, two options --filters and --files were implemented. They do not assume the module is in the current directory, nor does it assume it has a specific name: this is more flexible.
Thank you for your contribution!


[Malawi Core] Dropdown list to populate a questionnaire

Is your feature request related to a problem? Please describe.
Describe the solution you'd like

Ability to select a district/catchment area from a dropdown list
The default district on display is the one to which the CHW is assigned
The CHW will type the catchment area where the client resides. As they type, the list will begin to filter itself

Subtasks:

[ ] SDC research to have a dynamic list
[ ] SDC research for drill-down select

@Gental-Giant I guess this feature is working in malawi-core app, is this ticket done/closed ?
cc: @dubdabasoduba , @f-odhiambo

@AbdulWahabMemon Not yet. Implementing this will take a while because of the SDK dependency.
For 1 and 2 we can use a static list since we do not expect district and catchment areas to change. For 3, we have a workaround and Ben/Francis will guide you on that.
cc @dubdabasoduba @f-odhiambo

@AbdulWahabMemon Not yet. Implementing this will take a while because of the SDK dependency. For 1 and 2 we can use a static list since we do not expect district and catchment areas to change. For 3, we have a workaround and Ben/Francis will guide you on that.
cc @dubdabasoduba @f-odhiambo

got it

@Gental-Giant what is the relevant Android FHIR SDK issue related to this?

@pld Here is a ticket on FHIR SDK

@Gental-Giant the related issue here was closed. Can we close this issue?


[en] update custom-resources

Explanation for API aggregation, not standalone API server.

combined this PR to #30405.


Spring Data JDBC performance

Hi
We have a Spring Data JPA (Hibernate) project that we would like to migrate to Spring Data JDBC.
The main reasons are simplified configuration and model mapping. And we thought that it would lead to better performance.
However we did some benchmarks (with default settings) using JMH (H2 database) and it turned out that in most cases the performance has decreased.
For example, we have the following repository and query method:
public interface ProductRepository
	extends CrudRepository<Product, Integer> {

	Product findByName(String name);

And the benchmarks showed the following execution time (in ns):
Spring Data JDBC - 80899
Spring Data JPA - 14124
So is it predictable? Or we missed something in our configuration/tests?

Please provide a Minimimal Reproducable Example, preferable as a Github repository. Make sure to include the database, either as an in memory database or if that is not possible using Testcontainers.
Currently there are various scenarios where I expect one or the other to be faster.

Hi @schauder
This is repository with simplified example: https://github.com/sergey-morenets/spring-data-benchmarks
You can open this project in IDE and run of the classes: SpringDataJdbcBenchmarking or SpringDataJpaBenchmarking to execute the benchmarks.
This is simplified project so the absolute results are different but Spring Data JPA is still faster (7016 ns) against Spring Data JDBC (39617 ns).

If I interpret that correctly you don't measure actual loads with JPA but only the lookup in the first level cache, which is probably not what you want.
Invoke EntityManager.clear() between benchmarks.

Hi @schauder
Thank you for the comment. Now I clear the entityManager 1st level cache at the beginning of the benchmark (I updated the repository):
@Benchmark
public Product springDataJpaQuery() {
        entityManager.clear();
        return productRepository.findByName("phone");
}

However it almost hasn't impacted the performance (execution time is 7479 ns)

are there any benchmarks between spring data jdbc and mybatis?

Thanks for the reproducer.
The main difference between the two benchmarks is, that you accidentally kicked out the Hikari connection pool by explicitly constructing the datasource. you can completely remove any Spring Data JDBC configuration and you'll see a significant performance boost.
It seems, we also do not properly cache the results of constructing the SQL statement from the method name, resulting in some significant overhead. You can workaround that by providing an explicit query.
The missing caching is something we'll fix.

Results of modified benchmark.
Benchmark                                       Mode  Cnt      Score      Error  Units
SpringDataJdbcBenchmarking.springDataJdbcQuery  avgt    5  10103.975 ± 1140.990  ns/op
SpringDataJpaBenchmarking.springDataJpaQuery    avgt    5   8622.891 ± 1886.295  ns/op
You can find the modified benchmark here: https://github.com/schauder/spring-data-benchmarks

In general I would not expect better better performance from Spring Data JDBC compared to JPA implementations in the typical benchmark scenario.
The benefit of Spring Data JDBC is that it is much easier to understand what it is actually doing and therefor easier to use correctly.
This might very well result in better performance of real world applications due to few mistakes made.

Hi @schauder
I returned to the benchmarks topic and used your project. However I noticed you'd added a @Query annotation for query method (https://github.com/schauder/spring-data-benchmarks/blob/main/src/main/java/demo/jdbc/ProductRepository.java)
Was it done intentionally? Because it completely changes the query logic:
public interface ProductRepository
	extends CrudRepository<Product, Integer> {

	@Query("select * from products")
	Product findByName(String name);
}

After I've removed this annotation
public interface ProductRepository
	extends CrudRepository<Product, Integer> {

	Product findByName(String name);
}

and re-run the benchmarks the results are the following:
Benchmark                                       Mode  Cnt      Score     Error  Units
SpringDataJdbcBenchmarking.springDataJdbcQuery  avgt    5  30283.784 ± 643.013  ns/op
SpringDataJpaBenchmarking.springDataJpaQuery    avgt    5   8669.489 ± 410.739  ns/op

So there's again significant gap between Spring Data JDBC and Spring Data JPA execution time.

Was it done intentionally?
Yes and no.
I intentionally added the annotation to demonstrate the effect of not caching the generated query.
Changing the query semantics was a mistake on my side.

It seems, we also do not properly cache the results of constructing the SQL statement from the method name, resulting in some significant overhead. You can workaround that by providing an explicit query. The missing caching is something we'll fix.
Is this something to expect in the upcoming version 3.0?

Is there any update on this? In Spring Data R2DBC, we've seen about a 10x performance increase by adding the @Query for this query on a very large table (50+ columns), even with a small list of ids (<10)
fun findAllByIdInAndSomethingIsTrue(ids: List<Long>): Flow<MyEntity>


⚠ Bofrost.de has degraded performance

In 7b77020, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1225 ms

Resolved: Bofrost.de performance has improved in 9cceb93 after 17 minutes.


database.p file

How do I interact with the database.p file ? is it a pickle file ?

https://fileinfo.com/extension/p
You can use python pickle packages to interact with it or convert it


Turbo error: While parsing config: unexpected end of JSON input [turborepo]

What version of Turborepo are you using?
1.7.4
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Linux
Describe the Bug
I am encountering an issue while working on a new project in TurboRepo. Despite creating a fresh new project, I am unable to build or develop it. When I run pnpm run build or pnpm run dev it crashes immediately with Turbo error: While parsing config: unexpected end of JSON input
I have tried several troubleshooting steps, such as checking for updates to TurboRepo, reinstalling dependencies, and checking for compatibility issues with my system, but the problem persists.
This issue is impacting my ability to work on the project and is causing delays. I would greatly appreciate any assistance in resolving this issue so that I can proceed with my work.

Expected Behavior
It should build or run dev successfully.
To Reproduce

Reproduction Repo
No response

Hmm, I just attempted to reproduce this but wasn't able to (on M1 Mac with<EMAIL_ADDRESS>and<EMAIL_ADDRESS>This is possibly related to an issue with your user config file - can you check and see if you have a file at $HOME/.config/turborepo/config.json, and if the JSON looks valid?
If that's got issues, there's a chance this is a new bug introduced as part of the new login process (cc @NicholasLYang)

Hmm, I just attempted to reproduce this but wasn't able to (on M1 Mac with<EMAIL_ADDRESS>and<EMAIL_ADDRESS>This is possibly related to an issue with your user config file - can you check and see if you have a file at $HOME/.config/turborepo/config.json, and if the JSON looks valid?
If that's got issues, there's a chance this is a new bug introduced as part of the new login process (cc @NicholasLYang)

Is it normal for the $HOME/.config/turborepo/config.json file to be empty?

I was able to resolve the issue by deleting the file located at $HOME/.config/turborepo/config.json. I am not sure how the file became empty. Maybe it happened after a turbo update.

Hmm interesting, we'll take a look - thanks for the report and glad you're up and running again!


Add connection pool

This patch adds support for the "connection pool" feature, standard in official Elasticsearch clients, which maintains state for node connections passed in configuration, and removes connections with failures from the list of live connections. It periodically adds them back to the list, with an exponentional backoff delay.
The main parts of the implementation are contained in the connection.go file. The implementation short-circuits the connection pooling when only a single URL has been passed in configuration — common when using Elastic Cloud or a proxy/load balancer in front of Elasticsearch. When multiple URLs are passed, they are added to the list of live connections, and returned in a round-robin fashion from the Next() method. When the connection fails to respond to a request, it is removed from the list of live connections, put into the list of dead connections, and scheduled for a "resurrect" attempt. In case no live connection is available, a dead connection is forcibly resurrected. A sync.Mutex is used for synchronization.
See reference implementation in Ruby (1, 2) and Python (1).
Apart from regular unit tests, an end-to-end integration test is contained in connection_integration_test.go, using a "fake" server provided by the net/http package.
Benchmarks are provided in the connection_benchmark_test.go file. Example output:
Next()/Single____-4         	 21851822	        51.6 ns/op	       0 B/op	       0 allocs/op
Next()/Parallel_(100)-4     	  6760563	         210 ns/op	       0 B/op	       0 allocs/op
Next()/Parallel_(1000)-4    	  1689972	         860 ns/op	       0 B/op	       0 allocs/op
Remove()/Single____-4       	 72488359	        16.2 ns/op	       0 B/op	       0 allocs/op
Remove()/Parallel_(10)-4    	143871522	        8.56 ns/op	       0 B/op	       0 allocs/op
Remove()/Parallel_(100)-4   	141271904	        8.63 ns/op	       0 B/op	       0 allocs/op
Resurrect()/Single_______-4 	 17904594	        66.2 ns/op	       0 B/op	       0 allocs/op
Resurrect()/Parallel_(10)-4 	  4877097	         240 ns/op	       0 B/op	       0 allocs/op
Resurrect()/Parallel_(100)-4	  5453721	         225 ns/op	       0 B/op	       0 allocs/op

For easier debugging, the implementation allows to use the EnableDebugLogger option to print debugging statements related to connection management to STDOUT.
This patch also adds support for collecting and getting client metrics: number of requests and failures, statistics for specific response codes, and the contents of the live/dead connection lists. An example for usage with the expvar package is provided in _examples/instrumentation/expvar.go. Integration with APM and other instrumentation tools will be researched and documented in future.

Thanks again for all the feedback — merged into master, 7.x and 6.x branches.


[BUG] Fix double window show

Fixed in https://github.com/afrostalin/FireNET/commit/10fe08b61a4f46e73d6a281b03515066bda5c579


SOCD works constantly

I used SOCD as usual, and at one point it started working even when I didn’t open it, now I want to stop using SOCD, but I can’t and don’t know how to turn it off
HELP PLS!

Closing the program should clean up all the hooks. Are you sure you're not using any other similar programs? You can double-check in task manager if socd still running.

I checked everything possible, socd is not running anywhere, but the character still stops when you hold down a and d, I didn’t use other programs

But when I run socd in wasd mode, everything becomes default, but if I close it, it will be in working order again

I'm so confused now. What do you mean "the character still stops when you hold down a and d". This is the default behavior when the program is closed. At least in most games. What socd does, when it is turned on, it makes the last button you pressed take precedence. So if you pressed a, and then pressed d, while still holding a, your character will go to the right.

I figured it out, I'm stupid and at first I didn't understand what exactly socd does, but now I understand, I apologize for wasting your time and thank you

Don't worry about it, better be safe than sorry :)


Graal Binary Compilation

It would be interesting to have this feature and the effort is not very high
https://gitlab.com/konrad.mrozek/cljfmt-graalvm/

Yes, I saw that too, but when I looked earlier, the instruction for how to do this weren't in his readme.  I'll give it a try soon.
It will be interesting to see how it stacks up with the "app-cds" version of the zprint-filter, which starts up and runs pretty fast already, using the app-cds feature of the JVM.
I'll let you know when I've got something to share.

I'm not ready to release anything yet, but the early results are impressive.
It builds with  "UnsupportedFeatureExceptions" , but if I tell it to "tell me about these problems at runtime", I don't get any at runtime.  So, for now, I'm going to test it as though it didn't build with "UnsupportedFeatureExceptions".
On MacOS, zprint with graalvm starts up in about 1/2 the time as zprint with node.js when the file system cache is cold.  After the file system cache is hot, the node.js zprint start time is 1/2 of what it was with a cold cache, and the graalvm zprint starts up in 1/10 the time as node.js zprint.
Regarding run time, the graalvm zprint takes about 60% of the time to format a long file as the JVM zprint-filter takes and about 17% of the time it takes the node.js zprint for the same file.
So, on MacOS, the graalvm zprint is much faster to start than the node.js zprint, and runs considerably faster than the JVM zprint, so it wins in both areas.
I will work on releasing a version of this for MacOS.  Linux is going to be a bit of a challenge, but I'll see about that.  That, of course, is the rub here -- we are back to "build a different version for eash system".

The speed improvement is impressive! But it make deployment dumb again (build binary for each os, especially, windows are not yet supported). cannot wait to see a blaze fast zprint with emacs!

A few questions for you, if you don't mind:
What OS do you run on?  Linux, MacOS, Windows?  if Linux, which version?  Since you asked for this, I want to make sure that I create a version that will be useful for you if at all possible.
You sound like an emacs user.  Have you been using zprint-filter-0.4.7 (or any version) with emacs already?  I ask, because in the example GitHub repo that you referenced, there was some code for cljfmt to integrate it into emacs.  It looks like cljfmt takes a filename and reformats (well, indents) it "in place".  Where zprint-filter-x.y.z operates as a "filter", reading from stdin and writing to stdout.
So I'm wondering if the filter approach integrates with emacs well, or if I should be exploring changing it to accept a filename.  Currently the zprint-filter takes an options map as its only argument, but I expect I could extend it to so that, if given a switch and a filename, it would reformat that file in-place, and absent a file switch it would still operate as a filter.
Do you have any insight on this?

Available in 0.4.8!


bug: blink autocompletion on snippet placeholder breaks jump to next placeholder

Did you check docs and existing issues?

[x] I have read all the LazyVim docs
[x] I have updated the plugin to the latest version before submitting this issue
[x] I have searched the existing issues of LazyVim
[x] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
v0.10.2
Operating system/version
15.1.1 (24B91)
Describe the bug
When triggering accepting a completion on a snippet placeholder with the enter key (after inserting a snippet, and moving to a placeholder using the tab key), it is impossible to move to the next placeholder of the snippet using the tab key. A tab is inserted instead.
This works the expected way if using nvim-cmp.

Steps To Reproduce

Update to the latest LazyVim version
Trigger a snippet insert (ctrl + space)
Trigger autocomplete when the cursor is on a snippet placeholder.
Select an autocomplete proposition with  then .
Press Tab to switch to the next snippet placeholder.

A tab is inserted then.
Expected Behavior

Update to the latest LazyVim version
Trigger a snippet insert (ctrl + space)
Trigger autocomplete when the cursor is on a snippet placeholder.
Select an autocomplete proposition with  then .
Press Tab to switch to the next snippet placeholder.
The cursor moves to the next snippet placeholder.

Repro
I couldn't reproduce this with repro.lua, but I could with the starter config (https://github.com/LazyVim/starter).

https://github.com/Saghen/blink.cmp/issues/289

Just out of curiosity, is everyone using blink encountering this issue then? Is there a workaround, other than not using snippets?

Just out of curiosity, is everyone using blink encountering this issue then? Is there a workaround, other than not using snippets?

nvim 0.10.x is ok.

@folke after reading the blink issue you shared thoroughly, unless I misunderstood something, I think that is not the issue I'm encountering.
That issue, as @chaozwn said, is about:

In snippet mode, that is, when you select a snippet item during completion, if the snippet_forward is not fully cycled through, my Tab key won't work(It just performs a normal jump without selecting any item from the completion menu). This happens even when I use the default configuration of LazyVim. Removing the fallback results in the same effect.

My issue is about:

After inserting a snippet, and moving to a placeholder (tabstop) using the tab key, when triggering autocompletion (ctrl + leader) and accepting a completion proposition with the enter key (), it is impossible to move to the next placeholder of the snippet using the tab key. A tab is inserted instead.

Also, as @chaozwn said, that issue should not be present on nvim 0.10.x, and I'm using 0.10.2.
I updated the issue description, it may have not been clear enough before.
Could it be possible to re-open this issue please?
Thanks!

This was fixed on v14.5.0, no need to reopen the issue.
Thanks!


Multiple screens bounds not working

With the following code:
    var screen = require('screen');
    var displays = screen.getAllDisplays();

    var externalDisplay = null;

    for (var i in displays) {
        if (displays[i].bounds.x > 0 || displays[i].bounds.y > 0) {
            externalDisplay = displays[i];
            break;
        } else {
            dialog.showErrorBox('no display', 'no display');
        }
    }

I see my dialog three times (I have three screens connected). So the code knows I have three screens connected but can't seem to figure out the bounds (as in theory the other two should have bounds greater than zero right?)... What's the problem?
In any case I have tried to do the following, where I find which screen is the largest and use that for the external display (which is what I really want to do). And I'm trying to do this by looking at the workAreaSize for each screen and comparing its width and heights and updating the largestScreen variable if a larger screen is found.
var currentScreen = null, largestScreen = null, mainWindow = null;

    if(displays.length > 1) {

        mainWindow = new BrowserWindow({
            x: 0,
            y: 0,
            width: 400,
            height: 400
        });

        for( index = 0; index < displays; ++index) {
            currentScreen = displays[index];
            if( largestScreen == null ){
                largestScreen = currentScreen;
            } else {
                var currentScreenSize = currentScreen.workAreaSize;
                var largestScreenSize = largestScreen.workAreaSize;
                var currentArea = currentScreenSize.width * currentScreenSize.height;
                var largestArea = largestScreenSize.width * largestScreenSize.height;
                if(currentArea > largestArea) {
                    largestScreen = currentScreen;
                }
            }
        }

        secondWindow = new BrowserWindow({
            x: largestScreen.bounds.x,
            y: largestScreen.bounds.y,
            width: 400,
            height: 400
        });

    } else {

        dialog.showErrorBox('ERROR', 'You need more than one screen to run this application.');

        app.quit();

    }

But this doesn't work either! Can anyone help me understand why the first code doesn't work and how to get the second code working for my application? Thanks.

Can you print out the results of screen.getAllDisplays()?

What's the best way to do this?
Sent from my iPhone

On 21 Jan 2015, at 18:54, Cheng Zhao<EMAIL_ADDRESS>wrote:
Can you print out the results of screen.getAllDisplays()?
—
Reply to this email directly or view it on GitHub.

console.log(screen.getAllDisplays());

@zcbenz
C:\Windows\system32>[7296:0122/092731:INFO:CONSOLE(0)] [ { id:<PHONE_NUMBER>,
    bounds: { x: 0, y: 0, width: 1366, height: 768 },
    workArea: { x: 0, y: 0, width: 1366, height: 738 },
    size: { width: 1366, height: 768 },
    workAreaSize: { width: 1366, height: 738 },
    scaleFactor: 1,
    rotation: 0,
    touchSupport: 'unknown' },
  { id:<PHONE_NUMBER>,
    bounds: { x: -1280, y: -256, width: 1280, height: 1024 },
    workArea: { x: -1280, y: -256, width: 1280, height: 1024 },
    size: { width: 1280, height: 1024 },
    workAreaSize: { width: 1280, height: 1024 },
    scaleFactor: 1,
    rotation: 0,
    touchSupport: 'unknown' },
  { id:<PHONE_NUMBER>,
    bounds: { x: -2360, y: -688, width: 1080, height: 1920 },
    workArea: { x: -2360, y: -688, width: 1080, height: 1920 },
    size: { width: 1080, height: 1920 },
    workAreaSize: { width: 1080, height: 1920 },
    scaleFactor: 1,
    rotation: 270,
    touchSupport: 'unknown' } ]

Apparently the external displays can have negative positions, you can just change the line of detecting external display to:
displays[i].bounds.x != 0 || displays[i].bounds.y != 0


Journey to test chatbot

What's this PR do?
 We are going to start testing middleware in the chatbot route. For this, we need to take all middleware out to their own modules for easier testing.
This is the first attempt at splitting things up. There is more likely more stuff to be refactored and/or moved around. Whatever I have identified as things to move next, have TODO tags.
All tests should be passing. I also tested reporting back in my localhost and it worked as usual.
How should this be reviewed?

Run all tests!
👀

Any background context you want to provide?

Getting Gambit ready fore more testing.

Checklist

[x ] Tested on localhost.

Codecov Report

Merging #908 into develop will decrease coverage by 0.67%.
The diff coverage is 0%.

@@             Coverage Diff             @@
##           develop     #908      +/-   ##
===========================================
- Coverage    22.02%   21.34%   -0.68%
===========================================
  Files           24       29       +5
  Lines         1144     1157      +13
===========================================
- Hits           252      247       -5
- Misses         892      910      +18

Impacted Files
Coverage Δ

lib/helpers.js
88.23% <ø> (-2.25%)
:arrow_down:

config/logger.js
0% <0%> (ø)

server.js
0% <0%> (ø)
:arrow_up:

lib/middleware/timeouts.js
0% <0%> (ø)

app/routes/chatbot.js
0% <0%> (ø)
:arrow_up:

config/index.js
0% <0%> (ø)

app/routes/index.js
0% <0%> (ø)
:arrow_up:

app.js
0% <0%> (ø)

config/mongoose.js
0% <0%> (ø)

... and 5 more

Continue to review full report at Codecov.

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

@aaronschachter updated PR with fixes.


obex-data-server: enable strictDeps

Description of changes
Motivation: https://github.com/NixOS/nixpkgs/issues/178468
Fixes the following error when using strictDepsByDefault:
[...]
checking for BLUEZ... yes
checking for sdp_extract_seqtype_safe in -lbluetooth... no
checking for OPENOBEX... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands

                    obex-data-server 0.4.6
                  =============================

        prefix:                    /nix/store/dq0cps7xz5hjfcjnzkksj9nwryzr3g0s-obex-data-server-0.4.6
        compiler:                  gcc
        cflags:                    -Wall -O2 -D_FORTIFY_SOURCE=2
        BIP imaging support:       disabled
        USB support:               yes

building
build flags: SHELL=/nix/store/5ynbf6wszmggr0abwifdagrixgnya5vy-bash-5.2-p15/bin/bash
  GEN    src/ods-manager-dbus-glue.h
/nix/store/5ynbf6wszmggr0abwifdagrixgnya5vy-bash-5.2-p15/bin/bash: line 2: --prefix=ods_manager: command not found
make: *** [Makefile:953: src/ods-manager-dbus-glue.h] Error 127

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

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

[X] Fits CONTRIBUTING.md.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/2002

@ofborg build obex_data_server


cred req: disallow lossy user info translations

Signed-off-by: Monis Khan<EMAIL_ADDRESS>Release note:
The pinniped concierge will reject webhook identities that assert UID or extra fields.

Going to wait to merge this until we can confirm that this will not horribly break known consumers.


PR for Akash Testnet-3 Challenge (4.1r)

Hi @YogaSakti - we already have a mongodb entry - anything else you can add?

There is already a mongoDB https://github.com/akash-network/awesome-akash/tree/master/mongoDB


add support to store service credentials in sm

Description
https://github.com/terraform-ibm-modules/terraform-ibm-icd-redis/issues/408
Release required?

[ ] No release
[ ] Patch release (x.x.X)
[X] Minor release (x.X.x)
[ ] Major release (X.x.x)

Release notes content
This enhancement will enable users to store service credentials in an existing secrets manager for Redis instance. Users can choose to use an existing secret group or create a new one for the service credentials.
Your notes help the merger write the commit message for the PR that is published in the release notes for the module. --->
Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
/run pipeline

Checklist for reviewers

[ ] If relevant, a test for the change is included or updated with this PR.
[ ] If relevant, documentation for the change is included or updated with this PR.

For mergers

Use a conventional commit message to set the release level. Follow the guidelines.
Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
Use the Squash and merge option.

/run pipeline

/run pipeline

/run pipeline

/run pipeline

/run pipeline

/run pipeline

/run pipeline

/run pipeline

/run pipeline

/run pipeline

/run pipeline

@shemau I made the changes here consistent with this PR(https://github.com/terraform-ibm-modules/terraform-ibm-event-notifications/pull/266)

/run pipeline

/run pipeline

/run pipeline

/run pipeline

/run pipeline

@ocofaigh @shemau can I get a review on this please. PR is waiting for some time now. Wanted to get it done.

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

GitHub release
v1.15.0

Your semantic-release bot :package::rocket:


Add secret's key as a label

I think it is important to have the name of the key as a label. This is the best way to find that particular certificate inside a secret,

Definitely useful to have the key in there as well, good catch. Have you tested this? My only concern here is that we are violating the interface ExportMetrics() method signature by having 3 String arguments instead of 2, could possibly throw an error. But if this is working fine with no errors then we're good to go

I've tested it. It's working.


新版无法使用.

+1

+1

+1

commit

https://github.com/anhkgg/SuperRDP/commit/4aa2bac678d76001b22d4e81f45445994060d90b


ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.

when built opencv4.4.0, folder 'cv2' had been create in python's site-packages.
my env:
cuda 10.2
python 3.8
vs2017
cmake3.19
>>>import cv2
ImportError: DLL load failed while importing cv2

then i used opencv's python_loader
>python setup.py install
>python
>>>import cv2
>>>ImportError: DLL load failed while importing cv2
['', 'D:/CodingEnv/opencv/opencv4.4.0/sources/build/lib/python3/Release', 'D:\\CodingEnv\\python\\python3.8.5\\python38.zip', 'D:\\CodingEnv\\python\\python3.8.5\\DLLs', 'D:\\CodingEnv\\python\\python3.8.5\\lib', 'D:\\CodingEnv\\python\\python3.8.5', 'D:\\CodingEnv\\python\\python3.8.5\\lib\\site-packages', 'd:\\codingenv\\opencv\\opencv4.4.0\\sources\\build\\python_loader']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\CodingEnv\opencv\opencv4.4.0\sources\build\python_loader\cv2\__init__.py", line 96, in <module>
    bootstrap()
  File "D:\CodingEnv\opencv\opencv4.4.0\sources\build\python_loader\cv2\__init__.py", line 86, in bootstrap
    import cv2
  File "D:\CodingEnv\opencv\opencv4.4.0\sources\build\python_loader\cv2\__init__.py", line 96, in <module>
    bootstrap()
  File "D:\CodingEnv\opencv\opencv4.4.0\sources\build\python_loader\cv2\__init__.py", line 23, in bootstrap
    raise ImportError('ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.')
ImportError: ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.

Seems that you are not using this repository (pip install opencv-python), there is no python_loader here. Please open an issue to the OpenCV repository.

Seems that you are not using this repository (pip install opencv-python), there is no python_loader here. Please open an issue to the OpenCV repository.

Seeing a similar issue when packaging with pyinstaller using opencv-python <IP_ADDRESS> from pypi. <IP_ADDRESS> work fine.
Traceback (most recent call last):
  File "ftf_app_bambam.py", line 2, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module
  File "taskmaster/app_manager.py", line 30, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module
  File "hardware/ximea_camera/setup_tools/filter_tuning.py", line 9, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module
  File "cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "importlib/__init__.py", line 127, in import_module
    applySysPathWorkaround = True
  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module
  File "cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "cv2/__init__.py", line 76, in bootstrap
    raise ImportError('ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.')
ImportError: ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.
[11606] Failed to execute script 'ftf_app_bambam' due to unhandled exception!


Database backup and restore

We should implement backup and restore functionality for Postgres database.
Backup action should be scheduled (probably as job or command via scheduler).
Probably we will utilise Duplicati app as a container, to upload backup files in some data store provider, like Google drive, S3, etc..
But if you have other idea, fell free to share with details in this issue.
Backup:

automatically
manually

Restore:

manually

@krzysztofrewak
Would you like to have notifications regarding to success or fail automatically backup? If so, on which channel, email, Slack?

@krzysztofrewak Would you like to have notifications regarding to success or fail automatically backup? If so, on which channel, email, Slack?

Email would be fine, I think.


Fix Misclassification of Laps in 'split_qualifying_sessions' Method

Hi!
I fixed a bug associated with laps being misclassified into an earlier qualifying session because the driver passed the timing beam, as reported here: (https://github.com/theOehrly/Fast-F1/issues/605#issue-2381081866).
Happy to make any changes necessary to make sure my changes comply with the testing and documentation requirements.
Summary:
This PR introduces a new method, 'correct_lap_placement', to address an issue where laps are incorrectly classified into earlier qualifying sessions when a driver enters the pits and crosses the timing beam before the start of the next session. The fix ensures that such laps are reassigned to the correct qualifying session, improving the accuracy of the 'split_qualifying_sessions' method.
Changes Made:

New Function: Added 'correct_lap_placement(self, laps, split_times)', which:
Identifies laps that end in the pits and checks if the driver exits the pits after the start of the next qualifying session.
Reassigns these laps to the correct session, ensuring they are not misclassified as part of an earlier session.
Maintains the original column order and handles edge cases like empty or all-NA entries.

Integration: Integrated 'correct_lap_placement' into the existing 'split_qualifying_sessions' method to automatically correct any misclassified laps before returning the final split sessions.

Issue Addressed:

Problem: When using the 'split_qualifying_sessions' and 'pick_drivers' methods, laps were not correctly split between qualifying sessions. For example, Lap 15 (which should be classified as a Q2 lap), was incorrectly placed into Q1, and Lap 18 (which should be a part of Q3), was placed into Q2.

Impact:

This fix will correct the classification of laps across qualifying sessions, improving the accuracy of data analysis and reporting in FastF1.

@tmossington thank you for having a look at this problem. Your solution really looks nicely written and well documeted.
I'd really prefer if there was a less complex solution to this though. The code is fairly involved and having two nested for loops over the number of laps is also not a very performant solution.
I was really hoping that this could be resolved by changing the logic here:
https://github.com/theOehrly/Fast-F1/blob/95f623184b8d8cb41f4b7a0060f797a10e7b300d/fastf1/core.py#L3343-L3349
It might not be possible to keep this as one line assignment with including the logic. But hopefully we'd be able to keep it fairly concise.
Given that you have already looked at the issue, you probably understand the problem well now. Maybe you can try and fix it by changing that specific part of the existing code. Of course, if that is not viable, maybe we need to use the solution that you have already worked out. But I'd really hope that we can simplify this a bit more.
Feel free to ask if you have any more questions.

Sure thing, reducing the looping to improve performance makes sense. I'll take a look at this later today and see if I can come up with a solution that modifies this block:

https://github.com/theOehrly/Fast-F1/blob/95f623184b8d8cb41f4b7a0060f797a10e7b300d/fastf1/core.py#L3343-L3349

Thanks for the feedback, I'll let you know what I'm able to do about this!

@tmossington awesome, thank you :)

So, I played around with it some today and have come up with a bit of a different solution. I'm not sure if this solution is actually better, but it does condense things down a bit and I aimed to follow the style of the existing code (although I was unable to get it to work with just a line or two).
It works in much the same way as the initial method, except instead of using a for loop to iterate over every lap, it uses the same vectorized boolean indexing to identify laps that meet the "mistake" criteria:

The driver entered the pits on the previous lap
The driver left the pits on this lap
The next lap begins in the following qualifying session
This lap started prior to Q3 (as laps do not need to be adjusted from Q3).

Then, the "mistake" laps are removed from the current_laps variable, and laps[I] is populated with the values in current_laps. Finally, if the "mistake" laps variable is not empty, it will add these laps to the following qualifying session.
If you like this version, I already pushed changes to the same branch, so I think it should be ready. If not, I can revert it to the previous version or I can meddle with this one more! Apologies if it's still a bit unpolished.
for i in range(len(split_times) - 1):
            # split by start time instead of end time, because the split times
            # that are generated from timing data may not account for crashed
            # cars being returned or having a generated lap time that results
            # in a late 'Time' value!

            # Find all of the appropriate laps for the current session and
            # assign them to current_laps
            current_session = (
                (self['LapStartTime'] > split_times[i]) &
                (self['LapStartTime'] < split_times[i + 1])
            )
            current_laps = self[current_session]

            # Find all of the laps that have been added to the
            # wrong qualifying session
            #(i.e. car passes timing beam in pits, initializing a new lap
            # but not finish said lap until the next session)
            next_session_criteria = (
                (~pd.isna(self['PitInTime'].shift(1))) &
                (~pd.isna(self['PitOutTime'])) &
                (self['LapStartTime'].shift(-1) > split_times[i + 1]) &
                # Verify session starts before Q3
                (self['LapStartTime'] < split_times[2])
            )
            # Align indices to avoid reindexing warnings
            next_session_criteria = \
                next_session_criteria.reindex(current_laps.index,\
                                              fill_value=False)
            # Grab all the laps in current_laps that fit the criteria
            next_session_laps = current_laps[next_session_criteria]

            # Remove laps that fit criteria from current_laps
            current_laps = current_laps[~next_session_criteria]

            # Accumulate laps in the current session
            laps[i] = pd.concat([laps[i], current_laps],\
                                 ignore_index=False).sort_index()

            # Assuming at least one lap meet criteria:
            if not next_session_laps.empty:
                # Always concatenate to the next session
                if i + 1 < len(laps):
                    laps[i + 1] = pd.concat([laps[i + 1], next_session_laps],\
                                            ignore_index=False).sort_index()

        # Remove any empty DataFrames
        laps = [session_laps if not session_laps.empty else \
                None for session_laps in laps]
        return laps

Some adjustments have been made to the original bit of code (initializing current_laps with the current session instead of immediately populating laps[i]):
for i in range(len(split_times) - 1):
            # split by start time instead of end time, because the split times
            # that are generated from timing data may not account for crashed
            # cars being returned or having a generated lap time that results
            # in a late 'Time' value!

            # Find all of the appropriate laps for the current session and
            # assign them to current_laps
            current_session = (
                (self['LapStartTime'] > split_times[i]) &
                (self['LapStartTime'] < split_times[i + 1])
            )
            current_laps = self[current_session]

And then this is the block that's been added:
# Find all of the laps that have been added to the
            # wrong qualifying session
            #(i.e. car passes timing beam in pits, initializing a new lap
            # but not finish said lap until the next session)
            next_session_criteria = (
                (~pd.isna(self['PitInTime'].shift(1))) &
                (~pd.isna(self['PitOutTime'])) &
                (self['LapStartTime'].shift(-1) > split_times[i + 1]) &
                # Verify session starts before Q3
                (self['LapStartTime'] < split_times[2])
            )
            # Align indices to avoid reindexing warnings
            next_session_criteria = \
                next_session_criteria.reindex(current_laps.index,\
                                              fill_value=False)
            # Grab all the laps in current_laps that fit the criteria
            next_session_laps = current_laps[next_session_criteria]

            # Remove laps that fit criteria from current_laps
            current_laps = current_laps[~next_session_criteria]

            # Accumulate laps in the current session
            laps[i] = pd.concat([laps[i], current_laps],\
                                 ignore_index=False).sort_index()

            # Assuming at least one lap meet criteria:
            if not next_session_laps.empty:
                # Always concatenate to the next session
                if i + 1 < len(laps):
                    laps[i + 1] = pd.concat([laps[i + 1], next_session_laps],\
                                            ignore_index=False).sort_index()

        # Remove any empty DataFrames
        laps = [session_laps if not session_laps.empty else \
                None for session_laps in laps]

I'll try to properly review this on the weekend. Hopefully I'll have enough time. Else, it might take a few more days.

No worries, no rush on this!

Ok, my only real concern with this is the complexity of the logic. I'd really prefer to simplify that over your approach, Because event though the code is nicely written and commented, it's really not that straightforward to understand what's going on. Especially since we are dealing with a minor edge case, sort of.
I've made a "counterproposal" for how this could maybe be handled. Please have a look at it. Maybe I'm missing something obvious. I've decided to just commit it to another branch, so you can look at the diff of the changes here: https://github.com/theOehrly/Fast-F1/commit/b674282ccb6f663ca3f995df479dbc86bc0948a3

So I took a look, and everything looks good here. I actually think your solution beats mine both on simplicity and performance, as direct assignment should be faster than concatenating. I also didn't do extensive testing of your version, but I tested it on the original issue and several other qualifying sessions that have unusual laps, and it seems to handle everything thrown at it. Sorry to make you do the work in the end, but hopefully my solution helped move it in the right direction!

Don't worry at all, I'm rather sorry that I probably won't be able to merge your PR then. Even though it looks like you really spent a lot of effort on this.
But in any case, seeing another solution, discussing the problem and having a second set of eyes on everything is great. And I also enjoy reviewing PRs and giving suggestions.
By the way, which other qualifying sessions are you aware of, where this is a problem?
I'll do a bit more thorough testing on both solutions and check against a potential edge case that I thought of. And then I'll decide how to proceed.

Sorry for the late response, lot of travel last week!
No worries about the PR, it's more important that the best solution is used. Plus, just collaborating on code makes me a stronger programmer so I'm happy. I'll keep an eye on the issues page for other things I can work on, or if you have any ideas of improvements needed feel free to drop me a message.
I only tested a few other qualifying sessions, but it seemed like much of 2024 sessions had this issue (Spa, Imola, Monza, Zandvoort, etc.). I suspect it's a fairly widespread problem, but your solution looks like it passes all of these sessions.

I've implemented my solution now, after further testing. Thank you again for your input on this!

I'll keep an eye on the issues page for other things I can work on, or if you have any ideas of improvements needed feel free to drop me a message.

Always appreciated :) Although, I think there are few good issues at the moment. Most stuff is blocked due to external constraints or is part of larger refactoring tasks.


how play mp3 from memory?

Hello. Please help me, i don't understand how play mp3 from memory --> []byte
func play(mp3 []byte) {
if err := sdl.Init(sdl.INIT_AUDIO); err != nil {
		log.Println(err)
		return
	}
	defer sdl.Quit()

	if err := mix.Init(mix.INIT_MP3); err != nil {
		log.Println(err)
		return
	}
	defer mix.Quit()

	if err := mix.OpenAudio(22050, mix.DEFAULT_FORMAT, 2, 4096); err != nil {
		log.Println(err)
		return
	}
	defer mix.CloseAudio()

        ?????????????????
}

Hi @pvitaliy84, I updated a bit of the code (particularly mix.QuickLoad_WAV()) and added an example called audio_wav_memory in the examples directory. You can only play WAV or raw audio data from memory though. If you want to play MP3, perhaps save the data as a temporary file and then play the file.

Ok, thnx for you help!


Writable $isServer

What problem does this feature solve?
We've added a renderToString method in vue-test-utils, which is a wrapper around vue-server-renderer renderToStrting. This let's users test SSR code without a window.
Sometimes users will be running tests for SSR code and browser target code in the same process, where window will be defined. This means $isServer will be false, even though we're rendering with the server-renderer.
What does the proposed API look like?
I'm unsure of the best way to do this.
One solution is to make $isServer writable

@yyx990803 Can we remove the inBrowser check from this line—https://github.com/vuejs/vue/blob/dev/src/core/util/env.js#L41?

@eddyerburgh is it for simulating SSR by mocking global in a browser environment?

No, it would be for running unit tests for server-side code in the same process as tests for client-side code.
Vue Test Utils is now two packages—vue/test-utils and vue/server-test-utils. It would be great to run tests using both libraries in the same process, and have isServer set differently depending on the method used:

<template>

Yes

No

</template>

import { renderToString } from '@vue/server-test-utils'
import { shallow } from '@vue/test-utils'

renderToString(TestComponent) // '
Yes
'
shallow(TestComponent).html() // '
No
'

I think we should leave it to users to run tests for SSR code in the correct environment. Making isServer writable makes it possible to write tests that pass, but fail in production.