Read articles remain visible even after refreshing

I'd like a way to "clear" read items from the All Unread section.
I've not been a user for long, but I find it weird that the articles I've read stay on-screen even after refreshing. Is the expected use case to switch from All Unread to another "tab" and back again?

On Mac or iOS?

macOS, sorry.

On Macs, you can do View > Clean Up Articles to remove the read articles from the All Unread feed. Keyboard shortcut is cmd-'
The reason we don’t do it automatically while you’re still in the All Unread feed is because you may not actually be ready for read items to disappear. There might be something you wanted to come back to, maybe something that you passed by quickly, for instance.

Ah, and there's even a toolbar button already for it! The behaviour is still a little odd, the final selected-and-read article stays in the list until I de-select and hit the button again.

Sure — because you’re still reading that article. Or there’s a good chance you’re reading it, and it would be jarring to have it removed before you’re finished.

I guess this is a philosophical difference – as a completionist, I don't want to "clean up" until after I'm done reading everything, and at that point I want everything marked as read gone.
Would you entertain a preference for this behaviour? I'm willing to have a go myself, I don't expect it done for me. Been a while since I did macOS dev, but I'd gladly try.

I hate to disappoint, but I don’t think I’d want a preference for this. We’re trying hard to keep the app from being overwhelmed with preferences, and this is a very small issue. (This is the first time it’s come up.)

No problem at all, thanks for the replies all the same.


SqliteException(26): file is not a database, file is not a database (code 26)

So, I've been randomly getting these errors when trying to open a database on start. I am not sure if this is moors issue, or maybe even the operation systems (lineage os).
I/flutter ( 8265): "SqliteException(26): file is not a database, file is not a database (code 26)"
I/flutter ( 8265): #0      throwException (package:sqlite3/src/impl/exception.dart:32)
I/flutter ( 8265): #1      PreparedStatementImpl.select (package:sqlite3/src/impl/statement.dart:59)
I/flutter ( 8265): #2      DatabaseImpl.userVersion (package:sqlite3/src/impl/database.dart:54)
I/flutter ( 8265): #3      _VmVersionDelegate.schemaVersion (package:moor/src/ffi/vm_database.dart:146)
I/flutter ( 8265): #4      DelegatedDatabase._runMigrations (package:moor/src/runtime/executor/helpers/engines.dart:263)
I/flutter ( 8265): #5      DelegatedDatabase.ensureOpen.<anonymous closure> (package:moor/src/runtime/executor/helpers/engines.dart:245)
I/flutter ( 8265): <asynchronous suspension>
I/flutter ( 8265): #6      BasicLock.synchronized (package:synchronized/src/basic_lock.dart:34)
I/flutter ( 8265): <asynchronous suspension>
I/flutter ( 8265): #7      _MoorServer._handleEnsureOpen (package:moor/src/runtime/isolate/server.dart:74)
I/flutter ( 8265): <asynchronous suspension>
I/flutter ( 8265): #8      IsolateCommunication.setRequestHandler.<anonymous closure>.<anonymous closure> (package:moor/src/runtime/isolate/communication.dart)

On startup of the app we try to open the database. Sometimes randomly it says the file was not a database. Killing and re-opening the app fixes it quite often, but occasionally a full data wipe is needed. We do not use app store for anything else than moor, so this seems....odd.
It could also be that this is some Lineage OS issue as it seems to only have appeared after the last LOS update?
Any ideas of what might be going on?

Killing and re-opening the app fixes it quite often

Wait what? It's a file-based database, right? It sounds very strange that this would be fixed by restarting the process. Do you open the database on multiple threads at once? Maybe it's some threading issue that for some reason only happens on the latest update.

It could also be that this is some Lineage OS issue

I assume it would hit others as well in that case, but so far I couldn't find anything.

Wait what? It's a file-based database, right?

Yes, that is correct

Do you open the database on multiple threads at once?

Nope, only one thread
So it sounds like this is probably not a moor issue but rather an issue with something else reading files either incorrectly or not at all?

@Sorunome I don't know if that error can throw with SQLite but for sure it can with SQLCipher when using an incorrect password or file format.
Are you using SQLCipher?

We are using SQLCipher
We currently store the passphrase using flutter_secure_storage and a few things hint to that module maybe not returning the right keys. Sorry for bothering and thank you for the help!

Is there a way to capture this exception "file is not database" and handle gracefully ?
especially when using SQLCipher
Can we have a function IsDatabase(file) to test before opening.

The database is opened with the first query, so I imagine you could use something like customQuery('SELECT 1'); to open it and catch that exception if necessary. If there's an exception, chances are it's not a proper database file.
You could also circumvent moor and use the lower-level apis for this, depending on which implementation you're using.


Can I still use Docker Desktop without a desktop on my Ubuntu 20.04?

Yup. Just download Docker with whatever package manager you use and proceed with the README instructions.


Post v6 cleanup

This PR prunes all legacy state format fields, and upgrades to a version of orga which has done the same.

Codecov Report

Merging #189 (cb64f81) into develop (5184121) will increase coverage by 0.30%.
The diff coverage is 0.00%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.
@@             Coverage Diff             @@
##           develop     #189      +/-   ##
===========================================
+ Coverage    14.61%   14.92%   +0.30%
===========================================
  Files           22       22
  Lines         6220     6092     -128
===========================================
  Hits           909      909
+ Misses        5311     5183     -128

Files Changed
Coverage Δ

src/airdrop.rs
42.97% <0.00%> (+5.15%)
:arrow_up:

src/app.rs
2.08% <ø> (ø)

src/app/migrations.rs
0.00% <0.00%> (ø)

src/bitcoin/checkpoint.rs
10.02% <0.00%> (+0.43%)
:arrow_up:

src/bitcoin/header_queue.rs
76.60% <0.00%> (+0.44%)
:arrow_up:

src/bitcoin/mod.rs
19.08% <0.00%> (+0.51%)
:arrow_up:

src/incentives.rs
0.00% <0.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Bugfix and tests for RegularCartesianGrid

This fixes a minor bug in the grid constructor and contributes some simple tests to verify correct grid construction. It also adds the syntax
g = RegularCartesianGrid(Float32, (nx, ny, nz), (Lx, Ly, Lz))

for constructing grids with element type Float32 (for example).

Right --- the core functions cannot allocate memory. Even @views may not be best for the final code because it allocates some memory.
I would have written the xderiv functions, but I wasn't exactly sure how to deal with the staggered grid --- does the differentiation formula depend on whether the variable is stored at cell centers or cell faces?

Yeah it'll be slow but I figure we can always optimize later...
The velocities stored are defined as averages over the cell faces (well the velocities are normal to the cell faces) while tracer variables (e.g. temperature T, salinity S, and pressure p) are defined as cell or volume averages. The difference is reflected in the different operators, e.g. div_flux vs. u_dot_u, which I guess is why the δ operators aren't exactly derivatives as much as they are difference operators used by the actual divergence and curl operators.

Well, that explains some of my flailing!
Ok, I agree with what you're saying.
Should we anticipate that functions should mutate some output array, so function signatures will generally be something like operation!(out, in, otherargs...)?
Anticipating the basic code pattern will reduce work later, and it'll still be possible to write operation! quick and dirty.

On that note, we have a lot of the algorithmic details written up in Overleaf so I can use it to bootstrap some documentation (as soon as the deep convection example works...).
And yeah I'm not sure yet which operations will look like operation!(out, in, ...) although probably all of them at the derivative operator level will as it's supposed to be as fast as possible.

My experience is that essentially all non-constructor functions take this form.
Functions that output something will likely only be called during the construction of types --- which occurs once in the model lifecycle, during initialization. After model initialization, almost no new memory can be allocated; therefore all functions mutate existing data structures.
This concept manifests even at the user-level, where one scripting pattern might be
model = Model(parameters...)

set_ic!(model, ic)

run!(model)

In this case, the user obtains an output (model) from the Model constructor at model initialization. Subsequently, all compute-intensive operations act to mutate 'model' in place.


Update Runner.php

At HttpService.php file at check function, you are silence an fsockopen. Now the silence is not working because of the errorHandler. By adding the check for "error_reporting", you can check if an error is silenced, if it is not silenced it will throw an ErrorException.

thx


Feature: Switch to Disable JSON File Creation

Is your feature request related to a problem? Please describe.
When creating an html report, the JSON output is ALWAYS created except when the output format is text. Currently, with a big report the JSON file results in a crash. See #166. Skipping the JSON file will be stopgap measure.
Describe the solution you'd like
A command line switch to disable JSON file creation.
Describe alternatives you've considered

The text format does not have the issue above but it's not really what I want.
I considered not using ApplicationInspector, but I like ApplicationInspector.

The json is a feature allowing the user to switch from the UI so not planning on an option to disable today and as mentioned in #166 this doesn't really solve the problem if for instance a large json only format was specified.  Going to close this and focus on fixing #166.  Thanks.

Thanks. Makes sense.


Articles in Vietnamese

It seems that the comments (and maybe values?) for Vietnamese (viet1252) on GB020 (definite) and GB021 (indefinite) have been exchanged.
Namely, the comment for definite articles includes: "Indefinites are accompanied by a classifier (Vuong and Moore, 1994:103) though I was unable to infer whether these can be deemed as indefinite articles as such (see Wiki)"

@JacobMenschel how'd you feel about assisting @OlenaShcherbakova in more article reviews?

I agree with your findings, I have fixed the coding accordingly. Thanks!


reversed() implementation is different with cpython

From @ironpythonbot on December 9, 2014 17:31
E:\2.5test\ironpythonCompatableFor2.5\25\Lib>ipy
IronPython console: 2.0
Copyright (c) Microsoft Corporation. All rights reserved.

>>> n = 10
d = range(n)
it = reversed(d)
d[1:] = []
len(it)
10
list(it)
Traceback (most recent call last):
File , line 0, in ##304
File , line 0, in _stub_##255
IndexError: index out of range: 9
^Z

E:\2.5test\ironpythonCompatableFor2.5\25\Lib>python
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on
win
32
Type "help", "copyright", "credits" or "license" for more information.
n = 10
d = range(n)
it = reversed(d)
d[1:] =[]
len(it)
0
list(it)
[]

Work Item Details
Original CodePlex Issue: Issue 23915
Status: Active
Reason Closed:  Unassigned
Assigned to:    Unassigned
Reported on:    Jul 28, 2009 at 12:08 AM
Reported by:    dfugate
Updated on: Feb 22, 2013 at 2:12 AM
Updated by: jdhardy
Custom value:   Reported internally at Microsoft.
Test:   test_iterlen.py
CreatedDate:    1/9/2008
NewInternalID:  409735
OldInternalID:  365854
AreaPath:   IronPython\Python25
Plaintext Attachments
CodePlex Issue #23915 Plain Text Attachments
Copied from original issue: IronLanguages/main#633

From @ironpythonbot on December 9, 2014 17:31
On 2011-01-29 06:35:03 UTC, rjnienaber commented:
This behaviour has subsequently changed in CPython 2.6 and 2.7 to the following:
c:\Python27\python.exe testcase-23915.py
Traceback (most recent call last):
File "testcase-23915.py", line 5, in
len(it)
TypeError: object of type 'listreverseiterator' has no len()
Ironpython 2.6.2 and 2.7b1 behaviour is the following:
ipy27 testcase-23915.py
Traceback (most recent call last):
File "testcase-23915.py", line 5, in
TypeError: len() of unsized object
The behaviour seems correct, it's just the error messages that need to be changed.

