Drop out of warp for random satellite out of power message

Drop out of warp for random satellite out of power message is hard to manage as you get more sats.  with just a small comms constellation I have to spam KCT button presses to get to the next warp to item.

I think these should default off.

I think you can change the default behavior in the game settings, I can't do anything (config wise) about it.


MBL-1168: PKCE class

📲 What
Class that generates code verifiers and challenges for PKCE exchange, take a look at the RFC Proof Key for Code Exchange by OAuth Public Clients
🤔 Why

Generate a code verifier and a code_challenge, the code_challenge will be sent to the (authorization endpoint) on following tickets

🛠 How

Take a look at the RFC Proof Key for Code Exchange by OAuth Public Clients 4.1 for the code verifier
Take a look at the RFC  Proof Key for Code Exchange by OAuth Public Clients 4.2 for the code challenge

👀 See

No user facing changes

|  |  |
📋 QA
You can use this website to generate encypted codeChallenges from codeVerifiers, and play around with the unit tests
Story 📖
MBL-1168

Codecov Report
Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (b9634bf) 73.91% compared to head (bbc1e24) 73.90%.

Files
Patch %
Lines

...in/java/com/kickstarter/libs/utils/CodeVerifier.kt
65.85%
13 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1943      +/-   ##
============================================
- Coverage     73.91%   73.90%   -0.02%
- Complexity     1969     1971       +2
============================================
  Files           341      342       +1
  Lines         19707    19748      +41
  Branches       2744     2753       +9
============================================
+ Hits          14566    14594      +28
- Misses         3528     3541      +13
  Partials       1613     1613

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Stimslack is gonna flip. Used to be, you had to beg your private channel buddies to like and subscribe to your decks merely to make more.


Rename REAMDE.md to README.md

The spelling mistake may cause unnecessary errors during path access code.

Addressed at [#1] https://github.com/satwantrana/iitd-tools/pull/1


Some TiFlash ci test using a k8s cluster that no one maintains

Some TiFlash ci (for example tiflash_schrodinger_test )using a k8s cluster that no one maintains , and the cluster is only a machine node with a k8s kind mode cluster.
I think we should migrate the ci to our k8s cluster managed unified and destroy the wandering and helpless k8s kind mode cluster.

new ci url https://ci.pingcap.net/view/tiflash/


Fixing deploy/k8s/deploy.sh and deploy/k8s/deploy-local.sh

Description
Fix shell check linter for deploy/k8s/deploy.sh and deploy/k8s/deploy-local.sh
Checklist

[ ] Investigated and inspected CI test results
[ ] Unit test and regression tests added
[ ] Evaluated and added CHANGELOG entry if required
[ ] Determined and documented upgrade steps
[ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)

If any of these don't apply, please comment below.
Testing Performed
$ shellcheck myscript
No issues detected!

/ok-to-test

I would like the PR description to be filled out according to the template to understand why these changes are proposed and how they were tested.

Updated in description

I would like the PR description to be filled out according to the template to understand why these changes are proposed and how they were tested.

Updated in description

Thanks for updating, but the contents of the description is not correct. The checkboxes are set in places where they should not be (there is no change in the docs, no change in the changelog, no tests are added in this PR). Moreover, the tests performed shellcheck myscript are not reproducible by someone who does not have the myscript file.
Could you maybe please try again editing the PR description so that all the readers would know what your PR contributes and how we can verify that the contribution is safe to be merged?

I would like the PR description to be filled out according to the template to understand why these changes are proposed and how they were tested.

Updated in description

Thanks for updating, but the contents of the description is not correct. The checkboxes are set in places where they should not be (there is no change in the docs, no change in the changelog, no tests are added in this PR). Moreover, the tests performed shellcheck myscript are not reproducible by someone who does not have the myscript file.
Could you maybe please try again editing the PR description so that all the readers would know what your PR contributes and how we can verify that the contribution is safe to be merged?

Done

@vikin91 PTAL

I think this is now in good shape. Thanks for improving and addressing my feedback.

Thank you, please merge this PR


Maximize index usage for predicates containing conjunctions

When a QScript filter predicate contains a top-level conjunction, use indexed queries for as many of the predicates as possible, pushing the rest to a post-filter of the indexed search.

The new Mongo branch has a MapFuncCore.flattenAnd function that is FreeMap => NonEmptyList[FreeMap], which should help with this and #2425.


Adding code cell after non-runnable code cell creates a runnable cell

Issue Type: Bug

Create a notebook extension in which code cells are set runnable or not runnable when a notebook is opened, based on the language mode of the stored cells.
Click the +Code button after a non-runnable cell.
Observe that the new cell has the same language mode :+1: but it is runnable :-1:

VS Code version: Code - Insiders 1.53.0-insider (8490d3dde47c57ba65ec40dd192d014fd2113496, 2021-02-03T15:53:41.416Z)
OS version: Windows_NT x64 10.0.19042

In contrast, metadata,breakpointMargin does get carried forward to the new code cell :+1:

Contrast this with what copy+paste does with metadata
https://github.com/microsoft/vscode/issues/103881#issuecomment-673752304

I think this would have been based on the cellRunnable property and require the extension to jump in and fix up runnable, but all of this has been deleted and the runnability is now inferred based on kernel+language, so it should be good now.


Evaluate Shortcode support

Feature Description
Some users might not be using Gutenberg, but are instead using a page builder like Divi or Elementor that doesn't support blocks. Should we be adding shortcodes for those cases?
Alternatives Considered
Focus on Gutenberg blocks only.
Additional Context
Support request for this: #3086

Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance Criteria

Implementation Brief

This should be pretty simply if we have the different render type working. It would be a matter of taking url param and rendering like the block.

Increasing the priority of this ticket given the popularity of this request (top requested feature during the Beta period)

Is "none" an option? 🙂  Because that's what I would strongly vote on.
We have to differentiate the context of all these requests a bit. Most of the time they want integrations with their page builder.
Shortcodes themselves are a dying feature in WordPress. Blocks are the way to go. So it doesn't really make sense to bet on this horse.
Integrations with page builders are a different beast, and should be something to tackle as part of our ecosystem work.

@swissspidy I think that integrations with page builders makes a ton of sense to start, and deprioritize shortcode.
Is there a workaround we can provide to users so they can get around this (some generic embedding mechanism that doesn't require them waiting for per-page builder effort?)

@o-fernandez So, I was considering just pointing users to use <amp-story-player> markup directly as shown in the docs, but I've come to the realization that this wouldn't get them good results out of the box:

Issues with AMP validation when using the AMP plugin
No built-in responsiveness
Difficult to work with due to usage of CSS custom properties and requiring loading external assets

Then, I thought about just writing a simple shortcode mini-plugin for some users to install on their site. At that point I realized we could just as well incorporate it in the plugin, even if I'm not super fond of it — but it's better for the users.
I suggest for WP pod to tackle shortcode support for the next sprint.
It should be super easy to add.

Thanks for thinking through the options, this makes sense to me. @choumx FYI and for consideration.

"Super easy to add" SGTM. :)
If it takes longer than a couple days of work, then we should consider doing a quick cost-benefit analysis WRT number of impacted users.

@spacedmonkey I added an IB in ticket above with an estimate. Curious to hear your feedback on it. Anything I missed? Feel free to adjust directly.

@swissspidy This should be extremely simple. Much of the logic in Embed_Block could be reused. In fact I believe that render_block could even be used for the add_shortcode callback.
The biggest piece of work here, is moving the code around and making it a little bit more generic to make it reuable.
Maybe much of the logic for Embed_Block could be moved to a new called Embed and Embed_Block and Embed_Shortcode could extend that.

Related: https://github.com/google/web-stories-wp/pull/4671

If it takes longer than a couple days of work, then we should consider doing a quick cost-benefit analysis WRT number of impacted users.

tl;dr: The implementation of the shortcode(s) is super quick, but it requires some overdue/necessary refactoring on the PHP side. That refactoring would also need to happen once we start adding more blocks.


fix(challenge): modify regex in increment a number challenge

Pre-Submission Checklist

[x] Your pull request targets the staging branch of freeCodeCamp.
[x] Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
[x] You have only one commit (if not, squash them into one commit).
[x] All new and existing tests pass the command npm test. Use git commit --amend to amend any fixes.

Type of Change

[x] Small bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds new functionality)
[ ] Breaking change (fix or feature that would change existing functionality)
[ ] Add new translation (feature adding new translations)

Checklist:

[x] Tested changes locally.
[x] Closes currently open issue (replace XXXX with an issue no): Closes #14026

Description

A camper reported this issue, #14026, and I had a feeling this was a regex issue related to tail. Which indeed it was, the original regex for the test was still matching the code in the tail, causing a false negative in the test. Made the regex a bit more strict to only match the line of code we are looking for and not the tail.

Just tested this. Works on my end.

@Manish-Giri nice, thanks!

Tested locally and LGTM! Thanks @no-stack-dub-sack 👍 🌮 🦅


Console logger

Basic console logger which provides fluid internal logging.
https://dev.azure.com/fluidframework/internal/_workitems/edit/2263

The change looks good to me 😄
As part of this PR, should we add this logger in as of the examples?

You can also link ADO ticket number as part of the description:
AB#2263

this shouldn't be necessary. we already include the a debug logger by default which support logging to the console: https://www.npmjs.com/package/debug
just set the env var DEBUG="fluid*"

i think we should use the existing debug logger instead of adding this

@anthony-murphy , we provide this option to developers. The reason why we are adding this is to be able to showcase ITelemetryBaseLogger implementation since that's the primary way that developers will consumer our logs for the own means.
This is a showcase/teaching tool :)

i think we should use the existing debug logger instead of adding this

@anthony-murphy , we provide this option to developers. The reason why we are adding this is to be able to showcase ITelemetryBaseLogger implementation since that's the primary way that developers will consumer our logs for the own means.
This is a showcase/teaching tool :)

