ESP32-C3 freezes when setting CPU clock to internal RC oscillator (IDFGH-11852)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
v5.3
Espressif SoC revision.
ESP32-C3 rev v0.3
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-C3 rev v0.3 on custom board
Power Supply used.
External 3.3V
What is the expected behavior?
The ESP32-C3 should switch to the internal RC oscillator (17.5MHz) as the CPU clock source and continue to operate normally, as indicated in the ESP32-C3 datasheet.
What is the actual behavior?
When setting the CPU clock source to the internal RC oscillator in the ESP32-C3, the system consistently freezes, making any further code execution impossible. This problem has been observed on several ESP32-C3 boards. Notably, an equivalent code functions correctly on ESP32-C6 boards, suggesting a model-specific issue with the ESP32-C3.
Steps to reproduce.

Connect any ESP32-C3 board
Build and flash this code:

#include <stdio.h>
#include <inttypes.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_chip_info.h"
#include "esp_flash.h"
#include "esp_system.h"
#include "soc/rtc.h"

void app_main(void) {
    printf("Hello world!\n");
    fflush(stdout);
    vTaskDelay(1000 / portTICK_PERIOD_MS);
    rtc_clk_8m_enable(true, false);
    vTaskDelay(2000 / portTICK_PERIOD_MS);
    rtc_cpu_freq_config_t config;
    rtc_clk_cpu_freq_get_config(&config);
    config.source = SOC_CPU_CLK_SRC_RC_FAST;
    config.freq_mhz = 20;
    config.div = 1;
    rtc_clk_cpu_freq_set_config(&config);
    esp_restart();
}

Debug Logs.
ESP-ROM:esp32c3-api1-202�I (26) boot: ESP-IDF v5.3-dev-1196-gece73357ca-dirty 2nd stage bootloader
I (26) boot: compile time Jan  6 2024 18:10:01
I (27) boot: chip revision: v0.3
I (31) boot.esp32c3: SPI Speed      : 80MHz
I (36) boot.esp32c3: SPI Mode       : DIO
I (40) boot.esp32c3: SPI Flash Size : 2MB
I (45) boot: Enabling RNG early entropy source...
I (51) boot: Partition Table:
I (54) boot: ## Label            Usage          Type ST Offset   Length
I (61) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (69) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (76) boot:  2 factory          factory app      00 00 00010000 00100000
I (84) boot: End of partition table
I (88) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=09d50h ( 40272) map
I (103) esp_image: segment 1: paddr=00019d78 vaddr=3fc8ae00 size=01294h (  4756) load
I (106) esp_image: segment 2: paddr=0001b014 vaddr=40380000 size=05004h ( 20484) load
I (117) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=16ed8h ( 93912) map
I (137) esp_image: segment 4: paddr=00036f00 vaddr=40385004 size=05dc8h ( 24008) load
I (145) boot: Loaded app from partition at offset 0x10000
I (145) boot: Disabling RNG early entropy source...
I (157) cpu_start: Unicore app
I (166) cpu_start: Pro cpu start user code
I (166) cpu_start: cpu freq: 160000000 Hz
I (166) cpu_start: Application information:
I (169) cpu_start: Project name:     hello_world
I (174) cpu_start: App version:      1
I (179) cpu_start: Compile time:     Jan  6 2024 18:09:57
I (185) cpu_start: ELF file SHA256:  3ef25d90c...
I (190) cpu_start: ESP-IDF:          v5.3-dev-1196-gece73357ca-dirty
I (197) cpu_start: Min chip rev:     v0.3
I (202) cpu_start: Max chip rev:     v1.99
I (207) cpu_start: Chip rev:         v0.3
I (211) heap_init: Initializing. RAM available for dynamic allocation:
I (219) heap_init: At 3FC8D030 len 00032FD0 (203 KiB): RAM
I (225) heap_init: At 3FCC0000 len 0001C710 (113 KiB): Retention RAM
I (232) heap_init: At 3FCDC710 len 00002950 (10 KiB): Retention RAM
I (239) heap_init: At 50000010 len 00001FD8 (7 KiB): RTCRAM
I (246) spi_flash: detected chip: generic
I (250) spi_flash: flash io: dio
W (253) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (267) sleep: Configure to isolate all GPIO pins in sleep state
I (273) sleep: Enable automatic switching of GPIO sleep configuration
I (281) main_task: Started on CPU0
I (291) main_task: Calling app_main()
Hello world!

More Information.
An image from the ESP32-C3 datasheet, specifying CLK sources, will be attached for reference. The ESP32-C3 datasheet indicates the internal RC oscillator as a viable CPU clock source, yet implementing this in code results in system freeze. It's important to note that my ESP-IDF version is marked as "dirty." This is because I attempted several modifications in the SDK to resolve the issue. However, it's crucial to mention that the system freeze occurred with both the modified ("dirty") and the original, unmodified versions of the SDK, indicating that the problem persists regardless of these changes. I would greatly appreciate any insights or confirmation on whether it is indeed feasible to use the internal RC oscillator as a CPU clock source on the ESP32-C3. This information is critical for my project, and I am under a significant time constraint. Prompt assistance or guidance from the community or Espressif representatives would be highly valued.

Hi @Pavelovec, we didn't really support to use RC_FAST_CLK as CPU clock source in ESP-IDF. We didn't even try this option internally. Can you explain why you may want to do this? If we think it is reasonable, this could be a feature request.

Hi @songruo ,
Thank you for your response. We are exploring the use of the internal RC oscillator as a CPU clock source on the ESP32-C3 as a workaround for a specific issue. Our ESP32-based devices are experiencing restarts when a relay, controlling a contactor, is activated. We suspect that the relay's electromagnetic interference might be causing glitches in the 40MHz crystal oscillator, leading to system instability and resets by the watchdog timer after a few seconds.
As a potential solution, we are considering switching the CPU clock source from the 40MHz crystal to the internal 17.5MHz RC oscillator during relay activation and then switching back post-operation. We acknowledge that this approach is unconventional, but we aim to address the problem through software modifications without substantial hardware changes.
Thank you for your consideration and support in addressing this issue.


chore: release v0.1.11

🤖 New release

realme: 0.1.10 -> 0.1.11

Changelog

0.1.11 - 2024-10-19
🪶 Miscellaneous Tasks

Improve code clarity and maintainability - (fc6efb8)

This PR was generated with release-plz.

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.


fix(isolated-declarations): do not infer type for private parameters

close: #4033

#4105  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Dunqing and the rest of your teammates on  Graphite


No version data in latest build

Not sure how long this issue exists (my recent download of this package was a few months ago), but I noticed latest build has basic information (years, version, etc.) missing. See https://github.com/RobinHerbots/Inputmask/blob/5.x/dist/jquery.inputmask.min.js for yourself, it displays:

dist/jquery.inputmask.min
<%= pkg.homepage %>
Copyright (c) 2010 - <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>
Licensed under the <%= pkg.license %> license
Version: <%= pkg.version %>

@toxpal,
Fixed!
Thx!


uvgRTP doesn't compile on CentOS7

I am using uvgRTP for a streaming application developped on CentOS7.9. Upgrading the OS is not an option.
Until now, I used the 1.0.0 release. I had to modify the random.cc file (more on this later) but the build succedeed.
I now want to upgrade to the 2.0.0 release. Unfortunately, the Makefile generated by cmake3 hardcodes the C++ standard version to c++17. The gcc compiler of CentOS7.9 is 4.8.5, which supports only c++11.
Wouldn't it be possible to ensure uvgrtp compiles with c++11 ?
The only thing that is specific to c++17 is located in the include/crypto.hh file.
I suggest to replace :
#if __has_include(<cryptopp/aes.h>) &&
...
!defined(RTP_NO_CRYPTO)
#define RTP_CRYPTO
#include <cryptopp/aes.h>
...
#endif
with :
#ifndef RTP_NO_CRYPTO
#include <cryptopp/aes.h>
...
#endif
The second point that is not available on CentOS7 is the getrandom() function.
I suggest to use the SYS_getrandom system call if the getrandom() function isn't available (HAVE_GETRANDOM undefined).
I have attached the modified file random.cc
random.txt