Closing this since https://github.com/IronLanguages/ironpython2/issues/387 has a better description of the remaining issue.


Cordova-Safe does not work anymore!

After hours of investigation, I have come to the conclusion that the cryptsetup error lies with cordova-safe.
I followed the official documentation very pedantic.
It still did not work! I even started 2 new projects from Scratch!
Just to check if I made a mistake or if something was wrong with npm.
Unfortunately, it is definitely the plugin which does not work anymore!
I really hope very much that cordova-safe is further developed!
Detailed information: https://stackoverflow.com/questions/44969832/is-cordova-safe-still-working-with-ionic3

I have been away from Cordova development for some time. I have a few weeks free and will be updating my plugins in this timespan. I don't have an ETA but I set up my Android environment earlier, I'll keep you posted.

wip branch posted at https://github.com/disusered/cordova-safe/tree/next
I've mostly been getting up to date with ecosystem and tooling changes, expect a lot more activity in the coming days :+1:


Interpreter: included module as class reports incorrect class

Bug Report
Example code explains it better:
module M
end

class E
  property base : M

  def initialize(@base)
  end
end

abstract class P
  include M

  def error
    puts self.class
    puts E.new(self).base.class
  end
end

class A < P
end

A.new.error

Running it in compiled mode gives below result:
$ cr bin/self_bug.cr
Using compiled compiler at /home/chao/git/personal/crystal/.build/crystal
A
A

Running it in interpreted mode gives a different result:
$ cr i bin/self_bug.cr
Using compiled compiler at /home/chao/git/personal/crystal/.build/crystal
A
P

The interpreter should report A as the class of @base
System info:
$ cr -v
Using compiled compiler at /home/chao/git/personal/crystal/.build/crystal
Crystal 1.5.0-dev [a37e5df9a] (2022-07-04)

LLVM: 14.0.6
Default target: x86_64-pc-linux-gnu

OS: Ubuntu 22.04

@cyangle Thank you! Keep them coming ❤


Allow customization of ClaimUid extraction

In the event that the claims which you look for in the current identity (sub, nameid, upn) don't exist you fallback on hashing all claims. All claims most likely includes expiry/issuance dates which change frequently. The end result being that antiforgery tokens which last across token refreshes will be wrongly invalidated.
My suggestion would be to add a setting which describes an alternate claim to use for uniquely identifying a principal.
I ran into this since my service uses an odd set of claims, none of which are the ones you are looking for.

@blowdart / @Tratcher / @rynowak - thoughts on adding an option for this?

This is possible to do with pubternal today: https://github.com/aspnet/Antiforgery/blob/dev/src/Microsoft.AspNetCore.Antiforgery/Internal/IClaimUidExtractor.cs
This would be easy to clean up and document if we think it's valuable. I believe this was possible in System.Web

Yeah, overriding that was how I worked around the issue. However, IMO, depending on the shape of anything in the .Internal namespaces seems like a code smell since you guys probably feel more comfortable changing thing at will in there.

Yeah, overriding that was how I worked around the issue. However, IMO, depending on the shape of anything in the .Internal namespaces seems like a code smell since you guys probably feel more comfortable changing things at will in there.

Yeah this is exactly correct. We want you to be able to unblock yourself, but over time APIs will migrate from .Internal to the mainline areas as we get requests for improvements.
If you find more cases like this feel free to give us feedback. It's definitely intended that we polish and move .Internal code into public areas if there is a good reason for you to use it. 👍

This issue was moved to aspnet/Home#2412


NuGet.Protocol.Plugins.ProtocolException: troubleshooting steps...?

The document below was no help for the issue I faced when running a build pipeline from a PR. Any possible help with a NuGet.Protocol.Plugins.ProtocolException?

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

ID: 364b2ab6-e786-ed3e-3446-c5933669995b
Version Independent ID: f408d9bf-6f1d-fa3f-2b78-c4814d27bd73
Content: Troubleshoot pipeline runs - Azure Pipelines
Content Source: docs/pipelines/troubleshooting/troubleshooting.md
Service: azure-devops-pipelines
GitHub Login: @steved0x
Microsoft Alias: sdanie

@tobiomojayowork -- thank you for your question.  This repo is solely for documentation issues, and this seems implementation-related.  Please consider these resources:

Azure DevOps Services
Azure DevOps on Stack Overflow

I am closing this issue now.  You are welcome to @ mention me for any followup.  We hope to hear from you again.


Swift 5 support

Hi, can we have swift 5 support?

@tereks swift5 support was already merged
https://github.com/airbnb/AloeStackView/pull/46

I mean mention swift 5 in podspec file

Hi @tereks, the podspec is updated in the latest release: https://github.com/airbnb/AloeStackView/releases/tag/v1.1.0


Slicing with lists in multiple axes

From the From the dask docs:

Dask.array supports most of the NumPy slicing syntax.
...
It does not currently support the following:
Slicing one dask.array with another x[x > 0]
Slicing with lists in multiple axes x[[1, 2, 3], [3, 2, 1]]
Both of these are straightforward to add though. If you have a use case then raise an issue.

Here's that issue.
My use case is for point-wise indexing in xray: https://github.com/xray/xray/issues/475
A simple use case using dask arrays:
x = da.ones((10, 100), chunks=(10, 10))
points = x[[1, 2, 3], [3, 2, 1]]

currently raises this error:
NotImplementedError: Don't yet support nd fancy indexing

cc @shoyer

Am I correct in assuming that in this case you'd like the shape of the output to be (3,) and not (3, 3)?

And if so is it important to you that this be the default array slicing syntax or are you ok with some other custom method?

Correct.  I'm looking for the default numpy slicing behavior, how we get there is up for discussion.  My preference would be to use the numpy slicing syntax, but could use a take method of some kind if that is substantially easier.

They're both the same level of difficulty to accomplish.  I mostly want to avoid locking dask into one behavior or the other for as long as possible.

