Cannot access the cfs file.

The process cannot access the file 'C:\ProgramData\LuceneIndex-_0.cfs' because it is being used by another process.
I'm not able to open the file stream on the CFS file, it is giving me access denied exception.

Is this question also you?
https://stackoverflow.com/questions/71047400/whos-locking-the-cfs-file-in-lucene
It might be helpful if you explain a little more about what you are trying to do. We have the FileShare flags set up in a way that the tests pass, but the tests may not cover every use case that is allowed in Lucene, so we might need to adjust some of the settings.
Do note that there are several CFS commands in the lucene-cli tool, but in general the assumption (by us) is that the commands will be performed while the index is not being used. However, there shouldn't be any reason why we can't add the FileShare.Read flag so multiple file streams can at least read the files (on every file except for write.lock).

Yes, I asked this question on stack overflow.
I'm working on Lucene's structure. I need to copy the index files from one path to another using fileStream.  Meanwhile, readers and searchers are opening and closing on index files. Readers are taken from the writer or directory in different applications.
Let's say you have an index on path1, and on-demand, you need to transfer a portion of index files to the second path. That's why I need to open the filestream.

Is this question also you?
https://stackoverflow.com/questions/71047400/whos-locking-the-cfs-file-in-lucene
It might be helpful if you explain a little more about what you are trying to do. We have the FileShare flags set up in a way that the tests pass, but the tests may not cover every use case that is allowed in Lucene, so we might need to adjust some of the settings.
Do note that there are several CFS commands in the lucene-cli tool, but in general the assumption (by us) is that the commands will be performed while the index is not being used. However, there shouldn't be any reason why we can't add the FileShare.Read flag so multiple file streams can at least read the files (on every file except for write.lock).

If you just need to copy the index while it is being used, one option is to use the Lucene.Net.Replicator module.

I agree with Shad, If you are trying to make a copy of the index while it's being written to then using the Replicator is probably a good way to go.  You may find the info in this issue helpful: https://github.com/apache/lucenenet/issues/401#issuecomment-759258652

Ok I got your point.
But I need to know why I'm getting the access denied exception. If you can identify then it will be good for me. I tried to close all the instance of IndexWriter, IndexReader and IndexSearcher. But still I'm facing this issue.

Ok I got your point.
But I need to know why I'm getting the access denied exception. If you can identify then it will be good for me. I tried to close all the instance of IndexWriter, IndexReader and IndexSearcher. But still I'm facing this issue.

I see. Then this is likely some kind of bug, but it is hard to pinpoint in such a large application which of the 50+ FileStream usages or other file write methods that could be keeping a file handle open without a minimal reproducable example, ideally provided as a standalone console app or as a test. In other words, code that we can run without modification to observe the issue.
Note that we haven't yet reviewed IDisposable usage (see #265), so it is possible we have something hanging open, especially due to the fact that Lucene may be relying on the fact that the Closable interface inherits the AutoClosable interface, which can be configured to automatically clean up.

  IndexWriter writer = null;

  lock (_lockObject)
  {

      if (IndexWriters.ContainsKey(bucketId))
      {
          writer = IndexWriters[bucketId];

          if (writer != null)
          {
              try
              {
                //  writer.DeleteUnusedFiles();
                  writer.DeleteAll();
                  writer.Commit();
                  writer.Dispose();
              }
              finally
              {

                  if (IndexWriter.IsLocked(writer.Directory))
                  {
                      IndexWriter.Unlock(writer.Directory);
                      _directory.RemoveSubDirectory(bucketId);
                  }
                  writer = `null;`
              }

          }
          IndexWriters.Remove(bucketId);
      }
      }
  }

I have shared the code for deleting the index from the source directory.

Why indexWriter.Dispose()  does not release the handle from the cfs file.?
Additionally, I'm also unlocking the writer.

Thanks for the snippet. However, due to the fact that nearly every component in Lucene is pluggable, short snippets are not much use for tracking issues down. Please provide a complete example (that runs) as either a standalone console app or a test. This is so we can be sure we are using the same components that you are.
If you prefer, you may provide a working example in a GitHub repository and provide a link.

I debugged my application code before sending it to you people. I found out that IndexWriter releases access on these files but if any reader is opened on that directory. The reader will not allow me to delete the file.  Unfortunately, I don't know the way to close the reader on a specific directory from multiReader (Leaves).  If there is a quick way through which I can close or dispose of the reader.
Thanks for the support.
@NightOwl888  @rclabo  I Appreciate your quick responses.

@hamzashoukat94
As an experiment, does the file remain locked if you use NIOFSDirectory? It is using FileShare.Delete which should allow deletion of the file even if the file handle is still open.
However, as for why the file handle remains open, that is something that will require a working example to determine.
Although, a quick search indicates that it is probably the underlying OS that has control over this and there isn't much that can be done except to retry after a certain interval.

https://stackoverflow.com/a/30506866
https://social.msdn.microsoft.com/Forums/office/en-US/3737fef5-b7b7-434f-b7a7-794b3d4aaa07/is-there-a-delay-between-calling-dispose-on-a-filestream-and-the-file-handle-actually-being?forum=netfxbcl

That said, it would be helpful to know whether the OS eventually releases the file handle, or if it holds it open indefinitely.

If you have a MultiReader in order for it to close the  Indexes (ie their files) that it has open you need to make sure it decrements the reference counts of all it's SubReaders to 0.  Once those reference counts go to 0 it will automatically close the underlying files.  Now how exactly to do that is a little less clear to me.  As Shad pointed out, trying to answer questions in the abstract is challenging with a system the size of LuceneNET.  It's much easier to provide help if you provide a toy chunk of runnable code that demonstrates the issue you are having. This allows us to among other things run the code in the debugger and see the underlying types that are in play.  Without that, it's pretty hard to provide concrete specifics to solve an issue.

Unfortunately, I cannot share the code with you guys.
But @NightOwl888  is right about delaying disposing of the file stream. I'm using MMapDirectory, and I have experienced the latency in disposing of the file stream.  Unfortunately, In dotnet, there is no way to find out which process our object is accessing the particular file.

I have attached the image in which you can see that after disposal there is a subReader Exist that is holding the handle of the file in cfsReader.

 protected internal override void DoClose()
        {
            lock (this)
            {
                IOException ioe = null;
                foreach (IndexReader r in GetSequentialSubReaders())
                {
                    try
                    {
                        if (closeSubReaders)
                        {
                            r.Dispose();
                        }
                        else
                        {
                            r.DecRef();
                        }
                    }
                    catch (IOException e)
                    {
                        if (ioe == null)
                        {
                            ioe = e;
                        }
                    }
                }
                // throw the first exception
                if (ioe != null)
                {
                    throw ioe;
                }
            }
        }

This is the implementation of DoClose() method of MultiReader Class.
I have checked why it is holding a handle till now, so I come up to this point where refCount.DecrementAndGet() giving 1 instead of 0. So, it is not closing here.

        public void DecRef()
        {
            // only check refcount here (don't call ensureOpen()), so we can
            // still close the reader if it was made invalid by a child:
            if (refCount.Get() <= 0)
            {
                throw new ObjectDisposedException(this.GetType().GetTypeInfo().FullName, "this IndexReader is closed");
            }

            int rc = refCount.DecrementAndGet();
            if (rc == 0)
            {
                closed = true;
                Exception throwable = null;
                try
                {
                    DoClose();
                }
                catch (Exception th)
                {
                    throwable = th;
                }
                finally
                {
                    try
                    {
                        ReportCloseToParentReaders();
                    }
                    finally
                    {
                        NotifyReaderClosedListeners(throwable);
                    }
                }
            }
            else if (rc < 0)
            {
                throw new InvalidOperationException("too many decRef calls: refCount is " + rc + " after decrement");
            }
        }

If I call the r.DoClose() forcefully, it closed the file handle but next time it will not allow me to open a reader from the writer.
Can you please give me a quick response on it,?

I found out the reason behind that I was creating a indexSearcher instance using indexReader, as there is no dispose of method exists in indexSearcher so, underlying it is not decrementing the reference count inside indexReader which is somehow incremented on the creation of indexSearcher.
There are mutiple options to use indexSearcher.

ReferenceManager<>
SearcherManager
SearcherLifeTimeManager (Only supported for DirectoryReader, not supported for multiReader)

What if the user creates an IndexSearcher directly through its constructor.?

SearcherManager help you manage the use of IndexSearchers and their underlying IndexReader across threads.  When multiple threads hold references to objects that have references to IndexReaders the system needs some way to know if the underlying LeafReaders can be release or not.  This is the purpose of the ReferenceManager and the incrementing and decrementing of reference counts. If you don't use the SearcherManager and hence the ReferenceManager it inherits from then it's up to you to manage the lifetime of the object that you use.

Yes, I got your point. Then I think we should mention it in our LUCENENET documentation or in index page code samples.
As I checked code samples, I noticed that we are not using any ReferenceManager or SearcherManager.

Fair point.  it's not uncommon for example code to assume it running on a single thread unless the example code is demoing parts of LuceneNET that are specific to a multi-threaded environment.

I have managed to delete the index files. After code walk through, I found out that every input (fileStream) is opening from directory, so I managed the open inputs and now, I'm deleting when I need to delete the files on directory level. This solves the problem for me.
Thanks for the responses and interest.


Update to React 18