I'd rather see us productize the application insight logger, then check in a toy implementation of a logger that is also a bad practice.


Fix non-relative pathname detection

When composing a style from a CSS file in a scoped module, the hook would previously not detect that this was not a relative path due to it starting with @.
A quick trip to StackOverflow later, I think this updated regex will now correctly detect all non-relative paths.

Yes please, merge this. Just ran in to the same problem and found the very same issue

Oh, sorry guys, didn't noticed it. Anyways published it in 4.0.2.
Thank you for your efford!

Great, and thank you @dallonf for providing a good solution


Remove experimental status tag and references to experimental status on website

Removes the experimental status tag from all docs that use it, it's associated content and references to the experimental status in the tag component and the develop a component or pattern guidance page.
Closes https://github.com/alphagov/govuk-design-system/issues/3194. More details in issue.
Extra thoughts
There's a reference to stuff being marked as experimental on the contribution criteria page:

Components and patterns which are not proven usable can be published as experimental. But they must be clearly based on relevant user research from other organisations and best practice, and meet the other criteria.

Should we remove it?
Is removing the reference to the Tag being experimental the right move?

Do we also need to remove it from line 80 of contribution-criteria/index.md?

I totally agree.
Maybe instead of

Components and patterns which are not proven usable can be published as experimental. But they must be clearly based on relevant user research from other organisations and best practice, and meet the other criteria.

we say

Components and patterns which have not yet been proven usable can be published, but they must be clearly based on relevant user research from other organisations, best practice, and meet the other criteria.

Perhaps we can also include a line about the new research guidance.

We also encourage service teams to share findings about users to support contributions.

I think the issue is that being 'usable' or not isn't binary - it's always specific to a context.
So I'd say something like -
'You can submit a pattern or component as long as you've established that it works in your service. We'll make a judgement about whether it's likely to work in other contexts. And if we publish the pattern or component, we'll be clear about what contexts it's been tried in - and invite feedback about how well it works in different contexts.'
But obviously with less repetition of the word 'context'.

I've drafted something based on the above suggestions:

If there isn't a evidence of usability outside of one or a small number of services, the component or pattern can still be published if it meets other contribution criteria. We will be clear about what contexts the component or pattern has been tested in upon publishing and invite feedback about its performance in a wide range of services.

What do we think?
One thing I'm a little concerned about is that this clashes with one of the other criteria: versatile:

The implementation is versatile enough that the component or pattern can be used in a range of different services that may need it.

Reading this back, it sorta feels like these two criteria have always contradicted one another. I'm wondering if the context of where it's been tested is the right approach over outlining gaps in testing.

@owenatgov I'm super happy with:

If there isn't evidence of usability outside of one or a small number of services, the component or pattern can still be published if it meets other contribution criteria. We will be clear about what contexts the component or pattern has been tested in upon publishing and invite feedback about its performance in a wide range of services.

(I removed a rogue 'a' before evidence)
On the second point I'm not sure it is meant to contradict. I think what we are trying to get at is, there's an option for things to be published untested if we have good reason to believe that they will be useful and useable in a range of different services once available.


Add missing declaration statement.

Description

This PR adds a missing declaration statement for a logical variable used in MAPL_GenericFinalize(), fixing a bug which prevented MAPL from building when preprocessor macro H5_HAVE_PARALLEL is not defined (e.g. when building with serial NetCDF).
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Trivial change (affects only documentation or cleanup)

Checklist:

[ ] I have tested this change with a run of GEOSgcm (if non-trivial)
[x] I have added one of the required labels (0 diff, 0 diff trivial, 0 diff structural, non 0-diff)
[ ] I have updated the CHANGELOG.md accordingly following the style of Keep a Changelog

Ugh.
Per this page:
https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
I think I can undo the need for secrets on GitHub Actions at least. That way @rmontuoro could pull that PR.

Ugh.
Per this page:
https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
I think I can undo the need for secrets on GitHub Actions at least. That way @rmontuoro could pull that PR.

Wait...huh. the GCM build failed for a weird reason. Let me investigate.

Wait...huh. the GCM build failed for a weird reason. Let me investigate.