NumPy has been discussing adding vindex and oindex attributes for explicit vectorized vs. outer/orthogonal indexing (see @seberg's NEP and PR).
I suggest that dask should follow NumPy's lead here, and consider implementing both attributes -- even if it will only support a limited subset of vectorized indexing. Outer indexing is easier to reason about and optimize (dask already has all the necessary functionality), and it will be useful to have explicit syntax both to support better fusing of getitem calls and to make things simpler for downstream libraries like xray (which uses outer indexing).
Dask certainly should not try to exactly replicate NumPy's current indexing behavior, which will sometimes but not always reorders axes with array indices, e.g.,
In [14]: x = np.zeros((5, 6, 7, 8))

In [15]: x[:, [0, 1], [0, 1]].shape
Out[15]: (5, 2, 8)

In [16]: x[:, [0, 1], :, [0, 1]].shape
Out[16]: (2, 5, 7)

OK, I've implemented this (I think) in #439 .  It could use a better name.  Happy to use vindex if that's best.  Feedback welcome.


python3Packages.polars: 0.20.15 -> 1.4.1

Description of changes
2024-08-09 update:
Trying to update polars to 1.4.1 results in following error:
   Compiling polars-sql v0.41.3 (/build/source/crates/polars-sql)
error[E0599]: no variant or associated item named `Titlecase` found for enum `StringFunction` in the current scope
   --> py-polars/src/lazyframe/visitor/expr_nodes.rs:890:37
    |
890 |                     StringFunction::Titlecase => {
    |                                     ^^^^^^^^^ variant or associated item not found in `StringFunction`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `py-polars` (lib) due to 1 previous error
💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit status: 101": `env -u CARGO "cargo" "rustc" "--jobs" "12" "--features" "all" "--no-default-features" "--target" "x86_64-unknown-linux-gnu" "--message-format" "json-render-diagnostics" "--offline" "--manifest-path" "/build/source/py-polars/Cargo.toml" "--release" "--lib" "--" "-C" "link-arg=-s"`
error: builder for '/nix/store/3jfsfxv13y2ds3idm3580l7dw69ldra0-python3.12-polars-1.4.1.drv' failed with exit code 1;
       last 25 log lines:
       >    Compiling zstd v0.13.2
       >    Compiling polars-error v0.41.3 (/build/source/crates/polars-error)
       >    Compiling git2 v0.19.0
       >    Compiling built v0.7.4
       >    Compiling py-polars v1.4.1 (/build/source/py-polars)
       >    Compiling polars-row v0.41.3 (/build/source/crates/polars-row)
       >    Compiling polars-json v0.41.3 (/build/source/crates/polars-json)
       >    Compiling polars-parquet v0.41.3 (/build/source/crates/polars-parquet)
       >    Compiling polars-ffi v0.41.3 (/build/source/crates/polars-ffi)
       >    Compiling polars-time v0.41.3 (/build/source/crates/polars-time)
       >    Compiling polars-io v0.41.3 (/build/source/crates/polars-io)
       >    Compiling polars-expr v0.41.3 (/build/source/crates/polars-expr)
       >    Compiling polars-mem-engine v0.41.3 (/build/source/crates/polars-mem-engine)
       >    Compiling polars-sql v0.41.3 (/build/source/crates/polars-sql)
       > error[E0599]: no variant or associated item named `Titlecase` found for enum `StringFunction` in the current scope
       >    --> py-polars/src/lazyframe/visitor/expr_nodes.rs:890:37
       >     |
       > 890 |                     StringFunction::Titlecase => {
       >     |                                     ^^^^^^^^^ variant or associated item not found in `StringFunction`
       >
       > For more information about this error, try `rustc --explain E0599`.
       > error: could not compile `py-polars` (lib) due to 1 previous error
       > 💥 maturin failed
       >   Caused by: Failed to build a native library through cargo
       >   Caused by: Cargo build finished with "exit status: 101": `env -u CARGO "cargo" "rustc" "--jobs" "12" "--features" "all" "--no-default-features" "--target" "x86_64-unknown-linux-gnu" "--message-format" "json-render-diagnostics" "--offline" "--manifest-path" "/build/source/py-polars/Cargo.toml" "--release" "--lib" "--" "-C" "link-arg=-s"`
       For full logs, run 'nix log /nix/store/3jfsfxv13y2ds3idm3580l7dw69ldra0-python3.12-polars-1.4.1.drv'.

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Yes, its probably a rust version issue, feel free to ping me when 1.79 lands on master.

rust 1.79 is on master now

Upgrading to polars 1.3.0 and trying to compile it now results in the following error:
   Compiling polars-sql v0.41.3 (/build/source/crates/polars-sql)
error[E0599]: no variant or associated item named `Titlecase` found for enum `StringFunction` in the current scope
   --> py-polars/src/lazyframe/visitor/expr_nodes.rs:890:37
    |
890 |                     StringFunction::Titlecase => {
    |                                     ^^^^^^^^^ variant or associated item not found in `StringFunction`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `py-polars` (lib) due to 1 previous error
💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit status: 101": `env -u CARGO "cargo" "rustc" "--jobs" "12" "--features" "all" "--no-default-features" "--target" "x86_64-unknown-linux-gnu" "--message-format" "json-render-diagnostics" "--offline" "--manifest-path" "/build/source/py-polars/Cargo.toml" "--release" "--lib" "--" "-C" "link-arg=-s"`
error: builder for '/nix/store/h78cgbmic5xn1nhmmp10v91qxd24nfm5-python3.12-polars-1.3.0.drv' failed with exit code 1;
       last 25 log lines:
       >    Compiling polars-error v0.41.3 (/build/source/crates/polars-error)
       >    Compiling git2 v0.19.0
       >    Compiling zstd v0.13.2
       >    Compiling built v0.7.4
       >    Compiling py-polars v1.3.0 (/build/source/py-polars)
       >    Compiling polars-row v0.41.3 (/build/source/crates/polars-row)
       >    Compiling polars-json v0.41.3 (/build/source/crates/polars-json)
       >    Compiling polars-parquet v0.41.3 (/build/source/crates/polars-parquet)
       >    Compiling polars-ffi v0.41.3 (/build/source/crates/polars-ffi)
       >    Compiling polars-time v0.41.3 (/build/source/crates/polars-time)
       >    Compiling polars-io v0.41.3 (/build/source/crates/polars-io)
       >    Compiling polars-expr v0.41.3 (/build/source/crates/polars-expr)
       >    Compiling polars-mem-engine v0.41.3 (/build/source/crates/polars-mem-engine)
       >    Compiling polars-sql v0.41.3 (/build/source/crates/polars-sql)
       > error[E0599]: no variant or associated item named `Titlecase` found for enum `StringFunction` in the current scope
       >    --> py-polars/src/lazyframe/visitor/expr_nodes.rs:890:37
       >     |
       > 890 |                     StringFunction::Titlecase => {
       >     |                                     ^^^^^^^^^ variant or associated item not found in `StringFunction`
       >
       > For more information about this error, try `rustc --explain E0599`.
       > error: could not compile `py-polars` (lib) due to 1 previous error
       > 💥 maturin failed
       >   Caused by: Failed to build a native library through cargo
       >   Caused by: Cargo build finished with "exit status: 101": `env -u CARGO "cargo" "rustc" "--jobs" "12" "--features" "all" "--no-default-features" "--target" "x86_64-unknown-linux-gnu" "--message-format" "json-render-diagnostics" "--offline" "--manifest-path" "/build/source/py-polars/Cargo.toml" "--release" "--lib" "--" "-C" "link-arg=-s"`
       For full logs, run 'nix log /nix/store/h78cgbmic5xn1nhmmp10v91qxd24nfm5-python3.12-polars-1.3.0.drv'.

Any ideas?

I get the same if I stick to 1.2.1

This looks like there are differences between how dependencies get resolved when using the vendor flag and when compiling locally. Its probably some error in their cargo files that is not picked up because they dont use vendoring to compile their stuff.
We should probably report it upstream, and signify that we use cargo vendor and that the discrepency is probably something in the cargo files.

This looks like there are differences between how dependencies get resolved when using the vendor flag and when compiling locally. Its probably some error in their cargo files that is not picked up because they dont use vendoring to compile their stuff.
We should probably report it upstream, and signify that we use cargo vendor and that the discrepency is probably something in the cargo files.

Opened an issue here: https://github.com/pola-rs/polars/issues/18117
don't hesitate to add more details if I missed something!

Polars should be compiled with rust-nightly, otherwise it will take quite a performance hit. Is there any way to use rust-overlay in nixpkgs?

I think we should add:
  env = {
    # polars depends on nightly features for SIMD
    RUSTC_BOOTSTRAP = 1;
  };

to the package.

Thats a good point, i agree, thank you !

Do you mean replacing the existing line with
RUSTC_BOOTSTRAP = 1;

with
  env = {
    # polars depends on nightly features for SIMD
    RUSTC_BOOTSTRAP = 1;
  };

?

Oh i totally forgot it was already there.
You can add env in front of it but its just format, it wont add anything.
We should be covered on that front then. You can the comment if you want.

Another thing that is a bit difficult is the standard target features. Polars is quite depended on CPU extensions. The target features enabled by default are listed here. There is also an polars-lts-cpu package that does not include these target cpu extension for older cpus.
In general, I would say that these features should be enabled for this package. The performance difference is quite clear.

Fair enough, but would that fix the package? As it is now it doesn't compile. Is it a matter of using rust nightly? Because from my reading, we shouldn't be using overlays in nixpkgs and could only rely on rustc_bootstrap = 1;, however that's already set and it still doesn't compile. What else could we try?

I fixed the errors that made your package not compile on the main branch. But that doesn't fix the root cause, I am pretty current the compilation failure is due maturin running with --features=all instead of the --all-features flag.

Yeah, the --features=all is not a valid flag. If you want, I can take over this PR. It is quite a thing to keep up with the Polars release cadence.

Please do! I’ll close this PR, thanks for your help!


Reissner-Nordstorm metric to symbolic module

Added the Reissner-Nordstorm metric to vacuum_solutions.py and added a new test function in the test_all.py for the same.
Fixes #309
@ritzvik
@shreyasbapat
Sorry about a new PR. I was trying to squash my commits in the old PR and ended up breaking everything. I had to delete my repository and refork this to my account. Starting afresh again :(

I’m very sorry to say that KerrNewman is defined wrongly. If you can correct it, it would be good, otherwise I’ll take care of it myself.

I’m very sorry to say that KerrNewman is defined wrongly. If you can correct it, it would be good, otherwise I’ll take care of it myself.

Yes. I was confused about the diagonal matrix and the first term not having an rQsq element. I'll see to it :)

Hello @obi-wan-shinobi! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file src/einsteinpy/symbolic/predefined/vacuum_solutions.py:

Line 55:9: W503 line break before binary operator
Line 103:9: W503 line break before binary operator

@ritzvik
@shreyasbapat
I've made changes and corrected the vacuum_solutions.py.
Please look into the docs error raised by @pep8speaks
I've reformatted the code using tox. If I remove those changes to compensate for the error raised by @pep8speaks the quality check fails. If I reformat the code using tox, @pep8speaks raises error. Please assist me in removing the errors :(

@pep8speaks is not a big concern

@obi-wan-shinobi Thanks a lot!
I really appreciate the efforts you did in cleaning up the embarrassment that was KerrNewman.
I'm gonna merge :)

One thing,
please open new branches for separate PRs, never make a PR from master.


Add remap a key to be keyboard specific

Description of the new feature / enhancement
Currently remap a key will remap the keys for all keyboards connected to the computer. Remapping should be keyboard / HID specific.
Scenario when this would be used?
User has 2 keyboards which have bit different layouts, e.g. mechanical "normal Windows keyboard" and Apple Magic Keyboard. They want to swap Win and Ctrl buttons only for the Apple keyboard. Currently remap key will remap all keyboard connected, including macros in mouse, which is definately not expected behaviour.
Supporting information
This can be tested with Logitech or any other mouse that can be setup with macros, or just two keyboards connected to a computer.

Thanks for your suggestion! This issue is a duplicate.
I'm linking this issue to #1460 to centralize the discussion thread, please go to that thread for discussion.

Unfortunately, this issue is a #won't-fix for us since there are no public APIs to achieve this, see here for more information!
Thanks for your help to make PowerToys a better piece of software!


runbook signing - plain ASCII only

Missing in the documentation about singing runbooks: make sure you use plain ASCII only in your runbooks.
If you use diacritic characters, for example in comments in your code, they will be replaced by '?' when Azure Automation downloads your code and your runbook will fail with a "signature hash validation failure" exception.

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

ID: a21ca143-2f33-5cea-94a8-ace7e9de5f9c
Version Independent ID: d7f2ef01-8c25-770e-dfd9-37b98dc7ba29
Content: Run runbooks on Azure Automation Hybrid Runbook Worker
Content Source: articles/automation/automation-hrw-run-runbooks.md
Service: automation
Sub-service: process-automation
GitHub Login: @bobbytreed
Microsoft Alias: robreed

@smerkx Thanks for the feedback. We are looking into this and will get back to you shortly.

Assigning @bobbytreed for visibility, review and document enhancement considerations.

@smerkx - My apologies your feedback has not been properly responded to.  I've reviewed your suggestion and I'll confirm with engineering that this is expected behavior before updating the article. I've created a work item and we will update the article shortly after confirming.  Thanks for bringing this to our attention.  #please-close.


Websocket / webhook for invoice payment detection

This seems like a cool project! I'm investigating adding support into BTCPay to use an LNBits based wallet for accepting lightning. We do however some form of push from the server to BTCPay to notify of an invoice being paid.
On an unrelated note, are you publishing any docker images?

This will also reduce the load on the backend if users don't have to poll all the time. Most real node backends support some form of notification on payment finalization. For the ones that don't support that there could be a central thread polling all open payments and sending notifications instead of every request causing a separate poll.

WebSockets need to happen at some point, this is as good an excuse as any.
Linking LNbits and BTCPay server is an exciting concept

WebSockets need to happen at some point, this is as good an excuse as any.
Linking LNbits and BTCPay server is an exciting concept

Yes, I could integrate LNBits as if it was another lightning node in our lightning abstraction. Someone offering a BTCPay server to multiple merchants could then host LNBits alongside and use that as a way for them to accept lightning via their node!
Will need the websocket support and multiarch docker images though

Hey, just a heads up: LNbits now has an (still undocumented while we make sure it works) SSE endpoint that you can listen to to get an event every time an invoice payment is received (it listens for notifications in the background from each of the funding sources -- except lntxbot), matches the incoming payments to each LNbits wallet and dispatches the event there.
curl https://lnbits.example/api/v1/payments/sse -H 'x-api-key: yourkey' should work. It will give you something like this:
curl 'http://localhost:5000/api/v1/payments/sse' -H 'x-api-key: 4b0518a9a640af02b5165fd9879a756c'
event: keepalive

event: payment
data: {"checking_id": "UeEG32TSDuKUzsxwUJupgX0Nlf8Ix9aElrDPGcmQzUU=", "pending": 0, "amount": 600000, "fee": 0, "memo": "an invoice", "time":<PHONE_NUMBER>, "bolt11": "lnbcrt60n1p0cp7c9pp528ssdhmy6g8w99xwe3c9pxafs97sm90lprradpykkr83njvse4zsdqzyccqzpgxqzjcsp52439y3p0sg8mqvgrr5tfx56prq59nrmmq52cqjv09wr9c3kw35yq9qy9qsqfjv5egvze5dtl7n0dg24f533xdvvxm2w0u9l5pl3j79fvfknc05q02lxtggtd3rqsrgu6wyetyt0tgdhv78d38s4qljmvar00hux2dspcqq0k7", "preimage": "0000000000000000000000000000000000000000000000000000000000000000", "payment_hash": "51e106df64d20ee294cecc70509ba9817d0d95ff08c7d68496b0cf19c990cd45", "extra": {}, "wallet_id": "8fbefbdba16c4dd19afa641ebd51fd5e"}

event: keepalive

event: keepalive

I chose an SSE stream because it seems to be lighter and simpler to implement on every side, but WebSockets or Webhooks are also possible to do.
The code is here if anyone is curious: https://github.com/lnbits/lnbits/blob/2894944b1e43ce1faabb6142860f6be1db5655d3/lnbits/core/views/api.py#L134-L185


Updated ruby entrypoint and command

This PR updates the entrypoint for Ruby images to use /usr/bin/ruby with the default command set to --version.
The current entry point is set to the interactive ruby tool irb, resulting in odd behavior when you try to run Ruby scripts directly via docker run. This change was discussed in an internal Slack thread.
With the update, it is possible to execute a Ruby script with:
docker run --rm -v ${PWD}:/work cgr.dev/chainguard/ruby:latest script.rb

The tests need to be updated to, working on it now.


Flow Chart Maker

Enter calculator name -
Flow Chart Maker
Describe calculator functionality -
Provide basic tools to the user to design flow chart and download it.
Under which category you wish to place it -

[x] Computer Science
[ ] Mathematics
[ ] Physics
[ ] Chemistry
[ ] Biology
[ ] Finance
[ ] Scientific
[ ] Health
[ ] Sports
[ ] Let project owner decide
[ ] Suggest a new category - (Answer here)

hey @SarthakKeshari kindly assign it to me

I want to work on it, please assign to me.

Hey @uttkarsh1m,
Assigned.
You may contribute your code under the folder path -
calc_for_everything\calculators\src\computer_science\flowChartMaker
Issue completion deadline - 16th Oct 11:00:00 am IST
NOTE - In case the issue completion deadline is not met, the issue will be assigned to a new participant

Hey @arif78699,
Glad to see your eagerness for contributing 🤩. We are following first come first serve. If deadline is not met, then only it can be assigned to a new participant.
For now, kindly look into any open issues or you may even create one. 🥳
Happy contributing🎉

Kindly assign this to me

@SarthakKeshari kindly assign me this issue.

Hey @dvtushar,
Assigned.
You may contribute your code under the folder path -
calc_for_everything\calculators\src\computer_science\flowChartMaker
Issue completion deadline - 29th Oct 8:00:00 am IST
NOTE - In case the issue completion deadline is not met, the issue will be assigned to a new participant

@dvtushar,
Since the issue completion deadline is crossed,
Issue has been unassigned.
Kindly do not create a PR for the issue now.

@SarthakKeshari Kindly assign this issue to me.

@SarthakKeshari Please unassign me from this issue. I implemented a flow chart maker on a new react project dir and it is working but when I integrate it into this project, it's not working.

Sure @ShivamPatel-24

@ShivamPatel-24,
Issue has been unassigned.


worker_groups_launch_template with r6g instance family

I have issues
I'm submitting a...

[x] bug report
[ ] feature request
[x] support request - read the FAQ first!
[ ] kudos, thank you, warm fuzzy

What is the current behavior?
Cannot create new autoscaling group. Terraform apply fails
If this is a bug, how to reproduce? Please include a code sample if relevant.

Having a cluster in ap-southeast-1 AWS region.
Updating the Terraform plan by updating the launch template with new group of instance type r6g.large

  worker_groups_launch_template = [
    {
      name                 = "memory-optimized-group"
      instance_type        = "r6g.large"
      asg_desired_capacity = 2
      public_ip            = true
      asg_max_size = 3
      asg_min_size            = 2
      autoscaling_enabled = true
      root_volume_size = "30"
      root_volume_type = "gp2"
      ebs_optimized = false
      enable_monitoring = false
    }

Run terraform apply -auto-approve

Getting this error :

  StatusMessage: "The requested configuration is currently not supported. Please check the documentation for supported configurations. Launching EC2 instance failed."
}

  on .terraform/modules/eks/terraform-aws-eks-12.0.0/workers_launch_template.tf line 3, in resource "aws_autoscaling_group" "workers_launch_template":
   3: resource "aws_autoscaling_group" "workers_launch_template" {

What's the expected behavior?
I expected that this update will create a new autoscaling group and this autoscaling group
Are you able to fix this problem and submit a PR? Link here if you have already.
No
Environment details

Affected module version: 12.0.0"
OS: k8s 1.16
Terraform version:

Terraform v0.12.28
+ provider.archive v1.3.0
+ provider.aws v2.70.0
+ provider.kubernetes v1.12.0
+ provider.local v1.4.0
+ provider.null v2.1.2
+ provider.random v2.3.0
+ provider.template v2.1.2

Any other relevant info
no

r6g.large instance is basing on Arm-based AWS Graviton2 processors, currently if you don`t specify custom AMI module is having filter:
https://github.com/terraform-aws-modules/terraform-aws-eks/blob/1c8122704413fb3f54bff90b2692100def041caf/local.tf#L27-L30
and searching via:
https://github.com/terraform-aws-modules/terraform-aws-eks/blob/1c8122704413fb3f54bff90b2692100def041caf/data.tf#L16-L41
currently this search returns something like
ami = {
  "architecture" = "x86_64"
  "arn" = "arn:aws:ec2:us-east-1::image/ami-02a815c648e3ac746"
  "block_device_mappings" = [
    {
      "device_name" = "/dev/xvda"
      "ebs" = {
        "delete_on_termination" = "true"
        "encrypted" = "false"
        "iops" = "0"
        "snapshot_id" = "snap-02f8d592cc6106713"
        "volume_size" = "20"
        "volume_type" = "gp2"
      }
      "no_device" = ""
      "virtual_name" = ""
    },
  ]
  "creation_date" = "2020-09-04T10:44:47.000Z"
  "description" = "EKS Kubernetes Worker AMI with AmazonLinux2 image, (k8s: 1.17.9, docker:19.03.6ce-4.amzn2)"
  "filter" = [
    {
      "name" = "name"
      "values" = [
        "amazon-eks-node-1.17-*",
      ]
    },
  ]
  "hypervisor" = "xen"
  "id" = "ami-02a815c648e3ac746"
  "image_id" = "ami-02a815c648e3ac746"
  "image_location" = "amazon/amazon-eks-node-1.17-v20200904"
  "image_owner_alias" = "amazon"
  "image_type" = "machine"
  "most_recent" = true
  "name" = "amazon-eks-node-1.17-v20200904"
  "owner_id" = "602401143452"
  "owners" = [
    "602401143452",
  ]
  "product_codes" = []
  "public" = true
  "root_device_name" = "/dev/xvda"
  "root_device_type" = "ebs"
  "root_snapshot_id" = "snap-02f8d592cc6106713"
  "sriov_net_support" = "simple"
  "state" = "available"
  "state_reason" = {
    "code" = "UNSET"
    "message" = "UNSET"
  }
  "tags" = {}
  "virtualization_type" = "hvm"
}

which is dedicated for x86_64 and not arm64 architecture. In result your r6g.large instance cannot use this and module fail on EC2 API request.
To get this working you must specify worker_ami_name_filter in worker definition and put any of ARM supported AMI, for example:
amazon-eks-arm64-node-1.17-*
Also AWS EKS supported AMIs you can find them under https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html
I think that in general this can be also improved in module code to discover this automatically basing on  instance architecture, when I will find some time will take a look how this can be achieved.

Closing this since the answer sounds good. Feel free to re-open it doesn't help you.

@barryib I think that this should be a 3rd filter. If the solution, as @daroga0002 presented is used, then all Linux nodes in the cluster will be required to be ARM64. In the case that it's desirable to have both x86_64 and ARM64 nodes in the same cluster, a third platform ("linux-arm64" maybe?) should be created. (The second platform is "windows".)
Currently, the only solution to having both x86_64 and ARM64 nodes in a cluster is to specify the ami_id in the worker group, which requires a:
data "aws_ami" "eks_worker_arm64" {
   filter {
     name   = "name"
     values = ["amazon-eks-arm64-node-1.17-*"]
   }

   most_recent = true

   owners = ["602401143452"] // The ID of the owner of the official AWS EKS AMIs.
}

This could be done in the module easily, and it already has been done for the "windows" platform.

I just shared a reason of issue, to solve this just extend your definition of wroker group:
worker_groups_launch_template = [
    {
      name                 = "memory-optimized-group"
      instance_type        = "r6g.large"
      ami_id = <<<<<<<<<<<<<<<< ami_id or even better can be data.aws_ami.eks_worker_arm64.id
      asg_desired_capacity = 2
      public_ip            = true
      asg_max_size = 3
      asg_min_size            = 2
      autoscaling_enabled = true
      root_volume_size = "30"
      root_volume_type = "gp2"
      ebs_optimized = false
      enable_monitoring = false
    }
]

    ```

Yes, that was what I was saying that a user of the module needs to do, currently.
A default AMI selection is done for both Linux x86_64 and Windows x86_64 inside the module, which makes the module very easy to use.
I'm only proposing that a 3rd platform be added ("linux_arm64"), which would imply that the data.aws_ami.eks_worker_arm64 would be inside the module, and used when ami_id is not specified.

I dont know how you can recognise intention of user and basing on what criteria decision should be made, but feel free to open a PR :)


Added support for iothub connectionstring and refactored the design

Added support for iothub connectionstring.
Moved opening the connection to CbSClient as that is the first thing that should happen after opening the connection. This reduces calls to rpc.open() all over the sdk and puts them at one place in the init() method on the CbsClient.
ManagementClient also does cbs auth before making the management request
EventHubSender, EventHubReceiver, ManagementClient inherit from a base class ClientEntity.

@princjef - Please review this update whenever possible. Thanks in advance :)

return new (P || (P = Promise))(function (resolve, reject) {

Did you really want to include the generated js?

Refers to: client/examples/js/examples/getHubRuntimeInfo.js:3 in 8423ab3. [](commit_id = 8423ab3273ee5b3bc9dde3fd6d23000314fcb84c, deletion_comment = False)


Kenya mobiles are always 9 digit national numbers

Kenya mobile phone numbers are always exactly 9 digits after the country code. (Wikipedia used to think that they could be 10 digits, but that is wrong; I fixed that also.)
https://en.wikipedia.org/wiki/Telephone_numbers_in_Kenya#Mobile_phone_numbers
At this time the Communication Authority of Kenya's website (http://www.ca.go.ke/) is offline but I contacted Safaricom (a major mobile operator in Kenya) and they confirmed this on their support line. I also confirmed it with two friends who live & work in Kenya.
(Apologies if this is the wrong way to submit patches; I wasn't able to figure out the Rietveld code review tool.)

The latest ITU doc supports what you're saying, but it's from 2010, i.e. a bit old.
http://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000700001PDFE.pdf
http://www.ca.go.ke/ works for me right now. Is there a page / download on that website which provides supportive evidence for the requested change?
Thanks!

@penmetsaa Can you confirm that this request (all numbers should be 9 digits) based on the 2013 national number plan PDF we have?

Hi Andy,
As per ITU document(2013 version) all mobile prefixes have length exactly 9 digits.
And it is implemented in same way in our metadata as well.
For double confirmation I have tested with 10digit mobile number, which is resulted as invalid number.
Thanks & Regards,
Aravind

Fixed in release 7.0.11.


Can't resolve 'vscode-languageserver-protocol/lib/main'

I'm getting the following error in connection.js:
Can't resolve 'vscode-languageserver-protocol/lib/main'
I was able to get rid of the error by adding the following to my webpack config...
resolve: {
    alias: {
      'vscode-languageserver-protocol/lib/main': 'vscode-languageserver-protocol/lib/browser/main',
      'vscode-languageserver-protocol/lib/utils/is': 'vscode-languageserver-protocol/lib/common/utils/is',
    },
  },

...but I must be missing something since the example in the repo works fine without that.

What is the version of monaco-editor?
What is the version of monaco-languageclient?

What is the version of monaco-editor?
What is the version of monaco-languageclient?

{
    "dependencies": {
        "monaco-editor-core": "^0.17.0",
        "monaco-languageclient": "^0.10.0",
    ...
}

Here is the log from the terminal:
example: Entrypoint main = main.bundle.js main.bundle.js.map
example: Entrypoint editor.worker = editor.worker.bundle.js editor.worker.bundle.js.map
example: [./lib/client.js] 3.5 KiB {main} [built]
example: [./lib/main.js] 468 bytes {main} [built]
example:     + 714 hidden modules
example: ERROR in ../node_modules/monaco-languageclient/lib/connection.js
example: Module not found: Error: Can't resolve 'vscode-languageserver-protocol/lib/main' in '/home/predrag/Downloads/typescript-language-server/node_modules/monaco-languageclient/lib'
example:  @ ../node_modules/monaco-languageclient/lib/connection.js 7:15-65
example:  @ ../node_modules/monaco-languageclient/lib/index.js
example:  @ ./lib/client.js
example:  @ ./lib/main.js
example: ERROR in ../node_modules/monaco-languageclient/lib/services.js
example: Module not found: Error: Can't resolve 'vscode-languageserver-protocol/lib/main' in '/home/predrag/Downloads/typescript-language-server/node_modules/monaco-languageclient/lib'
example:  @ ../node_modules/monaco-languageclient/lib/services.js 16:9-59
example:  @ ../node_modules/monaco-languageclient/lib/index.js
example:  @ ./lib/client.js
example:  @ ./lib/main.js
example: ERROR in ../node_modules/monaco-languageclient/lib/monaco-converter.js
example: Module not found: Error: Can't resolve 'vscode-languageserver-protocol/lib/utils/is' in '/home/predrag/Downloads/typescript-language-server/node_modules/monaco-languageclient/lib'
example:  @ ../node_modules/monaco-languageclient/lib/monaco-converter.js 8:11-65
example:  @ ../node_modules/monaco-languageclient/lib/index.js
example:  @ ./lib/client.js
example:  @ ./lib/main.js
example: ERROR in ../node_modules/monaco-languageclient/lib/connection.js
example: Module not found: Error: Can't resolve 'vscode-languageserver-protocol/lib/utils/is' in '/home/predrag/Downloads/typescript-language-server/node_modules/monaco-languageclient/lib'
example:  @ ../node_modules/monaco-languageclient/lib/connection.js 8:11-65
example:  @ ../node_modules/monaco-languageclient/lib/index.js
example:  @ ./lib/client.js
example:  @ ./lib/main.js
example: error Command failed with exit code 2.
example: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run bundle exited 2 in 'example'
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.

{
    "dependencies": {
        "monaco-editor-core": "^0.17.0",
        "monaco-languageclient": "^0.10.0",
    ...
}

Here is the log from the terminal:
example: Entrypoint main = main.bundle.js main.bundle.js.map
example: Entrypoint editor.worker = editor.worker.bundle.js editor.worker.bundle.js.map
example: [./lib/client.js] 3.5 KiB {main} [built]
example: [./lib/main.js] 468 bytes {main} [built]
example:     + 714 hidden modules
example: ERROR in ../node_modules/monaco-languageclient/lib/connection.js
example: Module not found: Error: Can't resolve 'vscode-languageserver-protocol/lib/main' in '/home/predrag/Downloads/typescript-language-server/node_modules/monaco-languageclient/lib'
example:  @ ../node_modules/monaco-languageclient/lib/connection.js 7:15-65
example:  @ ../node_modules/monaco-languageclient/lib/index.js
example:  @ ./lib/client.js
example:  @ ./lib/main.js
example: ERROR in ../node_modules/monaco-languageclient/lib/services.js
example: Module not found: Error: Can't resolve 'vscode-languageserver-protocol/lib/main' in '/home/predrag/Downloads/typescript-language-server/node_modules/monaco-languageclient/lib'
example:  @ ../node_modules/monaco-languageclient/lib/services.js 16:9-59
example:  @ ../node_modules/monaco-languageclient/lib/index.js
example:  @ ./lib/client.js
example:  @ ./lib/main.js
example: ERROR in ../node_modules/monaco-languageclient/lib/monaco-converter.js
example: Module not found: Error: Can't resolve 'vscode-languageserver-protocol/lib/utils/is' in '/home/predrag/Downloads/typescript-language-server/node_modules/monaco-languageclient/lib'
example:  @ ../node_modules/monaco-languageclient/lib/monaco-converter.js 8:11-65
example:  @ ../node_modules/monaco-languageclient/lib/index.js
example:  @ ./lib/client.js
example:  @ ./lib/main.js
example: ERROR in ../node_modules/monaco-languageclient/lib/connection.js
example: Module not found: Error: Can't resolve 'vscode-languageserver-protocol/lib/utils/is' in '/home/predrag/Downloads/typescript-language-server/node_modules/monaco-languageclient/lib'
example:  @ ../node_modules/monaco-languageclient/lib/connection.js 8:11-65
example:  @ ../node_modules/monaco-languageclient/lib/index.js
example:  @ ./lib/client.js
example:  @ ./lib/main.js
example: error Command failed with exit code 2.
example: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run bundle exited 2 in 'example'
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.

It seems you're using versions of both monaco-editor-core and monaco-languageclient that are more than 1 year old

It seems you're using versions of both monaco-editor-core and monaco-languageclient that are more than 1 year old

Anyone ever figure this issue out? I'm running into the same isssue with the versions:
"monaco-editor": "^0.34.0",
"monaco-languageclient": "^4.0.0"


(Long) Gone by Kenny Wayne Shepherd unsupported.

Check if issue with swaglyrics or whether song lyrics unavailable on Genius.

stripper -> Kenny-Wayne-Shepherd-Gone

added


Object_Detection_Nanodet

Google Summer of Code'22
Contributor: Sri Siddarth Chakaravarthy
Project: Lightweight Object Detection
Model: Nanodet
Submitting pull requests for Mid-term evaluations.
COMPLETED:

[x] Nanodet ONNX model (FP16)
[x] ReadMe
[x] License
[x] Sample Images and Results

TO DO:

[ ] Video Inference
[ ] Model Quantization

Ok yuantao will update these changes and update the pull request.
On Mon, Jul 25, 2022 at 12:48 PM Yuantao Feng @.***>
wrote:

@.**** requested changes on this pull request.
Thank you 👍 Please take a look at the comments below.
By the way, can you remove the axis of the result images for better visual
effects?
In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928513752:

@@ -0,0 +1,158 @@

+import cv2
+import numpy as np
+import argparse
+import time
+import matplotlib.pyplot as plt

+class nanodet():
I think it should be named as NanoDet. So class NanoDet:
In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928514977:

+class nanodet():

def init(self, prob_threshold=0.35, iou_threshold=0.6):

   with open('coco.names', 'rt') as f:

       self.classes = f.read().rstrip('\n').split('\n')

   self.num_classes = len(self.classes)

   self.strides = (8, 16, 32, 64)

   self.image_shape = (416, 416)

   self.reg_max = 7

   self.prob_threshold = prob_threshold

   self.iou_threshold = iou_threshold

   self.project = np.arange(self.reg_max + 1)

   self.mean = np.array([103.53, 116.28, 123.675], dtype=np.float32).reshape(1, 1, 3)

   self.std = np.array([57.375, 57.12, 58.395], dtype=np.float32).reshape(1, 1, 3)

   self.net = cv2.dnn.readNet('nanodet-plus-m-1.5x_416.onnx')

The model should be renamed to
object_detection_nanodet-plus-m-1.5x-416.onnx
In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928516320:

           img = cv2.copyMakeBorder(img, 0, 0, left, self.image_shape[1] - neww - left, cv2.BORDER_CONSTANT,

                                    value=0)  # add border

       else:

           newh, neww = int(self.image_shape[0] * hw_scale), self.image_shape[1]

           img = cv2.resize(srcimg, (neww, newh), interpolation=cv2.INTER_AREA)

           top = int((self.image_shape[0] - newh) * 0.5)

           img = cv2.copyMakeBorder(img, top, self.image_shape[0] - newh - top, 0, 0, cv2.BORDER_CONSTANT, value=0)

   else:

       img = cv2.resize(srcimg, self.image_shape, interpolation=cv2.INTER_AREA)

   return img, newh, neww, top, left

def detect(self, srcimg):

   img, newh, neww, top, left = self.resize_image(srcimg)

   img = self._normalize(img)

   blob = cv2.dnn.blobFromImage(img)

   print(blob.shape)

Do not print in the inference function.
In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928518766:

   img = self._normalize(img)

   blob = cv2.dnn.blobFromImage(img)

These two lines should be placed in a function called pre_process. Do
something like this:
def pre_process(self, img):
img = self._normalize(img)

blob = cv2.dnn.blobFromImage(img)

return blob

In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928521450:

           img = cv2.resize(srcimg, (neww, newh), interpolation=cv2.INTER_AREA)

           top = int((self.image_shape[0] - newh) * 0.5)

           img = cv2.copyMakeBorder(img, top, self.image_shape[0] - newh - top, 0, 0, cv2.BORDER_CONSTANT, value=0)

   else:

       img = cv2.resize(srcimg, self.image_shape, interpolation=cv2.INTER_AREA)

   return img, newh, neww, top, left

def detect(self, srcimg):

   img, newh, neww, top, left = self.resize_image(srcimg)

   img = self._normalize(img)

   blob = cv2.dnn.blobFromImage(img)

   print(blob.shape)

   self.net.setInput(blob)

   outs = self.net.forward(self.net.getUnconnectedOutLayersNames())

   det_bboxes, det_conf, det_classid = self.post_process(outs)

We need to put pre-process, forward, and post-process in a function called
infer for benchmarking. Do something like this:
def infer(self, img):
input_blob = self.pre_process(img)

self.net.setInput(input_blob)

outs = self.net.forward(self.net.getUnconnectedOutLayersNames())

bboxes, conf, classid = self.post_process(outs)

return bboxes, conf, classid

def detect(self, img):
img, newh, neww, top, left = self.resize_image(img)

det_bboxes, det_conf, det_classid = self.infer(img)

return det_bboxes, det_conf, det_classid

self.detect is kept because for now we do not want to have the time of
resizing in benchmarking and it is used in demo.py to produce correct
results.
In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928522492:

       bboxes_mlvl /= scale_factor

   scores_mlvl = np.concatenate(scores_mlvl, axis=0)

   bboxes_wh = bboxes_mlvl.copy()

   bboxes_wh[:, 2:4] = bboxes_wh[:, 2:4] - bboxes_wh[:, 0:2]  ####xywh

   classIds = np.argmax(scores_mlvl, axis=1)

   confidences = np.max(scores_mlvl, axis=1)  ####max_class_confidence

   indices = cv2.dnn.NMSBoxes(bboxes_wh.tolist(), confidences.tolist(), self.prob_threshold, self.iou_threshold)

   if len(indices)>0:

       bboxes_mlvl = bboxes_mlvl[indices[:]]

       confidences = confidences[indices[:]]

       classIds = classIds[indices[:]]

       return bboxes_mlvl, confidences, classIds

   else:

       print('nothing detect')

Do not print messages here
In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928523287:

       print('nothing detect')

       return np.array([]), np.array([]), np.array([])

def distance2bbox(self, points, distance, max_shape=None):

   x1 = points[:, 0] - distance[:, 0]

   y1 = points[:, 1] - distance[:, 1]

   x2 = points[:, 0] + distance[:, 2]

   y2 = points[:, 1] + distance[:, 3]

   if max_shape is not None:

       x1 = np.clip(x1, 0, max_shape[1])

       y1 = np.clip(y1, 0, max_shape[0])

       x2 = np.clip(x2, 0, max_shape[1])

       y2 = np.clip(y2, 0, max_shape[0])

   return np.stack([x1, y1, x2, y2], axis=-1)

def drawPred(self, frame, classId, conf, left, top, right, bottom):

The drawing function should be placed in demo.py. In this wrapper class,
we put functions or methods related to inference, pre-processing and
post-processing.
In models/object_detection_nanodet/README.md
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928527188:

@@ -0,0 +1,83 @@

+# Nanodet

+Nanodet: NanoDet is a FCOS-style one-stage anchor-free object detection model which using Generalized Focal Loss as classification and regression loss.In NanoDet-Plus, we propose a novel label assignment strategy with a simple assign guidance module (AGM) and a dynamic soft label assigner (DSLA) to solve the optimal label assignment problem in lightweight model training.

+Note:
+- This version of nanodet: Nanodet-m-plus-1.5x_416
+- The model was trained on COCO 2017 dataset, link to dataset: https://cocodataset.org/#download
+- Below, we have results of COCO data inference

+| class         | AP50   | mAP   | class          | AP50   | mAP   |
+|:--------------|:-------|:------|:---------------|:-------|:------|
+| person        | 67.5   | 41.8  | bicycle        | 35.4   | 18.8  |
It is good to have AP for different classes as supplements. But I think
people would care more about the overall mAP. So, please, put the overall
mAP here and move this table to the end of this file.
In models/object_detection_nanodet/demo.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928529937:

@@ -0,0 +1,39 @@

+import cv2
+import numpy as np
+import argparse
+import time
+import matplotlib.pyplot as plt

+from Nanodet_m_plus import nanodet
Nanodet_m_plus -> NanodetPlus. NanoDet of different variances should
share the same pre-processing and post-processing.
In models/object_detection_nanodet/demo.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928530507:

+try:

backends += [cv2.dnn.DNN_BACKEND_TIMVX]

targets += [cv2.dnn.DNN_TARGET_NPU]

help_msg_backends += "; {:d}: TIMVX"

help_msg_targets += "; {:d}: NPU"

+except:

print('This version of OpenCV does not support TIM-VX and NPU. Visit https://gist.github.com/Sidd1609/5bb321c8733110ed613ec120c7c02e41 for more information.')

+if name=='main':

parser = argparse.ArgumentParser(description='Nanodet inference using OpenCV an contribution by Sri Siddarth Chakaravarthy part of GSOC_2022')

parser.add_argument('--image_path', type=str, default='test2.jpg', help="image path")

parser.add_argument('--confidence', default=0.35, type=float, help='class confidence')

parser.add_argument('--nms', default=0.6, type=float, help='enter nms IOU threshold')

args = parser.parse_args()

image = cv2.imread(args.image_path)

Please, add the video stream as input as well
—
Reply to this email directly, view it on GitHub
https://github.com/opencv/opencv_zoo/pull/75#pullrequestreview-1048926939,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALTC7V5S3TDGETXR7OTBFBTVVY5UBANCNFSM54QBLGGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

Hey yuantao, will I need to make these changes by Wednesday, as in before
the mentor meetings ?
I have reviewed most of the changes working on the video input now
On Mon, Jul 25, 2022 at 12:50 PM Sri Siddarth Chakaravarthy P <
@.***> wrote:

Ok yuantao will update these changes and update the pull request.
On Mon, Jul 25, 2022 at 12:48 PM Yuantao Feng @.***>
wrote:

@.**** requested changes on this pull request.
Thank you 👍 Please take a look at the comments below.
By the way, can you remove the axis of the result images for better
visual effects?
In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928513752:

@@ -0,0 +1,158 @@

+import cv2
+import numpy as np
+import argparse
+import time
+import matplotlib.pyplot as plt

+class nanodet():
I think it should be named as NanoDet. So class NanoDet:
In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928514977:

+class nanodet():

def init(self, prob_threshold=0.35, iou_threshold=0.6):

   with open('coco.names', 'rt') as f:

       self.classes = f.read().rstrip('\n').split('\n')

   self.num_classes = len(self.classes)

   self.strides = (8, 16, 32, 64)

   self.image_shape = (416, 416)

   self.reg_max = 7

   self.prob_threshold = prob_threshold

   self.iou_threshold = iou_threshold

   self.project = np.arange(self.reg_max + 1)

   self.mean = np.array([103.53, 116.28, 123.675], dtype=np.float32).reshape(1, 1, 3)

   self.std = np.array([57.375, 57.12, 58.395], dtype=np.float32).reshape(1, 1, 3)

   self.net = cv2.dnn.readNet('nanodet-plus-m-1.5x_416.onnx')

The model should be renamed to
object_detection_nanodet-plus-m-1.5x-416.onnx
In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928516320:

           img = cv2.copyMakeBorder(img, 0, 0, left, self.image_shape[1] - neww - left, cv2.BORDER_CONSTANT,

                                    value=0)  # add border

       else:

           newh, neww = int(self.image_shape[0] * hw_scale), self.image_shape[1]

           img = cv2.resize(srcimg, (neww, newh), interpolation=cv2.INTER_AREA)

           top = int((self.image_shape[0] - newh) * 0.5)

           img = cv2.copyMakeBorder(img, top, self.image_shape[0] - newh - top, 0, 0, cv2.BORDER_CONSTANT, value=0)

   else:

       img = cv2.resize(srcimg, self.image_shape, interpolation=cv2.INTER_AREA)

   return img, newh, neww, top, left

def detect(self, srcimg):

   img, newh, neww, top, left = self.resize_image(srcimg)

   img = self._normalize(img)

   blob = cv2.dnn.blobFromImage(img)

   print(blob.shape)

Do not print in the inference function.
In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928518766:

   img = self._normalize(img)

   blob = cv2.dnn.blobFromImage(img)

These two lines should be placed in a function called pre_process. Do
something like this:
def pre_process(self, img):
img = self._normalize(img)

blob = cv2.dnn.blobFromImage(img)

return blob

In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928521450:

           img = cv2.resize(srcimg, (neww, newh), interpolation=cv2.INTER_AREA)

           top = int((self.image_shape[0] - newh) * 0.5)

           img = cv2.copyMakeBorder(img, top, self.image_shape[0] - newh - top, 0, 0, cv2.BORDER_CONSTANT, value=0)

   else:

       img = cv2.resize(srcimg, self.image_shape, interpolation=cv2.INTER_AREA)

   return img, newh, neww, top, left

def detect(self, srcimg):

   img, newh, neww, top, left = self.resize_image(srcimg)

   img = self._normalize(img)

   blob = cv2.dnn.blobFromImage(img)

   print(blob.shape)

   self.net.setInput(blob)

   outs = self.net.forward(self.net.getUnconnectedOutLayersNames())

   det_bboxes, det_conf, det_classid = self.post_process(outs)

We need to put pre-process, forward, and post-process in a function
called infer for benchmarking. Do something like this:
def infer(self, img):
input_blob = self.pre_process(img)

self.net.setInput(input_blob)

outs = self.net.forward(self.net.getUnconnectedOutLayersNames())

bboxes, conf, classid = self.post_process(outs)

return bboxes, conf, classid

def detect(self, img):
img, newh, neww, top, left = self.resize_image(img)

det_bboxes, det_conf, det_classid = self.infer(img)

return det_bboxes, det_conf, det_classid

self.detect is kept because for now we do not want to have the time of
resizing in benchmarking and it is used in demo.py to produce correct
results.
In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928522492:

       bboxes_mlvl /= scale_factor

   scores_mlvl = np.concatenate(scores_mlvl, axis=0)

   bboxes_wh = bboxes_mlvl.copy()

   bboxes_wh[:, 2:4] = bboxes_wh[:, 2:4] - bboxes_wh[:, 0:2]  ####xywh

   classIds = np.argmax(scores_mlvl, axis=1)

   confidences = np.max(scores_mlvl, axis=1)  ####max_class_confidence

   indices = cv2.dnn.NMSBoxes(bboxes_wh.tolist(), confidences.tolist(), self.prob_threshold, self.iou_threshold)

   if len(indices)>0:

       bboxes_mlvl = bboxes_mlvl[indices[:]]

       confidences = confidences[indices[:]]

       classIds = classIds[indices[:]]

       return bboxes_mlvl, confidences, classIds

   else:

       print('nothing detect')

Do not print messages here
In models/object_detection_nanodet/Nanodet_m_plus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928523287:

       print('nothing detect')

       return np.array([]), np.array([]), np.array([])

def distance2bbox(self, points, distance, max_shape=None):

   x1 = points[:, 0] - distance[:, 0]

   y1 = points[:, 1] - distance[:, 1]

   x2 = points[:, 0] + distance[:, 2]

   y2 = points[:, 1] + distance[:, 3]

   if max_shape is not None:

       x1 = np.clip(x1, 0, max_shape[1])

       y1 = np.clip(y1, 0, max_shape[0])

       x2 = np.clip(x2, 0, max_shape[1])

       y2 = np.clip(y2, 0, max_shape[0])

   return np.stack([x1, y1, x2, y2], axis=-1)

def drawPred(self, frame, classId, conf, left, top, right, bottom):

The drawing function should be placed in demo.py. In this wrapper class,
we put functions or methods related to inference, pre-processing and
post-processing.
In models/object_detection_nanodet/README.md
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928527188:

@@ -0,0 +1,83 @@

+# Nanodet

+Nanodet: NanoDet is a FCOS-style one-stage anchor-free object detection model which using Generalized Focal Loss as classification and regression loss.In NanoDet-Plus, we propose a novel label assignment strategy with a simple assign guidance module (AGM) and a dynamic soft label assigner (DSLA) to solve the optimal label assignment problem in lightweight model training.

+Note:
+- This version of nanodet: Nanodet-m-plus-1.5x_416
+- The model was trained on COCO 2017 dataset, link to dataset: https://cocodataset.org/#download
+- Below, we have results of COCO data inference

+| class         | AP50   | mAP   | class          | AP50   | mAP   |
+|:--------------|:-------|:------|:---------------|:-------|:------|
+| person        | 67.5   | 41.8  | bicycle        | 35.4   | 18.8  |
It is good to have AP for different classes as supplements. But I think
people would care more about the overall mAP. So, please, put the overall
mAP here and move this table to the end of this file.
In models/object_detection_nanodet/demo.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928529937:

@@ -0,0 +1,39 @@

+import cv2
+import numpy as np
+import argparse
+import time
+import matplotlib.pyplot as plt

+from Nanodet_m_plus import nanodet
Nanodet_m_plus -> NanodetPlus. NanoDet of different variances should
share the same pre-processing and post-processing.
In models/object_detection_nanodet/demo.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r928530507:

+try:

backends += [cv2.dnn.DNN_BACKEND_TIMVX]

targets += [cv2.dnn.DNN_TARGET_NPU]

help_msg_backends += "; {:d}: TIMVX"

help_msg_targets += "; {:d}: NPU"

+except:

print('This version of OpenCV does not support TIM-VX and NPU. Visit https://gist.github.com/Sidd1609/5bb321c8733110ed613ec120c7c02e41 for more information.')

+if name=='main':

parser = argparse.ArgumentParser(description='Nanodet inference using OpenCV an contribution by Sri Siddarth Chakaravarthy part of GSOC_2022')

parser.add_argument('--image_path', type=str, default='test2.jpg', help="image path")

parser.add_argument('--confidence', default=0.35, type=float, help='class confidence')

parser.add_argument('--nms', default=0.6, type=float, help='enter nms IOU threshold')

args = parser.parse_args()

image = cv2.imread(args.image_path)

Please, add the video stream as input as well
—
Reply to this email directly, view it on GitHub
https://github.com/opencv/opencv_zoo/pull/75#pullrequestreview-1048926939,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALTC7V5S3TDGETXR7OTBFBTVVY5UBANCNFSM54QBLGGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

Please, make these changes by Wednesday

ok will work on it and update the changes
I have reviewed some of the comments and made the necessary changes, let me
know if you are able to review the changes

class name changed
model file name changed
no print statement in NanodetPlus.py

On Mon, Jul 25, 2022 at 4:07 PM Yuantao Feng @.***>
wrote:

Please, make these changes by Wednesday
—
Reply to this email directly, view it on GitHub
https://github.com/opencv/opencv_zoo/pull/75#issuecomment-1193874155,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALTC7V5RPYCF6BLTGYD26EDVVZU5ZANCNFSM54QBLGGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

reviewed all changes
no comments left unchecked

Sure will update these changes
On Tue, Jul 26, 2022 at 9:00 AM Yuantao Feng @.***>
wrote:

@.**** requested changes on this pull request.
Please, review requested changes below by Wednesday.
You also need to put test_data and results under a directory named example.
We do not need videos in examples. It does not make sense to have video
examples of size bigger than the model. So, please, remove those videos.
And keep only 2 or 3 images (for image as input), plus 1 gif (for webcam as
input) for examples.
In models/object_detection_nanodet/NanodetPlus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929476689:

+import argparse
+import time
+import matplotlib.pyplot as plt

Remove these lines as they are not used.
In models/object_detection_nanodet/NanodetPlus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929477458:

+class NanoDet():

def init(self, prob_threshold=0.35, iou_threshold=0.6):

   with open('coco.names', 'rt') as f:

       self.classes = f.read().rstrip('\n').split('\n')

   self.num_classes = len(self.classes)

   self.strides = (8, 16, 32, 64)

   self.image_shape = (416, 416)

   self.reg_max = 7

   self.prob_threshold = prob_threshold

   self.iou_threshold = iou_threshold

   self.project = np.arange(self.reg_max + 1)

   self.mean = np.array([103.53, 116.28, 123.675], dtype=np.float32).reshape(1, 1, 3)

   self.std = np.array([57.375, 57.12, 58.395], dtype=np.float32).reshape(1, 1, 3)

   self.net = cv2.dnn.readNet('object_detection_nanodet-plus-m-1.5x-416.onnx')

The model filename should be passed as a parameter (lets name it
"modelPath" in def init.
In models/object_detection_nanodet/NanodetPlus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929479496:

   if keep_ratio and srcimg.shape[0] != srcimg.shape[1]:

       hw_scale = srcimg.shape[0] / srcimg.shape[1]

       if hw_scale > 1:

           newh, neww = self.image_shape[0], int(self.image_shape[1] / hw_scale)

           img = cv2.resize(srcimg, (neww, newh), interpolation=cv2.INTER_AREA)

           left = int((self.image_shape[1] - neww) * 0.5)

           img = cv2.copyMakeBorder(img, 0, 0, left, self.image_shape[1] - neww - left, cv2.BORDER_CONSTANT,

                                    value=0)  # add border

       else:

           newh, neww = int(self.image_shape[0] * hw_scale), self.image_shape[1]

           img = cv2.resize(srcimg, (neww, newh), interpolation=cv2.INTER_AREA)

           top = int((self.image_shape[0] - newh) * 0.5)

           img = cv2.copyMakeBorder(img, top, self.image_shape[0] - newh - top, 0, 0, cv2.BORDER_CONSTANT, value=0)

   else:

       img = cv2.resize(srcimg, self.image_shape, interpolation=cv2.INTER_AREA)

If the input size is 416x416 exactly, we do not need to resize the source
image.
In models/object_detection_nanodet/NanodetPlus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929481214:

                                    value=0)  # add border

       else:

           newh, neww = int(self.image_shape[0] * hw_scale), self.image_shape[1]

           img = cv2.resize(srcimg, (neww, newh), interpolation=cv2.INTER_AREA)

           top = int((self.image_shape[0] - newh) * 0.5)

           img = cv2.copyMakeBorder(img, top, self.image_shape[0] - newh - top, 0, 0, cv2.BORDER_CONSTANT, value=0)

   else:

       img = cv2.resize(srcimg, self.image_shape, interpolation=cv2.INTER_AREA)

   blob = self.pre_process(img)

   self.net.setInput(blob)

   outs = self.net.forward(self.net.getUnconnectedOutLayersNames())

   det_bboxes, det_conf, det_classid = self.post_process(outs)

   ratioh,ratiow = srcimg.shape[0]/newh,srcimg.shape[1]/neww

   return det_bboxes, left, top, ratioh, ratiow, det_bboxes, det_conf, det_classid

Double det_bboxes in return?
I suggest you put the letter_box transformation (the resize and pad
processings) in demo.py.
In models/object_detection_nanodet/NanodetPlus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929484178:

       points = anchors

       distance = bbox_pred

       max_shape=self.image_shape

       x1 = points[:, 0] - distance[:, 0]

       y1 = points[:, 1] - distance[:, 1]

       x2 = points[:, 0] + distance[:, 2]

       y2 = points[:, 1] + distance[:, 3]

       if max_shape is not None:

           x1 = np.clip(x1, 0, max_shape[1])

           y1 = np.clip(y1, 0, max_shape[0])

           x2 = np.clip(x2, 0, max_shape[1])

           y2 = np.clip(y2, 0, max_shape[0])

       bboxes = np.stack([x1, y1, x2, y2], axis=-1)

Try not to call np.stack in a loop. It can be too slow.
In models/object_detection_nanodet/demo.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929485878:

@@ -0,0 +1,110 @@
+import cv2
+import numpy as np
+import argparse
+import time
+import matplotlib.pyplot as plt

Use cv2.imshow to display result image. Take the following as an exmaple:
https://github.com/opencv/opencv_zoo/blob/54190541bb9f717144b255358ca6b37e3e47bf23/models/face_detection_yunet/demo.py#L106-L110
In models/object_detection_nanodet/demo.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929486900:

+def drawPred(frame, classId, conf, left, top, right, bottom):

cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 0), thickness=2)
#label = '%.2f' % conf
label =''
label = '%s%s' % (classes[classId], label)
labelSize, baseLine = cv2.getTextSize(label, cv2.FONT_HERSHEY_SIMPLEX, 0.5, 1)
top = max(top, labelSize[1])

cv.rectangle(frame, (left, top - round(1.5 * labelSize[1])), (left + round(1.5 * labelSize[0]), top + baseLine), (255,255,255), cv.FILLED)

cv2.putText(frame, label, (left, top - 10), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), thickness=2)
return frame

+if name=='main':

parser = argparse.ArgumentParser(description='Nanodet inference using OpenCV an contribution by Sri Siddarth Chakaravarthy part of GSOC_2022')
parser.add_argument('--input_type', type=str, default='image', help="Input types: image or video")
parser.add_argument('--image_path', type=str, default='test_data/test1.jpg', help="image path")
parser.add_argument('--video_path', type=str, default='test_data/TestV1.mp4', help="video path")

My apology for the previous misleading comment. What I meant was taking
webcam as input. Take the following as an example:
https://github.com/opencv/opencv_zoo/blob/54190541bb9f717144b255358ca6b37e3e47bf23/models/face_detection_yunet/demo.py#L111-L136
In models/object_detection_nanodet/demo.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929487028:

   plt.imshow(frame)

   plt.axis('off')

   plt.show()

Do not use plt for result display
In models/object_detection_nanodet/demo.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929487543:

   plt.imshow(frame)

   plt.axis('off')

   plt.show()

else:

   model_net = NanoDet(prob_threshold=args.confidence, iou_threshold=args.nms)

   colors = [(255, 255, 0), (0, 255, 0), (0, 255, 255), (255, 0, 0)]

   capture = cv2.VideoCapture(args.video_path)

   start = time.time_ns()

   frame_count = 0

   total_frames = 0

   fps = -1

   model_net = NanoDet(prob_threshold=args.confidence, iou_threshold=args.nms)

Remove this repeated line.
In models/object_detection_nanodet/demo.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929487854:

+with open('coco.names', 'rt') as f:

classes = f.read().rstrip('\n').split('\n')

+def drawPred(frame, classId, conf, left, top, right, bottom):

cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 0), thickness=2)
#label = '%.2f' % conf
label =''
label = '%s%s' % (classes[classId], label)
labelSize, baseLine = cv2.getTextSize(label, cv2.FONT_HERSHEY_SIMPLEX, 0.5, 1)
top = max(top, labelSize[1])

cv.rectangle(frame, (left, top - round(1.5 * labelSize[1])), (left + round(1.5 * labelSize[0]), top + baseLine), (255,255,255), cv.FILLED)

cv2.putText(frame, label, (left, top - 10), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), thickness=2)
return frame

+if name=='main':

parser = argparse.ArgumentParser(description='Nanodet inference using OpenCV an contribution by Sri Siddarth Chakaravarthy part of GSOC_2022')

Make the model path as one of the argument as shown below:
https://github.com/opencv/opencv_zoo/blob/54190541bb9f717144b255358ca6b37e3e47bf23/models/face_detection_yunet/demo.py#L36
In models/object_detection_nanodet/demo.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929488933:

       #image = model_net.infer(frame)

       srcimg = frame

       drawimg = srcimg.copy()

       result, left, top, ratioh, ratiow, det_bboxes, det_conf, det_classid = model_net.infer(frame)

       for i in range(det_bboxes.shape[0]):

           xmin, ymin, xmax, ymax = max(int((det_bboxes[i,0] - left) * ratiow), 0), max(int((det_bboxes[i,1] - top) * ratioh), 0), min(

               int((det_bboxes[i,2] - left) * ratiow), srcimg.shape[1]), min(int((det_bboxes[i,3] - top) * ratioh), srcimg.shape[0])

           image = drawPred(drawimg, det_classid[i], det_conf[i], xmin, ymin, xmax, ymax)

       frame_count += 1

       total_frames += 1

       if frame_count >= 50:

           end = time.time_ns()

           fps =<PHONE_NUMBER> * frame_count / (end - start)

You do not have to calculate FPS manually. Use cv2.TickMeter() to measure
time, and you can get FPS by calling getFPS() as done below:
https://github.com/opencv/opencv_zoo/blob/54190541bb9f717144b255358ca6b37e3e47bf23/models/face_detection_yunet/demo.py#L118-L131
—
Reply to this email directly, view it on GitHub
https://github.com/opencv/opencv_zoo/pull/75#pullrequestreview-1050301686,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALTC7V4FKKI4SCK6TWEA57TVV5LT5ANCNFSM54QBLGGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

Ok will check and resize images before running inference
On Tue, Jul 26, 2022 at 3:41 PM Yuantao Feng @.***>
wrote:

@.**** commented on this pull request.
In models/object_detection_nanodet/NanodetPlus.py
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929779830:

   if keep_ratio and srcimg.shape[0] != srcimg.shape[1]:

       hw_scale = srcimg.shape[0] / srcimg.shape[1]

       if hw_scale > 1:

           newh, neww = self.image_shape[0], int(self.image_shape[1] / hw_scale)

           img = cv2.resize(srcimg, (neww, newh), interpolation=cv2.INTER_AREA)

           left = int((self.image_shape[1] - neww) * 0.5)

           img = cv2.copyMakeBorder(img, 0, 0, left, self.image_shape[1] - neww - left, cv2.BORDER_CONSTANT,

                                    value=0)  # add border

       else:

           newh, neww = int(self.image_shape[0] * hw_scale), self.image_shape[1]

           img = cv2.resize(srcimg, (neww, newh), interpolation=cv2.INTER_AREA)

           top = int((self.image_shape[0] - newh) * 0.5)

           img = cv2.copyMakeBorder(img, top, self.image_shape[0] - newh - top, 0, 0, cv2.BORDER_CONSTANT, value=0)

   else:

       img = cv2.resize(srcimg, self.image_shape, interpolation=cv2.INTER_AREA)

We need to consider whether the input image is 416x416 already, as we do
not want to measure the time of resizing in benchmarking.
—
Reply to this email directly, view it on GitHub
https://github.com/opencv/opencv_zoo/pull/75#discussion_r929779830, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ALTC7V4BQIOGYGIBOGW4ZN3VV62UJANCNFSM54QBLGGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

Reviewed changes

@Sidd1609 I cannot load the onnx model in this pull request. You can reproduce the issue using netron.app to open your model. Did you manually modify the model?

No I did not manually edit the model
On Thu, Jul 28, 2022 at 8:01 AM Yuantao Feng @.***>
wrote:

@Sidd1609 https://github.com/Sidd1609 I cannot load the onnx model in
this pull request. You can reproduce the issue using netron.app to open
your model. Did you manually modify the model?
—
Reply to this email directly, view it on GitHub
https://github.com/opencv/opencv_zoo/pull/75#issuecomment-1197581528,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALTC7V2ILPLMEMUL6B7IFNTVWHWIJANCNFSM54QBLGGQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Shall I share you a google drive link for the model
On Thu, Jul 28, 2022 at 11:34 AM Sri Siddarth Chakaravarthy P <
@.***> wrote:

No I did not manually edit the model
On Thu, Jul 28, 2022 at 8:01 AM Yuantao Feng @.***>
wrote:

@Sidd1609 https://github.com/Sidd1609 I cannot load the onnx model in
this pull request. You can reproduce the issue using netron.app to open
your model. Did you manually modify the model?
—
Reply to this email directly, view it on GitHub
https://github.com/opencv/opencv_zoo/pull/75#issuecomment-1197581528,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALTC7V2ILPLMEMUL6B7IFNTVWHWIJANCNFSM54QBLGGQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Shall I share you a google drive link for the model

Yes, please send me the model via gdrive and doublecheck on you system as well (e.g. try to read the model with netron or onnx in Python).

I am able to read the model on my system using opencv
Cv.dnn.readnet()
On Thu, Jul 28, 2022 at 11:43 AM Yuantao Feng @.***>
wrote:

Shall I share you a google drive link for the model
Yes, please send me the model via gdrive and doublecheck on you system as
well (e.g. try to read the model with netron or onnx in Python).
—
Reply to this email directly, view it on GitHub
https://github.com/opencv/opencv_zoo/pull/75#issuecomment-1197709081,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALTC7V4Z6UPJPEKE627AKRTVWIQJPANCNFSM54QBLGGQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

sending the link for the model
https://drive.google.com/file/d/1FWYWlZm73UiusQpuvxxmiucwMU-YwKVY/view?usp=sharing
On Thu, Jul 28, 2022 at 11:44 AM Sri Siddarth Chakaravarthy P <
@.***> wrote:

I am able to read the model on my system using opencv
Cv.dnn.readnet()
On Thu, Jul 28, 2022 at 11:43 AM Yuantao Feng @.***>
wrote:

Shall I share you a google drive link for the model
Yes, please send me the model via gdrive and doublecheck on you system as
well (e.g. try to read the model with netron or onnx in Python).
—
Reply to this email directly, view it on GitHub
https://github.com/opencv/opencv_zoo/pull/75#issuecomment-1197709081,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALTC7V4Z6UPJPEKE627AKRTVWIQJPANCNFSM54QBLGGQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Tested the model on my side. It works fine on my local system, reaching ~20 FPS with M1 chip. Will do some benchmarking in the following days.

Sure, i will begin working on YoloX then.
On Fri, Jul 29, 2022 at 3:26 PM Yuantao Feng @.***>
wrote:

Tested the model on my side. It works fine on my local system, reaching
~20 FPS with M1 chip. Will do some benchmarking in the following days.
—
Reply to this email directly, view it on GitHub
https://github.com/opencv/opencv_zoo/pull/75#issuecomment-1199090717,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALTC7VYRVO55ZQNBWRROCJDVWOTDFANCNFSM54QBLGGQ
.
You are receiving this because you were mentioned.Message ID:
@.***>


Add callback to Kino.interrupt!

When using Kino.interrupt! it would be useful to be able to specify a task that should be executed before restarting the cell.

We're working on tutorials for Liveview Native in Livebook and would like to be able to interrupt execution if the default port is in use.
Assuming a Port module that can detect whether a port is in use and can also kill processes using a port, we'd like to be able to do the following:
default_port = 4000

if HTTPPort.in_use?(default_port) do
  Kino.interrupt!(:error, "Input required", on_continue: {HTTPPort, :kill_process, [default_port]})
end

# Start Phoenix on port 4000

This addition will make it possible to interrupt execution whenever user confirmation is needed before performing an action. The current interrupt! does not allow developers to respond to a user clicking Continue.
What do you think?
Let me know if you need someone to actually implement the change.

At first I am :-1: because if you need to perform such tasks, it means you are generally unable to reevaluate the cell in the first place? Can you provide a more concrete example? Who is using that Port? Where and how was it started?

Sure thing.
I mean that there is a system process somewhere that is making use of the HTTP port (not Elixir port 🙃).
Let's say that a new Elixir developer has run mix phx.server from their terminal.
If they attempts to start one of LiveView Native's tutorials, we would like to tell them that the port is in use and offer to kill the system process holding the port.
The idea is that to block the execution until that system process is killed, and to offer the user a way to kill it.
Kino.interrupt! currently lets us block execution if some condition is not met. It would be nice to be able to execute some code before attempting to reevaluate the code.

@NduatiK you can do this:
if Process.get(:port_taken?) do
  kill? = Kino.Shorts.read_checkbox("Kill port 4000")

  if kill? do
    Process.put(:port_taken?, true)
  else
    Kino.interrupt!(:normal, "Port 4000 is taken")
  end
end

Since you start the LVN server in the notebook, it would make sense to pick a more random port, so it's much less likely that people run into conflict :)

Thanks @jonatanklosko, we came up with a similar workaround, but yours is much cleaner.
Thanks!


primefac 1.1 process 5 ValueError: gmpy does not handle infinity

[If there is a different site for primefac 1.1 bug reports, please let me know; or if this is a previously-reported problem.]
I downloaded primefac-1.1.tar.gz from https://pypi.org/project/primefac/ and tar xzf'd it and said ./primefac s where s is a large number shown below.  Problem: An error message appeared, "ValueError: gmpy does not handle infinity", as shown in following transcript.
Note, python --version shows "Python 2.7.12", gmpy version appears to be gmpy-1.17, uname -a shows "Linux mita 4.15.0-34-generic #37~16.04.1-Ubuntu SMP Tue Aug 28 10:44:06 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux", and free shows
 total        used        free      shared  buff/cache   available
 Mem:       32800772    15661784     1379632     1690020    15759356    14834292
 Swap:      75599864           0    75599864

Transcript:
mita ~/src/primes/pyfac/primefac-1.1 > ./primefac.py<PHONE_NUMBER>99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999820999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999379000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111159 ;ps
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999820999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999379000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111159:Process Process-5:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "./primefac.py", line 593, in factory
    def factory(method, n, output): output.put((method(n), str(method).split()[1]))
  File "./primefac.py", line 451, in mpqs
    min_prime = mpz(thresh*3)
ValueError: gmpy does not handle infinity
^Z
[1]+  Stopped                 ./primefac.py<PHONE_NUMBER>99999[snip]000111159
  PID TTY          TIME CMD
22257 pts/45   00:00:00 bash
23536 pts/45   00:00:00 python
23538 pts/45   00:00:23 python
23539 pts/45   00:00:23 python
23540 pts/45   00:00:22 python
23541 pts/45   00:00:22 python
23542 pts/45   00:00:12 python <defunct>
23568 pts/45   00:00:00 ps

mita ~/src/primes/pyfac/primefac-1.1 > kill -9 23536

Thanks for the report, but unfortunately this tracker is not the correct place for it. This tracker is only for issues with the software that runs https://pypi.org itself. It cannot help with packages distributed or installed from there. You'll need to contact the maintainers of this package instead.

@di, thanks, I'll try to contact the primefac maintainer.
Note, perhaps you could add that sentence, "This tracker is only for issues with the software that runs https://pypi.org itself", to the "Bug reports." line at https://github.com/pypa/warehouse/blob/master/CONTRIBUTING.rst and also in the section at https://pypi.org/help/#feedback , which is where the "Bugs and feedback" link at the bottom of https://pypi.org/project/primefac/ goes to.


Crash while getting getting amount from bitstamp

Hi,
my gekko crashed while getting the amount of something from bitstamp.
Happened after a new advise came in and this is the error:
2014-04-01 06:09:32 (INFO):     We have new trading advice!
2014-04-01 06:09:32 (INFO):              Position to take: long
2014-04-01 06:09:32 (INFO):              Market price: 462.69
2014-04-01 06:09:32 (INFO):              Based on market time: 2014-04-01 06:09:11
2014-04-01 06:09:32 (DEBUG):    Processed trades, sleeping for a minute...
/root/gekko/core/portfolioManager.js:107
return this.getFund(fund).amount;
^
TypeError: Cannot read property 'amount' of undefined
at Manager.getBalance (/root/gekko/core/portfolioManager.js:107:28)
at bound [as getBalance] (/root/gekko/node_modules/lodash/dist/lodash.js:729:21)
at act (/root/gekko/core/portfolioManager.js:135:23)
at bound (/root/gekko/node_modules/lodash/dist/lodash.js:729:21)
at /root/gekko/node_modules/async/lib/async.js:232:13
at /root/gekko/node_modules/async/lib/async.js:142:25
at /root/gekko/node_modules/async/lib/async.js:229:17
at /root/gekko/node_modules/async/lib/async.js:556:34
at set (/root/gekko/core/portfolioManager.js:77:7)
at bound (/root/gekko/node_modules/lodash/dist/lodash.js:729:21)
These are the gekko and node versions:
Gekko version: v0.1.2
Nodejs version: v0.10.26
It worked pretty well for a time, no idea what caused this

this is now fixed!


[Tech Debt] Run deno tests for every PR, not just /games

Suggest always running deno tests to ensure compatibility between the engine and games, not just when something in the /games directory changes.
Commentary can be found here as to why this might be a good idea.

@leomcelroy is this something we want to implement?

@leomcelroy Can I hack at this?

I'm volunteering to work on this issue.

I'm volunteering to work on this issue.


Gif -> mp4 for the feature previews

https://www.reddit.com/r/logseq/comments/1cexbmq/comment/l1p0g1k/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
Faster load times

[ ] convert the gifs to mp4s
[ ] works?

I am happy to implement this. Can I be assigned to this task?

So I looked into this. Unfortunately, what I gathered from this thread is that while technically possible, it may not be legal to implement. Another video format that could be used is .webm which would depend on client support to work.

:fearful:
I didn't know that.
Any format will work; it just needs to be preview-able on the README
Thank you so much for helping!

I misread the issue. I thought it was an add-on to this LSP. I'll check to see if a .webm works, if not, I'll try to fix the existing gifs to reduce file-size and loading times.

I should be able to get MP4 videos to work for this project's README. I'll try to get it done by tomorrow night.

Amazing! Thank you

Hey let me know if you need any help with this!

how about using something like https://github.com/marionebl/svg-term-cli to generate animated SVGs instead of videos?

The website now handles this