When react-freeze gets installed it creates a warning in projects that use react ^18.0.0:
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving<EMAIL_ADDRESS>npm WARN Found<EMAIL_ADDRESS>npm WARN node_modules/react
npm WARN<EMAIL_ADDRESS>from the root project
npm WARN   10 more (@react-navigation/bottom-tabs, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm WARN node_modules/react-native-screens/node_modules/react-freeze
npm WARN<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm WARN   node_modules/react-native-screens
npm WARN
npm WARN Conflicting peer dependency<EMAIL_ADDRESS>npm WARN node_modules/react
npm WARN   peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm WARN   node_modules/react-native-screens/node_modules/react-freeze
npm WARN<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm WARN     node_modules/react-native-screens
Are there any plans to update to react 18?

It should be now fixed in the newest version of the package.
Cheers


⚠ Samsung has degraded performance

In 01ea0ba, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2779 ms

Resolved: Samsung performance has improved in 74157c1.


[Bug]: The dark mode isnt functional

Bug Description
Add dark mode to the website
Provide a detailed description of the bug
When we are clicking on the sun icon, the moon icon is coming but the page is not going into dark mode, thus I want to work and fix this issue
Expected Behavior
when clicking on the sun icon, when the moon icon comes the whole page should go into dark mode, but it is not happening
What browsers are you seeing the problem on?
Chrome, Microsoft Edge
Put here any screenshots or videos (optional)

By submitting this issue, you agree to

[X] I agree to follow this project's Code of Conduct
[X] I’ve read all the issues in the issue section, and this has not been reported yet.

Other Information

[X] I'm a GSSoC '24 Extended contributor
[X] I'm a Hacktoberfest '24 contributor
[X] I am willing to work on this issue (optional)

Heyy @maniyaom , this is a bug that I should be fixed, please assign it to me.


Fix typo in sklearn notebook link

[x] ❗ I have followed the Contributing to DVCLive
guide.

[ ] 📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.

Thank you for the contribution - we'll try to review it as soon as possible. 🙏
The previous link led to a 404 when accessing the example notebook.

Thanks!


Implemented support for Indices

This will fix #42.

I've added tests and the code is ready for review!


Periodic segfault in SparseBinIterator<VAL_T>::Reset

When I'm creating a large number of models (in Python), I will occasionally see a segfault.  By enabling debugging (and later doing some printf-style instrumenting), I can track the error down to SparseBin::CopySubset creating the Iterator:
SparseBinIterator<VAL_T> iterator(other_bin, used_indices[0]);

on line 318.  The error reports at a later line because the SparseBinIterator::Reset happens in an inline call.
The stack trace (after disabling OpenMP for the Dataset::CopySubset() call, looks like:
0   lib_lightgbm.so               	0x000000010bb26717 LightGBM::SparseBin::CopySubset(LightGBM::Bin const*, int const*, int) + 167 (sparse_bin.hpp:381)
1   lib_lightgbm.so               	0x000000010bb3974b LightGBM::Dataset::CopySubset(LightGBM::Dataset const*, int const*, int, bool) + 107 (dataset.cpp:222)
2   lib_lightgbm.so               	0x000000010bb102e4 LightGBM::GBDT::Bagging(int) + 372 (unique_ptr.h:308)
3   lib_lightgbm.so               	0x000000010bb1ae60 LightGBM::GBDT::TrainOneIter(float const*, float const*, bool) + 64 (gbdt.cpp:316)
4   lib_lightgbm.so               	0x000000010baea650 LGBM_BoosterUpdateOneIter + 64 (c_api.cpp:150)
This happens both in Linux and Mac, but only rarely and not with any discernible pattern that I can see (other than it is more likely to happen when there are few rows in the tree.
Any thoughts?

Hrm... it's not exactly there.  There is memory corruption prior to this which is causing the corruption in the structure pointed to by other_bin

by bagging
That said, there appear (under Linux and OS X at least) to be a number of memory corruption issues caused by thread safety problems inside of the code.  I can see where they are occurring on Linux by linking against -lmcheck and setting the environmental variable MALLOC_CHECK_=3, but the logic of the code looks correct to me.
I'm currently up against a deadline, but after that deadline, I will try to track them down and submit a pull request.

@chriscramer
Sure, thanks.
BTW, is it possible caused by the used_indices[0] ? Did you check the size of this array?

I'll check.  Thanks!

@chriscramer
I think this problem is fixed.

I've just run about a quarter of my full model (250+ LGBMRegressors) against the latest version of the code and I have not seen a single problem.  I think you've got it fixed.  Thanks!


Remove old bidder

Hello, we wanted to remove an obsolete bidder we had created last year: https://docs.prebid.org/dev-docs/bidders/pgam.html
Thanks

@PGAMSSP - for now I've disabled pgamssp for PBJS download, added it to the removal list for Prebid Server 2.0 https://github.com/prebid/prebid-server/issues/2764
We don't generally remove bid adapters outside of major releases, so we'll have to wait for PBJS 9.0, so opened https://github.com/prebid/Prebid.js/issues/10504. Closing this issue.

I think I screwed this up. You wanted to remove the 'pgam' bidder, not the 'pgamssp' bidder.

Hi - we want to remove this one:
https://docs.prebid.org/dev-docs/bidders/pgam.html
PGAM SSP is the new one we just launched and want to keep that.
On Fri, Sep 22, 2023 at 10:01 AM bretg @.***> wrote:

I think I screwed this up. You wanted to remove the 'pgam' bidder, not the
'pgamssp' bidder.
—
Reply to this email directly, view it on GitHub
https://github.com/prebid/prebid.github.io/issues/4800#issuecomment-1731476953,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BB525SKMDH5TQ7Q3PJV6ZJLX3WK45ANCNFSM6AAAAAA3RNDQJA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Ok - fixed the docs MD files and issues. Question @PGAMSSP - what about the Prebid.js pgammedia bidder - that's still good?

Thanks, yep 'pgammedia' is still good and we currently use that.
On Fri, Sep 22, 2023 at 11:11 AM bretg @.***> wrote:

Ok - fixed the docs MD files and issues. Question @PGAMSSP
https://github.com/PGAMSSP - what about the Prebid.js pgammedia bidder

that's still good?

—
Reply to this email directly, view it on GitHub
https://github.com/prebid/prebid.github.io/issues/4800#issuecomment-1731587580,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BB525SN3G4NJM6ALCHVJDDTX3WTBHANCNFSM6AAAAAA3RNDQJA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Great thanks On Sep 22, 2023, at 11:31 AM, bretg @.***> wrote:
Closed #4800 as completed.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>


feat: allow auto select and trigger get-stats-button after select

For better accessibility, allow to auto search after user select one option with enter, tab or click action.

What are this third party changes about?
Does this allow to hit Enter after entering a github username to jump to the repo field?

For now it doesn't, could be a great idea, it only trigger the button when you choose an option of repository, avoiding you to hit Tab and then Enter or using the mouse

Before:

1. Type an username, Tab
2. Type an repository, choose one from the list using arrows, clicking or/and hitting Enter
3. Hit Tab and then Enter or click in the button

Now:

1. Type an username, Tab
2. Type an repository, choose one from the list using arrows, clicking or/and hitting Enter and it automatically search it

Demo link

Now:

Type an username, Tab
Type an repository, choose one from the list using arrows, clicking or/and hitting Enter and it automatically search it

That's a huge improvement. No complains there.
But don't forget that any mobile device has no Tab button, that's why I double checked/suggested the Enter to make the jump from username to repo, too.

Great point, I did not think of that, I'll implement that!
Thanks!

Tested with your demo link again - seems to work!

Thanks for the patch!


feat: Add Landing Page

Description
Here's my first shot at adding the landing page with some context about the Burner Wallet. The flow will go as follows:

When a new user goes to the site, we will look for a cookie called hasSeenIntro
If this cookie does not exist, redirect them to the new landing page at /intro
On the /intro page, there is a "Generate Wallet" button. All this button does is set the cookie and redirect the user to the homepage.
On the homepage, everything works as it currently does without changes.
When the user visits the site again, the cookie will now exist and they see the homepage and their wallet normally.

Some things to note:

Instead of actually generating the private key when pushing the "Generate Wallet" button, I am simply redirecting to the homepage. I think this is a safer and simpler approach, and if it ever gets annoying to have the landing page, we can simply turn off the redirects and everything works without it.
I am using cookies to store hasSeenIntro. This is so we can do the redirects on the server side, and there's no chance the client will "leak" the homepage.
I had to do some restructuring of the ScaffoldEthAppWithProviders so that elements from the burner wallet doesn't show up on the landing page.
I refactored the homepage to be a server component, so that we can do the redirect on the server side.

Let me know how this approach feels and we can improve or add some spinners or loading state if needed.
Screenshots

Since there are changes to the layout and index page.tsx, we might want to wait until https://github.com/BuidlGuidl/burnerwallet/pull/46 lands before merging this. I don't want to merge anything weird before the wallet connect lands.

 Thank you for the PR.
I had a slightly different vision for this (Note: No strong opinion, and happy to go this PR route... especially after the work you've put here :sweat_smile: ). BTW, I think it was my fault because I used the term "landing" haha
Anyway, what I had in mind initially was something more integrated into the burner wallet itself (instead of the classic landing page + "go to app" workflow). Something like a modal on top of the burner wallet with the welcome/warning message (like the one you have in the PR) + generate button. This will generate the burner wallet while showing some loading state (e.g. spinner + changing bg. We could even "fake" 2seconds of loading that we don't need ) and will end up displaying your burner. When you come back again to the app, you won't see the modal (loved how you did the cookie thing, were we can access in the server and render accordingly)
I think this will feel more integrated and remove one layer that we don't need.
What are your thoughts?
I'd also love to see what others think too! cc @Pabl0cks @damianmarti

Damn @ChangoMan this is a great-looking landing page!! Thank you for the PR.
I had a slightly different vision for this (Note: No strong opinion, and happy to go this PR route... especially after the work you've put here 😅 ). BTW, I think it was my fault because I used the term "landing" haha
Anyway, what I had in mind initially was something more integrated into the burner wallet itself (instead of the classic landing page + "go to app" workflow). Something like a modal on top of the burner wallet with the welcome/warning message (like the one you have in the PR) + generate button. This will generate the burner wallet while showing some loading state (e.g. spinner + changing bg. We could even "fake" 2seconds of loading that we don't need ) and will end up displaying your burner. When you come back again to the app, you won't see the modal (loved how you did the cookie thing, were we can access in the server and render accordingly)
I think this will feel more integrated and remove one layer that we don't need.
What are your thoughts? I'd also love to see what others think too! cc @Pabl0cks @damianmarti

This is awesome @ChangoMan !!!
I was thinking something similar to what @carletex said, but I think the approach and the nice design that Hunter implemented is better because it explains very well what the BurnerWallet is and we can add more data there when we add more features. And it's something you can share and the people can understand what the BurnerWallet is in a better way.
Yes, it will be nice to add some "magic" when the wallet is "generated", all fake, but it will add a WOW moment to the user :-)
I think we should add a way to see the home page after the wallet is generated, changing the buttons to generate the wallet, to "Go to the wallet" or something like that.

@carletex @damianmarti Thanks for the feedback! I did also think about a modal, but decided to do a full page to fit more text. I can make a modal version as well and we can compare.
The modal is simpler, but there might be less space for all the text. Also on mobile, you can't really tell because the modal will cover everything anyways. I'll tinker with it though.

Love the landing copys, design and vibes from it @ChangoMan!
As @carletex and @damianmarti I also had a small modal in mind with 3 simple ideas and a security tip. Having it already crafted I was thinking in pros and cons of the full landing vs "modal".

Landing will give more context and more confidence to users that landed randomly or without much context on burner wallets (not sure if this random landing will happen often tho).
Maybe we should have a way to avoid landing somehow (parameter or different url?), for example when sharing a QR in a IRL event, or when we have the share PK feature in the future. So users with context (from IRL talk) and current users don't pass through the landing.

If you are going to tinker with the modal, we can play with both and decide!
Don't know if it would even make sense to have both options for different use cases, or it may just add unnecessary complexity:

burnerwallet.io => Goes to landing page if you don't have the cookie
Sharing your own wallet to other device, or scanning a QR in a talk => Access to burner wallet directly. parameter or url to define
Scanned QR code at some event with not much context on it (walls, entrance) => Opens wallet with modal message and generate button. parameter or url to define

Maybe we should have a way to avoid landing somehow (parameter or different url?), for example when sharing a QR in a IRL event, or when we have the share PK feature in the future. So users with context (from IRL talk) and current users don't pass through the landing.

 Adding a url parameter should be possible.


refactor(region): Optimization for snapshotpolicy sync

这个 PR 实现什么功能/修复什么问题:
If the number of added cloudsnapshotpolicy more than 5, we do
clustering for all snapshotpolicies and find suitable one from these.
Otherwise, we find suitable one from database everytimes.
是否需要 backport 到之前的 release 分支:

release/2.12
release/2.13

/area region
/cc @wanyaoqi

Codecov Report

Merging #3772 into master will decrease coverage by <.01%.
The diff coverage is 0%.

@@            Coverage Diff            @@
##           master   #3772      +/-   ##
=========================================
- Coverage    6.94%   6.93%   -0.01%
=========================================
  Files         499     499
  Lines       84252   84271      +19
=========================================
- Hits         5848    5841       -7
- Misses      77907   77936      +29
+ Partials      497     494       -3

Flag
Coverage Δ

#aFlag
6.93% <0%> (-0.01%)
:arrow_down:

Impacted Files
Coverage Δ

pkg/compute/models/snapshotpolicy.go
3.63% <0%> (-0.16%)
:arrow_down:

pkg/cloudcommon/cronman/cronman.go
49.51% <0%> (-5.34%)
:arrow_down:

pkg/appsrv/response.go
69.23% <0%> (+3.07%)
:arrow_up:

pkg/cloudcommon/db/lockman/fifo.go
90% <0%> (+10%)
:arrow_up:

Continue to review full report at Codecov.

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

/lgtm

/approve

/lgtm

/approve


Add Task Complete feature

Add a task complete feature that allows the completed task to be striked out (either make a strikethrough or change the colour) and list it at the bottom.

Can you be more clear? This already happens I guess.

Yeah sorry, i did not try it out, it does make a strikethrough but it does not list it at the end so lets do that.

Completed notes do go to the end of the list.

Yeah sorry, i did not try it out, it does make a strikethrough but it does not list it at the end so lets do that.

It goes to the end. I think It is not up to date on your end because it is a PWA so it caches everything. Try opening it in InPrivate or Incognito window. It'll work


Email to Middlebury Town Manager and Selectboard

To<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Civil Servants,
My name is [INSERT], and I live in Middlebury, Vermont.
I am writing to ask that you refuse the FY21 budget increase of $46,234 for the Middlebury Police Department (MPD) and that you halt any funding that has already been approved in order to begin defunding the police immediately.
Systemic racism exists in all police departments across America. To act as though our community has risen above racism is ignorant and inhumane. In a town that is 84% white, we must do more than explain the history of MPD’s efforts to reform. So often, police enter into situations without context, and act violently due to not fully understanding the situation at hand. This is reckless, and the results are often catastrophic. As Police Chief Thomas Hanley said, “If you don’t understand what you’re dealing with, no de-escalation technique can work. It’s the basis for successful de-escalation.” In March of 2016 we saw police in Burlington fatally shoot a man in the middle of a mental health crisis. In this past decade, 17 people have been shot, tasered, or otherwise killed by police in Vermont. The 2010s was Vermont’s deadliest decade in terms of police killing, with 2019 being the deadliest year as four people were executed by police.
If we care about the quality of life experienced in our Black, Indigenous, and People of Color (BIPOC) communities, we must invest in our community services that work directly with these populations. BIPOC communities are disproportionately affected by the current economic and health emergency and are over-policed. Increasing the police force will only exacerbate our ongoing public health crises.
The 2019 Middlebury Town Report details that mental health, chronic substance abuse, and issues surrounding homelessness were the three most time consuming issues for the MPD. Yet despite those patterns, an ongoing pandemic, and unprecedented rates of unemployment, the FY21 budget only allows a $10,000 increase in funding for social services. This increase isn’t even a fourth of the increase which is allocated for MPD. As a resident of Middlebury I demand that the FY21 budget be rejected, and a new budget be proposed with these funds redirected away from MPD and into our community services. We are a rural town with limited access to healthcare, rising unemployment, and homelessness. Our town needs healthcare, social services, food, and job opportunities. I demand that the funding for MPD be reallocated into: Health Services, Senior Services, Child Protective Services, Housing Services, Community Legal Aid, and Social Services.
Please do the right thing – defund the police and invest in our community.
Sincerely,
[NAME]
[ADDRESS]
[EMAIL]
[PHONE NUMBER]

Thank you for submitting your city to defund12.org! Your request is now in the queue for review and publishing. We’ll reply here if we have any questions.

I’m reviewing

Hi, my account exists.

Please let me know if I need to edit this. I am currently organizing with local groups and have met with a selectboard memeber. We need to spread this as much as possible to keep our momentum going. Thanks so much for all your doing!
Here is the reference for  the police cheif's  quote: https://cms5.revize.com/revize/middlebury/document_center/Selectboard Meeting Packets/2020/18 - June 9 SB Packet/12f - Middlebury Police Department  Anti-Bias & De-Escalation Training.pdf
And here is my reference for the  number of police killings in Vermont:
https://vtdigger.org/2020/02/17/fatal-police-encounters-rising-in-vermont/

I commented in the feed with more references for the content that was
removed. I understand if you are not willing to add that content back in.
But I feel these references make my argument stronger. Thanks for all that
you're doing!
Hannah Horris, MS, ATC
Assistant Athletic Trainer
Middlebury College Sports Medicine
<EMAIL_ADDRESS><EMAIL_ADDRESS>On Fri, Jun 12, 2020 at 8:53 PM brickaney<EMAIL_ADDRESS>wrote:

I’m reviewing
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/defund12/defund12.org/issues/1211#issuecomment-643544656,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP45FLA7M4Y42UXLLHXZR53RWLEZ7ANCNFSM4NZ5HAZA
.

Hey @hhorris sorry about that, my computer wasn’t loading tags! My interpretation of the email guidelines are to keep things fairly high-level and generic such that many others will feel comfortable signing their name to it. I don’t think your statements are invalid, I just believe they should be on your personal letter to the city council.

Go it, thanks for tour help!
On Sat, Jun 13, 2020 at 3:23 PM brickaney<EMAIL_ADDRESS>wrote:

Hey @hhorris https://github.com/hhorris sorry about that, my computer
wasn’t loading tags! My interpretation of the email guidelines are to keep
things fairly high-level and generic such that many others will feel
comfortable signing their name to it. I don’t think your statements are
invalid, I just believe they should be on your personal letter to the city
council.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/defund12/defund12.org/issues/1211#issuecomment-643666793,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP45FLF4QSHFIJI76SA6HQDRWPG3FANCNFSM4NZ5HAZA
.

--
Hannah Horris, MS, AT

on it


Add an example to documentation for "Initializing a fresh instance"

Problem
Setting up a user and db (other than the admin user and test db) is a little opaque.
This link How to create a DB for MongoDB container on start up? with over 268K views shows how much of an issue the lack of documentation is. There are many other variations of the search term above, so I'd imagine the numbers would be a lot higher if they were all tallied.
Proposal
Please include something like the below in that section of the documentation
docker-compose.yaml
version: '3.8'

services:
    mongodb:
        image: mongo:latest
        container_name: mongodb
        restart: always
        environment:
            MONGO_INITDB_ROOT_USERNAME: <admin user>
            MONGO_INITDB_ROOT_PASSWORD: <admin password>
            MONGO_INITDB_DATABASE: <custom db>
        ports:
            - 27017:27017
        volumes:
            - ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro

mongo-init.js
print('Init Script - Started Adding the User Roles.');
// use the admin db to create a new user and give that new user permission to the db
// mongo seems to lazy load the db, meaning it'll create the db when a collection is first added
// but the newly created user will still have access to the db
db = db.getSiblingDB('admin');
db.createUser({
  user: '<custom user>',
  pwd: '<custom user password>',
  roles: [{ role: 'readWrite', db: '<custom db>' }],
});
print('Init Script - Ended Adding the User Roles.');

please include the shell version

@melvingaye could you open a PR here: https://github.com/docker-library/docs/blob/master/mongo/content.md

@melvingaye so its mandatory to do the db.getSibilings()? I don't understand it, if i have to specify the custom db in the script, what's the point to use the MONGO_INITDB_DATABASE environment variable in the first place?
Thanks in advance!


Unhandled promise rejection error

I am getting this problem when i run my program, i used the fortnite api correctly but idk why it does that error

its happening on the login method of the api

Can you give your code please ?

@qlaffont I'm having the same issue. Unfortunately I tried to pull too many stats from the server and generated too many sessions. Happened already sometimes, I changed the password and was able to login again, not this time.
So I was having the same error message as on the screen above and so I checked the coding of the login function. I added a catch block for the "return new promise" to get more details.
that's my result. Complete log is around 4 "pages" in terminal.
message: 'Please enter good token',
err:
{ StatusCodeError: 429 - {"errorCode":"errors.com.epicgames.common.throttled","errorMessage":"Operation access is limited by throttling policy, please try again in 6798 second(s).","messageVars":["6798"],"numericErrorCode":1041,"originatingService":"com.epicgames.account.public","intent":"prod"}


[Telink] Add Window app demo

Problem
These changes add new Telink app example
Change overview
Added Telink Window Covering example
Testing
Tested manually with chip-tool.
Steps:
Run: $ chip-tool pairing ble-thread <...>
Wait till success

@andy31415 @jmeg-sfy Could you process PR?

@andy31415 @jmeg-sfy Could you process PR?


Recommend the prettier vscode formatting plug-in.

I thought I did this in the initial PR, but apparently I forgot.
This just suggests to new users that they install the prettier vscode plugin in addition to the other plugins we recommend when working on Cesium. This ensures that VS Code follows the same exact formatting as our prettier rules specify.
Completely optional to the user, just like the eslint/shader/gltf suggestions.

Thanks for the pull request @mramato!

:heavy_check_mark: Signed CLA found.
:grey_question: CHANGES.md was not updated.

If this change updates the public API in any way, please add a bullet point to CHANGES.md.

:grey_question: Unit tests were not updated.

Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

[ ] Cesium Viewer works.
[ ] Works in 2D/CV.
[ ] Works (or fails gracefully) in IE11.

The Shift + Alt + F command for formatting the current file is really convenient. Also you can configure it to format on save, which I personally don't use but might be useful to others.

The extension page recommends that the project should have a .prettierrc file, even if just to solidify the defaults.  Otherwise the user-level settings might be different.


Review of sensor/motion behaviour

Is your feature request related to a problem? Please describe.
The app has an option to enable motion detection that I personally use so the app can wakes my tablet up if motion detected as they are linked.
I also enable MQTT because I want to get the app's status (online/offline).
That AUTOMATICALLY means I receive data from ALL available sensors as there is no option to opt out from any particular one etc.
It's not an issue, but I think that motion sensor implementation is not quite correct.
Currently when motion detected, it publishes something like

09:47:20: (0) home/wallpanel/entrance/sensor/motion {"value":true}

and then after Motion Reset Time seconds (5 seconds in my case)

09:47:25: (0) home/wallpanel/entrance/sensor/motion {"value":false}

Describe the solution you'd like
I think it can act as a standard PIR, for example: when motion detected, it sends a signal and does not send any more signals within a set period of time (typically 3 minutes for battery-powered devices to save energy).
I don't think sending that second mqtt message makes sense and it's better to send only {"value":true} messages and don't publish anything (even if motion detected) within the next Motion Reset Time seconds.
That way it won't be controversial (as having pair {"value":true} and {"value":false} might be interpreted as "there was motion between this and that time") and will help to ease mqtt traffic.
Hope it makes sense.

You can ignore the second value if you wish, I use the second value for my automations and so do others.  Rather than remove it for everyone, just ignore the value if its false.

Well, at least it creates unnecessary load on MQTT broker.
And as I mentioned, the only meaningful event is the {"value":true}.
Automations can be changed to reflect the nature of this event - in HA it's just adding "delay_off:".
But it's up to you really.

@akasma74
Other motion sensors send motion:false too (example zigbee hue motion sensor). How else should it let you know if there is still/continuous motion or not!?

@allofmex I don't own any motion sensors that send motion:false but I do believe you ;)
The thing is I use my sensors to trigger a security alarm. Therefore I don't need to know if there's still/continuous motion - as soon as I get a motion detected message, it's time to raise the alarm and anything extra just doesn't make sense.
Maybe there are circumstances when people use their motion sensors differently, but I'm not aware of that.


[Enhance] Add CCE specific see also sections to transformer and template

This enables you to define:
max-seealso: fzero~
pd-related: sigmund~

in the YAML docs which is then rendered in the appropriate templates.
I've opted for a relatively permissive try/Except block to catch cases where these new things are not defined or just not needed. It thusly throws a warning if they aren't which given the current unfinished state of the docs is a bit noisy.
On another note does this block up the YAML to RST milestone?

The naming being consistent would make it obvious how all those bits talk to each other, I agree. What does @weefuzzy think of that?

Ths is also made slightly more complicated by the YAMl to RST conversion so I think it best to put it into a separate PR


Created Shift-on-stack task

Description
Created shift-on-stack task

Opening a new pr from personal fork to use the playground scripts!


Checked Property

I am using your component but I can not verify the fields assigned.
If the check box works with the basic input, this works perfect for me.
I appreciate your help

     <input type="checkbox" :value="permission" v-model="permissions">

        {{ permission.name }}

Hi Jorge,
Thanks for using this component,
i hope following Codepen help you to understand what's happening:
Pen
if you need any more help don't hesitate to ask

thanks for answering,  I did not understand the operation of the Update variable very well, I also failed to mention that the checked is based on the role that is chosen.
the id of the role it shows me the checkbox checked
data: {
   	arrayPermissions: [
	    	{ id: 1, name: 'Inactivar usuario'},
		{ id: 2,name: 'Inactivar rol'},
	    	{ id: 3,name: 'Inactivar permiso'},
	    	{ id: 4,name: 'Editar usuario'},
		{ id: 7,name: 'Crear usuario',},
         ],
	permissions: [],
	arrayRoles: [
		{"id":1,"name":"Administrador","permissions": []},
	  	{"id":2,"name":"Asistente","permissions": []},
	  	{"id":5,"name":"admin","permissions": [{"id":7,"name":"Crear usuario"},
                                                                             {id: 4,name: 'Editar usuario'},
                                                                             ]
	         }
         ]
}

consider this example:
let a = {name:'Update'};
let b = {name:'Update'};

is (a === b)?

no
they are two different objects
that's why "Read" is not checked by component but "Update" is

According to that I must do two FOR one for the array Permissions and the other for the Permissions and then compare them in the checked property?

i updated Codepen to match you case:
Pen

Partner, I apologize for the insistence, I perfectly understand the example but when I try to transfer it to my eyes it does not work.
Please can you help me
View

                                Id
                                Rol

                                    <button type="button" class="btn btn-outline-primary btn-sm" title="Editar"
                                     v-on:click="editRole(role)">

                                    </button>

Method for data (EDIT)
editRole(role){
                //console.log(role);
                this.idrole   = role.id;
                this.name = role.name;
                this.permissions = role['permissions'];
                this.editModal();//muestra el formulario
            }

My Watch
watch: {
            permissions(value) {
               console.log(value);
                this.permissions =value;
            }
        }

change watch to this:
watch: {
            idrole(value) {
               console.log(value);
                this.permissions = this.arrayRoles[value]['permissions'];
            }
        }

if it doesn't solve your problem create a Codepen so i can help you better

partner, it'is my pen

this is what you should do:
Pen

I can not bring the role array, therefore I can not do the comparison
watch: {
            idrole(role) {
                //console.log(this.arrayRoles);
                let roles = this.arrayRoles;
                    for(var i=0; i<roles.length;i++){
                        console.log(roles[i].role);
                    }
            }
        },

this return undefined

I didn't understand what you mean

partner I share all my code, as a last alternative, I really do not understand why it does not work ...
Role.txt

i can't run this code, it depends on other resources which you access by axios
Create a Github so i can help you

git

i fixed your problem and created a PR for you

Partner, I really appreciate the help you gave me, I see that you like to help people.
INFINITAS THANK YOU.
100% solved
PD: I will analyze your solution very well for next implementations.

i'm glad that your problem is solved


[bug] notes tab needs scroll for new recall knowledge sidebar

I have 6 players, and the sidebar for the new recall knowledge is no displaying all said player before the bottom of the window.

I just released v1.0.5 that fixes this. 🤖 👍
Removed the reset button aswell to improve text flow. The player name can instead be clicked to reset the Recall Knowledge Attempt tracker (alt-click to avoid confirmation popup.)


Log test failures, errors, etc. to stderr.

There are perfectly valid reasons for wanting to do this, and it should definitely be done.

Fixed in 02f4563.


:seedling: add support for nebula as a graph database storage layer

What type of PR is this?
/kind feature

What this PR does / why we need it:
add support for nebula as a graph database storage layer
Which issue(s) this PR fixes:
Fixes #578
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

NONE

/auto-cc

Is nebula-go compatible with gorm? Their syntax looks different

ig not the gorm is not compatible.WIll have to check its compatibility as well


VMS: mitigate for the C++ compiler that doesn't understand certain pragmas

This only affects __DECC_INCLUDE_EPILOGUE.H and __DECC_INCLUDE_PROLOGUE.H,
which are used automatically by HP and VSI C/C++ compilers.

Does this fix an issue reported by users?
Nit: 'mittigate' -> 'mitigate'

Does this fix an issue reported by users?

The report came directly from VSI

I actually fixed the message just now

No diffs, reconfirmed.

Ready to merge.

Merged
1.1.1:
605a0c709f4d50497a1c49ee117a0ec4bb956d58 VMS: mitigate for the C++ compiler that doesn't understand certain pragmas
master:
f33ca114c1f8a1ea07948fec6e175806d69274ef VMS: mitigate for the C++ compiler that doesn't understand certain pragmas


app store verification review request rejected

Can anyone tell me the exact requirements for trying to pass world id app store verification. I submitted twice for review and got rejected with the reason “I dont see how world id or any sdk is implemented”, my app has integrated world id login but is still in app store review stage.

Hello @chenkuangkuang
This issue has been preview on the Pull Requests. To resolve, Visit the official live support page to initiate a chat with an agent using the chat button via support


[BEAM-13776][Playground] Update Playground README

[BEAM-13776]
Update README.md for the playground

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

R: @KhaninArtur @ilya-kozyrev

R: @pabloem

lgtm thanks!


prevent peer dependency issues

solves https://github.com/elangobharathi/react-leaflet-fullscreen-plugin/issues/3

Uups: only relevant after solving https://github.com/elangobharathi/react-leaflet-fullscreen-plugin/issues/1


iPhone 7 user cannot edit polygons

After submitting a new shape, going back to edit that shape, user clicks on it and it turns yellow. However, she cannot click on and move vertices to change the shape.

I don't see any current problem with it on my iPhone. There could be issues with iPhone 7 particularly, but that does seem unlikely. Do we have any confirmation that this was a functional issue with the device and not confusion about the interface?

No. She watched me go through the process on my iPhone (over Zoom) and repeatedly said, "No, I can't do that. On my phone, the polygon turns yellow but I can't move the vertices."

Could be an old version of the operating system. I've installed Sentry.io on the client so we can get error reports and device info. That may help if it happens again.


Upstream Todoist issue: Can't undo archiving multiple tasks at once

Repro:

Add a couple items, and select them
Either use e to archive, or use the mouse ui, via shift+click and More... -> Archive
Press undo.

Expected:

Box pops up saying 2 items completed
Pressing undo brings back both items

Actual:

Box pops up saying 1 item completed
Pressing undo only brings back one

A somewhat related issue is that you can't undo a deletion.

Somewhat related is that you cannot undo task deletion.

Added a task to take a look at this. Thanks for the report @mgsloan 👍

Closing this issue as part of a general issue tracker cleanup


Can't send routines

Describe the bug
I am getting an error message when attempting to start a routine
I am running the following routine:
- service: media_player.media_play
  data:
    media_content_id: Set Work Alarm
    media_content_type: routine
  target:
    entity_id: media_player.bedroom_echo

The error message I'm getting is:
extra keys not allowed @ data['media_content_id']
Expected behavior
Expected routine to play.
Screenshots

System details

Home-assistant (version): 2022.2.6
Hassio (Yes/No): ?
alexa_media  (version from const.py or HA startup): HACS
alexapy (version from pip show alexapy or HA startup): HACS
Amazon 2FA is enabled (y/n). We will not debug login issues if unanswered: Yes

Logs
Please provide logs. We'll be most likely asking for them anyway.
Logger: homeassistant.components.automation.night_mode
Source: helpers/script.py:1375
Integration: Automation ([documentation](https://www.home-assistant.io/integrations/automation), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+automation%22))
First occurred: 10:51:52 PM (24 occurrences)
Last logged: 11:02:16 PM

IFTTT: Night Mode: Choose at step 1: choice 2: Choose at step 3: choice 1: Choose at step 1: default: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['media_content_id']
IFTTT: Night Mode: Choose at step 1: choice 2: Choose at step 3: choice 1: Error executing script. Invalid data for choose at pos 1: extra keys not allowed @ data['media_content_id']
IFTTT: Night Mode: Choose at step 1: choice 2: Error executing script. Invalid data for choose at pos 3: extra keys not allowed @ data['media_content_id']
IFTTT: Night Mode: Error executing script. Invalid data for choose at pos 1: extra keys not allowed @ data['media_content_id']

Figured out the issue. It's play_media, not media_play. Weird that I have both.


[Bug]: disk I/O error

What happened?
I am trying to inserts 5M records into Chromadb.
But I got followings errors.
How I can fix it.
Here is my source code.
import chromadb
from chromadb.config import Settings
chromadb_path = f"./chromadb_gpu_manual_full1M_12"
print(chromadb_path)
persistent_client = chromadb.PersistentClient(path=chromadb_path)
collection = persistent_client.get_or_create_collection(
    name="vectordb",
    embedding_function=huggingface_ef)

batch_size = 40000
for i in range(0, my_df.count(), batch_size):
    chunk_df = my_df.filter((my_df["id"] >= i) & (my_df["id"] < i + batch_size))
    ids = chunk_df.select('id').rdd.flatMap(lambda x: x).collect()
    ids_str = list(map(str, ids))
    meta_infos = chunk_df.rdd.map(lambda row: row.asDict()).collect()
    column_values = chunk_df.select('text_for_search').rdd.flatMap(lambda x: x).collect()
    collection.add(
        ids = ids_str,
        metadatas = meta_infos,
        documents = column_values
    )
    print(f"Batch {i} DONE")

Versions

Linux 0308-035611-p0z5su4q-10-139-64-4 5.15.0-1056-azure #64~20.04.1-Ubuntu SMP Wed Feb 7 16:49:43 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
chroma-hnswlib                           0.7.3
chromadb                                 0.4.24

Databrick/Azure
Relevant log output
Batch 0 DONE
Batch 40000 DONE
OperationalError: disk I/O error
File <command-924036316931534>, line 8
      6 meta_infos = chunk_df.rdd.map(lambda row: row.asDict()).collect()
      7 column_values = chunk_df.select('text_for_search').rdd.flatMap(lambda x: x).collect()
----> 8 collection.add(
      9     ids = ids_str,
     10     metadatas = meta_infos,
     11     documents = column_values
     12 )
     13 print(f"Batch {i} DONE")
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-6e5265cf-73d2-40cb-95bc-52599f23d408/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py:172, in SqlEmbeddingsQueue.submit_embeddings(self, topic_name, embeddings)
    169 # The returning clause does not guarantee order, so we need to do reorder
    170 # the results. https://www.sqlite.org/lang_returning.html
    171 sql = f"{sql} RETURNING seq_id, id"  # Pypika doesn't support RETURNING
--> 172 results = cur.execute(sql, params).fetchall()
    173 # Reorder the results
    174 seq_ids = [cast(SeqId, None)] * len(
    175     results
    176 )  # Lie to mypy: https://stackoverflow.com/questions/76694215/python-type-casting-when-preallocating-list

@tupv-mor, it is correct in assuming you are using some sort of NFS drive? If that is the case it is not recommended to store the sqlite3 db on it. The sqlite Chroma relies on can get corrupt by the way NFS works. In addition to this NFS is really slow compared to traditional SSDs.

@tazarov
Thanks for replying.
I am using NFS storage.
As you said, It mean that in new version of Chroma, Using NFS Storage is not recommended?


Switch to Robolectric for ContentResolver tests

I am tired of Android emulator problems on CI, lets use Robolectric for ContentResolver tests.

Fixed by #420.


Not automatically scroll to prompt

If I have a long output, it doesn't automatically scroll to prompt. Is there any way to do this programatically?

It work when I've tested, do can you create a demo with the problem?

Closing because of inactivity.


Document design decision between Paho and Tahu

Eclipse Tahu provides a Sparkplug specific library while Eclipse Paho provides generic MQTT support.
In the final report and maybe also for the final implementation we should evaluate both libraries.

https://docs.chariot.io/display/CLD79/B%3A+Example+Java+Client
Docs for setting up Sparkplug.


[Header] Allow for multiple right panels

Internal tracking issue #71
Previous spec had only actions and menu drop downs for header menus with the allowance for the one application switcher right panel.
There is now a use case to support multiple right panels for to use in place of menu drop downs.

:tada: This issue has been resolved in version 2.23.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Cursor-based pagination not working as expected (only works if cursor actually exists)

Bug description
Cursor-based pagination only works if the given cursor actually exist
How to reproduce
The following piece of code
const users = await prisma.user.findMany({
	where: {
		AND: [{
			name: {
				contains: "rocky",
				mode: "insensitive"
			}
		}, {
			active: true
		}]
	},
	skip: 1,
	take: 20,
	cursor: {
	        id: 0
	}
});

Generates the following query:
SELECT * FROM user, (SELECT id AS id_0 FROM user WHERE id = 0) AS order_cmp WHERE (active = true AND name ILIKE '%rocky%' AND id >= order_cmp.id_0) ORDER BY id ASC LIMIT 20 OFFSET 1;

(it has been reformatted for sake of legibility)
However, this query SELECT id AS id_0 FROM user WHERE id = 0 I believe it is redundant and dangerous since it returns nothing (because there is no user with id = 0) and thus the entire query will return nothing when it shouldn't.
The latter example was produced because I'm writing an application and I want to return all users matching some query parameters with pagination support. Since the first query done by the client will have no pagination, the cursor or last queried id was set to 0 by default
However this is not the only case where this may happen. In general, the query won't work if the cursor doesn't exist (including when it has been deleted), so the following may also not work
const users = await prisma.user.findMany({
	where: {
		AND: [{
			name: {
				contains: "rocky",
				mode: "insensitive"
			}
		}, {
			active: true
		}]
	},
	skip: 1,
	take: 20,
	cursor: {
	        id: 5
	}
});

If the fifth user in the database has been deleted.
Expected behavior
It may be a good idea to generate the following SQL query instead
SELECT * FROM user WHERE (active = true AND name ILIKE '%rocky%' AND id >= 5) ORDER BY id ASC LIMIT 20 OFFSET 1;

This will work even if the id 5 does not exist (or it was deleted).
Prisma information
generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model user {
  id            Int                 @id @default(autoincrement()) @db.SmallInt
  active        Boolean             @default(true)
  name          String              @db.VarChar(100)

  @@index([name, active], name: "user_name_and_active_idx")
}

Environment & setup

OS: Fedora 34
Database: PostgreSQL 13.3
Node.js version: v14.17.0

Prisma Version
prisma               : 2.28.0
@prisma/client       : 2.28.0
Current platform     : rhel-openssl-1.1.x
Query Engine         : query-engine 89facabd0366f63911d089156a7a70125bfbcd27 (at<EMAIL_ADDRESS>Migration Engine     : migration-engine-cli 89facabd0366f63911d089156a7a70125bfbcd27 (at<EMAIL_ADDRESS>Introspection Engine : introspection-core 89facabd0366f63911d089156a7a70125bfbcd27 (at<EMAIL_ADDRESS>Format Binary        : prisma-fmt 89facabd0366f63911d089156a7a70125bfbcd27 (at<EMAIL_ADDRESS>Default Engines Hash : 89facabd0366f63911d089156a7a70125bfbcd27
Studio               : 0.417.0

Current theory:
This seems like a difference in expectation, here the expectation is that it does a bigger than > id.
Our implementation of cursor might need the cursor to exist, as it will fetch results after it.
Probably not documented?
We should reproduce this.

@Jolg42 is right; I was able to reproduce and it seems like we do need the cursor to exist, otherwise we return no results.

Linking #3362, where a separate implementation has been discussed. Another issue #14283 discusses an update to the documentation making it clear that the specified cursor needs to exist.
While the other commenters are correct that this is expected behavior, I believe there should be a way to tell Prisma to choose a cursor of the next item in line. Going to submit this as a feature request

I made a workaround using gt and lt, I'm not sure if this scales though.
where: {   ...(cursor && {     id: {       ...(sortDirection === 'desc' && {         lt: cursor,       }),       ...(sortDirection === 'asc' && {         gt: cursor,       }),     },   }), },


[mongo] obfuscatee parsedQuery, filter and indexBounds in explain plan

What does this PR do?
This PR obfuscates literal values in parsedQuery, filter and indexBounds in collected MongoDB explain plan. This change ensures literals are properly obfuscated with ?.
Motivation
https://datadoghq.atlassian.net/browse/DBMON-4498
Additional Notes

Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] Changelog entries must be created for modifications to shipped code
[ ] Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
[ ] If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged


Linux Basics Notes

document use of centos 6
day 1: intro to basics (session 2 of devops daycamp), parts of editors/git, tar
day 2: os installation w/ virtualbox, kickstart, boot, filesystem
day 3: troubleshooting, bash scripting (advanced bash scripting guide)
day 4: networking, lvm & storage, cron, syslog, kernel basics

1/21 - syslog, cron, mdadm, other


Flag forbidden imports on the line at which they occur

> ./stdlib/_collections_abc.pyi:4:23: NQA102 "# noqa: Y022,Y038,Y057" has no matching violations
> ./stdlib/_collections_abc.pyi:5:5: Y038 Use "from collections.abc import Set as AbstractSet" instead of "from typing import AbstractSet" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:6:5: Y022 Use "collections.abc.AsyncGenerator[YieldType, SendType]" instead of "typing.AsyncGenerator[YieldType, SendType]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:7:5: Y022 Use "collections.abc.AsyncIterable[T]" instead of "typing.AsyncIterable[T]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:8:5: Y022 Use "collections.abc.AsyncIterator[T]" instead of "typing.AsyncIterator[T]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:9:5: Y022 Use "collections.abc.Awaitable[T]" instead of "typing.Awaitable[T]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:10:5: Y057 Do not use typing.ByteString, which has unclear semantics and is deprecated
> ./stdlib/_collections_abc.pyi:11:5: Y022 Use "collections.abc.Callable" instead of "typing.Callable" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:12:5: Y022 Use "collections.abc.Collection[T]" instead of "typing.Collection[T]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:13:5: Y022 Use "collections.abc.Container[T]" instead of "typing.Container[T]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:14:5: Y022 Use "collections.abc.Coroutine[YieldType, SendType, ReturnType]" instead of "typing.Coroutine[YieldType, SendType, ReturnType]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:15:5: Y022 Use "collections.abc.Generator[YieldType, SendType, ReturnType]" instead of "typing.Generator[YieldType, SendType, ReturnType]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:17:5: Y022 Use "collections.abc.Hashable" instead of "typing.Hashable" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:18:5: Y022 Use "collections.abc.ItemsView[KeyType, ValueType]" instead of "typing.ItemsView[KeyType, ValueType]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:19:5: Y022 Use "collections.abc.Iterable[T]" instead of "typing.Iterable[T]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:20:5: Y022 Use "collections.abc.Iterator[T]" instead of "typing.Iterator[T]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:21:5: Y022 Use "collections.abc.KeysView[KeyType]" instead of "typing.KeysView[KeyType]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:22:5: Y022 Use "collections.abc.Mapping[KeyType, ValueType]" instead of "typing.Mapping[KeyType, ValueType]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:23:5: Y022 Use "collections.abc.MappingView" instead of "typing.MappingView" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:24:5: Y022 Use "collections.abc.MutableMapping[KeyType, ValueType]" instead of "typing.MutableMapping[KeyType, ValueType]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:25:5: Y022 Use "collections.abc.MutableSequence[T]" instead of "typing.MutableSequence[T]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:26:5: Y022 Use "collections.abc.MutableSet[T]" instead of "typing.MutableSet[T]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:28:5: Y022 Use "collections.abc.Reversible[T]" instead of "typing.Reversible[T]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:29:5: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:30:5: Y022 Use "collections.abc.Sized" instead of "typing.Sized" (PEP 585 syntax)
> ./stdlib/_collections_abc.pyi:32:5: Y022 Use "collections.abc.ValuesView[ValueType]" instead of "typing.ValuesView[ValueType]" (PEP 585 syntax)

We can probably avoid having to add a thousand million noqas to _collections_abc.pyi by add a per-file-ignore entry to our .flake8 file

The isort thing is fixed now by using # isort: off, but there's still another issue: turns out ast.alias nodes don't have a lineno attribute on Python 3.8 and 3.9.

Seems like there's a bigger problem: on 3.8 and 3.9 aliases don't have a lineno, so we can only do this on 3.10+ :(
That creates the problem that the location of # noqas will have to depend on the version of Python used to run flake8-pyi. Not a big problem for typeshed, but possibly annoying for some users.

That creates the problem that the location of # noqas will have to depend on the version of Python used to run flake8-pyi. Not a big problem for typeshed, but possibly annoying for some users.

I'm not too worried about errors being reported on different lines for different versions. I feel like if we can give a more specific lineno for an error, we should, and I'm guessing most projects only run flake8 with a fairly recent Python version in CI -- so hopefully they won't be too annoyed with having errors reported on different linenos on different Python versions.

I am however not sure what a clean way to test this behaviour would be. Our test suite can't currently handle errors being reported on different lines, depending on which Python version you're using. I can think of various workarounds, but none that I like.

Following 17698fa, this PR no longer makes the plugin crash on py39, but the tests still fail due to the incorrect line numbers on py39.

@JelleZijlstra, thoughts on maybe gating this behaviour behind a flag? --precise-import-linenos? That would mean that users could stick with the current behaviour (consistent error reporting across Python versions), but also opt into more precise line numbers for their error codes if they wanted to. It would also solve the issue of how to test these error codes at flake8-pyi -- we could have a specific test file that enables that flag and checks that the errors are on the right line number when the flag is enabled.

I'm not too fond of adding flags, it's generally better to have consistent behavior. It's definitely an option though.
We could probably handle this in the test suite by having separate test files per Python version.

I'm not too fond of adding flags, it's generally better to have consistent behavior.

In general I definitely agree. However, I think a flag is a good option here for two reasons:

I think it's nice for our default to be to have consistent behaviour across different Python versions. I think it could be confusing for users for us to say that we support Python 3.9, but then for them to find out that their noqa comments don't work if they actually run the plugin using Python 3.9, because the errors are now being flagged on different lines.
This change is arguably backwards incompatible, since users will have to change the location of their noqa comments. Making the new behaviour opt-in solves this problem.

I think we should prefer consistent behavior, and it is less important what line number the error points at.
If we want to proceed with this PR, I'd suggest we make something hacky that gets the new behavior on Python 3.8 and 3.9, and we put it inside a sys.version_info check. We can delete the hack when we drop support for Python 3.8 and 3.9.

Agreed, maybe we should just do this later :)

I'll wait to see if Jelle has any ideas that I'm missing; if not, I'll just close this :)

I don't have any better ideas than dropping support for 3.8 and 3.9, and it's a bit early for that.

I opened #413 so we remember to do this when we drop support for Python 3.9 :)


Release is a tarbomb

Steps to reproduce:
Download the latest release.
tar -xzvf release.tar.gz
Expected Outcome:
Files should be extracted into a subfolder.
Noted Outcome:
Files are extracted directly into the current directory.
This is pretty basic etiquette.

the AUR packages work with this in mind.


  It's too risky, one, and two, everything's going on the internet.  Anyone wi..." }

Long sentences causing error.

@nikhil-pandey Can you point which piece of code resulted this error.

Happened with me too. I had to split long replies, only taking first sentence or discarding it if it's too long, but it's still a bad solution imho

Just a note on this, newer versions of ChatterBot include more verbose error handling for MongoDB and part of message for this error now also states distinct too big, 16mb cap.

Is this still not fixed? 🤔

Is this still not fixed?

Just hit this recently.

Is this still not fixed?

how can I  fix it?

I've removed the index from the Mongo DB storage adapter. This error should no longer occur as a result.


struct.error: 'H' format requires 0 <= number <= 65535

May 27 17:07:49 bohol electrumx_server.py[1755]: flush_id = pack('>H', self.flush_count)
May 27 17:07:49 bohol electrumx_server.py[1755]: struct.error: 'H' format requires 0 <= number <= 65535
how to fix this ?
We are using https://github.com/bauerj/electrumx-installer .

see https://github.com/spesmilo/electrumx/issues/88


Fix css for Ruby examples

Some of the Ruby examples look weird, similar to the number problem earlier (see #43).
Especially when using #{ ... }
This should be fixed (either in css or javascript)

@aslakhellesoy are you the person most familiar with the CSS ?

He probably is, but I gave it a shot anyway. ;)


Disable accidental snowed-block removal

The blocks snow layers generate on include shovelable blocks, such as dirt and sand. I need a shovel to break the snow to get snowballs, but with a shovel I also risk breaking the block underneath it, which is often not what I want. Currently, I would have to find a non-shovelable block and build a snow golem on top of it to farm snow.
I suggest adding a toggle somewhere to do something like "snow farming mode" to ensure that only snow layers get shoveled for the snow, not other shovelable blocks. This would eliminate the need for the aforementioned non-shovelable block + snow golem, since I can now just scrape the landscape.

The idea sounds good, but I'm not quite sure how I'll implement that, so it may take a bit to implement it.


Bug in Environment Initialization with Direct Role Assignment Causes Error

Bug description

我看到Environment中也初始化参数也可以直接定义Role进去，所以我就试了下（因为我目标要实现多个不同的环境下的不同Team要协作），结果发现直接Bug报错。目测Bug的来源我还不太确定，因为我不太熟悉这个类的构造方式。根据下面截图的报错，可能是在 self.roles 赋值的时候，触发了什么机制保护？
Bug solved method

如上。
Environment information

LLM type and model name:

gpt-4-1106-preview

System version:

# Inside a docker container
Linux e24f4ba5e757 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Python version:

Conda Python 3.10.13

MetaGPT version or branch:

0.8.0

packages version:
installation method:

pip install -e . && pip install -e .[rag]

Screenshots or logs

Maybe you can ref to examples/debate_simple.py, firstly init environment and then add roles into team. or, Environment(desc="xxx", roles={assistant1.profile: assistant1, assistant2.profile: assistant2}) which due to the rolesinside env is a dict that keys areprofileofrole`.
BTW, I see you define a android assistant, what's your demands?

Due to the lack of updates or replies by the user for a long time, we will close it. Please reopen it if necessary.


ENG-14122: Updates for heterogeneous clusters

ENG-14122: Updates for heterogeneous clusters

@KPostOffice Ready for you to review again and approve if happy.


Create CI pipeline

CI checks if the code can build when pushing into a branch

I think we don't need to set a CI for the project, we can discuss more on next week maybe

not implemented


Rollback to reset the DB

Interesting ID used in https://github.com/dmaicher/doctrine-test-bundle: instead of resetting the schema or empty all the tables, simply wrap the fixture insertion in a transaction which can be rolled back. May have an issue with nested transactions though.
See also http://stackoverflow.com/questions/12408145/how-to-rollback-any-transaction-when-doing-test-with-phpunit-in-symfony2.

Duplicate of https://github.com/theofidry/AliceDataFixtures/issues/39


roles/check_deps/tasks/main.yml: simplify check_deps and compute openshift_release if not set

roles/check_deps/tasks/main.yml is executed at the beginning of every playbook / toolbox script.
This patch simplifies what is checked and automates the computation of openshift_release

/test gpu-operator-e2e

@ArangoGutierrez tests passed :)


src: Update .gitignore

Coverage remained the same at 94.565% when pulling 79699e96aff54441c79c815bc3fe9460c31d0b56 on felipewmartins:fixgitignore into 466dab8377ccbda490518d0960d6d4bfc12be4ff on bucharest-gold:master.


Prepare for transition to the Prototype Kit site

We are moving all missing content to the Prototype Kit site
When that is done, we'll need to turn this site off and redirect all the pages.
Tasks

[x] investigate where and how the training site is hosted and deployed
[x] create redirects
[x] deploy redirects to replace the training site

Done in https://github.com/alphagov/govuk-prototype-kit/issues/1275.


update install command for Mac OS following standard quoting

when copying/pasting the command to install the Kubernetes on Mac OS using zsh, the command results in the following error,
The specified key does not exist.. This is usually because of the \ that zsh automatically inserts into the command. The best practice is to use double-quotes and this is also the standard method according to https://google.github.io/styleguide/shell.xml?showone=Quoting#Quoting

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Remember to delete this note before submitting your pull request.
For pull requests on 1.15 Features: set Milestone to 1.15 and Base Branch to dev-1.15
For pull requests on Chinese localization, set Base Branch to release-1.14
For pull requests on Korean Localization: set Base Branch to dev-1.14-ko.<latest team milestone>
If you need Help on editing and submitting pull requests, visit:
https://kubernetes.io/docs/contribute/start/#improve-existing-content.
If you need Help on choosing which branch to use, visit:
https://kubernetes.io/docs/contribute/start#choose-which-git-branch-to-use.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I signed it

/assign @simplytunde

@simplytunde Can I have a review on this, Its a short PR and the description is been added to the top. Let me know if you need anything else from my end. Thanks

ping @simplytunde , @mikedanese , @stewart-yu. Can I please get your kind review on this PR. Thanks

/approve
/lgtm


Migrate from commons-lang2 to commons-lang3

Commons-lang2 is old and no longer supported. We are trying to move away from commons-lang2 in favor of commons-lang3 and the jbpmmigration project is one of the last remaining projects that depend on it.

The PR was merged, closing the issue.


customizable statusbar

Configuration
profiles:
    PROFILE_NAME:
        status_line:
            display: indicator # one of: none, indicator,

            # Indicator status line specific configuration.
            indicator:
                # Update interval only applies to internal process execution, e.g. for `${Shell:...}`
                update_interval: 15 # seconds
                left: "#{InputMode} #{Date:%Y-%m-%s %H:%M:%S}"
                center: "${Title}"                 # default: empty
                right: "#{shell:uptime}"           # default: shows the current time

Format specifiers

Format
Description

{InputMode}
current input mode, e.g. NORMAL or INSERT, ...

{Shell:COMMMAND}
shows the output of the given command being executed using the login shell

{Date:Format}
date (and/or time) in the given format, e.g. {Date:%H:%M:%S}

{fg:NAME}
defines the foreground color for the next text

{fg:#RRGGBB}
defines the foreground color in hex notation for the next text

{bg:NAME}
defines the background color for the next text

{bg:#RRGGBB}
defines the background color in hex notation for the next text

{Reset}
resets color/styles to their defaults

{Bold}
enables bold font

{Italic}
enables italic font

{Underline:STYLE}
enables the given underline style, e.g. normal, curly, ...

{Title}
current window title

{DECModes:Pm}
Shows current state for VT modes of interest, a comma separated list of mode numbers

{ANSIModes:Pm}
like DECModes, but for ANSI mode numbers

{Cell:UTF8}
Shows the hovered cell content as an escaped UTF-8 sequence

{Cell:UTF32}
Shows the hovered cell content in UTF-32 codepoint sequence

{Cell:SGR}
Shows the hovered cell's SGR attribute numbers

{Session:IdleTime}
Timespan since last input activity

{Session:Uptime}
Uptime since session start

For {fg:NAME} and {bg:NAME} the name are color names like red, green etc or their numbers as found in the color palette (a value between 0 and 264 (inclusive) for indexed color palette access).

FYI, there's a whole section on the workings of the status line in the DEC STD-070 manual, assuming you have a copy of that. It's in chapter 14 - labelled as 14-001 in the PDF table of contents, or starting around page 1036 of the PDF.

@j4james do you have any plans in adding something like this (implementing the two VT seqs above) for WT maybe too? I am currently PoC-implementing this, and I actually see not just some potential example for shells (host writable status line) but also a user-configurable per TE config, similar to what tmux can do. The indicator status-line could also be of great use for power users (or TE devs?) showing the actual UTF-8 sequence of the grid cell under the current mouse cursor and other states.

Ultimately I'd like to implement most of the DEC VT sequences, and I believe the status display extension is a requirement for level 3, so it's definitely on my TODO list. It's not a priority at the moment, though, so it'll probably be a while before I get to it.

@j4james luckily the DEC STD 070 (chapter 14, thx btw) is explicitly only giving recommendations of what an indicator line should display. There's not really anything mandatory. The above screenshot shows how it looks like for Contour for now. Especially the format of the status line isn't formalized. So the implementor has quite some freedom (which I personally find good).
What wonders me is the fact that they say the status line (host writable or Indicator) is at least one line. I didn't find how that one could be made configurable. I wonder if there is some benefit in supporting status line count greater than 1.

That's looking good. I'm not sure about the multi-line status thing though. I vaguely recall some of the DEC terminals having an additional line for keyboard status below the main status line, so that's possibly what they were referring to. I don't think that line was writeable though.
Btw, if you want to look at how other terminals emulators have implemented this, there are quite a few that I know of:

Reflection Desktop
PowerTerm
TTWin
VTStar
RLogin
KoalaTerm
TeraTerm
MLTerm

The last four don't support the "Indicator status" option, though - they only allow the "Host-writable" option or nothing.
I also know that both Kermit and IBM Personal Communications have some kind of "indicator status" line by default, and in theory it should be host-writable too, but I couldn't get either of them to work. It's possibly just a config option somewhere, but I didn't spend much time trying to figure it out.

@j4james Reviving an oldish ticket here. I don't see why the indicator statusline should be host writable, because that's what the host writable statusline is there for. However, I'm planning to finally make the indicator statusline actually customizable, finally, because we want to give it a little bit more prominence in our TE, as I see some value in having one. :)
I am actually considering supporting displaying both, indicator as well as host writable at the same time (host writable's content could be embedded into the middle of the indicator one, e.g., or both lines at full with stacked vertically).
I feel it is really hard to check indicator statusline support that against other TEs because it's hard to find some, despite the list above that you provided to me thanksfully. But they all seem to be corporate.
However, I think it would be "okayish" to deviate from the standard (as far as indicator statusline is concerned), because I don't think that this is some software that'll be connected with a power plant or so (just saying) that would fire up when the statusline would not look like specced by DEC :)
p.s.: You said you have that on your TODO list. Any updates on that? And did you refer to WT in that context? If not, which TE then?

However, I'm planning to finally make the indicator statusline actually customizable

That sounds like a nice idea.

I am actually considering supporting displaying both, indicator as well as host writable at the same time (host writable's content could be embedded into the middle of the indicator one, e.g., or both lines at full with stacked vertically).

Stacked is possibly OK, but I'm not sure embedding would work. Any app that is using the host writeable status line is going to expect that they have the full width of the screen to work with. Things are likely to break if the content is getting clipped earlier than it should be.

I feel it is really hard to check indicator statusline support that against other TEs because it's hard to find some, despite the list above that you provided to me thanksfully. But they all seem to be corporate.

Those that aren't free should have a trial version you can download and try out for a couple of weeks. That should be plenty of time, if you just want to test their status line functionality.

You said you have that on your TODO list. Any updates on that?

I was actually thinking about this recently. I've just been adding paging support to Windows Terminal, and I thought that architecture might turn out to be a good base on which to build the status line. The problem is I don't see how I can get it to work over conpty, so it may only be usable in conhost. And if that's the case, I'd probably keep it in my private fork, because I don't think the MS devs are keen on conhost-only features.


[WIP] Refactor to stateless validators

This work-in-progress is exploring how we might approach stateless validators.
Essentially, instead of an isValid() method returning a boolean, and a subsequent call on the validator to retrieve validation error messages, we would instead:

Define a Result interface modeling the results of validation; it would compose the value validated, validation status, and, if present, any validation error messages.
Define validators would define a single validate() method, accepting both a value and optional context, and return a Result instance.
Define a ResultAggregate interface for aggregating several results, as is necessary in a ValidatorChain; Result instances would be pushed upon an aggregate.

Translation, value obscuration, and message truncation then become presentation issues, and can be achieved by decorating Result instances.
Additionally, we'd remove the concept of $options for creating individual validator instances; they would instead have concrete constructor arguments. This simplifies a ton of logic internally, but means that each validator would require its own factory class. On the flip side, it also means developers can write factories for specific options combinations, and have shared instances without worrying about state.
Migration concerns
We could create a new minor release that adds the new Validator, Result, and ResultAggregate interfaces, and various Result implementations. Validator would define validate instead of isValid(), allowing devs to implement both in order to forward-proof their validators. We could also provide a wrapper for Validator implementations to make them work as ValidatorInterface instances; in such a case, it would pull info from the result in order to populate its members.
The bigger issue is existing validators, and extensions to them. Developers extending existing validators may want to copy/paste implementations and begin migration of those to make them forwards-compatible with version 3. Since we would have version 3 released simultaneously to a v2 with the new interface additions, they could even copy those from v3 to aid their migration.
Integration concerns
I have not yet investigated impact on zend-inputfilter; however, that version will require a similar refactor towards stateless inputs/input filters as well.

The bigger issue is existing validators, and extensions to them. Developers extending existing validators may want to copy/paste implementations and begin migration of those to make them forwards-compatible with version 3. Since we would have version 3 released simultaneously to a v2 with the new interface additions, they could even copy those from v3 to aid their migration.

Every single custom validator and every extension to a supplied validator will need to be rewritten?

Every single custom validator and every extension to a supplied validator will need to be rewritten?

Yes - as isValid() goes away, and is replaced by validate(), and the return values would differ. This is, of course, why it's targeted for a new major version.
My hope is that we can provide some tooling and guidance around this. For instance, something like the following trait would allow adapting an existing validator to implement the new Validator interface:
trait LegacyValidator
{
    public function validate($value, array $context = null) : Result
    {
        if ($this->isValid($value, $context)) {
            return ValidatorResult::createValidResult($value);
        }

        return ValidatorResult::createInvalidResult(
            $value,
            $this->getMessageTemplates(),
            $this->abstractOptions['messageVariables']
        );
    }
}

class ExistingValidator extends AbstractValidator implements Validator
{
    use LegacyValidator;

    /* ... */
}

If we provide the legacy interface in v3, but mark it deprecated, this approach would allow mixing and matching existing v2-capable validators with v3, providing a longer upgrade path.

I think there's going to have to be a compelling advantage to v3 or upgrading is going to have to be quite easy :)  A quick check of one of my projects shows that I have 30 or so Validators that would need upgrading and that won't be an easy sell to the client if there's no tangible benefit if it's more than a day's work.

I think there's going to have to be a compelling advantage to v3

One of the issues currently is that stateful validators can lead to hard to debug issues, particularly if you share an instance.
As an example:
$validator->isValid($value1);
$validator->isValid($value2);
$messages = $validator->getMessages(); // $value1 messages are missing
$value = $validator->getValue(); // $value2

The other issue I've been seeing is maintenance of the AbstractValidator, as it contains a ton of logic around gathering options, formatting messages, etc:

Due to the options based approach, we have to do a lot of internal testing to see if the validator is in a valid state before we validate — does it have the necessary options? are they of the correct type? etc.
Moving presentation logic (value obscuration, translation, message truncation, etc.) into results, result decorators, or DTOs greatly reduces the logic, and thus maintenance, of that base class.

One nice benefit of the approach is that we can finally use callables for validation more cleanly. If they return a Result instance, this is no different than using a Validator for a consumer. The Callback validator can be used when you want to return a boolean result instead; you would compose your message templates and variables in that, so it can return a Result. This simplifies the creation and usage of one-off validators; you no longer need to have classes. (That said, PHP 7's anonymous classes also makes this easier.)

This repository has been closed and moved to laminas/laminas-validator; a new issue has been opened at https://github.com/laminas/laminas-validator/issues/15.

This repository has been moved to laminas/laminas-validator. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

Squash all commits in your branch (git rebase -i origin/{branch})
Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
Run the laminas/laminas-migration tool on the code.
Clone laminas/laminas-validator to another directory.
Copy the files from the second bullet point to the clone of laminas/laminas-validator.
In your clone of laminas/laminas-validator, commit the files, push to your fork, and open the new PR.
We will be providing tooling via laminas/laminas-migration soon to help  automate the process.


Loading r2ai as r2 plugin fails

The documentation says:
There are 4 different ways to run r2ai:

[...]
As an r2 plugin: r2 -i main.py /bin/ls
[...]

Can't get that to work.
Solution 1. Try for a miracle. Fails: Script 'main.py' not found
r2 -i main.py subs_crack
ERROR: Script 'main.py' not found

Solution 2. Specify path of main.py. Fails "ModuleNotFoundError: No module named 'r2ai'"
$ r2 -i ~/.local/share/radare2/r2pm/git/r2ai/main.py ./subs_crack
Traceback (most recent call last):
  File "/home/axelle/.local/share/radare2/r2pm/git/r2ai/main.py", line 9, in <module>
    from r2ai.main import main as r2ai_main
ModuleNotFoundError: No module named 'r2ai'

Solution 3. Be in ~/.local/share/radare2/r2pm/git/r2ai/. Fails ModuleNotFoundError: No module named 'rich'
$ r2 -i ./main.py ~/git/research/ai/subs_crack
Traceback (most recent call last):
  File "./main.py", line 9, in <module>
    from r2ai.main import main as r2ai_main
  File "/home/axelle/.local/share/radare2/r2pm/git/r2ai/./r2ai/__init__.py", line 3, in <module>
    from rich.logging import RichHandler
ModuleNotFoundError: No module named 'rich'

So, what's the correct command supposed to be? + fix the doc accordingly.

fixed in https://github.com/radareorg/r2ai/pull/58

r2pm -ci r2ai-plugin
On Mon, 23 Sept 2024 at 17:59, cryptax @.***> wrote:

How should I use it? Just did r2pm -ci r2ai, and then r2 -i
~/.local/share/radare2/r2pm/git/r2ai/main.py ./mybin. Wasn't successful...
—
Reply to this email directly, view it on GitHub
https://github.com/radareorg/r2ai/issues/57#issuecomment-2368720888, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAG75FXRUE35QWCBOWI65YTZYA3GFAVCNFSM6AAAAABOWABNN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRYG4ZDAOBYHA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
--pancake


How to choose an encoding method?

Hi,
I am not getting any resources on what encoding to choose for my model.
I tried Binary and Hashing encoding but the predictions are way worse using the Binary encoding.
How to choose an encoding that is suited for my problem?
Any help is greatly appreciated. Thanks!!

For now transformer selection is outside of scope of this project. Scikit-learn itself has model and pipeline selection tooling. The most straightforward approach would be something like a grid search.

also please note that v1.2.7 had a critical bug in hashing encoder, if you were using that, try with v1.2.8

@wdm0006 thanks for the reply, i am trying different values but the hashing encoder just return the same values with very different variables..


remove repeated the

Signed-off-by: NIKHIL E GUPTA<EMAIL_ADDRESS>Type of change

Documentation update

@mergifyio backport release-2.2

@Mergifyio backport release-2.3


Multi-GPU: optimize for cuda:1 but model also gets pushed on cuda:0, why???

❓ Question
I have two GPUs in my system. When optimize my model for the cuda:1 device the model gets somehow ALSO loaded onto the cuda:0 device (probably because that's the default device?). This happends during the optimization process which is called with:
optModel = torch_tensorrt::torchscript::compile(model, compile_settings);
With nvidia-smi I can clearly see that the optimization is performed on cuda:1 (as expected) as I explicitly tell to do so. Shortly before the optimization is finished the model is also loaded on cuda:0?
How can I stop the loading on cuda:0?
Environment

Build information about Torch-TensorRT can be found by turning on debug messages

Libtorch Version: 1.10.2+cu113
CPU Architecture:
OS (e.g., Linux): Linux
CUDA version: 11.3
GPU models and configuration: both GPUs are Nvidia RTX A4000
TensorRT: <IP_ADDRESS>
Torch-TensorRT: torch-tensorrt for libtorch-1.10.2

The torchscript model is first loaded on the cpu (torch::kCPU) and is then move to cuda:1 via .to("cuda:1") . So the model is only loaded on cuda:1.
I currently try to work around with the convert_method_to_trt_engine & embed_engine_in_new_modul functions as you described in your blog (https://narendasan.com/posts/trtorch, btw great work 👍🏼)

hi @narendasan ,
just wanted to let you know that converting the "forward"-method of my model with torch_tensorrt::torchscript::convert_method_to_trt_engine and subsequently embed the TRTengine in a new (torchscript)-module with torch_tensorrt::torchscript::embed_engine_in_new_module is working fine and fulfills my purpose.


feat: Update access_code routes with the is_managed field

Would this a major, minor, or patch update? I'd call it minor


Completed Feedback Section

completed feedback section with both light mode and dark mode support

@GokulAbisheak can you use the color that we used in figma design for the dark mode?


[SIM121] Use ".get" instead of "if X in dict: dict[X]"

Explanation
The get(key, default_fallback=None) method of a dictionary is often overlooked. It provides a clear interface that every Python developer should know.
Example
# Bad
name = "some_default"
if "some_key" in some_dict:
    name = some_dict["some_key"]

# Good
name = some_dict.get("some_key", "some_default")

$ astpretty --no-show-offsets /dev/stdin <<< `cat example.txt`
Module(
    body=[
        Assign(
            targets=[Name(id='name', ctx=Store())],
            value=Constant(value='some_default', kind=None),
            type_comment=None,
        ),
        If(
            test=Compare(
                left=Constant(value='some_key', kind=None),
                ops=[In()],
                comparators=[Name(id='some_dict', ctx=Load())],
            ),
            body=[
                Assign(
                    targets=[Name(id='name', ctx=Store())],
                    value=Subscript(
                        value=Name(id='some_dict', ctx=Load()),
                        slice=Constant(value='some_key', kind=None),
                        ctx=Load(),
                    ),
                    type_comment=None,
                ),
            ],
            orelse=[],
        ),
    ],
    type_ignores=[],
)

Related:
if "key" in some_dict:
    for item in some_dict["key"]:

False-Positive:
if key in some_dict:
    file = some_dict[key]
else:
    ...  # anything

False-positive:
if key in some_dict:
    # other_dict["other_key"] does not exist otherwise!
    other_dict["other_key"] = some_dict['key']

I've also seen:
name = "some_default" if "some_key" not in some_dict else some_dict["some_key"]

Kind of related, but might suit a separate rule:
# bad
if key in some_dict:
  some_dict[key].append(value)
else:
  some_dict[key] = [value]

# good
from collections import defaultdict
some_dict = defaultdict(list)
some_dict[key].append(value)

+ sets, dicts as values

I've used defaultdict in the past, but in the past 1-2 years I've rather used this pattern:
# bad
if key in some_dict:
  some_dict[key].append(value)
else:
  some_dict[key] = [value]

# Good
if key not in some_dict:
  some_dict[key] = []
some_dict[key].append(value)

I think it's typically clearer than a default dictionary, especially if the dictionary is passed to other functions.

See https://github.com/MartinThoma/flake8-simplify/pull/52