Okay. The CI issue more complicated than I think. I'll need to do some tests myself on a fork of my own as it'll be some subtle CircleCI to fix that side.
For now, I'll approve this as it's obviously correct and use superpowers to pull this in (with @tclune 's approval).

Okay. The CI issue more complicated than I think. I'll need to do some tests myself on a fork of my own as it'll be some subtle CircleCI to fix that side.
For now, I'll approve this as it's obviously correct and use superpowers to pull this in (with @tclune 's approval).


Integration tests do not pass for Opensearch 2.14

e2e tests failed in the upgrade PR https://github.com/jaegertracing/jaeger/pull/5606.
https://github.com/jaegertracing/jaeger/actions/runs/9503609365/job/26194416863?pr=5606
The logs show that the image was downloaded and "started", but then the CI script is not able to ping the server, and  for some reason the final step of printing container logs produces nothing.
Best way to fix is to run that specific workflow manually to reproduce and debug, e.g.
bash scripts/es-integration-test.sh opensearch 2.x 1v1

i don't think there is any issue with integration test

when i build the docker compose with version 2.14.0 it gave me logs
No custom admin password found. Please provide a password via the environment variable OPENSEARCH_INITIAL_ADMIN_PASSWORD.
I will create pr adding the var in few minutes


test: dynamically assign single AWS zone to SingleReplica guest clusters

Currently, we create test clusters with NodePools and AWS networking infra in all zones specified in the --e2e.availability-zones flag.
However, all test clusters are currently InfrastructureAvailabilityPolicy: SingleReplica and can operate on 2 workers in a single zone.
Limiting the test cluster to a single zone prevents a considerable number of AWS resources from being created, particularly NAT gateways.
This PR uses --e2e.availability-zones as a bank zones to which test clusters can be assigned and created.  It also removes the -e2e.node-pool-replicas flag from the e2e binary and allows each test to control this.
Tests default to running InfrastructureAvailabilityPolicy: SingleReplica with 2 workers in a single assigned zone.  TestCreateCluster exercises  InfrastructureAvailabilityPolicy: HighlyAvailable guest clusters, which we have not exercised in e2e up until now.

/retest-required

/retest-required

/retest-required

/lgtm
/hold

/test e2e-kubevirt-aws-ovn

/test kubevirt-e2e-kubevirt-aws-ovn

/lgtm

/hold cancel

/lgtm


Throw redirect in beforeLoad doesn't work on bun production bundle

Which project does this relate to?
Start
Describe the bug
When using bun, on a production build redirect doesn't work at least on beforeLoad (it correctly works using vinxi dev).
Your Example Website or App
https://github.com/TanStack/router/tree/main/examples/react/start-basic
Steps to Reproduce the Bug or Issue

Using the starts-basic example. Add preset: "bun" on app.config.ts
Run bun run build
Run bun run .output/server/index.mjs
Navigate to /redirect
White screen will show. No errors showing

Expected behavior
It should navigate to /posts
Screenshots or Videos
No response
Platform

OS: Windows and MacOS
Browser: Edge
Version: 131.0.2903.51

Additional context
No response

Sorry I cannot provide a full repro in StackBlitz but as far as I know, they don't support bun

does this only occur with bun?

Yes, only on bun on production. Basically I tested these scenarios:

Bun (dev mode): works
Bun (prod mode): fails
Node (dev mode): works
Node (prod mode): works

does the build output differ depending on bun vs node?

Now that I've seen on Bun output we have a Bun.serve at the end, I'm throwing some console.logs to see if I can find more info :)

No luck so far, it seems I cannot repro the same using standalone vinxi...

After debugging a little bit more and modifying the .output/server/index.mjs file to understand what is making Bun not doing the redirect, I found changing this line:
const server = Bun.serve({
  port: process.env.NITRO_PORT || process.env.PORT || 3e3,
  websocket: void 0,
  async fetch(req, server2) {
    const url = new URL(req.url);
    let body;
    console.log(url.pathname);
    if (req.body) {
      body = await req.arrayBuffer();
    }
    const response = await nitroApp.localFetch(url.pathname + url.search, {
      host: url.hostname,
      protocol: url.protocol,
      headers: req.headers,
      method: req.method,
      redirect: req.redirect,
      body
    });

    if(response.status === 307) {
+     return new globalThis.Response(response.body, {
-      return new globalThis.Response(null, {
        ok: response.ok,
        url: response.url,
        status: response.status,
        statusText: response.statusText,
        headers: response.headers,
        redirected: response.redirected,
        bodyUsed: response.bodyUsed
      });
    }
    return response;
  }

So basically it seems something in the response body is what is making bun to not do the redirect...

Ok, seems I've found the issue.
When we do a redirect with Bun, but the body is an empty ReadableStream, bun returns and empty response with no headers or body.
I've created an issue on Bun repo: https://github.com/oven-sh/bun/issues/15320


Fix report from another workspace persists after switching workspace

Details

When switching WS, the chat from other WS still shows. This PR fix it.
Fixed Issues

$ https://github.com/Expensify/App/issues/44619
PROPOSAL: https://github.com/Expensify/App/issues/44619#issuecomment-2198028748
Tests

Same as QA Steps

[x] Verify that no errors appear in the JS console

Offline tests

Same as QA Steps
QA Steps

Prerequisite: have at least 2 workspaces
(web/desktop)

Open the first workspace chat (#admins, #announce, etc.)
Open the workspace switcher page
Switch to the second workspace
Verify the first workspace chat doesn't show anymore

(android/iOS/mWeb)
can't switch WS while a report is shown, so just make sure the WS switching still works

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

https://github.com/Expensify/App/assets/50919443/6bae5de4-4472-4abb-81f6-182be9be9957

Android: mWeb Chrome

https://github.com/Expensify/App/assets/50919443/85f3b421-df19-4d65-8c55-01eaa77ea88e

iOS: Native

https://github.com/Expensify/App/assets/50919443/0ebded67-763d-493a-a61c-251f53d3b245

iOS: mWeb Safari

https://github.com/Expensify/App/assets/50919443/ac5320b7-54b4-4cb0-bc20-aa94dc1f66c1

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/50919443/b515ee56-8d0a-4c40-8bae-dc53675de19f

MacOS: Desktop

https://github.com/Expensify/App/assets/50919443/925f6cc8-3777-4fe1-bdfe-9fe190a87f43

Reviewer Checklist

[ ] I have verified the author checklist is complete (all boxes are checked off).
[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[ ] I checked that screenshots or videos are included for tests on all platforms
[ ] I included screenshots or videos for tests on all platforms
[ ] I verified tests pass on all platforms & I tested again on:

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

[ ] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[ ] I verified proper code patterns were followed (see Reviewing the code)

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[ ] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[ ] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[ ] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[ ] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I verified that this PR follows the guidelines as stated in the Review Guidelines
[ ] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

[ ] A similar component doesn't exist in the codebase
[ ] All props are defined accurately and each prop has a /** comment above it */
[ ] The file is named correctly
[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[ ] The only data being stored in the state is data necessary for rendering and nothing else
[ ] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[ ] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[ ] All JSX used for rendering exists in the render method
[ ] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[ ] If any new file was added I verified that:

[ ] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[ ] If a new CSS style is added I verified that:

[ ] A similar style doesn't already exist
[ ] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[ ] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[ ] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[ ] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[ ] I verified that all the inputs inside a form are aligned with each other.
[ ] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[ ] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[ ] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

These changes fail the Tests in #44559
https://github.com/Expensify/App/assets/102477862/fa87b3eb-2b76-4a49-beda-6027fcfff8a1
cc: @bernhardoj @pecanoro @jasperhuangg @roryabraham

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Cherry-picked to staging by https://github.com/jasperhuangg in version: 9.0.3-6 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.3-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


apps/ocsp: Add check for OPENSSL_strdup

Just assert 'bn' to be non-NULL is not enough.
The check for 'itmp' is still needed.
If 'bn' is 0, the 'itmp' is assigned by OPENSSL_strdup().
Since OPENSSL_strdup() may fail because of the lack of memory,
the 'itmp' will be NULL and be an valid parameter hashed in
TXT_DB_get_by_index(), returning a wrong result.
Signed-off-by: Jiasheng Jiang<EMAIL_ADDRESS>
Checklist

[ ] documentation is added or updated
[ ] tests are added or updated

This pull request is ready to merge

Merged to master and 3.0 branches. Thank you for your contribution.


Install via homebrew

Building is annoying for users.

Now, we can install via Homebrew.
https://github.com/Mic-U/homebrew-ecsher


Label pulls when dev/deploy_blocked

When a pull is dev_blocked, add a label "Dev Block" to it. When the dev_block is removed, remove the label. Do the same thing with deploy_block.

Difficulty scope me!

Closed in favour of #7.


Update instructions to run using the correct image name

After following the instructions to set up docker(on my Mac), seems like the second instruction to run the image is using the wrong image name,
docker run -i -t --mount type=bind,source="/$(pwd)"/../ebook,target=/home/jupyteruser/ebook -p8888:8888 ppenv
It should be pp.ebook:latest not ppenv.

Thanks. You're on it. Cleaned this up with latest commit and removed --allow-root from jupyter line.


Maybe try dual screen?

I add a old screen with display resolution(1280 * 1024) by HDMI of laptop. The laptop's screen is 1920 * 1080, the layout is that:

Adding the config to i3 file:
exec --no-startup-id xrandr --output HDMI1 --primary --mode 1280x1024 --pos 0x0 --rotate normal --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 1280x0 --rotate normal

so the vice screen and main screen have their own workspace individually(like that: vice screen at workspace 1 and main screen at workspace 2).
One of my questions is whether i can have the two screens all at one workspace?
Another question is how to let the polybar show on the two screens simultaneously.

That is my screens. Obviously the left screen has no bar.
By the way, the background wallpaper is tiling on two windows rather than tiling on a window one by one. Is any way to fix these?

I set nitrogen config file to make wallpaper zoom well. Now just the previous two questions.

Hello sir! Sorry for the (very) late response.
For your first question I suspect that you mean have for example Workspace A to extend from the first monitor to the second. I don't really know if it is possible at all on i3 , and I haven't really encountered a setup like this in the past so I don't know how to help with that :(
For the second question - if you want the same exact polybar  (not extend - just duplicate) I think the right way to do this is to copy the configuration for the first bar into a configuration for a second bar (exact same configuration - but set the monitor option to the value of the other monitor) and restart the polybar. This should (normally) cause the bar to duplicate into the second monitor.
I would suggest that you take a look at the polybar wiki (https://github.com/polybar/polybar/wiki/Configuration) , might be more enlightening.


[BUG] user_followers gets an only 249 items

Hello!
mb something with pagination
instagrapi==1.17.6
cl.user_followers(inst_pk)
cl.user_followers(inst_pk, False, amount=2000)

try cl.user_followers_gql

the same:
user_followers = self.cl.user_followers_gql(inst_pk)
logging.info(len(user_followers))
2023-05-05  [INFO ]  249

@zhito show inst_pk

Same here. These functions return only 288 followers, even though there ought to be over 40k.
User id is:<PHONE_NUMBER>9.

@zhito @mdczaplicki
Unfortunately, I don’t have time to look for reasons in instgrapi right now, but it also works on Lamadava on it and everything looks ok:

Number of returned items varies. Now (after some time) it returns 300 records. Consecutive requests return empty list.
In [2]: followers = client.user_followers_gql(45600199849)

In [3]: len(followers)
Out[3]: 300

In [4]:

In [4]: followers = client.user_followers_gql(45600199849, 500)

In [5]: len(followers)
Out[5]: 0

In [6]: followers = client.user_followers_gql(45600199849, amount=500)

In [7]: len(followers)
Out[7]: 0

I think I have read about this before. There it was thought to be some limit from Instagram's side.

Same here. These functions return only 288 followers, even though there ought to be over 40k.
User id is:<PHONE_NUMBER>9.

Yes, I have same problem, but now i use cl.user_followers_v1(inst_pk, amount=2000) and I can get latest 2k followers, but with cl.user_followers_gql(inst_pk), i get just 300 followers :/

the same: user_followers = self.cl.user_followers_gql(inst_pk) logging.info(len(user_followers)) 2023-05-05 [INFO ] 249

I'm trying to do the same (looping into a follower list and saving public info like number of media, followers etc) but I have two questions:
-doest instagram blocks you after retrieving just 249 items? If it doesn't, will you be able to retrieve the others running the code in another moment?

I managed to fetch over 10k followers (then I stopped the script) using Ensta.
Installation
pip install ensta

This is how to fetch follower list:
from ensta import Host, NewSessionID

sessionid = NewSessionID("username", "password")

host = Host(sessionid)
followers = host.followers("melon_owe")

for user in followers:
    print(user.username)  # access any data

Check out ensta's github repo for more...

Have you found any solution to this issue? I have the same problem.

Use Ensta.
I already gave the solution a month ago, but it was deleted by the repository owner.

Same here. 243 followers and then error 'Wait a few minutes before try again', despite I am using [30,45] random time between requests.

Using Ensta, I managed to fetch 2,000 followers, then I stopped the program.
I already gave the solution a month ago, but it was deleted by the repository owner.
Install Ensta by running: pip install ensta --upgrade
Here's the code to fetch followers:
from ensta import AutoHost

host = AutoHost(username, password, file="session.txt")
followers = host.followers("cristiano")

for user in followers:
    if user is None:
        print("Something went wrong.")
    else:
        print(user.username)

It doesn't work, if you use what you say or the same example from the ENSTA documentation, the number of followers seems to be random, each time it is executed it returns different and repeated followers.


Grand Unification

This repository could be (and should be) turned into a workspace with the following crates:

dkn-p2p-client that handles all P2P connections
dkn-model-client that handles Workflow execution, and model configurations & service checks
dkn-oracle-node that handles LLM oracle executions, uses (2)
dkn-compute-node that handles DKN tasks, uses (1) and (2)
dkn-node-launcher that basically takes care of configurations, envs, and updates; this shall be the only executable released & downloaded, the choice of node should come with a command line argument as it does in Oracle

(1) is required to share the P2P logic tht we keep copy-pasting around from a single source, will be useful for RPC
(2) is required to share the model logic between compute, oracle and even launcher maybe, again will help us avoid copy-pasting all the time
(5) is required because Oracle node needs a launcher logic as well, and using clap we can "connect" the underlying CLIs together, e.g dkn-oracle foobar becomes dkn oracle foobar

Note that Ollama Workflows will be re-exported from dkn-model-client, so if there is an update there we only need to update the version within dkn-model-client only!

Closing, oracle and launcher may come in a later date but the #127 works fine!

🆙


Support for .jscad files

The gear example was created by calling:
npm run build-jscad<EMAIL_ADDRESS>


New account login issue

Hi,
I'm using npm to create a bot and followed an example code from the repo.
My bot code is as follows: (mybot.js)
const { Wechaty } = require('wechaty')
const QrcodeTerminal  = require('qrcode-terminal')
const bot = Wechaty.instance()

bot.on('scan', (url, code) => {
  if (!/201|200/.test(String(code))) {
    const loginUrl = url.replace(/\/qrcode\//, '/l/')
    QrcodeTerminal.generate(loginUrl)
  }
  console.log('${url}\n[${code}] Scan QR Code in above url to login: ')
});
bot.on('login', user => console.log('User ${user} logined'))
bot.on('message', message => console.log('Message: ${message}'))
bot.on("error", (e) => console.log('Error: ${e}'))
bot.init()

On running the bot code I get the following logs:
mahesh@Mahesh-Gosemath:~/code/wechaty$ node mybot.js
09:11:14 INFO Wechaty v0.10.13 initializing...
09:11:14 INFO PuppetWebBridge init() initBrowser() down
09:11:15 INFO PuppetWebBridge initPage() before page.goto(domain)
09:11:22 INFO PuppetWebBridge initPage() after page.goto(domain)
09:11:22 INFO PuppetWebBridge init() initPage() down
https://login.weixin.qq.com/qrcode/4aT0xMjs_Q==
[0] Scan QR Code in above url to login:

On scanning the QR code I get the following message:
https://login.weixin.qq.com/qrcode/4aT0xMjs_Q==
[201] Scan QR Code in above url to login:

As per documentation code 201 means the QR code is scanned and it is waiting for confirmation.
But the shell keeps waiting infinitely. It never enters the login event.
I tried logging on https://web.wechat.com/ by scanning code, though the code was scanned successfully it didn't log me in with the following message:

For account security, newly registered WeChat accounts are unable to log in to Web WeChat. To use WeChat on a computer, use Windows WeChat or Mac WeChat at http://wechat.com

Is there any relation between the wechat login message and wechaty waiting for confirmation?
Can't we use wechaty for wechat with new accounts?
NodeJs version I'm using is: 6.11.4
mahesh@Mahesh-Gosemath:~/code/wechaty$ node --version
v6.11.4

Hello, thanks for using Wechaty.
Your issue is related to the latest policy changing from Tencent: Newly created Wechat Account will not be able to login via Web Wechat anymore. Wechaty is using the Web API of Wechat, which means newly created account will not use Wechaty to log in.
The solution will be:

use a Wechat Account that registered before Jun 2017.
wait for Wechaty to support PuppetWine/PuppetAndroid(currently still in prototype stage)

Sorry to tell you that.
Also see: #603

BTW: could you please to post the HTML Source Code of the page when you get the For account security, newly registered WeChat accounts are unable to log in to Web WeChat. To use WeChat on a computer, use Windows WeChat or Mac WeChat at http://wechat.com error message?
I need this source code because I think it's better to emit an error message for the user to show this message instead of just saw a useless login message.

The alert appears after the following API is called and it response it returns is blank.
Link

Thanks. I understand that this is an alert window.
Could you find a Wechat Account that registered before Jun 2017?

It was working normally with me for 4 days with many logins (50+ maybe)
all of a sudden it refused to login with this error....
I haven't changed anything with the account and this happened :(
@xinbenlv have any ideas if we can use OS X app cookies with it?
Thanks

HTTP/1.1 200 OK
Content-Type: text/plain;charset=utf-8
Transfer-Encoding: chunked
Connection: Keep-alive
1203For account security, newly registered WeChat accounts are unable to log in to Web WeChat. To use WeChat on a computer, use Windows WeChat or Mac WeChat at http://wechat.com

@seifhatem thank you!

@zixia the same issue, bug my account registered in 2013

No I couldn’t find an account before Jun 2017

@zixia my account is definitely before 2017. Have same issue.
It works for me 3 days ago.
I am located at US

I have an account is registered after June 2017, the previous test can not log on the web, but the first two days can suddenly log in, but less than 3 days to be banned landing web again.

@zixia the same issue, but my account registered before 2016
BTW: i can login https://web.wechat.com/

What's your version? Please post the full log as required.

Any solution yet?

@baselbers , I haven't found any, so i had to give up and install the wechat app on a phone man. I was trying to avoid that, hopefully one day these guys would provide us with a fix or solution.

@zixia I am running into the same problem described here. How is that wait for Wechaty to support PuppetWine/PuppetAndroid(currently still in prototype stage) going to solve the problem? And is this now available?

@nsorrors yes, it's now available.
Currently it's in alpha stage, learn more at #1296

Wechaty v0.15 Can Resolve This Login Issue
If you are expericing this New Account Login Issue with Web API, and still want to use Wechaty as your ChatBot SDK, you are luck from now because we have a branding new PuppetPadchat that can let you login your new account without any problem.
Start from Wechaty v0.15, we enable new Puppet System with all protocols support, include but not limited to: Android, iOS, Pad, Win32, Web.
Learn more at:

Wechaty v0.15 Alpha Testing - https://github.com/Chatie/wechaty/issues/1296
PuppetPadchat - https://github.com/lijiarui/wechaty-puppet-padchat

Cool

My account is created before 2017, still, I cannot login from the webui

The accounts that created before 2017 will have high probabilities to be able to login via web, but not guaranteed.

Why do you need to open wechat payment to continue the operation.

Update Jan 2022
UOS has been disabled. See

https://github.com/wechaty/getting-started/issues/242

郁闷

Update: recommend using Wechaty Puppet XP
It seems that the UOS patch has no solution to be enabled again. (If anyone has a solution, please submit a PR)
So for users who need a free Wechaty Puppet Provider (WPP), we are suggesting that you can try the Wechaty Puppet XP which is a free WPP based on the Windows WeChat Client.
I will lock this thread for now. Please file a new issue if there's any need.
Merge to:

https://github.com/wechaty/puppet-wechat/issues/192


Restore Token To new VPS/Server

I created a token on a shared online VPS. I have been minting some tokens and so forth.
Question I have is how do I restore this token using my private keys onto a new server if I was to move this server to continue my minting?
Been looking through the SPL commands and see no restore token or wallet. so not entirely sure how I would go about restoring my token/wallet onto a new server.

Hi there, we don't use GitHub for support, and invite you to join us at #developer-support on Discord https://discord.gg/solana
Most likely, everything is using the default keypair stored at ~/.config/solana/id.json, so you'll just need to move that over.  You can double-check by running solana-keygen pubkey and comparing that against the mint authority for your token.
More info at https://docs.solana.com/wallet-guide/file-system-wallet and by running solana config get and seeing what the keypair is


Json output not reflect relations between problem notes and suggestion

Hello Sergey
JSON output is not well formatted, there is no relation between issues and notes/suggestion.
And it can't be parsed correctly because if $issue[2] is empty json element for issue not creates, and data are shifting. There is no perforating id, or something else, in issue and notes/suggestion to correlate it.
https://github.com/wapmorgan/PhpCodeFixer/blob/master/src/ScanCommand.php#L542
Thanks,
Mikhail.

Hi, first of all, thanks for Feedback.
Notes/replace suggestions are not inteded to correlate, they are independent objects.
Issues list could be used alone, without notes/RS section.

Ok =)
I just try to generate HTML report from JSON, but can't do the same output as in text, will parse it.

Right now format is described in https://github.com/wapmorgan/PhpCodeFixer#json-report-format.
I will embed notes/replace_suggestions into problems in near future.


Fix accessing illegal memory

I also needed
diff --git a/fbcode/triton/triton/lib/codegen/analysis/axes.cc b/fbcode/triton/triton/lib/codegen/analysis/axes.cc
--- a/fbcode/triton/triton/lib/codegen/analysis/axes.cc
+++ b/fbcode/triton/triton/lib/codegen/analysis/axes.cc
@@ -35,7 +35,7 @@
   unsigned current = 0;
   bool is_skewed = false;
   for(unsigned d = 0; d < res_shapes.size(); d ++){
-    bool same_shape = res_shapes[d] == op_shapes[current];
+    bool same_shape = current < op_shapes.size() && res_shapes[d] == op_shapes[current];
     // either add edge between axis or just add a node in the graph
     if(!is_skewed && same_shape)
       graph_.add_edge({i, d}, {op, current++});

to shut up the errors.

I also needed
diff --git a/fbcode/triton/triton/lib/codegen/analysis/align.cc b/fbcode/triton/triton/lib/codegen/analysis/align.cc
--- a/fbcode/triton/triton/lib/codegen/analysis/align.cc
+++ b/fbcode/triton/triton/lib/codegen/analysis/align.cc
@@ -101,7 +101,7 @@
   bool is_skewed = false;
   for(size_t d = 0; d < x_shapes.size(); d ++){
     cst_info ax ;
-    if(x_shapes[d] == 1)
+    if(x_shapes[d] == 1 && current < op_shapes.size())
       ax = {1, op_cst[current].value};
     else if (!is_skewed && current < op_shapes.size() &&
              x_shapes[d] == op_shapes[current]) {

on top of the changes in this PR

I also needed
diff --git a/fbcode/triton/triton/lib/codegen/analysis/align.cc b/fbcode/triton/triton/lib/codegen/analysis/align.cc
--- a/fbcode/triton/triton/lib/codegen/analysis/align.cc
+++ b/fbcode/triton/triton/lib/codegen/analysis/align.cc
@@ -101,7 +101,7 @@
   bool is_skewed = false;
   for(size_t d = 0; d < x_shapes.size(); d ++){
     cst_info ax ;
-    if(x_shapes[d] == 1)
+    if(x_shapes[d] == 1 && current < op_shapes.size())
       ax = {1, op_cst[current].value};
     else if (!is_skewed && current < op_shapes.size() &&
              x_shapes[d] == op_shapes[current]) {

on top of the changes in this PR

This doesn't look right to me. Do you want to say current < op_cst.size()

I guessed that op_shapes.size() and op_cst.size()` are always equal (which explains why your initial patch is sufficient). It seems to work empirically.

I guessed that op_shapes.size() and op_cst.size()` are always equal (which explains why your initial patch is sufficient). It seems to work empirically.

Got you. Thanks for your review.
May I know if you would prefer these kind of problems to be completely resolved or you are ok with it now and wait for the new backend to be released?

We can patch it in our local copy of Triton until the new backend is out.

Thanks for letting me know. Requested changes have been added to this PR.

Will run some more internal tests and merge if it all looks ok!

we can wait for the new backend, but can you please compile and test the new backend in the debug mode? Out of bounds vector accesses are easy to catch this way.

@ngimel Sure. In addition, we also plan to apply static and dynamic code analyzers on the code to catch and fix potential problems.


Add static analyzers

This PR adds Roslyn code analyzers (a bit like FxCop of old) that run at build time. It also fixes various issues identified by them including:

Redundant methods caused by changes to IStatsDPublisher over time.
Changes methods that don't use instance data to be static.
Makes the internal DisposableTimer class sealed.
Fixes an incorrectly setup exception for parameter validation.
Uses Array.Empty<T>() to save an allocation in target frameworks that support it.
Specifies ConfigureAwait(false) when awaiting tasks.

This PR will probably need rebasing after #117, #118 and #125.


HSEARCH-4801 Bump maven-javadoc-plugin from 3.4.1 to 3.5.0

https://hibernate.atlassian.net/browse/HSEARCH-4801
I've checked if our property collection "plugin" still works with this Javadoc plugin update, and it seems it does. What... I can't say about the ORM version (probably not related to the Javadoc plugin) - https://docs.jboss.org/hibernate/orm/6.2/userguide/html_single/Hibernate_User_Guide.html#_list_of_all_available_configuration_properties (makes me sad 😭)

Failure is unrelated: https://hibernate.atlassian.net/browse/HSEARCH-4804
Merging, thanks


Update l2 packet api client to support upstream api changes for switching to mixed hybrid

Issue:  The packet l2 client does not seem to change a Packet machines network type from Layer-3 to Mixed-Hybrid.
The client is being run from the ansible role.  A "changed" response is returned from Ansible.  VLANs are created if they do not exist or existing VLANs are used as exepected.  The network type of a Machine does not get changed though.
Acceptance Criteria:

[ ] A machines network type should change from Layer-3 to Hybrid when the client runs against that machine

[ ] client running directly from cli works as expected
[ ] Using the packet_l2 ansible role works as expected

Thank you for the debug log, that is proving useful to isolate the issue.

On Feb 11th, @vielmetti said:

Our ticket regarding “Project API keys not allowed to use /ports” is in progress. Typically this might mean a release this week, but not guaranteed. I’ll advise when the ticket is reported closed.

Sounds great.  Thanks for the update @vielmetti.
Let us know if there is anything we can help with.

Project key did not work during the week of April 1st

@Taylor - the issue internal to Packet that is tracking this issue is marked as "done". It's still open here. At your convenience if you can help test or retest this and see what the real state of affairs is, I'll confirm or reopen that issue.

I can confirm project keys are able to make network changes on the packet hosts as I have done all my testing with a project key (specifically for those with project access, fredkey1)

Thanks @linkous8  - based on that I think this issue can be closed @taylor


net: icmpv4: Zephyr drops valid echo request

Zephyr drops echo request with valid checksum. Zephyr must respond to valid echo request.
icmpv4-valid-chksum2.pcap.gz
icmpv4-valid-chksum1.pcap.gz

@tbursztyka I tried PR #14200, now echo server replies to ping, but the response has wrong id and  seq numbers. So wireshark marks request as "No response seen"
icmpv4-valid-chksum1-pr14200.pcap.gz

@rmstoi previous echo reply build was cloning the original packet, as the un-existing ipv4 options made it assume ipv4 hdr is always same which is not. I modify the echo reply build to it only copies the payload from original packet, but builts ipv4/icmpv4 hdr properly. Should be fine now. (I quickly tried and no complaints from ws)

@tbursztyka works like charm. Thanks!


chore: update CI action versions

And link Node’s version to the one in repo

@mxdvl Thanks for your PR! Currently the CI is failing on all kinds of Prettier warnings. Are these a side effect of your changes?

It must be, somehow, but I'm not sure why… ☹

node_modules/.bin/prettier --write . edits a bunch of files here when I check out your branch, @mxdvl

I'm okay with the changes Prettier suggests. As long as the codebase is consistent. Can we let Prettier just fix them?

Also I wonder if this PR will run into the same ssh/https trouble as seen here: https://github.com/Wakamai-Fondue/wakamai-fondue-site/actions/runs/11230829820/job/31218950314?pr=185
I'm trying to fix that here: https://github.com/Wakamai-Fondue/wakamai-fondue-site/pull/187 The problem is apparently that we used to load the Engine dependency over ssh while developing it before making everything public. Since the repo is public now we can just load it over https instead of ssh. My commit there seems to fix that particular error, now stranding on another. Oh well, diving into that one now!

node_modules/.bin/prettier --write . edits a bunch of files here when I check out your branch, @mxdvl

I'm okay with the changes Prettier suggests. As long as the codebase is consistent. Can we let Prettier just fix them?

Thanks both, have done so in 4a95abdccefd2e268a6b0eba7baca55f84f8a63b

@mxdvl I get the error
npm ERR! Missing script: "lint:check"

Is that something that you added but didn't commit?

Oh I just noticed https://github.com/Wakamai-Fondue/wakamai-fondue-engine/pull/66 which might be relevant?

Making progress! \o/
I see it now complains about filenames, which could be fixed by cherry-picking https://github.com/Wakamai-Fondue/wakamai-fondue-site/pull/187/commits/5a9bdec33e987c5ad94f5c8ca86c4e8a7f153fb8 where @Ryuno-Ki addressed this. Let's do this, and then when this PR is green, rebase it against the other PRs?

Oh I just noticed Wakamai-Fondue/wakamai-fondue-engine#66 which might be relevant?

This is another approach that we could go with, using a matrix of Node versions, but I think that having a consistent version locally and on CI is a simpler first step.

Ha! Nice, we're at the old zlib/fs error, which will be addressed in @Ryuno-Ki's PR!
If nobody objects, perhaps we can get this merged into the master, then rebase the master in your branch, @Ryuno-Ki?

Coolio. Now @RoelN has to decide to either adopt #184 or #185.
I vote for merging this PR and continue there.
(what a :yarn: of issues :fearful: )

Thanks, @mxdvl !

And... done!!
Thanks @mxdvl and @Ryuno-Ki for your help, it is much appreciated!


Changed the background color of books

Provided a lighter background to the books and also added some opacity to it that makes it look more professional
New look -

Please close this PR and open an new issue regarding your solution.

Please close this PR and open a new issue regarding your solution.

Creating a new issue


Error in Python Check with Python

Describe The Bug:
Running Homebridge Docker container. Testing updating to Ubuntu:latest - in order to support Python 3.12 (proposed changes to official Homebridge Docker - https://github.com/homebridge/docker-homebridge/pull/576/commits/6dcbaff4cc3092857b317fd68d51166e7799e1d1)
To Reproduce:
Using container here: https://hub.docker.com/repository/docker/jakepez/homebridge/tags
Install KasaPython
Expected behavior:
KasaPython finds python3 / pip3 and starts up properly
Logs:
[12/13/2024, 2:44:00 AM] Homebridge v2.0.0-beta.23 (HAP v1.1.1-beta.7) (KasaPython) is running on port 46383.
[12/13/2024, 2:44:00 AM] [KasaPython] homebridge-kasa-python v2.7.0-beta.6, node v22.12.0, homebridge v2.0.0-beta.23, api v2.7 Initializing...
[12/13/2024, 2:44:01 AM] [KasaPython] [Python Check] Traceback (most recent call last):
  File "/var/lib/homebridge/kasa-python/.venv/bin/pip3", line 5, in <module>
[12/13/2024, 2:44:01 AM] [KasaPython] [Python Check] from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
[12/13/2024, 2:44:01 AM] [KasaPython] [Python Check] Traceback (most recent call last):
  File "/var/lib/homebridge/kasa-python/.venv/bin/pip3", line 5, in <module>
[12/13/2024, 2:44:01 AM] [KasaPython] [Python Check] from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
[12/13/2024, 2:44:01 AM] [KasaPython] [Python Check] Traceback (most recent call last):
  File "/var/lib/homebridge/kasa-python/.venv/bin/pip3", line 5, in <module>
[12/13/2024, 2:44:01 AM] [KasaPython] [Python Check] from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
[12/13/2024, 2:44:01 AM] [KasaPython] [Python Check] Traceback (most recent call last):
  File "/var/lib/homebridge/kasa-python/.venv/bin/pip3", line 5, in <module>
[12/13/2024, 2:44:01 AM] [KasaPython] [Python Check] from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
[12/13/2024, 2:44:31 AM] [KasaPython] An error occurred during startup: Error: Server did not respond within 30 seconds
    at waitForServer (file:///homebridge/node_modules/homebridge-kasa-python/src/platform.ts:99:9)
    at KasaPythonPlatform.didFinishLaunching (file:///homebridge/node_modules/homebridge-kasa-python/src/platform.ts:187:7)
    at HomebridgeAPI.<anonymous> (file:///homebridge/node_modules/homebridge-kasa-python/src/platform.ts:130:7)

Plugin Config:
{
            "name": "KasaPython",
            "enableCredentials": false,
            "username"<EMAIL_ADDRESS>            "password": "tyrgem-fonGu4-cebseh",
            "manualDevices": [
                {
                    "host": "10.XX.XX.XX",
                    "alias": "Power Strip 7BC8"
                },
                {
                    "host": "10.XX.XX.XX",
                    "alias": "Power Strip 357E"
                },
                {
                    "host": "10.XX.XX.XX",
                    "alias": "Power Strip F777"
                }
            ],
            "_bridge": {
                "username": "XX:XX:XX:XX:XX:XX"
            },
            "platform": "KasaPython"
        },

Screenshots:

Environment:

Plugin Version:
Homebridge Version: Homebridge v2.0.0-beta.23 (HAP v1.1.1-beta.7)
Node.js Version: node v22.12.0
NPM Version: 10.9.0
Python Version: root@Qnap:/var/lib/homebridge $ python3 --version
Python 3.12.3
root@Qnap:/var/lib/homebridge $ pip3 --version
pip 24.0 from /usr/lib/python3/dist-packages/pip (python 3.12)
root@Qnap:/var/lib/homebridge $
Operating System: Docker

@jakepez Can you enable debug logging on Homebridge and restart the plug-in and repost the logs? Thanks!

@jakepez I'm going to push v2.7.0-beta.7 with a lot better debug logging. Make sure to enable debug in the Homebridge settings, install the new version and post the logs here, thanks!

@jakepez it seems that it's unable to find pip3 under the virtual python environment. Can you open the web UI terminal and do the following:
cd kasa-python
source .venv/bin/activate
pip3 --version

@ZeliardM while the pip3 binary is there - the modules aren't properly installed  -
(.venv) root@Qnap:/var/lib/homebridge/kasa-python $ pip3 --version
Traceback (most recent call last):
  File "/var/lib/homebridge/kasa-python/.venv/bin/pip3", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
(.venv) root@Qnap:/var/lib/homebridge/kasa-python $

Inside the virtual environment I then ran this (h/t [https://stackoverflow.com/questions/21826859/setting-up-a-virtualenv-no-module-named-pip)] ) which successfully (re)installs pip and then the plugin starts successfully.
python -m ensurepip --default-pip
This page also mentions using this when setting up the virtual env:
virtualenv ENV --system-site-packages
After running the ensurepip command above - here's the current state of pip:
root@Qnap:/var/lib/homebridge $ cd kasa-python/
root@Qnap:/var/lib/homebridge/kasa-python $ source .venv/bin/activate
(.venv) root@Qnap:/var/lib/homebridge/kasa-python $ pip3 --version
pip 24.3.1 from /var/lib/homebridge/kasa-python/.venv/lib/python3.12/site-packages/pip (python 3.12)
(.venv) root@Qnap:/var/lib/homebridge/kasa-python $

[12/13/2024, 8:28:21 PM] [KasaPython] Child bridge starting (pid 650)...
[12/13/2024, 8:28:21 PM] Registering platform 'homebridge-kasa-python.KasaPython'
[12/13/2024, 8:28:21 PM] [KasaPython] Child bridge started successfully (plugin v2.7.0-beta.7).
[12/13/2024, 8:28:21 PM] Loaded 3 cached accessories from cachedAccessories.0ED879189234.
[12/13/2024, 8:28:21 PM] Homebridge v2.0.0-beta.23 (HAP v1.1.1-beta.7) (KasaPython) is running on port 37861.
[12/13/2024, 8:28:21 PM] [KasaPython] homebridge-kasa-python v2.7.0-beta.7, node v22.12.0, homebridge v2.0.0-beta.23, api v2.7 Initializing...
[12/13/2024, 8:28:48 PM] [KasaPython] Discovering devices...
[12/13/2024, 8:28:56 PM] [KasaPython] Adding HomeKit device: [Power Strip 357E] IOT.SMARTPLUGSWITCH [8006DE8296BC3D937087AAD2777CCF341ECB972B] at host [10.XX.XX.XX]
[12/13/2024, 8:28:56 PM] [KasaPython] Adding HomeKit device: [Power Strip 7BC8] IOT.SMARTPLUGSWITCH [80060DD6969145188C731B20545E9D592104A138] at host [10.XX.XX.XX]
[12/13/2024, 8:28:56 PM] [KasaPython] Adding HomeKit device: [Power Strip F777] IOT.SMARTPLUGSWITCH [800628A133967FFD76328A8803E53BF122221AE5] at host [10.XX.XX.XX]

Is this something to be solved in the plugin or should I report this back up to the Docker Container maintainers?

@jakepez try v2.7.0-beta.8 and let me know if that runs on fresh install. I force it to update pip when it creates the environment now.

@ZeliardM - beta.8 works great. As an after thought, I went back and tested beta.7 on a complete fresh install as well - it actually didn't have any problems. I think my plugin python virtual environment may have been corrupted somehow from running previous versions and upgrading or something.
Thanks for the help. I think forcing the dependancies is smart with the upcoming upgrade to the Docker Container.

@jakepez With the updated docker image today, can you give this a test on there?

@ZeliardM - All looks good - tested with a complete fresh install with the new Docker image today with both  v1.8.5 and v2.0.0-beta.23.
Also running all good on my normal install with the updated Docker image.

@jakepez can you check beta.12 and make sure that everything still works for you correctly?

@ZeliardM all good on my install -
Homebridge Installed: v2.0.0-beta.23
Docker - latest image

Excellent, thanks!


Update canvas API usage

Upon running the function this warning is printed in the terminal:
Deprecated API usage: canvasFactory-instance option, please use CanvasFactory instead.

Upon running the function this warning is printed in the terminal: Deprecated API usage: canvasFactory-instance option, please use CanvasFactory instead.

Currently "node-canvas" replaced with "@napi-rs/canvas". Please try v3.6.3


Implement UI for docs landing page

We have come up with the following design for our 5.12.0 docs landing page. The UI for this needs to be implemented.

Following improvements to UI/UX were suggested during the discussion happened on 28/05/2021.

Make the middle section (card section) less wordy
Include live images other than icons as it makes the design more modern
Using a single level navbar in header without having 2 levels of headers
Including a direct link to API documentation
Including the tech stack being used (using icons or any other method)
Including a direct link to API documentation


Cluster state colors

Version: Master 2.2 (2/13/19)
What kind of request is this (question/bug/enhancement/feature request):
Bug
Steps to reproduce (least amount of steps as possible):
Cluster states should be:
Updating = Yellow
Pending, Provisioning, Removing = current Teal color
We should ONLY have a red color if there is an error.

Version: Master 2.2 (3/4/19) HA Setup
Active is still the dark green color.
Updating is always yellow:

This is also true in other areas such as creating workloads:

Provisioning/Removing is indeed always teal:

When anything has an error/issue it is in red for any state as expected.

Confirmed this is working as expected; I smoke tested in this area by creating/editing/deleting clusters and workloads, etc. Confirmed that these colors use readable text whether dark or light theme is used. The yellow is a bit difficult but not too bad to read on white background.


Suggestion: Make the animation modifiable

Hi, and good evening. I have a thought for a while, in which daisy ui are able to modify the animations. Like easing, bouncing radius. Maybe more stuff but those two are the only things that I have in mind.
But I if possible can I try to implement it? If yes where do I start? Maybe I'll just give it a go and come back if I fail... Thank you for reading!

In the top-level, Tailwind has sets of animation available, and I'm pretty sure you can override those animation simply by putting classes on your component.
For Tailwind's animation, check out their documentation here. Have a great evening.

@nicerazer there are 2 CSS variables to modify the duration off button animations and input animations (checkbox, toggle, radio)
https://daisyui.com/docs/add-themes
--animation-btn: 0.25s;     /* bounce animation time for button */
--animation-input: 0.2s;     /* bounce animation time for checkbox, toggle, etc */

You can use them in a specific theme config or simply use them in your CSS file.
You can also use Tailwind's animation utilities or you can write custom animations in your CSS file.


[Enhancement][Refactor] reduce the number of spill files

What type of PR is this：

[ ] BugFix
[x] Feature
[x] Enhancement
[x] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Which issues of this PR fixes ：

Fixes #
Problem Summary(Required) ：

Currently, each MemTable will generate a new file when flushing in spill task. When the amount of spilled data is very large, many small files may be generated, which is not friendly to the file system.
This PR is mainly to minimize the number of spill files.
Major changes:

The interface for spilled data reading and writing has been redesigned, and the abstraction of Block/BlockManager/InputStream has been added. The purpose is to avoid exposing the underlying concept of File to the caller, which is conducive to more flexible expansion in the future, such as data placement strategies.
An implementation of BlockManager called LogBlockManager is introduced to solve the above problems, you can see more details in comments
compressing spilled data by default.
move spill related class to spill namespace

TODO:

make the compression algorithm of spilling be configurable.
optimize the placement strategy of spilled data
limit space usage of spill directory

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto backported to target branch

[ ] 3.0
[ ] 2.5
[ ] 2.4
[ ] 2.3

if we want to implement compact some block. it seems it's hard to implements it?

another problem we need think about:
If we need to implements merge blocks.


Is there any way to add additional columns to sqlbatch query?

sqlBatch: {
// which column to match up to the users
thisKey: 'post_id',
// the other column to compare to
parentKey: 'id'
}
I want to add additional column "comments"."xyz" with condition like below where 8989 is coming from parent (user) argument.
WHERE  "comments"."post_id" IN (2,8,11,12) and "comments"."xyz" =8989
{
  user(xyz: 8989) {
    fullName
    email
    posts {
      id
      body
      comments {
        id
        body
        author {
          id
          fullName
        }
      }
    }
  }
}

Yes this is possible. Just add a where function beside the sqlBatch.
sqlBatch: {
  // which column to match up to the users
  thisKey: 'post_id',
  // the other column to compare to
  parentKey: 'id'
},
where: function(table) {
  return `${table}."xyz" = 8989`
}

How do I get the parent (User) type's argument (xyz)? In below code it gives args.id comes as "undefined".
where: (table, args, context) => {
        return `${table}.invoice_id = ${args.id}`
      }

Oh I see. Currently, Join Monster does not provide the arguments from a parent field. I'll consider adding that to the callback signature.
For now, you'll have to repeat the argument on the posts field.
{
  user(xyz: 8989) {
    fullName
    email
    posts(xyz: 8989) {
      id
      body
      comments {
        id
        body
        author {
          id
          fullName
        }
      }
    }
  }
}

I see. Then as a workaround can I use sqlJoin with sqlBatch for satisfying multiple conditions like below? Basically I want the child to form a batch query using multiple conditions.
comments: {
......
sqlJoin: (postTable, commentsTable) => `${postTable}.XYZ = ${commentsTable}.XYZ`
sqlBatch: {
    // which column to match up to the users
    thisKey: 'post_id',
    // the other column to compare to
    parentKey: 'id'
 }
...
}

which need to result like this:
SELECT
  "comments"."id" AS "id",
  "comments"."body" AS "body",
  "comments"."post_id" AS "post_id"
FROM comments AS "comments"
LEFT JOIN posts AS "posts" ON "comments".XYZ = "posts".XYZ
WHERE "comments"."post_id" IN (2,8,11,12)

Unfortunately not. When using sqlBatch, a separate query is made, so you do not have access to any values from the users or posts except for the parentKey specified in sqlBatch. You cannot mix sqlJoin with sqlBatch.
Another option is to simply use joins all the way through. So you can replace sqlJoin with sqlBatch.

ok. Related to sqlBatch, can I put condition to join only when the column value is not null? I get the below error as the column I use in sqlBatch is null for some of the rows. In below case PO_DISTRIBUTION_ID is null which I am using in sqlBatch join.
  { INVOICE_ID: 168295,
    INVOICE_NUM: 'ERS-8928-64',
    INVOICE_AMOUNT: 109.88,
    INVOICE_CURRENCY_CODE: 'USD',
    batch__BATCH_ID: 22115,
    batch__BATCH_NAME: 'ERS:101',
    batch__BATCH_DATE: 2012-05-30T08:00:00.000Z,
    batch__LAST_UPDATED_BY: 'WHSE_MGR_M1',
    batch__CREATED_BY: 'WHSE_MGR_M1',
    'lines__INVOICE_ID#LINE_NUMBER': '1682955',
    lines__LINE_NUMBER: 5,
    lines__LINE_TYPE_LOOKUP_CODE: 'TAX',
    lines__AMOUNT: 4,
    lines__PO_DISTRIBUTION_ID: null },
   ........ +106ms
  join-monster 5 rows... +0ms
{ TypeError: Cannot read property 'toSQL' of null

You can manually add a where function to filter out the rows with NULL values at that column.
I'm going to make a patch to do a null check before attempting to call toSQL inside the function so that it does not throw an exception.

Thanks.


BigramCollocationFinder.score_ngrams with BigramAssocMeasure.likelihood_ratio raises ValueError: math domain error

I want to compute bigram collocations per sentence and tried to output my demo results in a jupyter notebook. Only for those four/five sentence combinations and a window size of larger than 4, the ordering with loglikelihood-ratio fails. Probably because of a negative log computation.
I'm not sure what to do at this point. Below my demo code to recreate the error.
import collections
import nltk
from nltk.collocations import BigramCollocationFinder
from nltk.metrics import BigramAssocMeasures
from somajo import Tokenizer

sentences = [
    "Ich gehe gerne nach Hause.",
    "Arbeit an der Uni macht Spaß.",
    "Ich esse gerne Eis.",
    #"Warum ist die Erde rund?",
    "Jemand anderes isst gerne Eis."
]

sentences_tok = [tokenizer.tokenize(s) for s in sentences]
all_tok = [word for sentence in sentences_tok for word in sentence]

def compute_neighbor_collocations(sentences_tok, window_size=2):
    sentences_tok = iter(sentences_tok)

    sentence_tok = next(sentences_tok)
    first_finder = BigramCollocationFinder.from_words(sentence_tok, window_size=window_size)
    for sentence_tok in sentences_tok:
        finder = BigramCollocationFinder.from_words(sentence_tok, window_size=window_size)
        first_finder.ngram_fd.update(finder.ngram_fd)
        first_finder.word_fd.update(finder.word_fd)

    return first_finder

# window_size=2 raises no error
finder_sentence = compute_neighbor_collocations(sentences_tok, window_size=255)
scored_sentence = finder_sentence.score_ngrams(BigramAssocMeasures.likelihood_ratio)

--------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-39-3af87a5a33c6> in <module>
      1 #finder_sentence.apply_freq_filter(3)
      2 #finder_sentence.nbest(BigramAssocMeasures.raw_freq, 100)
----> 3 scored_sentence = finder_sentence.score_ngrams(BigramAssocMeasures.likelihood_ratio)
      4 scored_sentence

/opt/miniconda3/envs/ekoerner/lib/python3.6/site-packages/nltk/collocations.py in score_ngrams(self, score_fn)
    119         lowest score, as determined by the scoring function provided.
    120         """
--> 121         return sorted(self._score_ngrams(score_fn), key=lambda t: (-t[1], t[0]))
    122
    123     def nbest(self, score_fn, n):

/opt/miniconda3/envs/ekoerner/lib/python3.6/site-packages/nltk/collocations.py in _score_ngrams(self, score_fn)
    111         """
    112         for tup in self.ngram_fd:
--> 113             score = self.score_ngram(score_fn, *tup)
    114             if score is not None:
    115                 yield tup, score

/opt/miniconda3/envs/ekoerner/lib/python3.6/site-packages/nltk/collocations.py in score_ngram(self, score_fn, w1, w2)
    183         n_ix = self.word_fd[w1]
    184         n_xi = self.word_fd[w2]
--> 185         return score_fn(n_ii, (n_ix, n_xi), n_all)
    186
    187

/opt/miniconda3/envs/ekoerner/lib/python3.6/site-packages/nltk/metrics/association.py in likelihood_ratio(cls, *marginals)
    141         return (cls._n *
    142                 sum(obs * _ln(obs / (exp + _SMALL) + _SMALL)
--> 143                     for obs, exp in zip(cont, cls._expected_values(cont))))
    144
    145     @classmethod

/opt/miniconda3/envs/ekoerner/lib/python3.6/site-packages/nltk/metrics/association.py in <genexpr>(.0)
    141         return (cls._n *
    142                 sum(obs * _ln(obs / (exp + _SMALL) + _SMALL)
--> 143                     for obs, exp in zip(cont, cls._expected_values(cont))))
    144
    145     @classmethod

ValueError: math domain error

The problem is with the calculation of the contingency table.
                w1    ~w1
             ------ ------
         w2 | n_ii | n_oi | = n_xi
             ------ ------
        ~w2 | n_io | n_oo |
             ------ ------
             = n_ix        TOTAL = n_xx
    """

When you call score_ngram, it will first fetch the value of n_ii, n_xi, n_ix and n_xx.
The value of n_ii will be fetched from finder.ngram_fd, and n_xi (the number of occurrences of word 1) and n_ix (the number of occurrences of number 2) are fetched from finder.word_fd.
Since you've updated ngram_fd and word_fd while looping through each sentence, it will get the correct values for the first three variables. But it will also fetch the value of n_oo through self.N, which is the total length of the tokens you've passed to first_finder, which will always be 6 (the length of tokens of your first sentence "Ich gehe gerne nach Hause."), and you didn't update this value in the loop.
So for example, as for word token "gerne" and the period token ".", the number of occurrences of the former one is 3, and the number of occurrences of the latter one is 4, and nii:
"""Returns the score for a given bigram using the given scoring
        function.  Following Church and Hanks (1990), counts are scaled by
        a factor of 1/(window_size - 1).
"""

        n_ii = self.ngram_fd[(w1, w2)] / (self.window_size - 1.0)

would be 3 / (255 -1) = 0.011811023622047244 (approximately 0)
and then since n_oo = n_xx - n_xi - n_ix + n_ii = 6 - 4 - 3 + 0.011811023622047244 = -0.988188976377952756
Trying to compute the logarithm would of course raise an error.
And I'm wondering why don't you just pass list of all tokens into the finder, then you don't have to update ngram_fd and word_fd in the loop,

Ahh, thank you. Seems I was not as thorough as I thought. My workplace has a Java tool that computes word and sentence cooccurrences but for 'quick' prototyping it is somewhat complicated to use. So I found the NLTK CollocationFinderand played around a bit. The generic way to compute frequencies, log-likelihood was even better incentive. :-)
I found the n_** variables but did not easily find the origin of those.
The reason I don't just paste the whole text / concatenate the sentences is that I want to compute the collocations/cooccurrences for sentences, not texts. My/Our sentences have no references to their origin text and are therefore 'isolated'(?). I would not like to have (".", "Ich") because it may not occur that way normally. Another reason, I want to compute sentence collocations/cooccurrences, that means I want to know for a given word what other word appears in this sentence, too. With a window size of e. g. 255 I can have those pairs for all words in a sentence (just separated by left-/right-hand side - I am working on combining those the correct way for only word-sentence (somewhat like a word-document matrix)). Inputting the whole text I would get wrong cooccurrences since the window would be too large, and the sentences have different sizes.
Again, thank you. The next time I will look better through the source. I think this issue can be closed?

You mean you want to find collocation in each sentence of your text?
Then the way you are updating ngram_fd and word_fd is wrong, since these two variables are instances of collections.Counter, not of the simple Python dictionary data type.
The update method will sum up the values of the same key, instead of overwrite it.
Compare:
>>> dict1 = {'a': 1}
>>> dict2 = {'a': 2}
>>> dict1.update(dict2)
>>> dict1
{'a': 2}
>>> import collections
>>> counter1 = collections.Counter({'a': 1})
>>> counter2 = collections.Counter({'a': 2})
>>> counter1.update(counter2)
>>> counter1
Counter({'a': 3})

And in your case, you may instantiate a new BigramCollocationFinder for each of your sentences, and call the score_ngrams method of each collocation finder to measure the association of the bigrams (in each sentence).

Yes and no? I have a whole corpus but the sentences are not contiguous. I want to generate statistics for all the sentences, so the a BigramCollocationFinder per sentence but with aggregated scores.
E. g. the collocation (".", "The") should be almost zero (when pasting all sentences together is would be equal to the number of occurrences of "The"). But I want to know whether ("The", "king") occurs more often than ("The", "queen"), or for some verbs etc. Then the log-likelihood for comparing which is more significant than the other.


InputEventKey.get_keycode_with_modifiers() returns wrong values (German keyboard)

Godot version
4.0 beta8
System information
Windows 10
Issue description
InputEventKey.get_keycode_with_modifiers() returns wrong values on German Keyboard.
In case it matters: This happens for my notebook's keyboard (Lenovo T470p) as well as my external Microsoft Ergonomic keyboard. The keyboards' drivers in the Device Manager are named "HID keyboard device" and "Standard PS/2 Keyboard"
Steps to reproduce

Set Windows to German keyboard layout and language.
Make a node with the code below and run it (or use Minimal reproduction project)
When pressing for example the Umlaut-Keys ö, ü or ä, I get 96 (QuoteLeft), 59 (Semicolon) and 39 (Apostrophe) respectively (they are not equal to the physical keycodes though). I would expect keycodes 214 (Ö), 220 (Ü) and 196 (Ä). The locale is returned correctly however.

extends Control

func _ready():
	print(OS.get_locale())
	print(OS.get_locale_language())

func _input(event):
	if event is InputEventKey:
		var key: int = event.get_keycode_with_modifiers()
		var key_phys: int = event.get_physical_keycode_with_modifiers()
		print("keycode  %s (%s), physical %s (%s)" %
			[key, OS.get_keycode_string(key),
			key_phys, OS.get_keycode_string(key_phys)])

Minimal reproduction project
get_keycode_demo.zip

These are correct values, there are no dedicated keycodes / scancodes for ö, ü or ä, see https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes and http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc
You can use unicode property to get layout specific character value.
I have no idea why there's ODIAERESIS and other similar codes in the Godot key list (maybe it is/was supported on some OS, definitely not on Windows, but it seems to be unused).

Since currently getting any of these Latin-1 keycodes in only possible on by lossy conversion from Unicode on iOS and a specific X11 config, we probably should allow using unicode values in the actions and restrict keycode list to the least common values (equivalent of PS/2 scancodes) to avoid confusion.

Without understanding all the technical details, I think it's relevant that there's some process with which we know what key on their keyboard the user has pressed, and also showing it to them (my main use case is to offer customizable controls.)
I didn't realise that InputEventKey.unicode is what I need, so OS.get_keycode_string(event.unicode) returns what I actually expected - well, at least when not pressing for example Shift+ü, otherwise I get Udiaeresis when I was expecting either Ü or Shift+ü. Seems I'm still missing something...

I didn't realise that InputEventKey.unicode is what I need, so OS.get_keycode_string(event.unicode) returns what I actually expected - well, at least when not pressing for example Shift+ü, otherwise I get Udiaeresis when I was expecting either Ü or Shift+ü. Seems I'm still missing something...

Right now, there's no convenient way to get is as text, but you can do something like this:
if event is InputEventKey:
	var name = ""
	if event.is_ctrl_pressed():
		name += OS.get_keycode_string(KEY_CTRL) + "+";
	if event.is_shift_pressed():
		name += OS.get_keycode_string(KEY_SHIFT) + "+";
	if event.is_alt_pressed():
		name += OS.get_keycode_string(KEY_ALT) + "+";
	if event.is_meta_pressed():
		name += OS.get_keycode_string(KEY_META) + "+";
	name += String.chr(event.unicode).to_upper()

	print(name)

Right now, there's no convenient way to get is as text, but you can do something like this

Actually, do not use this, it might work in German keyboard layout, but not in general. There are plenty of layouts which have completely different character bound to Key and Shift+Key, also unicode won't be set when using Ctrl / Alt modifiers.

Currently, key events have:

physical_keycode - which is position on a keyboard (should work fine, useful for stuff like WASD, when you do not care what character is on the key).
keycode - which is basic Latin in the current keyboard layout (if it's available), so something like Ctlr+S will always be triggered by the key with S on it. For non-Latin layouts, it's usually replaced with physical_keycode.
unicode - which is used for input, Ü will have unicode=ü and Shift+Ü will have unicode=Ü, but in other layout the same key can be for example Key -> unicode=ش and Shift+SameKey -> unicode=», Alt and Ctrl combinations can have some other Unicode values or none.

So maybe we should add another "unshifted" Unicode value to always give the primary character (like it was pressed without any modifiers) + list of modifiers, and allow using it as an option for action mappings.


Awsome little example!

Appreciate you making this public.  Good to see how you guys build React apps (from the view of the rest of us).  Took me a minute to realize that "loosing focus" updates the data when I type in changes.  No need (IMHO) to fix, but might be helpful to add a text note to that behavior.

Took me a minute to realize that "loosing focus" updates the data when I type in changes.

That makes sense. It's less intuitive initially, but I think it's better for two reasons:

The undo/redo feature works better if it isn't literally saving every keystroke.
Mobile editing experience feels pretty broken if the Canvas is redrawing (and measuring) after every edit.

might be helpful to add a text note to that behavior.

Any ideas on how to convey this?

Without going crazy, maybe something simple like change the titles (Tasks changes to "Tasks (Mouse out to save changes)" when there are pending changes (same for right text window).  Again, this is totally cool as is.  No need to change.

Thanks for the feedback! Fixed in 63ea9f0:
https://user-images.githubusercontent.com/29597/147881444-2c7f4326-94e1-4471-b2a9-62674944421c.mov


Fix #60

Add TypeForwardedTo to Types from other assembly
Might cause problem for those who use this package as file and not .dll
Also maybe better solution is to add reference to System.ComponentModel.Composition package for those .net versions that this package supports? but then

Works without System.ComponentModel.Composition

will be no longer valid.
fixes #60

Wow, interesting.. did not know about this attr. Thanks, merging.. Release is imminent.


A sample query may be wrong

Found the sample query returns error in Log Analytics workspace: 'summarize' operator: Failed to resolve scalar expression named '_SubscriptionId'
find where TimeGenerated > ago(24h) project _ResourceId, _BilledSize, _IsBillable
| where _IsBillable == true
| summarize BillableDataBytes = sum(_BilledSize) by _ResourceId
| summarize BillableDataBytes = sum(BillableDataBytes) by _SubscriptionId | sort by BillableDataBytes nulls last
After some minor change, the following query returns billable data by subscription:
find where TimeGenerated > ago(24h) project _ResourceId, _BilledSize, _IsBillable, _SubscriptionId
| where _IsBillable == true
| summarize BillableDataBytes = sum(_BilledSize) by _SubscriptionId | sort by BillableDataBytes nulls last
Recommended to correct this sample query in the documentation page
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: a73a8a62-95c6-9ec9-9199-695ad1e5e8a9
Version Independent ID: 6089f013-8b5b-661c-9ee4-d6b267737357
Content: Manage usage and costs for Azure Monitor Logs - Azure Monitor
Content Source: articles/azure-monitor/platform/manage-cost-storage.md
Service: azure-monitor
Sub-service: ****
GitHub Login: @bwren
Microsoft Alias: bwren

@joedocker758 Thanks for your comment! We will review and provide an update as appropriate.

@joedocker758 I have verified and updated the document as appropriate. I change should reflect in some time i.e., in less than 24 hours. Thanks again!


[RadioButtons] Clicking RadioButton can raise SelectionChanged twice, once with null and once with normal value

Describe the bug

When a RadioButtons control has been loaded, clicking a RadioButton can result in the SelectionChanged event being raised twice where the SelectedItem is null the first time and than the actual newly selected item the other time. This behavior was not the case before hand (I think) because XCG is now crashing because of this (see https://github.com/microsoft/Xaml-Controls-Gallery/issues/768=
Steps to reproduce the bug

Steps to reproduce the behavior:

Open MUXControlsTestApp
Open RadioButtons page
Set breakpoint in SelectionChanged handler
Click RadioButton and observe the value of the RadioButtons' SelectedItem property

Expected behavior

I think it should not raise with a null value when changing selection from a valid value to another valid value.
Screenshots

Version Info

NuGet package version:
bb516c6

Windows app type:

UWP
Win32

Windows version
Saw the problem?

Insider Build (19043)
Yes

May 2021 Update (19043)

October 2020 Update (19042)

May 2020 Update (19041)

November 2019 Update (18363)

May 2019 Update (18362)

October 2018 Update (17763)

April 2018 Update (17134)

Fall Creators Update (16299)

Creators Update (15063)

Device form factor
Saw the problem?

Desktop
Yes

Xbox

Surface Hub

IoT

Additional context

Closing as duplicate of #3128.


world hop messages in game chat

gives the player the information needed to not hop into a world they've already logged into. my friend found the current "quick-hopping ..." message to be unreliable. he said it only worked "some" of the time. he asked if a list of the worlds he'd visited could be printed on login.

how is it unreliable? it prints the world you hop to

how is it unreliable? it prints the world you hop to

let me rephrase. sometimes when he hopped, the message wouldn't print.

with my testing, i found the "quick-hopping ..." message was only printed when i hopped worlds using the sidebar hopper or the keyboard shortcut defined in the World Hopper config. Of course this works, but if you hop via the in game world hopper, the message is not printed. this commit makes it so the message is always printed regardless of where you hop from.


How do I link this library on Windows?

react-native link does not appear to work, and there are no manual instructions in the README.

I found some Windows instructions here: https://github.com/EstebanFuentealba/react-native-share#windows
It would be good to have something like that in the README.


Waavi trying to load second language into database but it won't pull

My second language is croatian so locale => 'hr', name => 'croatian' (tried 'hrvatski' also). and it only pulls english into database after
php artisan translator:load

@mlinko Have you added Croatian to the Languages table in the database?

sry. it went trough correctly it only problem was that it was on a last page


Fix bulk selection after filter

https://github.com/open-cluster-management/backlog/issues/16714
Signed-off-by: Kevin Cormier<EMAIL_ADDRESS>

/cc @zlayne


Merge MSHT to JVDHHT

Hi @joevdh, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;