Hi,
unfortunately it was decided that for the sake of user experience, Crypto++ should be checked and enabled automatically. There was internal debate about this but this was the direction that was chosen for uvgRTP and thus, unfortunately for you, I don't see this change being merged to master. On the other hand, I'm no longer in a position to make any decisions regarding uvgRTP (that's now Joni's or Marko's job) so you may also try your luck and open a pull request for the Crypto++ detection update and see what happens.
The updates regarding crypto.cc look good to me and if you want them to be merged to master, please open a pull request.

Thank you for your quick answer.
I will guard my modifications to the crypto.hh file with a check to the GCC version (< 5), hence the "official" Crypto++ remains unchanged if GCC version is > 5. I will try my luck with a pull request for this, and another for the getrandom() function.
What about the hardcoding of the standard c++17 in the CMakeLists.txt ? This requirement isn't mentioned in the BUILDING.md, and is new with the 2.0.0 version. This is disapointing for users of the 1.0.0 who wants to upgrade.

Checking against GCC's version sounds reasonable to me. As you mentioned, uvgRTP only uses the __has_include from C++17 so you could modify the CMake file to detect if a C++17-compatible compiler is present and enable -std=c++17 if so. And if not, it could default to C++11 and use your GCC version check code to enable/disable crypto (if merged to master).

I will prepare a pull request, but for that I need to learn how do do it. I think there are tutorials for that.

PR "build: Support for CentOS7 #18" submitted

The PR #18 has been merged. I can close this issue now.


Bug 57767 - Websocket client proprietary configuration

The original patch for redirection support (https://bz.apache.org/bugzilla/show_bug.cgi?id=57767)  is not compliant with the websocket spec since the redirectSet variable is not thread-safe. This pull request aims to fix the concurrency issue by creating a new class "WsWebSocketClient" with its own set of variables. It also includes the proposed changes for authentication support.

Chris's original concern with the BZ 57767 patch (lack of Javadoc) still needs to be addressed.

Well, it looks ok to me overall, so I'll add a bit of javadoc and merge it. Any issue with backporting it ?

No objections to back-porting here.


Add an Implementation section

following this issue #14, I have added an Implementation section with :

rust
js

@jbenet @RichardLitt @EternalDeiwos @Kubuxu

ping @jbenet @RichardLitt @EternalDeiwos @Kubuxu

Hey; I'm not a maintainer here at the moment. Good luck.

ping @jbenet @EternalDeiwos @Kubuxu

I wrote a Python implementation.

ping @jbenet @EternalDeiwos @Kubuxu


Add ReScript interface extension '.resi'

This PR adds ReScript language's interface files (.resi) in addition to implementation (.res) files.
Description
This PR supplements the original implementation introduced in #4975.
Checklist:

[x] I am associating a language with a new file extension.

[x] The new extension is used in hundreds of repositories on GitHub.com

Search results for each extension:

*.resi

[x] I have included a real-world usage sample for all extensions added in this PR:

Sample source(s): https://github.com/darklang/rescript-tea/blob/main/src/tea_app.resi
Sample license(s): GPL3

@lildude As I understand it, the popularity requirement is as described in #5756, normally 2000 files, or 200 files if it's typically a single file per repo. This extension currently has 836 files. However, because of the role this kind of file has, I'm not sure the normal requirements fit this case all that well.. These are interface files, which conceptually have a 1-to-1 relationship with the compilation units ("code files") they describe. But they are also usually implicit, because the file can be omitted if nothing needs to be abstracted away. Therefore there aren't all that many of them, but when they do exist they are really important.
Could I therefore ask that you consider either:

Treat this as a single-file-per-repo extension and use the 200-file requirement instead. Because public repos are mostly libraries, and most libraries are simple enough to only need a single .resi file to describe their public interface.
Include private repositories, if possible, as they tend to have a higher amount of these files since they're more often  complex applications that need more internal abstraction than simple libraries. As just one example, the private repo I'm working on has a 1-10 ratio of resi. to .res files (16 of 162, to be precise).
Factor in .res files to get a better sense of language popularity.

No, as this isn't the case and is bending the "rules" to suit a single use case.

The referenced issue also says that these are "loose rules", implying that they are intended to be bent to fit cases that don't fit that mold. Though this might still be bending it too far of course.

There is already a solution users can, and many do, use: implement an override in the repo like these repos to tell Linguist to treat these files as ReScript.

Thanks! I did not know about that, and this does neatly solve my immediate issue. :pray:


Add workflow to publish Cargo automatically

One of the last manual pieces of the Rust release process is publishing Cargo, and as it happens after the release itself it is often forgotten (I am often guilty of that). This PR aims to fully automate that.
Nowadays tagging Cargo happens automatically, as the release process creates and pushes a signed tag for the release. So the only piece remaining is automatically executing the publish.py script. This PR adds a workflow triggered by the tag push to run publish.py with a rust-lang-owner scoped token.
The secret is stored in the release environment, which can only be used during tag pushes.
cc @Mark-Simulacrum

The secret is stored in the release environment, which can only be used during tag pushes.

BTW I have no permission to read this page (and shouldn't have). So yeah need t-infra people to verity it.

BTW I have no permission to read this page (and shouldn't have). So yeah need t-infra people to verity it.

Current contents of the page:

Thanks @pietroalbini!
The cargo team has discussed trying to do this in the past. We were stuck on two issues:

How to selectively publish individual crates independent of the Rust release process? We had a few different ideas, but didn't really settle on anything.
How to guard or otherwise monitor when releases are made? GitHub doesn't really provide a nice way to do this like there is with PRs (which require an independent reviewer, and send out notifications to everyone). We also had some ideas on this, but didn't settle on one. It would be nice if something (crates.io or GitHub) at least sent out a notification.

I don't want to block anything on these, just wanted to let you know what we've been thinking.

How to selectively publish individual crates independent of the Rust release process? We had a few different ideas, but didn't really settle on anything.

Perhaps this helps https://github.com/rust-lang/cargo/issues/13397?

How to guard or otherwise monitor when releases are made? GitHub doesn't really provide a nice way to do this like there is with PRs (which require an independent reviewer, and send out notifications to everyone). We also had some ideas on this, but didn't settle on one. It would be nice if something (crates.io or GitHub) at least sent out a notification.

if we create a release for each new tag, there is notification for new releases

Perhaps this helps #13397?

Not really. We need to be able to do something like "publish home on the master branch, but don't publish cargo". Just looking at the version number doesn't help since we proactively bump cargo's version.
Which makes me think we won't be able to tag releases like home with this PR... 🤔
We might need to consider filtering based on the tag name?
In git2-rs, I use workflow dispatches which have a little GUI that lets you select which crates to publish.

if we create a release for each new tag, there is notification for new releases

Yea, I use that in some other repos and it works pretty well. Something we could consider, though I wouldn't want to block on it.

I would keep publishing other crates as out of scope right now, my main concern here is automating the last bit of the Rust release process :D

Which makes me think we won't be able to tag releases like home with this PR... 🤔
We might need to consider filtering based on the tag name?
In git2-rs, I use workflow dispatches which have a little GUI that lets you select which crates to publish.

Do you plan in the future to tag the release of other crates (like home-1.0.0), while keeping the Cargo tags as just the version number (like 0.80.0)? If so, I can change the trigger rule and the workflow to only apply on Cargo releases, leaving the door open for publishing other crates outside of this process in the future.

OK, I think with the restriction of only allowing promote-release to publish tags I think this is ready to be merged? Assuming we defer the discussion of other crates to a future PR.

@bors r+

:pushpin: Commit a28baaf3fbede227c9659e557389856cdd66b1cc has been approved by weihanglo
It is now in the queue for this repository.

:hourglass: Testing commit a28baaf3fbede227c9659e557389856cdd66b1cc with merge 916c5a4f363a503091d632d9f39c1e8f97c4587a...

:sunny: Test successful - checks-actions
Approved by: weihanglo
Pushing 916c5a4f363a503091d632d9f39c1e8f97c4587a to master...


panicked on linux - WIP to get it working on linux

Steps:
$ git clone https://github.com/jpochyla/psst
$ cd psst
$ git submodule update --recursive --init
$ cd psst-bin
$ rustup install stable
$ rustup run stable rustc --version
# rustc 1.49.0 (e1884a8e3 2020-12-29)
$ cargo +stable run --release
# see message below

Using cargo +stable run --release in /psst-bin for starting.
warning: field is never read: `loading_handle`
   --> psst-core/src/audio_player.rs:568:9
    |
568 |         loading_handle: JoinHandle<()>,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: field is never read: `loading_handle`
   --> psst-core/src/audio_player.rs:585:9
    |
585 |         loading_handle: JoinHandle<()>,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: field is never read: `reusable_creds`
  --> psst-core/src/session.rs:58:5
   |
58 |     reusable_creds: Credentials,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused `std::result::Result` that must be used
   --> psst-core/src/audio_file.rs:173:13
    |
173 | /             thread::Builder::new().name(thread_name).spawn({
174 | |                 // TODO: Do not bury the whole servicing loop in case the URL renewal fails.
175 | |                 let url = fresh_url()?.url.clone();
176 | |                 let cdn = self.cdn.clone();
...   |
198 | |                 }
199 | |             });
    | |_______________^
    |
    = note: `#[warn(unused_must_use)]` on by default
    = note: this `Result` may be an `Err` variant, which should be handled

warning: 4 warnings emitted

   Compiling psst-bin v0.1.0 (/home/daniel/Downloads/setups/psst/psst-bin)
    Finished release [optimized] target(s) in 33.56s
     Running `/home/daniel/Downloads/setups/psst/target/release/psst-bin`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NotPresent', psst-bin/src/main.rs:17:38
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I guess it's connected to the last warning, however I'm not very good nor up-to-date with rust.
My system:

Kernel: x86_64 Linux 5.10.2-2-MANJARO
OS: Manjaro 20.2 Nibia

@jpochyla Sorry for disturbing. My fault. :sweat:

@jpochyla Sorry for disturbing. My fault. :sweat:

No problem! I've just renamed psst-bin to psst-cli in b64fa27 to avoid further confusion.

No problem! I've just renamed psst-bin to psst-cli in b64fa27 to avoid further confusion.


Documentation/readme

Hi there,
This is for issue #7. I added more information to the documentation.

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

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@Gela, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, MSBOT;


Inject using current Android Context

Hello I'm wondering simply if there is a way to inject an Activity or while using either it's context or the Application object to initialize the object.
So something like:
class HomeActivity : Activity() {
    override val contextAwareObject by inject<ThisObjectNeedsContextInConstructor>()
}

I've tried using get() for the context in a module but it doesn't seem to be able to do the trick since it only has access to a Koin Context, not an Android one. I have seen an example using an AndroidModule but it seems I can't find an AndroidModule in the current version.
In particular I'm trying to inject access to my database, which is currently initialized and owned by the Application class. It needs an App context to start. So therefore my Activities have to know about it even though I'm using MVP. It would be really nice if when I inject my presenter I could also inject the presenter by constructor with the database object.

So if I understand correctly, you need database access in, lets say, HomeRepository.
When you instantiate your dependencies, is that happening in your Application class? If so, you can inject the Application context directly from there. For example:
Your HomeRepository would look like:
class HomeRepository(val appContext: Application, otherDependency: MiscDependency)
. . . etc

And in your Application class, where Koin should be instantiated
val myModule: Module = applicationContext {
    provide { MiscDependency() }
    provide { HomeRepository(this@Application, get()) }
}

startKoin(this, listOf(myModule))

Does this look like what you're asking for? With Koin, your activity shouldn't need a direct reference to the application context (for this purpose), and the database object should be able to have the application reference it needs directly.

I think the wording of koinContext and applicationContext can be confusing, because Koin's applicationContext is different than Android's Context, which can be a part of an Android activity or an application (the Application class is a subclass of Context), whereas a koinContext or Koin's applicationContext is Koin's way of referencing the Koin library and system, regardless of the platform.

Hello @vpotvin,
yes, there is no more AndroidModule.  The applicationContext function opens a lambda to describe a Koin application description module (as said @caleb-allen)
You can use the androidApplication() function to inject your Android Application context instance where you need. i.e:
Given a class that needs your App context:
class MyRepository(application : Application)

You can write it like this:
val yourModule = applicationContext {
    bean { MyRepository(androidApplication())}
}

If you need Context type, you can directly write androidApplication().context

Yes I think that is exactly what I am looking for. So if I have something like:
val myModule = applicationContext {
    provide { myPresenter as myContract.Presenter }
    provide { MyObjectBox.builder().androidContext(androidApplication()).build() }
}

provide creates a singleton so it will only execute that builder once correct? Also is there a major difference between  bean and provide?

Yes, provide {} will manage a unique instance for you. bean can't' have extra binding with bind:
provide { myPresenter } bind as myContract.Presenter::classwill bind definition on myPresenter type and myContract.Presenter. Whereas provide { myPresenter as myContract.Presenter } only bind the definition on myContract.Presenter type.
You can read more about the Koin DSL: http://insert-koin.io/docs/1.0/reference/koin-dsl/
But I see that people sometimes are confused about provide and bean. I will deprecate the provide keyword, to only have bean and factory keywords to declare your definitions.

I close the issue. Don"t hesitate to open a new one. Or try to contact us directly: https://insert-koin.io/docs/1.0/team/
Cheers.

Thank you for your help!


Register v0.2.1

@JuliaRegistrator register

Registration pull request created: JuliaRegistries/General/39673
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.2.1 -m "<description of version>" cd1b175d47c06c8ccbbddcdfaf3af263d43c7e91
git push origin v0.2.1


🌐 [i18n-KO] Translated guides/upload.md to Korean

What does this PR do?
Translated the guides/upload.md file of the documentation to Korean.
Thank you in advance for your review.
Part of https://github.com/huggingface/huggingface_hub/issues/1626

Before reviewing

[x] Check for missing / redundant translations (번역 누락/중복 검사)
[x] Grammar Check (맞춤법 검사)
[x] Review or Add new terms to glossary (용어 확인 및 추가)
[x] Check Inline TOC (e.g. [[lowercased-header]])
[x] Check live-preview for gotchas (live-preview로 정상작동 확인)

Who can review? (Initial)

Team PseudoLab, may you please review this PR?
@jungnerd, @heuristicwave, @harheem, @cjfghk5697, @seoulsky-field, @nuatmochoi, @boyunJang, @SeungAhSon, @seoyoung-3060, @junejae
Before submitting

[x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[x] Did you read the contributor guideline,
Pull Request section?
[ ] Was this discussed/approved via a Github issue or the forum? Please add a link
to it if that's the case.
[x] Did you make sure to update the documentation with your changes? Here are the
documentation guidelines, and
here are tips on formatting docstrings.
[ ] Did you write any new necessary tests?

Who can review? (Final)

@jungnerd, @heuristicwave May you please review this PR?

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

일부 번역이 안된 주석이 있습니다! 확인 부탁드려요 🤗

@jungnerd 해당 파트는 주석이 아닌 예시 코드 내의 커밋 메세지인데, 이 부분까지 번역하는 쪽으로 정책이 잡혔나요?

일부 번역이 안된 주석이 있습니다! 확인 부탁드려요 🤗

@jungnerd 빠진 부분 작업 완료했습니다!

@Wauplin LGMT. This PR is good to go!


Radius options for "repulse"

Currently, when using the onhover repulse mode, it's obvious that there's a diameter around the mouse to create the effect. It would be nice to see some options that allow us to grow/shrink this diameter

I use the tsparticles library.
there you're able to set the radius within the repulse mode.
repulse: {
  distance: 60,
  duration: 0.01,
  speed: 1,
}


documentation for Transform is wrong, or at least incomplete

describes position/rotation:number but getTransform returns internal rep instead of converting back to angle
i think the expected return is {position: angle}
there is documentation on q but it is cryptic
q: Rot
Defined in dist/planck.d.ts:369
Defined in src/common/Transform.ts:44
rotation rotation
o {p: o, q: o, constructor: Object}
p: o
x: 1.3333333333333333
y: 2
: "o"
q: o
s: 0.3894183423086505
c: 0.9210609940028851
: "o"
: "o"

Rot (rotation) is internally stored as { s: sin(angle), c: cos(angle)}, and Transform as {p: Vec2, q: Rot}.
I just update the code and added js-doc for rotation (api-doc and typescript definitions will update by the next build).
Thanks for reporting this!


Add a DispatchForwardingActor

What's needed?
We need an actor that is in charge of abstracting the access to the dispatch API for receiving dispatches, and that can act as a local cache for dispatches, so if the connection to the dispatch API is lost other actors can still get whatever contents could be fetched in the past.
Proposed solution
Add a DispatchForwardingActor that will poll the dispatch API and save currently active dispatches (start time in the present or future) and forward them to other actors.
When an actor first subscribe to the dispatch channel, they will get the whole list of active dispatches and then when new dispatches are found in the dispatch API, they will be sent to the channel too.
This could be done in a class or actor, but an actor is preferred because we only need one cache for a whole microgrid location, not one per process/controller.
Use cases
No response
Alternatives and workarounds
No response
Additional context
We have an internal actor, we can start moving this actor to the SDK or build it from scratch depending on how much will change with the dispatch API client.

FYI @thomas-nicolai-frequenz @stefan-brus-frequenz @christianparpart @sahas-subramanian-frequenz

I was wondering if the actor should more be called along the lines of a "dispatch request broadcaster" or "dispatch request router"?

OK, renamed to DispatchBroadcastingActor.

Done: https://github.com/frequenz-floss/frequenz-dispatch-python


FIlenaming

@wagerpascal A few of your posts use _ instead of - in the names.  Take a look and fix this when you're able.

Should be fixed now.

@wagerpascal I still see a few that are still unchanged.  There are some with spaces in the title too
https://github.com/silshack/spring2016/tree/gh-pages/_posts/jasonwang
Also I didn't see pull requests for these.  You shouldn't be committing directly to gh-pages, even for small changes like this.  Should be only 1-2 clicks more than committing directly.

@eah13 That's completely my bad. I have cleaned out the duplicate pages I believe, and I corrected the post with the space in the title.

No prob! That directory looks spic and span now. :star:


npm run test fails locally

When running npm run test locally:
><EMAIL_ADDRESS>build
> builder build plugin

➤ YN0000: ┌ Building @yarnpkg/plugin-allow-scripts
➤ YN0000: └ Completed in 1s 713ms

➤ YN0000: ✓ Done building @yarnpkg/plugin-allow-scripts!
➤ YN0000: ? Bundle path<EMAIL_ADDRESS>➤ YN0000: ? Bundle size: 0.99 KB

><EMAIL_ADDRESS>build:types
> tsc -b

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/generateKernel.d.ts' because it would overwrite input file.

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/generatePolicy.d.ts' because it would overwrite input file.

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/index.d.ts' because it would overwrite input file.

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/loadPolicy.d.ts' because it would overwrite input file.

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/makeInitStatsHook.d.ts' because it would overwrite input file.

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/mergePolicy.d.ts' because it would overwrite input file.

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/moduleRecord.d.ts' because it would overwrite input file.

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/parseForPolicy.d.ts' because it would overwrite input file.

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/schema/ambient.d.ts' because it would overwrite input file.

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/schema/index.d.ts' because it would overwrite input file.

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/schema/lavamoat-policy.v0-0-1.schema.d.ts' because it would overwrite input file.

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/sourceTransforms.d.ts' because it would overwrite input file.

error TS5055: Cannot write file 'LavaMoat/packages/core/types/src/types.d.ts' because it would overwrite input file.

Found 13 errors.

This comes from npm run build:types, which fails with the same error when run explicitly.

run npm run setup first 😄
unfortunately, there's nothing to be done about this; if TS configs change and you have stale artifacts in your working copy, they have to be blasted away first -- or you get the above error.
also, there may be some difference in behavior between npm test and npm run test; I'm not sure, though.


i would like to use the npm package

hey! are you using the babel-plugin-react-hooks namespace? i'd love to use it if you aren't.

ah. ok then.


book: describe how the current resolver sometimes duplicates deps

What does this PR try to resolve?
This updates the book to document the behavior described in #9029, where sometimes Cargo will duplicate a dep when it doesn't have to.
How should we test and review this PR?
Doc-only change; someone with knowledge of the resolver should read and assess.

I've updated the PR based on the current feedback.

Thank you for the clear description of a confusion that is often brought up. I appreciate your follow through on making this documentation better.

This looks great, thank you!
@bors r+

:pushpin: Commit 50588a9ee37048d2c9c6571c68dc7809ebfe9815 has been approved by ehuss
It is now in the queue for this repository.

:hourglass: Testing commit 50588a9ee37048d2c9c6571c68dc7809ebfe9815 with merge 4a2ebfbbf3f1b63c6b1796501cd0a6b97cdbd59c...

:sunny: Test successful - checks-actions
Approved by: ehuss
Pushing 4a2ebfbbf3f1b63c6b1796501cd0a6b97cdbd59c to master...


Delete your export folder on the source code and try again


Install from Microsoft Store

The msix package is already distributed, it would make it a lot easier to get and keep updated if it was installable from the Microsoft Store.
Additionally as the package would be signed, it would allow msix package to be installable without having to switch to developer mode.

MSFT team already announces this. They works on this internally.

This is a dupe of #7730

sorry, i didn't see #7730
Closing now.


1277|  Count Square Submatrices with All Ones | Python

Title -countSquareSubMatricesWithAllOnes
What will change - I will add a solution to this problem
Type of Issue -
Please add/delete options that are not relevant.

[x] Adding New Code

Programming Language
Please add/delete options that are not relevant.

[x] Python

Self Check

Ask for issue assignment and wait to get assigned to it before making Pull Request.
Add your file in the proper folder
Clean Code and Documentation for better readability
Add Title and Description of the program in the file

:star2: Star it :fork_and_knife:Fork it :handshake: Contribute to it!
Discord server ✉ - https://discord.gg/CXksGdn
Happy Coding,

Please assign this issue to me, I am new to open source and looking for opportunities to contribute


Hello, I want to know is there some data process before run data_find.py?

When I see your paper, I find it in the paper, a IDirD image resize to 768×768  , splitinto 3*3 patch and covert to gray space. I don't find any process in data_find.py. So should I process IDRID frist into that format?

Sure. You need to resize a IDRiD image to 768×768 pixels and convert it to gray. Then use data_find.py to process data and split it into patches.

So the data_find.py will split it into patches？

And can you prove the train val split for ADAM and IDIRD?

We provide an example of split operation in function 'hog_split' in data_find.py. And the input of model is in form of patches.

We followed the original protocol of two datasets and you can see the detailed information in their papers.

Thanks a lot

If you find it is useful, hopefully give a star to this repository


Update testcontainers-scala-scalatest to 0.39.5

Updates com.dimafeng:testcontainers-scala-scalatest from 0.39.4 to 0.39.5.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.dimafeng", artifactId = "testcontainers-scala-scalatest" } ]

labels: library-update, semver-patch

@janstenpickle we don't even use testcontainers
Do we need to keep them up-to-date? I suggest removing this dep


Import command

After this, #64 will need just one more PR to have some commands add built-in imports.

General note on the conversions - it seems like most of the cases we're converting follow a common pattern - each one does something like
firstword wordseparator [nextword wordseparator, ...] lastword
We could structure the base converter to follow this format. At that point, each CaseStyle simply becomes a set of properties:

how to style the first word
how to style the middle/next words
how to style the last word
what the word separator character (if any) is

Under this style, for example:
PackageUpperCase = style all words upper case, word separator = .
camelCase = style first word lower case, next and last words upper case, word separator none
etc.


Downstream processing output of HTO counts from CITE-SEQ

Hi,
I have a really simple question and perhaps i am missing the obvious. I have run Cite-seq on my HTO fastqs from 10x and the output mapped 88% reads to HTO and 12% were unmapped. Now in the umi count output i essentially have 7 features (6 antibody tags + unmapped). On using this output downstream in Seurat, when i am de-multiplexing my samples, i should include the un-mapped as a feature as well? Logically it makes sense to do that, as it helps to better identify doublets and remove cells which have unmapped reads based on HTO counts. But as i am identifying lot more doublets this way, i wanted to confirm if this is ok.
Any help will be appreciated.
Best,
Devika

I would take them out. The latest vignette also doesn't use them.


Mono: Data template directory not found

Godot version:
98caeb635
OS/device including version:
Windows 10 1903
Issue description:
Gives me this error when trying to export for windows:

All files are properly placed and the data folders are properly named (to my understanding):

Looks like it was looking for data.mono.windows.64.release_debug instead:

is this desired? The release folder inside the binary is named data.mono.windows.release not data.mono.windows.64.release_debug

debug ? ".release_debug" : ".release" means that release_debug is used for debug builds, so it's the debug one that you should rename, not the release one.
That's indeed expected, release_debug is the target used for "debug" templates (they're still optimized like release builds, but with added debug code - versus the pure debug target which is unoptimized, and thus only relevant for engine developers).

debug ? ".release_debug" : ".release" means that release_debug is used for debug builds, so it's the debug one that you should rename, not the release one.
That's indeed expected, release_debug is the target used for "debug" templates (they're still optimized like release builds, but with added debug code - versus the pure debug target which is unoptimized, and thus only relevant for engine developers).

Alright, just a side note that the folders should also be named properly when compiling. I wouldn't  of known this without looking at the source code :grimacing:

What command did you use to build your debug template?

What command did you use to build your debug template?

scons p=windows target=debug tools=no module_mono_enabled=yes disable_3d=yes disable_advanced_gui=yes use_lto=yes -j6
Should i change target to debug_release?
Also, after changing debug folder as you suggested i end up with data.mono.windows.64.release and data.mono.windows.64.release_debug which gives me the same error as before

You should use target=release_debug, and the folder should be properly named out of the box. As mentioned, target=debug is only for engine developers, the debug export templates are compiled with target=release_debug.
@neikeq Looks like you don't support exporting target=debug binaries for now. The code should likely check for both release_debug (default) and debug as fallback (which means that one could export a target=debug binary together with the target=release_debug data, but I guess that might be fine?).

It searches for data.mono.windows.64.release_debug and data.mono.windows.64.debug

It shouldn't, as per the code you linked. It's either data.mono.windows.64.release (release template) or data.mono.windows.64.release_debug (debug template).

You should use target=release_debug, and the folder should be properly named out of the box. As mentioned, target=debug is only for engine developers, the debug export templates are compiled with target=release_debug.
@neikeq Looks like you don't support exporting target=debug binaries for now. The code should likely check for both release_debug (default) and debug as fallback (which means that one could export a target=debug binary together with the target=release_debug data, but I guess that might be fine?).

I guess the documentation on this should be fixed:
`# Build temporary binary
scons p=windows tools=yes module_mono_enabled=yes mono_glue=no
Generate glue sources
bin\godot.windows.tools.64.mono --generate-mono-glue modules/mono/glue
Build binaries normally
Editor
scons p=windows target=release_debug tools=yes module_mono_enabled=yes
Export templates
scons p=windows target=debug tools=no module_mono_enabled=yes
scons p=windows target=release tools=no module_mono_enabled=yesThe target for export templates there isdebuginstead ofrelease_debug`

Indeed, that part of the documentation is wrong. All other platform docs use release_debug for the debug template.

It searches for data.mono.windows.64.release_debug and data.mono.windows.64.debug

It shouldn't, as per the code you linked. It's either data.mono.windows.64.release (release template) or data.mono.windows.64.release_debug (debug template).

Recompiling with release_debug seems to have fixed this :relaxed:. My data folders now are data.mono.windows.64.release and data.mono.windows.64.release_debug

Indeed, that part of the documentation is wrong. All other platform docs use release_debug for the debug template.

So i guess its only a documentation issue now? Also it used to search for debug instead of release_debug. A few versions back i was compiling with debug. I made a pull request the docs change.

We should already support both debug and release_debug as of de7c2ad21b4cc2d889a5aeda64ead962036d2aa4: https://github.com/godotengine/godot/commit/de7c2ad21b4cc2d889a5aeda64ead962036d2aa4#diff-452afcfd0c57cc1e4800975b71fd2249R148

We should already support both debug and release_debug as of de7c2ad: de7c2ad#diff-452afcfd0c57cc1e4800975b71fd2249R148

Ah great, so this is fixed in the latest master branch then.

We should already support both debug and release_debug as of de7c2ad: de7c2ad#diff-452afcfd0c57cc1e4800975b71fd2249R148

Shouldn't there be a check for data.mono.windows.64.debug forlder also then? When i compiled with debug flag the data folder was named data.mono.windows.64.debug.


Suggestions weight differences between divvunspell and hfst-ospell

Compare the following two commands and their output:
$ echo nikinitawiwapamew | divvunspell --always-suggest --zhfst tools/spellcheckers/fstbased/desktop/hfst/crk.zhfst
Reading from stdin...
Input: nikinitawiwapamew		[INCORRECT]
nikî-nitawi-wâpamâw		40.458984
naki-nitawi-wâpamêw		49.151657
naki-nitawi-wâpamâw		53.151657
nika-nitawi-wâpamâw		53.151657
nikê-nitawi-wâpamâw		53.151657
nikî-nitawi-asamâw		53.151657
nikî-natawi-wâpamâw		57.151657
nikî-nitawi-wanâmâw		57.151657
niwî-nitawi-wâpamâw		57.151657
kikî-nitawi-wâpamâw		67.15166

$ echo nikinitawiwapamew | hfst-ospell -S -b 16 tools/spellcheckers/fstbased/desktop/hfst/crk.zhfst
"nikinitawiwapamew" is NOT in the lexicon:
Corrections for "nikinitawiwapamew":
nikî-nitawi-wâpamâw    15.458984
naki-nitawi-wâpamêw    24.151655
nikî-nitawi-wanâmâw    27.151655
niwî-nitawi-wâpamâw    27.151655
kikî-nitawi-wâpamâw    27.151655
nikî-natawi-wâpamâw    27.151655
nika-nitawi-wâpamâw    28.151655
nikê-nitawi-wâpamâw    28.151655
nikî-nitawi-asamâw    28.151655
naki-nitawi-wâpamâw    28.151655
nikî-nitawi-wêpimâw    31.151655

What is strange about the weight differences is that the weights are encoded in the fst's (acceptor and error model). So the expectation would be that identical input should give identical weight for identical output.
On the surface, it looks like divvunspell is giving wrong weights — if one takes the acceptor weight of the suggestion + the weight of each editing operation, one comes close to the hfst-ospell weight:
$ echo nikî-nitawi-wâpamâw | hfst-lookup -q tools/spellcheckers/fstbased/desktop/hfst/acceptor.default.hfst
nikî-nitawi-wâpamâw	nikî-nitawi-wâpamâw	9,458984
nikî-nitawi-wâpamâw	nikî-nitawi-wâpamâw	11,151655

The lowest weight is the one used, and there are four editing operations applied to the input string, with the following weight:
# strings.default.regex:
{in} -> {î-n}::1,
{iw} -> {i-w}::1;

## editdist.default.txt:
a	â	2

# final_strings.default.txt:
mew:mâw	4

9,458984 + 1 +1 + 2 + 4 = 17,458984

hfst-ospell is still 2 off, but that is nevertheless way closer than divvunspells 40.458984.
These differences are problematic for two reasons: it indicates a bug in the weight calculation, and it makes it hard to debug the suggestions and their ordering.

Intentional. To get behavior & weights resembling hfst-ospell, use the option --no-case-handling:
$ echo nikinitawiwapamew | divvunspell --no-case-handling --always-suggest --zhfst tools/spellcheckers/fstbased/desktop/hfst/crk.zhfst
Reading from stdin...
Input: nikinitawiwapamew		[INCORRECT]
nikî-nitawi-wâpamâw		15.458984
naki-nitawi-wâpamêw		23.151655
nîmi-nitawi-wâpamêw		23.151655
kikî-nitawi-wâpamâw		27.151655
naki-nitawi-wâpamâw		27.151655
nikî-natawi-wâpamâw		27.151655
nikî-nitawi-wanâmâw		27.151655
niwî-nitawi-wâpamâw		27.151655
nîmi-nitawi-wâpamâw		27.151655
nika-nitawi-wâpamâw		28.151655

Is there any documentation on how these weighting differences work? Is there any system to them? As seen by your examples, the weight is not changed by the same amount for all words, which means that the order of suggestions does not match the one given by hfst-ospell. It also seems to contradict the edit distance rules.
For sjd, there is e.g. a edit distance rule ь ҍ 1, but no rule for the pair д ж, but still normal divvunspell prioritizes the latter correction:
echo куэдь|divvunspell suggest -n 10 -a sjd.zhfst
Reading from stdin...
Input: куэдь		[INCORRECT]
куэжь		24.414778
куэдҍ		25.879082
куэкь		26.178366
кӯль		35.915688
куэда		36.871513
куэдтҍ		40.974392
кӯдҍ		41.178368
пуэдҍ		50.53614
нуэдҍ		51.02569
вуэдҍ		52.871513

which is not the case when enabling --no-case-handling:
echo куэдь|divvunspell suggest -n 10 --no-case-handling -a sjd.zhfst
Reading from stdin...
Input: куэдь		[INCORRECT]
куэдҍ		10.879083
кӯдҍ		16.178366
куэжь		19.414778
пуэдҍ		20.536139
кӯль		20.915686
куэдтҍ		20.974392
нуэдҍ		21.025686
куэкь		21.178366
куэда		21.871513
вуэдҍ		22.871513

As seen, both lists contain the same corrections, but standard divvunspell is adding a different number of points to each result, thus changing the ordering. Here I've listed the results in the order given with  --no-case-handling, and indicated how many extra points divvunspell adds to each suggestion in normal mode:
куэдҍ		 + 15
кӯдҍ		 + 25
куэжь		 + 5
пуэдҍ		 + 30
кӯль		 + 15
куэдтҍ		 + 20
нуэдҍ		 + 30
куэкь		 + 5
куэда		 + 15
вуэдҍ		 + 30

I assume this is connected to the lines
"case_handling": {
    "start_penalty": 10,
    "end_penalty": 10,
    "mid_penalty": 5
  },

in the configuration, although these penalties do not seems to match the actual penalties exactly, and I do not understand what it has got to do with case handling.
If this behavior is intended, in which way are we expected to write our edit distance rules so that we still prioritize what we wish to prioritize?

@snomos

@trondtynnol you are correct in this:

I assume this is connected to the lines

but the name of the option is partly misleading. It does also affect case handling — it is turned off — but it also implies turning off the position-based extra weights.

If this behavior is intended

It is, but the present system is crude, and definitely hard to debug, and it is completely undocumented outside the source code for divvunspell.
The basic idea is this: we know from many studies that spelling errors are not evenly distributed throughout the words. Spelling errors are rare in first and last position, and typically most frequent in the middle of the word. This generalisation holds relatively well across languages, but I am not aware of any studies that look into how this plays out in morphology rich languages with mainly suffix morphology. In any case, the present implementation is a very rough first attempt at modelling this.
What should be done to improve divvunspell in this regard is at least the following:

document the behaviour
make the added penalties configurable both on the command line and in the speller (.zhfst) files
debuggable: using a trace or debug option, the added positional weights should be printed, preferably along with the position(s) getting extra weight

@flammie could probably look into this, and anyone can help with documentation.

@trondtynnol & @flammie the relevant code section seems to be this:
https://github.com/divvun/divvunspell/blob/cb27a91f52ec542bbb77ad9a069303375f0cf4bd/divvunspell/src/speller/mod.rs#L230-L261

More specifically it seems to be a bug in these lines:
https://github.com/divvun/divvunspell/blob/cb27a91f52ec542bbb77ad9a069303375f0cf4bd/divvunspell/src/speller/mod.rs#L246-L249
The bug:

when calculating the distance (=editing distance, if I read this correctly), it is calculated over the whole string, ie the first and last letter included. This means that first and last letter edits are penalised twice: both as separate first and last letter penalties, and secondly when the middle edit penalty is calculated. They should of course only be counted once.

Possible fix: chopping of the first and last letters of both the input and suggestion before calculating the value of distance, but that could probably give wrong results when the editing itself is removing the fisrt/last character. So care must be taken for those cases.
Wit this bug fixed, the extra penalties for the first three cases above would be (buggy weight in parentheses):
куэдҍ		 + 10		(+15)
кӯдҍ		 + 20		(+25)
куэжь		 + 5 		(+5)

which would reorder the first two suggestions:
куэдҍ		20.879082
куэжь		24.414778

Fixing this bug should be done first, and a new version released. @flammie could you do it?

LAst I was debugging this I think that if the finite-state error model is crafted carefully it's probably best to zero out the programmatic weighting but it's probably been beneficial for spell checkers where the default edit distance etc is untouched.
It will be easier to debug this and many rust-based stuffs if you all set RUST_LOG=trace (when debugging and eventually keep it at DEBUG or something for the rest), most relevant info is already logged by the code.
I am gonna try to decouple the recasing and reweighting first a bit and see from there, maybe we need more metadata and settings for these all.

My experience is that position-based error modelling is really hard to do well using FST's, so I see the programmatic weighting as a useful complement to the FST based error model. But we need documentation, and we need access to fine-tune the position-based weights to fit better with the rest of the error model. The present algorithm is also very crude, and might need replacement with something more sophisticated. There should be good proposals in the literature (not that I have any references right now).

I am gonna try to decouple the recasing and reweighting first a bit and see from there, maybe we need more metadata and settings for these all.

Sounds good.

After @flammie 's changes in https://github.com/divvun/divvunspell/commit/71d27eec7a777a46228ca19ebe9bf6e8a2dcb524 (and the following commits), the sjd test above gives the following output:
echo куэдь|divvunspell suggest -n 10 -a tools/spellcheckers/sjd.zhfst
Reading from stdin...
Input: куэдь		[INCORRECT]
куэдҍ		20.8799
куэжь		24.415596
куэкь		26.179182
куэда		31.87233
кӯль		35.916504
куэдтҍ		35.975212
кӯдҍ		36.179184
пуэдҍ		40.603645
нуэдҍ		41.026505
вуэдҍ		42.87233

which means that the desired suggestion is on top also for divvunspell. It is probably too early to close this as fixed, more testing is needed, but it looks good.
@trondtynnol it would be good if you too could test whether the latest changes in divvunspell gives better suggestions.

This (i.e. fixing the double penalty?) definitely seems to improve suggestions somewhat for our test material in general. Suggestions for our small palatalization corpus improved from
[#1] 76.10% [^5] 95.05% [any] 98.63% [none] 0.27% [wrong] 1.10%

to
[#1] 81.59% [^5] 96.70% [any] 98.63% [none] 0.27% [wrong] 1.10%

and our larger speller corpus  with many complicated misspellings also improved slightly from
[#1] 62.46% [^5] 82.35% [any] 85.51% [none] 1.55% [wrong] 12.94%

to
[#1] 64.03% [^5] 82.85% [any] 85.53% [none] 1.55% [wrong] 12.92%

There are still weightings I do not quite understand how are calculated – the rules do not seem to match the suggestions – but this is probably down to something else than the position penalties.
I have tried setting the penalties to zero, and that does worsen the suggestions, i.e. we should probably keep this feature also for sjd. However, reducing the end penalty from 10 to 6 does improve results somewhat, suggesting configurable position penalties would be a good thing.

Thanks for the report, it confirms that the penalty bug fix is a real improvement. I suggest we ASAP release a bug fix version of divvunspell (1.0.1) with the present code, and then work on an incremental feature release (1.1.0) with the configurable position penalties feature. For the configurability to work, we also need to add support for it in the index*.xml file in the .zhfst archives, and make sure it is read from there, and also make sure the configuration is kept in the .thfs and .bhfst formats.

I checked some other Sámi languages, the changes are mostly positive, I think sme gets -.1% shifted away from first position but that's probably alright and can be adjusted with weights.
Some of the changes touch public datatypes, not sure if it needs changes in other software?

Would it still be possible to run locally compiled spellchecking in Libreoffice on Linux if we abandon .zhfst ? That is a feature which is very useful for the current work on sjd.

It would definitely be possible, but requires that we build a Linux version of the divvunspell oxt for LO. That should not be too hard, but must be done first.


Repository Issue and PR Templates

Proposed Changes
This PR adds a feature request template, a documentation change request template, and a PR template for use in the repository.
Pull Request Checklist
Please check if your PR fulfills the following requirements:

[X] I have read the CONTRIBUTING guidelines
[X] My commits follow the appropriate guidance
[X] I certify that I have the appropriate permissions to add these changes to the repository
[X] An issue is open for the changes proposed
[ ] I have added/updated tests for new code changes (if applicable)
[ ] Documentation has been added/updated (if applicable)
[x] I built (npm run build) locally and pushed all changes

Issues Addressed: (e.g. #7, #8, #9)
Other Information
None.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


generic-stack-builder: attempt to add propagation

Attempt to fix #40039.
This adds a shellHook to handle propagated dependencies like that seen
in #40039 where gpgme needed libgpg-error.
Not sure if this is the correct way to do it, but this was my best attempt at it.
/cc @ElvishJerricco

One thing I’m not sure about is whether this breaks nix-build for these? Not sure if anyone uses it that way but we probably also need a configure hook to handle that.


replace colors with chalk everywhere

First PR!
This will close https://github.com/TryGhost/Ghost/issues/5259
One notable change in here is that I removed some excessive conditions from the config_spec. They weren't passing anymore, because the logInfo functions now include the "WARNING" prefix and the actual message in the same string.
I can switch that, but the code seemed cleaner from my perspective.

@jaswilli version pinned. thanks.


add compatibility with http 0.13

http 0.13 requires URIs to be provided with the Uri class rather than as strings

Thank you @bangfalse!


WebSocketServerProtocol instance leak

I belive there might be a leak in twisted websocket implementation - the instances of WebSocketServerProtocol subclass are never garbage collected. I have reproduced that with the echo example by repeatedly connecting and disconnecting clients and observing the used memory on the server process. Also adding del implementation on the server protocol instance and printing calls indicates it is never called.
Similar test with twisted Protocol subclass and Factory works fine - the instances are deleted when connection is closed. So I suppose the problem comes with the WebSocket implementation. Unfortunately I have not been able to identify what reference keeps them alive.
Testing with autobahn 18.10.1, python 3.5

For what it's worth, adding __del__ changes the nature of a class's interaction with the garbage collector, and may cause it to become uncollectable garbage where previously it would have been found.

Might be related to #1064

For what it's worth, adding __del__ changes the nature of a class's interaction with the garbage collector, and may cause it to become uncollectable garbage where previously it would have been found.

I am not a python expert but I have heard that too. However I have confirmed it by just observing memory use too without code modifications. And besides - I am not sure having a __del__ implementation would make a difference when the object is collected.

Might be related to #1064

I thought that but it talks about TLS only and I have verified it with unencrypted socket. But I haven't examined the proposed fix to see if it applies here too. Will do and report back.

Found similar problem

I tried using tornado websocket server and got memory leak too. This is really interesting. Here is the code:
import sys
import json
import logging
import tornado.escape
import tornado.ioloop
import tornado.options
import tornado.web
import tornado.websocket
import tornado.httpserver
from tornado.options import define, options

define("port", default=8000, help="run on the given port", type=int)

clients = set()

class BroadcastServerHandler(tornado.websocket.WebSocketHandler):
    def open(self):
        clients.add(self)
        print("Connected client {}".format(self.request.remote_ip))

    def on_message(self, message):
        msg = json.loads(message)
        try:
            if msg['command'] == 'feeder':
                print("Received feed and data from {}".format(self.request.remote_ip))
                for c in clients:
                    c.write_message(json.dumps(msg))
                    print("Message sent to {}".format(c.request.remote_ip))
        except:
            pass

    def on_close(self):
        clients.remove(self)
        print("Disconnected client {}".format(self.request.remote_ip))

    def check_origin(self, origin):
        return True

application = tornado.web.Application([
    (r'/', BroadcastServerHandler),
])

if __name__ == '__main__':
    http_server = tornado.httpserver.HTTPServer(application)
    http_server.listen(options.port)
    print("Websocket Server Started")
    tornado.ioloop.IOLoop.current().start()

Even when the "feeder" client closed the connection, the memory usage of the websocket server is still high.

cannot reproduce


[CODE IMPROVEMENT] Creation of a python script to push the model to Hugging Face from CLI

🔧 Proposed code refactoring

Adaptation in the H2O code for publishing fine-tuned models from H2O LLM Studio to Hugging Face using the CLI

Motivation

Using the Google Colab or other web tools to run the fine-tuning process. This will be easier and practical to try the H2O LLM Studio.
One more option to publish the model to Hugging Face. The only way to push the fine-tuned model to Hugging Face is from the graphic tool H2O LLM Studio using a local GPU or a cloud virtual machine with GPU as well.

P.S.: I have done some code adaptation following the patterns of the H2O LLM Studio code
Link https://github.com/diegomiranda02/cli_HF_h2o_llm_studio
In the section "The following code snippets were adapted using existing codes in the H2O LLM Studio project", steps 6 and 7. I hope the code can contribute to the project.

Great work @diegomiranda02 thanks for linking your code.
Actually, we have this issue open for quite a while now (https://github.com/h2oai/h2o-llmstudio/issues/95) which describes exactly the pain points that you have and apparently solved already. Would you want to contribute this to H2O LLM Studio as integrated utility functions?

Sure @pascal-pfeiffer. Which steps should I take to do it?

@pascal-pfeiffer
I have forked the repository and created the hugging_face_utils.py file inside the app_utils directory with two utility functions: publish_model_to_hugging_face and get_model_card.
Updated the experiment.py file and import the utility functions from the hugging_face_utils.py. Changed the method experiment_push_to_huggingface_dialog to directly call the publish_model_to_hugging_face utility function to use the same function using the CLI and the graphic tool. But I cannot test the graphic tool once I don´t have a GPU installed on my machine. Could you test it, please?
I have already tested the CLI to publish the model, which works properly.
Link to the Hugging Face model published from CLI with the utility function
https://huggingface.co/diegomiranda/testing-fork-model

The fork link https://github.com/diegomiranda02/h2o-llmstudio.git

Great work @diegomiranda02 thanks for linking your code.
Actually, we have this issue open for quite a while now (#95) which describes exactly the pain points that you have and apparently solved already. Would you want to contribute this to H2O LLM Studio as integrated utility functions?

@pascal-pfeiffer The code is done.

Thank you @diegomiranda02 , will you open a PR?

Hi @pascal-pfeiffer
PR created https://github.com/h2oai/h2o-llmstudio/pull/300


Not able to get clip board data from paste event

Hello,
I am trying to retrieve the clipboard data ( i have a requirement to paste an image into the text area), I dont seem to find the event e for me to search for var items = e.clipboardData.items;
Can you please help me!
Thanks

Is there a way I can access original event object and read clipboardData from there?


Update color documentation with rgba and name

Hi! I found that these format options work. I would prefer if these were documented features, that's all.

That's a good suggestion. I was surprised by that fact when I discovered it. Not having that piece of information can be misleading. I don't think any extra emphasis is needed. When I read that line now alarm bells go off in my head that I should stay away from trying to parse that string value.
I've added an extra commit.

Thanks @peterekepeter !


Bluetooth: Mesh: Return ETIMEDOUT if k_sem_take call times out

EAGAIN is used in some other places in the code, e.g. if node is not
provisioned when a model tries to send a message. This change helps to
differentiated if the acknowledged message timed out from other failers.
Signed-off-by: Pavel Vasilyev<EMAIL_ADDRESS>

Reference: https://github.com/nrfconnect/sdk-nrf/pull/5543#pullrequestreview-747635646


When using 'incremental materializations' getting "Use multi=True when executing multiple statements" error

Using MySQL 8.0 on AWS RDS. Table materializations work fine. However, when using "incremental materializations", I am getting Use multi=True when executing multiple statements error, since DBT automatically creates a delete and insert statements when the unique_key constraint is used in the config under the current dbt model. In the README says incremental mat. are supported. How do you achieve it?

Also running into this same issue, but when using MySQL 5.7. I observed the same behavior as described in the original description on this issue from @teno-justos: incremental materialization does run successfully if a unique_key constraint is not provided, but fails when unique_key is included in the config for the dbt model. This makes sense: including unique_key is what causes a DELETE statement to be generated before the INSERT of records from a temporary table into the target table, i.e. multiple SQL statements and apparently the mysql connector won't execute multiple statements unless you pass multi=True to .execute().

@teno-justos and @joeschmid thank you for noticing this error and reporting it!
I was able to reproduce the issue with a simple model like the following:
{{
    config(
        materialized='incremental',
        unique_key='id',
    )
}}

select * from {{ source('raw', 'seed') }}
{% if is_incremental() %}
where id > (select max(id) from {{ this }})
{% endif %}

I will start working on a fix.

Thanks so much @dbeatty10! If you need any help in testing a fix, we'd be happy to lend a hand on that!
Also, if it were easy to support the most recent release of dbt as part of this work that'd be great (i.e. release the fix with support for dbt 1.0.0 all at once), but don't want to add extra work -- whatever saves you time and effort.

@joeschmid
I suspect dbt 1.0.0 will take a fair amount of work, so prioritizing getting this one solved and released first.
Could you try out this release candidate and see if it fixes the issue you had with incremental models using a unique_key?
dbt-mysql==<IP_ADDRESS>rc1

@dbeatty10 just tested this successfully and confirmed the fix. I was able to recreate the issue, observe it fail (with Use multi=True when executing multiple statements error), install dbt-mysql==<IP_ADDRESS>rc1 and have several incremental builds succeed for the exact same model. Thanks so much for the fix and for getting this out so quickly. Very much appreciated!


Atmos device tickrate dependency

A bunch of atmos devices currently scale directly with the atmos tick rate. E.g., the thermo machines. Other devices, usually those with volume/s data-fields, scale with the elapsed time (i.e., more or less independent of tick rate).
This should probably be standardised so that they all scale with elapsed time. Additionally, the elapsed time should either be passed as an argument of the update event, or all these devices should just assume the update time is AtmosphereSystem.AtmosTime.

I agree that all atmos devices should scale with elapsed time.
Separately, there is currently a bug where the fixed elapsed time is not AtmosphereSystem.AtmosTime but rather AtmosphereSystem.AtmosTime times the number of cases in a switch statement.


update about (not) removing uncaughtException event

I think the documentation is a little bit outdated about removing uncaughtException from Node.js core.
They decided to keep it as is and closed the proposal about removing it.
https://github.com/nodejs/node-v0.x-archive/issues/2582#issuecomment-9971225
The documentation was updated as well.
https://github.com/nodejs/node-v0.x-archive/commit/a2fd657b10c7609e1776004156a8cd3016e2c6c8
So we should too :)

Thanks for the update!  LGTM.


various problems, preference page and broked fonts

Describe the bug
click on preference all page white and fonts broked
To Reproduce
Steps to reproduce the behavior:

Go to Application
Click on Preference
See error

Expected behavior
Page totally white
Screenshots

Desktop (please complete the following information):

OS: Fedora 33 (latest release)
Installation Method: snap
App Version: 2020.4.2

Additional context

Duplicate of https://github.com/Kong/insomnia/issues/2707

i run insomnia in debug mode
└─ $ ▶  insomnia --enable-debug
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
15:51:57.978 › Running version 2020.4.2
Error org.freedesktop.DBus.Error.Failed: cannot find snap for connection: not supported
Gtk-Message: 15:51:58.231: Failed to load module "pk-gtk-module"
Gtk-Message: 15:51:58.240: Failed to load module "pk-gtk-module"
15:51:58.473 › [fix] Running database repairs
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
15:51:58.744 › [db] Initialized DB at /home/vluongo/snap/insomnia/109/.config/Insomnia/insomnia.$TYPE.db
15:51:58.745 › Init responses DB
15:51:58.746 › [localstorage] Initialized at /home/vluongo/snap/insomnia/109/.config/Insomnia/localStorage
15:51:59.001 › [main] Loading file:///snap/insomnia/109/resources/app.asar/renderer.html
15:51:59.032 › [ga] Non-interactive General, Launched, 2020.4.2
15:51:59.053 › [ga] Queued event [
  { name: 't', value: 'event' },
  { name: 'ec', value: 'General' },
  { name: 'ea', value: 'Launched' },
  { name: 'ni', value: '1' },
  { name: 'el', value: '2020.4.2' }
]
15:51:59.533 › [updater] Updater not running platform=linux dev=false
(node:60499) Electron: Loading non-context-aware native module in renderer: '/run/user/1000/snap.insomnia/.org.chromium.Chromium.iA8YwK'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:60499) Electron: Loading non-context-aware native module in renderer: '/run/user/1000/snap.insomnia/.org.chromium.Chromium.UuuxBf'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:60499) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Fontconfig warning: FcPattern object weight does not accept value [0 205)


Envoy 1.27.0: Regression in UserSpace::IoHandleImpl

Title: New reset_drain_trackers_and_accounting functionality on Buffer::Instance::move caused a regression in Envoy 1.27.0
Description:
The logic for moveUpTo in io_handle_impl.cc has changed this line:
dst.move(src, res);

.. to this:
dst.move(src, res, /*reset_drain_trackers_and_accounting=*/true);

.. as part of this PR: https://github.com/envoyproxy/envoy/pull/27499
The PR claims the following:
"we don't care about the write buffer as soon as it has been written to the peer's IO handle."
.. but UserSpace::IoHandleImpl implements the "write" by moving the buffer slice to another buffer instance without expecting the slice to be marked as invalid.  The problem is that the drainer on Buffer::Slice is set up in the constructor as:
addDrainTracker([&fragment]() { fragment.done(); });

.. and fragment.done() invalidates the slice per the following comment for BufferFragment in buffer.h:
  /**
   * Called by a buffer when the referenced data is no longer needed.
   */
  virtual void done() PURE;

The end result is that slices sent using the userspace IO handle are invalidated before being moved to the other buffer.
Snippet from call stack:
#13 0x0000000006533cd9 in Envoy::Buffer::Slice::Slice(Envoy::Buffer::BufferFragment&)::{lambda()#1}::operator()() const (this=0x48f7edd0d10) at external/envoy/source/common/buffer/buffer_impl.h:93
 :
#16 0x0000000002632856 in Envoy::Buffer::Slice::callAndClearDrainTrackersAndCharges (this=0x48f7ee9d0d8) at external/envoy/source/common/buffer/buffer_impl.h:325
#17 0x000000000652878f in Envoy::Buffer::OwnedImpl::move (this=0x48f7ec94aa8, rhs=..., length=49595, reset_drain_trackers_and_accounting=true) at external/envoy/source/common/buffer/buffer_impl.cc:351
#18 0x0000000005933688 in Envoy::Buffer::WatermarkBuffer::move (this=0x48f7ec94aa8, rhs=..., length=49742, reset_drain_trackers_and_accounting=true) at external/envoy/source/common/buffer/watermark_buffer.cc:72
#19 0x0000000004af8635 in Envoy::Extensions::IoSocket::UserSpace::(anonymous namespace)::moveUpTo (dst=..., src=..., max_length=131072) at external/envoy/source/extensions/io_socket/user_space/io_handle_impl.cc:46
#20 0x0000000004af9cdf in Envoy::Extensions::IoSocket::UserSpace::IoHandleImpl::write (this=0x48f7ec94e00, buffer=...) at external/envoy/source/extensions/io_socket/user_space/io_handle_impl.cc:276
#21 0x0000000005a1a593 in Envoy::Network::RawBufferSocket::doWrite (this=0x48f7ec5ff20, buffer=..., end_stream=false) at external/envoy/source/common/network/raw_buffer_socket.cc:64
#22 0x000000000591a586 in Envoy::Network::ConnectionImpl::onWriteReady (this=0x48f7f1eea80) at external/envoy/source/common/network/connection_impl.cc:712

Repro steps:
I cannot share my application source, but it is running a test case that sends a large payload in multiple 4K slices through the internal listener (userspace IO handle) mechanism.  The test succeeds with versions of Envoy prior to 1.27.0.

I saw the same issue when implementing the IoUring. Probably two ways to fix this

using copy instead of moving the buffer, but this really a workaround
Separate the BufferFragment's releasor and drain tracker.

@roelfdutoit I write up a possible fix, would you like to give a try, hope it can fix the issue.

/backport

@soulxu Thank you.  Yes, I would be happy to test any fixes

Please reopen this issue to track the changes in #28770


Replace levenshtein with thefuzz for better compatiblity

Codecov Report

Merging #18 (eaf827c) into master (8ade599) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #18   +/-   ##
=======================================
  Coverage   96.54%   96.54%
=======================================
  Files          28       28
  Lines         925      925
  Branches      144      144
=======================================
  Hits          893      893
  Misses         19       19
  Partials       13       13

Impacted Files
Coverage Δ

stapy/sta/entity.py
100.00% <100.00%> (ø)

stapy/sta/geo.py
100.00% <100.00%> (ø)

stapy/version.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


[TW#19294] Peripheral server reconnection

Hi,
i'm writing a code for esp32 to act as a ble peripheral with the gatt secure server.
after a while, i want the esp32 to deep sleep and then initiate a reconnection to the client. -  the server already bond with the client and has its info in the table.
so how do i make the server prompt for a reconnection from the client?
Thanks

you should add reconnection in the client.


Conflicted with third library while double_buffer enabled?

Hello there,
When to enable double_buffer feature, library ESPAsyncTCP-esphome will report error at begin() as following:
[E][AsyncTCP.cpp:1291] begin(): failed to start task
Look into its begin() function,
void AsyncServer::begin(){
    if(_pcb) {
        return;
    }

    if(!_start_async_task()){
        log_e("failed to start task");
        return;
    }
    int8_t err;
    _pcb = tcp_new_ip_type(IPADDR_TYPE_V4);
    if (!_pcb){
        log_e("_pcb == NULL");
        return;
    }
 ...

Where _start_async_task function is as follows:
static bool _start_async_task(){
    if(!_init_async_event_queue()){
        return false;
    }
    if(!_async_service_task_handle){
        customTaskCreateUniversal(_async_service_task, "async_tcp", 8192 * 2, NULL, 3, &_async_service_task_handle, CONFIG_ASYNC_TCP_RUNNING_CORE);
        if(!_async_service_task_handle){
            return false;
        }
    }
    return true;
}

Stack for 'async_tcp' is assigned to 16K.  I cannot fix, just report here.
BR~

More detail required please

@mrfaptastic Let's describe it in details.
I use WeMOS mini D1 to drive 4 panels (64*32) to display something. To support web service by which user can control what to display, I add a webserver. Firstly using ESPAsyncWebServer-esphome by Hristo Gochkov which is adopted by many users (because its downloaded number is high). Of course, to prevent flickering, I enable double_buffer feature, but the library report error above mentioned. In result, webserver is unavailable although wifi connection is OK(got localIP). Just described above, the async webserver library is sort of heavy to mini D1, I guess, then I change to standard webserver #include <WebServer.h> provided by Arduino. Now everything is OK. So, simply, the ESPAsyncWebServer-esphome is not suitable to my case using your great library. And th report is just a hint to others when choosing webserver library.
Although it's ugly till now, I share it. There are some Chinese voice in it, don't mind please.
https://user-images.githubusercontent.com/1916257/120992103-db2afb80-c7b4-11eb-91aa-c5373ad16371.mp4

Hi @xuniuer. Double buffering uses double the memory and I think the Async library also uses more memory than the non-async library, so the combination of Async+double buffering = crash.
Using the NON-async library must provide just enough spare memory such that all works well.
Thank you for your kind words. Glad the library is of use to you.

@mrfaptastic It's right. Thanks for your attention and explanation.
The formula of memory usage for double buffering is useful.
Thanks again!


[BUG] Illegal argument exception when running hybrid query on index alias with filter

What is the bug?
We are getting following error when running hybrid queries on index alias. The same query works fine if index name is used.
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "hybrid query must be a top level query and cannot be wrapped into other queries"
      }
    ]
}

This issue occurs only when index alias is created with filters, here is the alias definition for our index alias
{
  "index-name-v0": {
    "aliases": {
      "ro-alias-index-name": {
        "filter": {
          "bool": {
            "must_not": {
              "term": {
                "eventType": "DELETED"
              }
            }
          }
        }
      }
    }
  }
}

How can one reproduce the bug?

Create the index with text and vector fields
Populate the data in the index
Create alias for the index as defined above
Run hybrid queries with alias name

What is the expected behavior?
Irrespective of using the index name or alias name in the hybrid query, open search should return the same results.
What is your host/environment?
AWS Managed OpenSearch 2.11
Do you have any screenshots?

Do you have any additional context?
The query runs fine if index alias is created without any filters.

@vamshin Please look into this issue as well

@ksingh17i can you add the steps of reproudcing the error

Hi @navneet1v I already added them in the ticket details, the only important step is to add an search alias with filter and then use that alias to run hybrid queries.

Create the index with text and vector fields
Populate the data in the index
Create alias for the index as defined below
Run hybrid queries with alias name

{
"index-name-v0": {
"aliases": {
"ro-alias-index-name": {
"filter": {
"bool": {
"must_not": {
"term": {
"eventType": "DELETED"
}
}
}
}
}
}
}
}

This situation is similar to, if say, we create a search pipeline with a combination of Filter Query processor and Normalization processor. And then try to run hybrid query (match & knn)

@ksingh17i the reason this happens is because Hybrid Query clause needs to be a top level query clause and these filter processors and index alias wraps the whole query into another compound query clause which breaks the hybrid query clause.
We need to do more deep-dive to identify how to unwrap the query clauses. This will take some time. In meantime I would suggest not using Filter Query processor and index alias filter and put the filters in the query itself. Example:
POST example-index/_search?search_pipeline=nlp-search-pipeline
{
  "query": {
    "hybrid": {
      "queries": [
        {
          "bool": {
            "should": [
              {
                "match": {
                  "text1": "neural"
                }
              }
            ],
            "filter": { // the filter for index alias used as filter for internal query
              "bool": {
                "must_not": {
                  "term": {
                    "eventType": "DELETED"
                  }
                }
              }
            }
          }
        },
        {
          "knn": { // this can be neural query clause too.
            "my_vector": {
              "vector": [
                3
              ],
              "k": 10,
              "filter": { // filter for index alias use as efficient filter here for vector search.
                "bool": {
                  "must_not": {
                    "term": {
                      "eventType": "DELETED"
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
}

@martin-gaievski lets close this issue as the feature is merged. @vamshin this feature is released in 2.13 version.


No exit button once camera is up and scanning.  How can I cancel without scanning?

` await BarcodeScanner.hideBackground(); // make background of WebView transparent
document.documentElement.style.opacity = '0'; // hideBackground() is not working on iOS

document.documentElement.style.visibility = 'hidden';

document.documentElement.style.display = 'none';

const result = await BarcodeScanner.startScan(); // start scanning and wait for a result

document.documentElement.style.opacity = '100%';

document.documentElement.style.visibility = 'visible';

document.documentElement.style.display = 'block';`

Hi this is what we do so that it works on both IOS and android.  However it goes into full camera mode with nothing to cancel it if the user decides to abandon barcode scanning.   Any ideas how to handle this?

Also, if the user uses the back button, it exits the app, can this be controlled in the BarcodeScanner side to call the stopScan?

Hello,
You can follow this: https://github.com/capacitor-community/barcode-scanner/issues/26#issuecomment-808862821
And then apply a scanner ui inside the div:

<div class="scanner-ui">
    <ion-header translucent>
      <ion-toolbar>
        <ion-buttons slot="end">
          <ion-button (click)="cancelScanning()">Cancel</ion-button>
        </ion-buttons>
      </ion-toolbar>
    </ion-header>
</div>

and cancelScanning could be
    cancelScanning() {
        document.body.classList.remove("qrscanner");
        BarcodeScanner.showBackground();
        BarcodeScanner.stopScan();
    }

I will close this issue since the Plugin comes with no UI by definition. This is currently not really well documented and some basic examples would make sense, but I just became a maintainer of this repo and it will take me a while to update the docs and add some examples.


Remove deprecated configuration items

Expected Behavior of the rule
Configuration items on the rule are all in use.
Context
Some are deprecated. These should be removed for detekt 2.

For reference, those are the one I found:
detekt-rules-empty/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/empty/EmptyFunctionBlock.kt
25-    @Configuration("Excludes all the overridden functions")
26:    @Deprecated("Use `ignoreOverridden` instead")
27-    private val ignoreOverriddenFunctions: Boolean by config(false)

detekt-rules-naming/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/naming/VariableNaming.kt
37-    @Configuration("ignores member properties that have the override modifier")
38:    @Deprecated("This configuration is ignored and will be removed in the future")
39-    @Suppress("UnusedPrivateMember")

detekt-rules-naming/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/naming/FunctionParameterNaming.kt
32-    @Configuration("ignores overridden functions with parameters not matching the pattern")
33:    @Deprecated("Use `ignoreOverridden` instead")
34-    private val ignoreOverriddenFunctions: Boolean by config(true)
--
36-    @Configuration("ignores overridden functions with parameters not matching the pattern")
37:    @Deprecated("This configuration is ignored and will be removed in the future")
38-    @Suppress("DEPRECATION", "UnusedPrivateMember")

detekt-rules-naming/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/naming/ConstructorParameterNaming.kt
34-    @Configuration("ignores constructor properties that have the override modifier")
35:    @Deprecated("This configuration is ignored and will be removed in the future")
36-    @Suppress("UnusedPrivateMember")

detekt-rules-naming/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/naming/FunctionNaming.kt
34-    @Configuration("ignores functions that have the override modifier")
35:    @Deprecated("This configuration is ignored and will be removed in the future")
36-    @Suppress("UnusedPrivateMember")

detekt-rules-naming/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/naming/BooleanPropertyNaming.kt
39-    @Configuration("ignores properties that have the override modifier")
40:    @Deprecated("This configuration is ignored and will be removed in the future")
41-    @Suppress("UnusedPrivateMember")

detekt-rules-naming/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/naming/MemberNameEqualsClassName.kt
64-    @Configuration("if overridden functions and properties should be ignored")
65:    @Deprecated("Use `ignoreOverridden` instead")
66-    private val ignoreOverriddenFunction: Boolean by config(true)

detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UseDataClass.kt
52-    @Configuration("allows to provide a list of annotations that disable this check")
53:    @Deprecated("Use `ignoreAnnotated` instead")
54-    private val excludeAnnotatedClasses: List<Regex> by config(emptyList<String>()) { list ->

detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/ForbiddenComment.kt
94-    @Configuration("forbidden comment strings")
95:    @Deprecated("Use `comments` instead, make sure you escape your text for Regular Expressions.")
96-    private val values: List<String> by config(emptyList())
--
113-    @Configuration("error message which overrides the default one")
114:    @Deprecated("Use `comments` and provide `reason` against each `value`.")
115-    private val customMessage: String by config("")

detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnderscoresInNumericLiterals.kt
36-    @Configuration("Length under which base 10 numbers are not required to have underscores")
37:    @Deprecated("Use `acceptableLength` instead")
38-    private val acceptableDecimalLength: Int by config(5) { it - 1 }

detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/AbstractClassCanBeConcreteClass.kt
57-    @Configuration("Allows you to provide a list of annotations that disable this check.")
58:    @Deprecated("Use `ignoreAnnotated` instead")
59-    private val excludeAnnotatedClasses: List<Regex> by config(emptyList<String>()) { list ->

detekt-rules-errorprone/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/IgnoredReturnValue.kt
58-    @Configuration("if the rule should check only annotated methods")
59:    @Deprecated("Use `restrictToConfig` instead")
60-    private val restrictToAnnotatedMethods: Boolean by config(defaultValue = true)

detekt-rules-complexity/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/complexity/LongParameterList.kt
33-
34:    @Deprecated("Use `allowedFunctionParameters` and `allowedConstructorParameters` instead")
35-    @Configuration("number of parameters required to trigger the rule")

detekt-formatting/src/main/kotlin/io/gitlab/arturbosch/detekt/formatting/wrappers/Indentation.kt
28-    @Configuration("continuation indentation size")
29:    @Deprecated("`continuationIndentSize` is ignored by KtLint and will have no effect")
30-    @Suppress("UnusedPrivateMember")

Those rules are instead deprecated, perhaps we should just remove them:
detekt-rules-errorprone/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/DuplicateCaseInWhenExpression.kt
31-@ActiveByDefault(since = "1.0.0")
32:@Deprecated("Rule deprecated as compiler performs this check by default")
33-class DuplicateCaseInWhenExpression(config: Config) : Rule(

detekt-rules-errorprone/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/RedundantElseInWhen.kt
58-@ActiveByDefault(since = "1.2.0")
59:@Deprecated("Rule deprecated as compiler performs this check by default")
60-class RedundantElseInWhen(config: Config) : Rule(

detekt-rules-errorprone/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/bugs/MissingWhenCase.kt
68-@RequiresTypeResolution
69:@Deprecated("Rule deprecated as compiler performs this check by default")
70-class MissingWhenCase(config: Config) : Rule(

Hi @cortinico I have tried to remove the Deprecated properties. Few things I couldn't understand

What is the use of detekt-core/src/main/resources/deprecation.properties
When removing the deprecated property threshold from the rule LongParameterList TCs in RunnerSpec was failing. I think it is assuming threshold to be deprecated in should not throw on deprecation warnings and hence this TC is failing

What is the use of detekt-core/src/main/resources/deprecation.properties

This file contains the information of all the deprecations of detekt. It is used to warn the user about renamed rules or renamed properties. We don't fail the config validation if you use a deprecated property. This file should be empty on 2.0 (we shouldn't release with deprecated rules/properties)
About the second point if you have things working you can create a PR with that and the "complex" cases can be handled in different PRs.

Hi @BraisGabin I have raised the PR at https://github.com/detekt/detekt/pull/7425
Currently, deprecations.properties contains below entries
complexity>ComplexMethod=Rule is renamed to `CyclomaticComplexMethod` to distinguish between Cyclomatic Complexity and Cognitive Complexity
complexity>LongParameterList>threshold=Use `allowedFunctionParameters` and `allowedConstructorParameters` instead
formatting>TrailingComma=Rule is split between `TrailingCommaOnCallSite` and `TrailingCommaOnDeclarationSite` now.
style>ForbiddenPublicDataClass=Rule migrated to `libraries` ruleset plugin
style>LibraryCodeMustSpecifyReturnType=Rule migrated to `libraries` ruleset plugin
style>LibraryEntitiesShouldNotBePublic=Rule migrated to `libraries` ruleset plugin
style>MandatoryBracesIfStatements=Use `BracesOnIfStatements` with `always` configuration instead

Currently, info about the migrated and renamed rules are present, and I think that should be there to inform the users that those rules are migrated or renamed or split. Right?
Also, I couldn't remove the complexity>LongParameterList>threshold as this property is being used in should not throw on deprecation warnings TC. Idealy to test that TC we should construct one dummy rule with deprecated rule there. Which we can take in some other PR

Well, we didn't start to think about releasing 2.0. We will need a migration guide or something similar because we have a lot of changes. I like the idea of detekt pointing out what needs to be migrated but I would prefer error messages instead of warnings.


Add sns ready fix webpa-common version in glide

Codecov Report

Merging #58 into master will increase coverage by 1.83%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
+ Coverage    62.3%   64.13%   +1.83%
==========================================
  Files           7        7
  Lines         642      686      +44
==========================================
+ Hits          400      440      +40
- Misses        226      228       +2
- Partials       16       18       +2

Impacted Files
Coverage Δ

src/caduceus/http.go
91.3% <0%> (-8.7%)
:arrow_down:

Continue to review full report at Codecov.

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


SchemaProvider::getSelfSubUrl returns URl with and without ending '/' depending on input resource

If resource is given it returns something like '/posts/2' (note no ending '/') but if null given it returns '/posts/' (with ending '/'). This lead to double slashes in URLs for resources without identities e.g. '/profile//relationships/comments'.
Need more consistency. It should be no trailing '/' in all cases.

It will be a breaking change. Sub-url in Schema (if set) had to have both starting and ending slashes e.g. '/posts/'. Now it must have only starting.
As this feature is optional it won't affect majority of users. Though it must be documented.


Fix grammatical errors in README.md and update License

Hey, thanks for your contribution sir! 🙏
It's merged ✅


ModuleNotFoundError: No module named 'paddle.fluid'

paddle.fluid has been  deleted ，so which paddlex version is correct ???
Traceback (most recent call last):
File "/home/xietao/software/miniconda3/bin/paddlex", line 5, in
from paddlex.command import main
File "/home/xietao/software/miniconda3/lib/python3.9/site-packages/paddlex/init.py", line 20, in
from . import cv
File "/home/xietao/software/miniconda3/lib/python3.9/site-packages/paddlex/cv/init.py", line 15, in
from . import models
File "/home/xietao/software/miniconda3/lib/python3.9/site-packages/paddlex/cv/models/init.py", line 15, in
from .segmenter import *
File "/home/xietao/software/miniconda3/lib/python3.9/site-packages/paddlex/cv/models/segmenter.py", line 25, in
from paddlex.cv.transforms import arrange_transforms
File "/home/xietao/software/miniconda3/lib/python3.9/site-packages/paddlex/cv/transforms/init.py", line 16, in
from .batch_operators import BatchRandomResize, BatchRandomResizeByShort, _BatchPadding
File "/home/xietao/software/miniconda3/lib/python3.9/site-packages/paddlex/cv/transforms/batch_operators.py", line 22, in
from paddle.fluid.dataloader.collate import default_collate_fn
ModuleNotFoundError: No module named 'paddle.fluid'

欢迎尝试使用PaddleX 2.2 进行训练，https://aistudio.baidu.com/intro/paddlex


Cannot create flutter project with latest android studio + plugin

Tried creating a new project using android studio + flutter plugin and the window got stuck in "creating flutter project".
Used only default options and unmarked the "kotlin" and "Swift" support.

So, I reinstalled the plugin and it worked. There might have been a problem with the latest update.


Merge main into features/extract-to-component

You could totally just have pushed this directly :P

Yea, I mostly wanted to run CI and see what work was ahead for getting to green. I also fixed the horrible generated description....


"Edit With" doesn't recognize some editors

when trying to open notes with an external editor, some options are "greyed out" such as MoU and TextEdit. (SubEthaEdit and TextWrangler work fine on my system). I would love to be able to open them in MoU

some updates here: this problem can be fixed if you use plaintext to store notes, and associate .txt or .md with say MoU in the system prefs.  (following instructions here http://andrewbrookins.com/tech/ia-writer-and-notational-velocity/). However it still doesn't work when using an encrypted database (subetha and textwrangler do)

looks like this issue has already been closed in another fork
https://github.com/scrod/nv/issues/287


[bug] @tamagui/core - startClearStyleCacheInterval - prevents node process from exiting

Describe the bug
Similar to #540 - startClearStyleCacheInterval found in packages/core/src/helpers/getStylesAtomic.ts has a setInterval that's hanging.
PASS  src/__tests__/App-test.tsx
  ✓ renders correctly (22 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        2.46 s, estimated 3 s
Ran all test suites.

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

  ●  Timeout

      at startClearStyleCacheInterval (node_modules/@tamagui/core-node/dist/static.js:7058:3)
      at createTamagui (node_modules/@tamagui/core-node/dist/static.js:9878:3)

To Reproduce
Source code: https://github.com/criszz77/luna/tree/withTamagui
Failing pipeline: https://github.com/criszz77/luna/actions/runs/3922716171/jobs/6705843301

Run to install:

npx react-native init MyAppName --template @criszz77/luna@next

Run yarn jest --detectOpenHandles

Thanks, fixed in 94cbc1691b0fb39de6ca3c28a0b78623800a74c7


Create system APIs for File Access

Is your feature request related to a problem? Please describe.
As of now, if you want to write to a file, the (proper) steps

Do a computer.fs.find() to check if the file you're trying to write to already exists
If it does, it's a little "easier", you can just `computer.fs.find(<FILE_PATH>).data.write(<DATA_TO_WRITE>)
(If the file doesn't exist), You need to find the parent or execute touch <FILE_PATH>

Describe the solution you'd like
Add a system API call write(file_path, content) that will

Automatically check if the given file_path exists (create if it doesn't)
Try to write the content to the file after checks are complete

Closed in #10