Camera diconnected after 10 seconds

Hi
Dear Alexx,
This camera is absent in the supported device list. Probably You will can thomething corrected  for its correct work.
Description this camera:
https://www.aliexpress.com/item/4000859777548.html?spm=a2g0s.9042311.0.0.e14c4c4dXNtG5c
Video:
https://youtu.be/lJ4EV2nrg-Q
Log here:
"Glazok": {
"url": "rtsp://<IP_ADDRESS>:554/user=admin&password=&channel=1&stream=0.sdp"
}
}
}
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env:	export GIN_MODE=release
- using code:	gin.SetMode(gin.ReleaseMode)
2021/04/24 14:43:54 Server Start Awaiting Signal
2021/04/24 14:43:54 Stream Try Connect Glazok
2021/04/24 14:43:54 Stream Try Connect Sonoff
[GIN-debug] Loaded HTML Templates (2):
-
- index.tmpl
[GIN-debug] GET    /                         --> main.serveHTTP.func1 (3 handlers)
[GIN-debug] POST   /recive                   --> main.HTTPAPIServerStreamWebRTC (3 handlers)
[GIN-debug] GET    /codec/:uuid              --> main.serveHTTP.func2 (3 handlers)
[GIN-debug] GET    /static/*filepath         --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (3 handlers)
[GIN-debug] HEAD   /static/*filepath         --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (3 handlers)
[cut]
2021/04/24 17:10:45 Set UDP ports to 50000..50009
[GIN] 2021/04/24 - 17:10:45 | 200 |   95.860482ms |    <IP_ADDRESS> | POST     "/recive"
[GIN] 2021/04/24 - 17:11:35 | 200 |    4.307576ms |    <IP_ADDRESS> | GET      "/?player=Glazok"
[GIN] 2021/04/24 - 17:11:35 | 200 |    1.686083ms |    <IP_ADDRESS> | GET      "/static/js/app.js?ver=2021-04-24+17:11:35.831671099+%2B0300+EEST+m%3D%2B8861.488265743"
[GIN] 2021/04/24 - 17:11:35 | 200 |      75.573µs |    <IP_ADDRESS> | GET      "/codec/Glazok"
2021/04/24 17:11:36 Set UDP ports to 50000..50009
[GIN] 2021/04/24 - 17:11:36 | 200 |   48.425056ms |    <IP_ADDRESS> | POST     "/recive"
2021/04/24 17:11:40 Client Not Send ACK (probably the browser is minimized) or tab not active Close client
2021/04/24 17:11:40 WritePacket WebRTC Client Offline
2021/04/24 17:11:54 noVideo

Add-on don't supported any more. Remove it and install custom component from this repo

Hi
Alex, i removed add-on and installed custom component but this don't helped. See log below please.
Maybe you have any ideas for this?
2021-05-09 14:04:04 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:04 Stream Try Connect rtsp://<IP_ADDRESS>:554/user=admin&password=&channel=1&stream=0.sdp
2021-05-09 14:04:04 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:04 Stream Try Connect rtsp://rtsp:12345678@<IP_ADDRESS>:554/av_stream/ch1
2021-05-09 14:04:04 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:04 Set ICEServers [stun:stun.l.google.com:19302]
2021-05-09 14:04:08 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:08 Set ICEServers [stun:stun.l.google.com:19302]
2021-05-09 14:04:25 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:25 noVideo
2021-05-09 14:04:25 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:25 noVideo
2021-05-09 14:04:38 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:38 muxerWebRTC.WritePacket WebRTC Client Offline
2021-05-09 14:04:40 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:40 Set ICEServers [stun:stun.l.google.com:19302]
2021-05-09 14:04:41 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:41 websocket.JSON.Send write tcp <IP_ADDRESS>:8083-><IP_ADDRESS>:54798: i/o timeout
2021-05-09 14:04:44 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:44 Stream Exit On Demand No Viewer
2021-05-09 14:04:44 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:44 Stream Exit On Demand No Viewer
2021-05-09 14:04:54 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:54 Set ICEServers [stun:stun.l.google.com:19302]
2021-05-09 14:04:55 DEBUG (webrtc) [custom_components.webrtc.utils] 2021/05/09 14:04:55 websocket.JSON.Receive EOF

I'm getting the same issue on one of my cams.
It runs fine in VLC and Frigate records it fine too, but using your card or the RTSPtoWEBRTC addon, it drops after ~6-10 seconds every single time. A couple of times it has run fine for several minutes without issue, but usually it drops and I get the NoVideo error.
It sends a keyframe every 2 seconds, and I tried reducing that to 1 second as well. But still, always drop after 6-10 seconds.
Weird, might be my network and the Hyper-V environment. Might be the camera. Can't really figure it out any further. My other cams are fine.


Use a Docker volume bazel-output for bazel-container output.

This is a behavioral change where the build output of the script is isolated from the host filesystem. The workspace directory is mounted as readonly and any convenience symlinks are left untouched. The script still bind mounts the Bazelisk cache and repository cache from the host filesystem.

This change is

This is intended to be merged into main after parent PR #361.
This should hopefully resolve any remaining issues w.r.t. running on MacOS, as I suspect the problem was that some of Bazel's filesystem operations are not properly implemented in the bind mount driver. See https://docs.docker.com/storage/volumes/ for more info on Docker volumes.

a discussion (no related file):
Previously, SanjayVas (Sanjay Vasandani) wrote…
Np. I'll hopefully have access to a Mac on Wednesday to try to fix that part.
Note that the parent PR #361 needs your approval before this PR can be merged.

Done.

As a tip for those using this script on Linux (e.g. to build with an older glibc) who want to run any of the output on the host machine, you can use docker volume inspect bazel-output to find the Bazel output path on the host machine and run things from its execroot.
For example, the Mountpoint returned for me is ~/.local/share/docker/volumes/bazel-output/_data. My execroot ends up at ~/.local/share/docker/volumes/bazel-output/_data/b2b94c5fcd8d59643147af90b9148cbf/execroot/wfa_measurement_system/bazel-out/k8-fastbuild/bin, so I can cd there and run any executables I've build using the script.

#378 changes this, and includes documentation for the correct steps.


Transitive dependency on commons-io 2.2, which is vulnerable

Serverless Java Container version: 1.9
Implementations: Spring Boot 2
Framework version: SpringBoot 2.6.6
Frontend service: N/A
Deployment method: N/A
Scenario
I’m using com.amazonaws.serverless:aws-serverless-java-container-springboot2:1.9 in a project, built using Gradle if it matters. This pulls in commons-io:2.2 via the following chain:

(root project)
com.amazonaws.serverless:aws-serverless-java-container-springboot2:1.9
com.amazonaws.serverless:aws-serverless-java-container-core:1.9
commons-fileupload:commons-fileupload:1.4
commons-io:commons-io:2.2

The release notes for version 1.8 contain the claim:

Explicitly set commons-io version to 2.11.0 to avoid older transitive dependency version (CVE-2021-29425)

But that does not seem to work. I actually looked through the pom.xml files for both 1.8 and 1.9 and I can’t find any trace of this. Maybe a relevant commit was accidentally dropped?

Thanks for raising it, the change is here: https://github.com/awslabs/aws-serverless-java-container/blob/main/aws-serverless-java-container-core/pom.xml#L103
Will take a closer look next week...

Asked for a new fileupload release: https://lists.apache.org/thread/t6zqknf84gkk0dr359hmf4okf57shvd6
Waiting for a response, otherwise will manage the dependency explicitly.

Next commons-fileupload release will happen next year so for now I added the dependency explicitly.

Released as part of version 1.9.1.


feat: add support for typedoc 0.23

Changes

feat: add support for typedoc 0.23
chore: update dependencies to latest

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


doc: reflect binary name in macOS with a Homebrew installation

see: https://github.com/Homebrew/homebrew-core/pull/134668

Thanks, already added some info in another PR.


A handful of tests fail on my Macbook (MacOS 10.12.4 Sierra) [phab:T245]

Created by benjyw at 2017-05-03 00:02:53:
Failures are:
  /private/var/tmp/_bazel_benjyw/0158cfe381fa7f053d73e34fd4048ea5/execroot/kythe/bazel-out/local-fastbuild/testlogs/kythe/cxx/common/testdata/net_client_test_runner/test.log
//kythe/cxx/tools/fyi/testdata:basic                                     FAILED in 1 out of 2 in 0.4s
  /private/var/tmp/_bazel_benjyw/0158cfe381fa7f053d73e34fd4048ea5/execroot/kythe/bazel-out/local-fastbuild/testlogs/kythe/cxx/tools/fyi/testdata/basic/test.log
//kythe/cxx/tools/fyi/testdata:hopeless                                  FAILED in 1 out of 2 in 0.2s
  /private/var/tmp/_bazel_benjyw/0158cfe381fa7f053d73e34fd4048ea5/execroot/kythe/bazel-out/local-fastbuild/testlogs/kythe/cxx/tools/fyi/testdata/hopeless/test.log
//kythe/cxx/tools/fyi/testdata:nothing                                   FAILED in 1 out of 2 in 0.2s
  /private/var/tmp/_bazel_benjyw/0158cfe381fa7f053d73e34fd4048ea5/execroot/kythe/bazel-out/local-fastbuild/testlogs/kythe/cxx/tools/fyi/testdata/nothing/test.log
//kythe/go/serving/tools/testdata:kwazthis_test                          FAILED in 1 out of 2 in 0.1s
  /private/var/tmp/_bazel_benjyw/0158cfe381fa7f053d73e34fd4048ea5/execroot/kythe/bazel-out/local-fastbuild/testlogs/kythe/go/serving/tools/testdata/kwazthis_test/test.log
//kythe/go/serving/tools/testdata:write_tables_test                      FAILED in 1 out of 2 in 0.2s
  /private/var/tmp/_bazel_benjyw/0158cfe381fa7f053d73e34fd4048ea5/execroot/kythe/bazel-out/local-fastbuild/testlogs/kythe/go/serving/tools/testdata/write_tables_test/test.log
//kythe/go/storage/leveldb:leveldb_test                                  FAILED in 1 out of 2 in 0.1s
  /private/var/tmp/_bazel_benjyw/0158cfe381fa7f053d73e34fd4048ea5/execroot/kythe/bazel-out/local-fastbuild/testlogs/kythe/go/storage/leveldb/leveldb_test/test.log
//kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata/pkg:cross_file_integration_test FAILED in 1 out of 2 in 0.3s
  /private/var/tmp/_bazel_benjyw/0158cfe381fa7f053d73e34fd4048ea5/execroot/kythe/bazel-out/local-fastbuild/testlogs/kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata/pkg/cross_file_integration_test/test.log

Executed 8 out of 524 tests: 516 tests pass and 8 fail locally.

Test logs are all similar to, e.g.,
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
-----------------------------------------------------------------------------
kythe/cxx/common/testdata/start_http_service.sh: line 67: 80091 Done                    $CAT "${TEST_ENTRIES:?no test entries for test}"
     80093 Broken pipe: 13         | "${KYTHE_ENTRYSTREAM}" $ENTRYSTREAM_ARGS
     80094 Killed: 9               | "${KYTHE_WRITE_ENTRIES}" -graphstore "${OUT_DIR}/gs" 2> /dev/null
Use --strategy=TestRunner=standalone to disable sandboxing for the failing actions.

clang version is:
$ clang -v
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

salguarnieri wrote at 2017-05-03 00:30:26:
This is clearly a problem, but I can't reproduce and don't have a good idea what might be causing it.

benjyw wrote at 2017-05-03 00:51:22:
Any useful information I can provide?
I tried cleaning, that didn't fix it.

salguarnieri wrote at 2017-05-03 01:02:23:
You probably have better things to do, but if you add set -x to the top of start_http_service.sh, we should get the exact commands executed from that script in the log. Maybe that will tell us more. It might also allow you to re-run the commands from the command line to see why/how they are failing. I forget, but you might need to disable sandboxing to rerun the commands (--strategy=TestRunner=standalone). If I had an idea of what was failing and what the error message was, I could try to replicate that situation locally.
Given there are only ~8 failures, and we know they pass  head on my mac I wouldn't consider this something you'd have to do before submitting more diffs though.

benjyw wrote at 2017-05-03 02:46:44:
Did some digging as you suggest, and it looks like this is being killed: 9:
bazel-bin/kythe/go/storage/tools/write_entries/write_entries
It happens even if I run it standalone, to get a usage message.  So that binary is messed up somehow. I rebuilt it, still same problem.

benjyw wrote at 2017-05-03 02:48:34:
Related? https://github.com/shirou/gopsutil/issues/339

benjyw wrote at 2017-05-03 02:51:09:
Bingo: https://github.com/golang/go/issues/19734 .
I am indeed on XCode 8.3.  Is your system on 8.2?

benjyw wrote at 2017-05-03 02:54:12:
Solution appears to be https://github.com/golang/go/issues/19734#issuecomment-289822644

salguarnieri wrote at 2017-05-03 03:09:17:
Thanks for digging in! Yeah, I'm still on Xcode 8.2 so that would explain everything.
I'm not sure if this is possible, but maybe we can throw something in tools/bazel.rc to always pass those flags to go builds.

fromberger wrote at 2017-05-03 03:10:18:
I think if it works, the better solution is for us to update to Go 1.8.1.

fromberger wrote at 2017-11-02 19:16:02:
I think this is resolved, but if I'm wrong please feel free to reopen it.

benjyw wrote at 2017-11-04 21:15:36:
Now I can't even build a release.
bazel build kythe/release gives errors like:
...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: bazel-out/local-fastbuild/bin/external/boringssl/_objs/crypto/external/boringssl/src/crypto/sha/sha1-altivec.pic.o has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: bazel-out/local-fastbuild/bin/external/boringssl/_objs/crypto/external/boringssl/src/crypto/thread_none.pic.o has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: bazel-out/local-fastbuild/bin/external/boringssl/_objs/crypto/external/boringssl/src/crypto/thread_win.pic.o has no symbols
ERROR: /private/var/tmp/_bazel_benjyw/0158cfe381fa7f053d73e34fd4048ea5/external/com_github_google_glog/BUILD.bazel:10:1: C++ compilation of rule 'com_github_google_glog//:glog' failed (Exit 1).
In file included from external/com_github_google_glog/src/signalhandler.cc:34:
In file included from external/com_github_google_glog/src/utilities.h:82:
In file included from bazel-out/local-fastbuild/genfiles/external/com_github_google_glog/include/glog/logging.h:43:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/mutex:189:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__mutex_base:17:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__threading_support:156:1: error: unknown type name 'mach_port_t'
mach_port_t __libcpp_thread_get_port();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__threading_support:300:1: error: unknown type name 'mach_port_t'
mach_port_t __libcpp_thread_get_port() {
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__threading_support:301:12: error: use of undeclared identifier 'pthread_mach_thread_np'
    return pthread_mach_thread_np(pthread_self());
           ^
3 errors generated.
Target //kythe/release:release failed to build

This is with:
gonzo:[~/src/kythe][master]$ bazel version
Build label: 0.7.0-homebrew
Build target: bazel-out/darwin_x86_64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Oct 19 09:12:48 2017<PHONE_NUMBER>)
Build timestamp:<PHONE_NUMBER>
Build timestamp as int:<PHONE_NUMBER>

at commit 4d479261f47a2fc1d10cc866e163d42b4b73e9dc

fromberger wrote at 2017-11-04 23:19:07:
shahms could this be a side-effect of the LLVM update?

salguarnieri wrote at 2017-11-05 01:09:22:
Have you tried
bazel clean --expunge followed by ./tools/modules/update.sh followed by bazel build //kythe/release

benjyw wrote at 2017-11-05 03:47:33:
I had tried update.sh before, tried now again with the expunge, but still get the same error:
INFO: From Linking third_party/llvm/libllvm.lo:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: bazel-out/local-fastbuild/bin/third_party/llvm/_objs/llvm/tools/modules/modules_checked_empty.pic.o has no symbols
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning for library: bazel-out/local-fastbuild/bin/third_party/llvm/libllvm.lo the table of contents is empty (no object file members in the library define global symbols)
ERROR: /private/var/tmp/_bazel_benjyw/0158cfe381fa7f053d73e34fd4048ea5/external/com_github_google_glog/BUILD.bazel:10:1: C++ compilation of rule 'com_github_google_glog//:glog' failed (Exit 1).
In file included from external/com_github_google_glog/src/symbolize.cc:55:
In file included from external/com_github_google_glog/src/utilities.h:82:
In file included from bazel-out/local-fastbuild/genfiles/external/com_github_google_glog/include/glog/logging.h:43:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/mutex:189:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__mutex_base:17:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__threading_support:156:1: error: unknown type name 'mach_port_t'
mach_port_t __libcpp_thread_get_port();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__threading_support:300:1: error: unknown type name 'mach_port_t'
mach_port_t __libcpp_thread_get_port() {
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__threading_support:301:12: error: use of undeclared identifier 'pthread_mach_thread_np'
    return pthread_mach_thread_np(pthread_self());
           ^
3 errors generated.
Target //kythe/release:release failed to build

benjyw wrote at 2017-11-05 03:47:52:
Could it be a bazel 0.7 vs. 0.6 thing?

salguarnieri wrote at 2017-11-05 04:59:29:
I'm on 0.7 also, so that shouldn't be the cause.

salguarnieri wrote at 2017-11-05 05:23:08:
So I think the difference is that I was on xcode 8.3.3. I just upgraded to 9.1 and I'm getting the following build error (which looks similar)
/usr/include/libkern/OSAtomicDeprecated.h:749:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
INFO: From Linking external/go_levigo/go_default_library.cgo.dir/gen/lib_cgo_lib.lo:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: bazel-out/local-fastbuild/bin/external/go_levigo/_objs/go_default_library.cgo.dir/gen/_cgo_lib/external/go_levigo/go_default_library.cgo.dir/gen/conv.cgo2.pic.o has no symbols
INFO: From Linking external/go_levigo/go_default_library.cgo.dir/gen/_cgo_.o:
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
ERROR: /private/var/tmp/_bazel_salguarnieri/ca16ea5a435d8ac2288f379cdf092007/external/com_github_google_glog/BUILD.bazel:10:1: C++ compilation of rule 'com_github_google_glog//:glog' failed (Exit 1).
In file included from external/com_github_google_glog/src/utilities.cc:32:
In file included from external/com_github_google_glog/src/utilities.h:82:
In file included from bazel-out/local-fastbuild/genfiles/external/com_github_google_glog/include/glog/logging.h:43:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/mutex:189:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__mutex_base:17:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__threading_support:156:1: error: unknown type name 'mach_port_t'
mach_port_t __libcpp_thread_get_port();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__threading_support:300:1: error: unknown type name 'mach_port_t'
mach_port_t __libcpp_thread_get_port() {
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__threading_support:301:12: error: use of undeclared identifier 'pthread_mach_thread_np'
    return pthread_mach_thread_np(pthread_self());
           ^
external/com_github_google_glog/src/utilities.cc:254:17: warning: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost(). [-Wdeprecated-declarations]
    pid_t tid = syscall(__NR_gettid);
                ^
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
int      syscall(int, ...);
         ^
1 warning and 3 errors generated.
Target //kythe/release:release failed to build
Use --verbose_failures to see the command lines of failed build steps.

benjyw wrote at 2017-11-05 15:47:55:
I am on xcode 9.0:
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ /usr/bin/xcodebuild -version
Xcode 9.0
Build version 9A235

salguarnieri wrote at 2017-11-05 22:32:24:
I found some discussion of the problem at https://github.com/tensorflow/tensorflow/issues/13220.
I threw together #2469 to build on my mac, but I suspect that it will be a bit more work for a solution that works well on linux.

revision #2469

This appears to be fixed, but @benjyw feel free to reopen if not and I'll take another look.

I think it's ok now, but generally the osx build is not particularly stable. Although 90% of my needs would be solved if there was a way to build a Java-only release. Currently bazel build kythe/release builds all the native code, even though I don't need it on OSX.

Thanks! We mostly develop on Linux, but do try to keep the macOS build stable.  Now that we've moved to GitHub we are looking at more CI options, but those are somewhat more limited where macOS is concerned.


[REQUEST Membership]: New membership for

GitHub Username

@wangxye
Organization you are requesting membership in

openyurtio
Sponsors

@gnunu
Requirements

[x] I have joined in the community Dingding and [WeChat]
[x] I often attend Openyurt Community Week
[x] I have reviewed the [community membership docs]
[x] I have spoken to my sponsors ahead of this application, and they have agreed to sponsor my application
[x] I have checked my affiliation in devstats (if it's not correct, please fix in cncf/gitdm)
[x] I am actively contributing to 1 or more OpenYurt subprojects

List of your contributions

PRs reviewed / authored:
https://github.com/openyurtio/openyurt/pull/1666
https://github.com/openyurtio/openyurt/pull/1647
https://github.com/openyurtio/openyurt/pull/1607
https://github.com/openyurtio/yurt-edgex-manager/pull/102
Issues :
https://github.com/openyurtio/openyurt/issues/1626
https://github.com/openyurtio/openyurt/issues/1615
https://github.com/openyurtio/openyurt/issues/1580
https://github.com/openyurtio/yurt-edgex-manager/issues/101

Brief Introduction
Hello everyone, I am a graduate student from Zhejiang University majoring in software engineering with a keen interest in cloud-native technologies.  Specifically, I am passionate about both K8s and Docker, and I'd like to contribute more to the development of the community.

agree +1

agree

@wangxye welcome, agree+1

@wangxye Congratulations you to become a member of OpenYurt community. We have sent a github message to invite you as member of OpenYurt, please check the message. and after joining member of OpenYurt, you need to check two points in this issue https://github.com/openyurtio/community/issues/14


Lag of the video stream from real time. Problem of handling errors when disconnecting the camera during processing.

Hello! I'm interested in this code and the asynchronous processing option.
SeeShark\SeeShark\Device\VideoDevice.cs:
        public DecodeStatus TryGetFrame(out Frame frame)
        {
            DecodeStatus status = decoder.TryDecodeNextFrame(out frame);

            // Big brain move to avoid overloading the CPU \o/
            // Decide whether we wait longer during a Thread.Sleep() when there are no frames available.
            // Waiting longer would mean a full frame interval (for example ~16ms when 60 fps), 1ms otherwise.
            // Always wait longer just after receiving a new frame.
            bool waitLonger = status == DecodeStatus.NewFrame;
            Thread.Sleep(waitLonger ? 1000 * decoder.Framerate.den / (decoder.Framerate.num + 5) : 1);

            return status;
        }

And so is this loop:
I append here OnEndOfStream event:
        public event EventHandler<DecodeStatus>? OnEndOfStream;
. . .
        protected void DecodeLoop()
        {
            DecodeStatus status;
            while ((status = TryGetFrame(out var frame)) != DecodeStatus.EndOfStream)
            {
                OnFrame?.Invoke(this, new FrameEventArgs(frame, status));

                if (!IsPlaying)
                    break;
            }
            if (status == DecodeStatus.EndOfStream)
            {
                OnEndOfStream?.Invoke(this, status);
            }
        }

I slightly modified the code here, adding a handler in case of an error.
The problem is that in case of an error, if the camera was disconnected from USB during processing, calling ffmpeg.av_read_frame(FormatContext, Packet); will return an EIO error with code -5:
SeeShark\SeeShark\Decode\VideoStreamDecoder.cs:
                error = ffmpeg.av_read_frame(FormatContext, Packet);

                if (error < 0)
                {
                    nextFrame = Frame;
                    GC.Collect();

                    // We only wait longer once to make sure we catch the frame on time.
                    return error == eagain
                        ? DecodeStatus.NoFrameAvailable
                        : DecodeStatus.EndOfStream;
                }

EIO is not the same as EAGAIN and will return DecodeStatus.EndOfStream accordingly. TryGetFrame will return EndOfStream along the chain, then DecodeLoop will exit the loop and IsPlaying will remain True (here we not set it to false on exit from loop), but we won't get any more frames. We also don't know about the error. those. OnFrame?.Invoke will not be called, with the status DecodeStatus.EndOfStream and there is no way to determine that an error has occurred and the camera is no longer working.
To solve this problem i append here OnEndOfStream and process it here. Other option still call OnFrame again with this status. But as it is now, we simply cannot find out that the camera has stopped, due to an unexpected error..
Problem two...
            bool waitLonger = status == DecodeStatus.NewFrame;
            Thread.Sleep(waitLonger ? 1000 * decoder.Framerate.den / (decoder.Framerate.num + 5) : 1);

This loop has a delay based on the FPS of the camera, which it declares in its configuration. Many cameras are able to adapt to light levels, I found this on both the ELP IMX 179 camera and the Genius camera. The fact is that, regardless of the FPS specified in the settings, they can raise it or lower it, compensating for too dark or overexposed frames.
I tried lighting the camera with a direct light with a lamp, and it raised the FPS to over 30 fps.
Over time, I got a video lag from reality, because each successfully received frame waited for the full time to the FPS indicated by the camera.
In case of low light, FPS drops to 14FPS or even lower. As a result, the loop executes several times with a delay of 1ms, which is also not good...
One more thing, if there is at least some processing in the OnFrame event, then this will lead to the same lag from reality.

Thanks for your feedback! I indeed completely neglected to properly handle end of stream in the video stream decoder.
As for everything else, especially the decode loop, do you think you can do a PR about it? Seeing some actual implementation would really help us

This loop has a delay based on the FPS of the camera, which it declares in its configuration. Many cameras are able to adapt to light levels, I found this on both the ELP IMX 179 camera and the Genius camera. The fact is that, regardless of the FPS specified in the settings, they can raise it or lower it, compensating for too dark or overexposed frames.
I tried lighting the camera with a direct light with a lamp, and it raised the FPS to over 30 fps.
Over time, I got a video lag from reality, because each successfully received frame waited for the full time to the FPS indicated by the camera.
In case of low light, FPS drops to 14FPS or even lower. As a result, the loop executes several times with a delay of 1ms, which is also not good...

Can reproduce with my OBS virtual camera by increasing the FPS after launching SeeShark.Example.Stats.
I'll have to see if I can make the FPS update in real time as well.

One more thing, if there is at least some processing in the OnFrame event, then this will lead to the same lag from reality. Because the event runs on the same thread as the loop, and processing time will increase the overall total delay between frames.

That is true. However, the solution would involve some copying of the received frame data to make it thread-safe, which could produce some performance drop - or at least consume more memory and CPU per frame. I'll have to investigate.

That is true. However, the solution would involve some copying of the received frame data to make it thread-safe, which could produce some performance drop - or at least consume more memory and CPU per frame. I'll have to investigate.

        private void OnFrameEventHandler(object sender, FrameEventArgs e)
        {
            var frame = e.Frame;

            if ((frame.Width == 0) || (frame.Height == 0) || (e.Status==DecodeStatus.NoFrameAvailable))
                return;

            converter ??= new FrameConverter(frame, PixelFormat.Rgb24);

            lock (syncPrimitive)
            {
                if (CurFrame != null)
                {
                    return;
                }

                Frame cFrame = converter.Convert(frame);
                CurFrame = new ImageFrame(ImageFormat.Srgb,
                    cFrame.Width, cFrame.Height, cFrame.WidthStep, cFrame.RawData);

                Monitor.Pulse(syncPrimitive);
            }
        }

I'm currently working with it like this. This is not efficient, but for a small resolution of 640x480 it will do. I don't need more now.
In my experience, the biggest waste of time is not in copying, but in memory allocation. It takes several times more time to allocate a buffer for a frame, if, say, this is not a compressed 8 megapixel video than to copy. The converter allocates memory every time, every time it is called, for every new frame inside, and I cannot reuse the buffer.
In my experience, it's more efficient to have a pool of buffers with memory allocated once. Remove one buffer from the pool, use it for video decoding, and give it to the user. The user can return it to the pool as needed (reducing the number of refs).
Without copying the frame, inside the OnFrameEventHandler (using only a reference), this doesn't seem to work either. after the frame is destroyed.
Maybe I'm wrong about something.

Going to delegate this on medium priority, as we do need to investigate this but not immediately.

Going to delegate this on medium priority, as we do need to investigate this but not immediately.

Since in this form, the library cannot be used in production. Because this inevitably leads to frame lag at nominal (due to the time spent copying the frame) or increased FPS.
I need to look for some quick solution, or go to other libraries. For example, work with the camera through OpenCV.
In my particular task, the stability of frames and the intervals between them is not important, then it is permissible to wait only if the frame is not decoded. For example 1/4 of FPS. And don't wait at all if the frame is decoded successfully to prevent lag. The question is what is there to decode synchronously in FFMPEG .... so that we know how many more frames it buffered.

The converter allocates memory every time, every time it is called, for every new frame inside, and I cannot reuse the buffer.

Actually no, the FrameConverter only allocates a frame buffer for the destination frame once in its constructor:
https://github.com/vignetteapp/SeeShark/blob/7768179eac3cb6095823610859b566e33c8589d2/SeeShark/FrameConverter.cs#L80-L94
var convertedFrameBufferSize = ffmpeg.av_image_get_buffer_size(dstPF, dstWidth, dstHeight, 1);
convertedFrameBufferPtr = Marshal.AllocHGlobal(convertedFrameBufferSize);

var dstData = new byte_ptrArray4();
var dstLinesize = new int_array4();
ffmpeg.av_image_fill_arrays(ref dstData, ref dstLinesize,
    (byte*)convertedFrameBufferPtr, dstPF, dstWidth, dstHeight, 1);

var dstFrame = ffmpeg.av_frame_alloc();
dstFrame->width = DstWidth;
dstFrame->height = DstHeight;
dstFrame->data.UpdateFrom(dstData);
dstFrame->linesize.UpdateFrom(dstLinesize);
dstFrame->format = (int)dstPF;
DstFrame = new Frame(dstFrame);

And all the Convert method does is to call sws_scale and return the already existing DstFrame, so it does not allocate more.
https://github.com/vignetteapp/SeeShark/blob/7768179eac3cb6095823610859b566e33c8589d2/SeeShark/FrameConverter.cs#L97-L106
public Frame Convert(Frame srcFrame)
{
    var srcAVFrame = srcFrame.AVFrame;
    var dstAVFrame = DstFrame.AVFrame;
    ffmpeg.sws_scale(convertContext,
        srcAVFrame->data, srcAVFrame->linesize, 0, srcAVFrame->height,
        dstAVFrame->data, dstAVFrame->linesize);

    return DstFrame;
}

This would need to be changed if we end up using a pool of buffers instead of just one.
The same is true for VideoStreamDecoder, it does not allocate any additional buffer every frame, which is why SeeShark cannot share Frames between threads safely.

In my particular task, the stability of frames and the intervals between them is not important, then it is permissible to wait only if the frame is not decoded. For example 1/4 of FPS. And don't wait at all if the frame is decoded successfully to prevent lag.

Looking at the TryGetFrame method, I understand what you mean:
https://github.com/vignetteapp/SeeShark/blob/7768179eac3cb6095823610859b566e33c8589d2/SeeShark/Device/VideoDevice.cs#L72-L84
A better solution would be to wait before decoding the next frame. However, not waiting at all will consume 100% of a CPU thread, that I cannot allow.
You do bring another good solution, which is to wait for a certain fraction of the FPS instead. I'll try that.
Yet again though, if you think you can make a pull request for this enhancement, don't hesitate. :)

cannot share Frames between threads safely.

That's just the point... And I was able to pull the frame out of this thread, only after copying it, with the help of Mediapipe.Net.Framework.Format.ImageFrame.  Which allocated new memory, and created a new instance of mediapipe::ImageFrame internally. And then ImageFramePacket called Dispose on it, after processing... And it couldn't be reused. https://github.com/vignetteapp/MediaPipe.NET/blob/d562895694bb9d590b328682bf869c51eec24205/Mediapipe.Net/Framework/Packets/PacketFactory.cs#L84
A better solution would be to wait before decoding the next frame. However, not waiting at all will consume 100% of a CPU thread, that I cannot allow.
What's the difference when to wait ... Before or after ... The main thing is that if we wait when there are a lot of frames in the buffer ... then we will not catch up with them. And if we wait when there are frames in the buffer, and then further increase the waiting time by the processing or copying time, in the same stream... We will lag behind even more.

Some like this:
diff --git a/SeeShark/Device/VideoDevice.cs b/SeeShark/Device/VideoDevice.cs
index 22e8e75..912cb92 100644
--- a/SeeShark/Device/VideoDevice.cs
+++ b/SeeShark/Device/VideoDevice.cs
@@ -17,6 +17,7 @@ namespace SeeShark.Device
         public bool IsPlaying { get; private set; }

         public event EventHandler<FrameEventArgs>? OnFrame;
+        public event EventHandler<DecodeStatus>? OnEndOfStream;

         public VideoDevice(VideoDeviceInfo info, DeviceInputFormat inputFormat, VideoInputOptions? options = null)
         {
@@ -34,6 +35,11 @@ namespace SeeShark.Device
                 if (!IsPlaying)
                     break;
             }
+            if (status == DecodeStatus.EndOfStream)
+            {
+                OnEndOfStream?.Invoke(this, status);
+            }
+            IsPlaying = false;
         }

         /// <summary>
@@ -77,9 +83,10 @@ namespace SeeShark.Device
             // Decide whether we wait longer during a Thread.Sleep() when there are no frames available.
             // Waiting longer would mean a full frame interval (for example ~16ms when 60 fps), 1ms otherwise.
             // Always wait longer just after receiving a new frame.
-            bool waitLonger = status == DecodeStatus.NewFrame;
-            Thread.Sleep(waitLonger ? 1000 * decoder.Framerate.den / (decoder.Framerate.num + 5) : 1);
-
+            if (status == DecodeStatus.NoFrameAvailable)
+            {
+                Thread.Sleep(1000 * decoder.Framerate.den / decoder.Framerate.num / 2);
+            }
             return status;
         }

those. instead of waiting when a frame is available, wait when it's not available, and only half the time. So that there is time to copy it when it is available.

What's the difference when to wait ... Before or after ... The main thing is that if we wait when there are a lot of frames in the buffer ... then we will not catch up with them.

FFmpeg, and thus by extension SeeShark, does not buffer frames at all. Only MediaPipe does.
You can test this with a loop where you call camera.GetFrame() and then wait for a little while with Thread.Sleep(500) on a camera with high FPS. You will see that it fetches the latest image of the camera. It never lags behind.
This is why it makes a difference. Fetching the image and then waiting means that we're having a slight delay from the camera to the code. Waiting and then fetching the image removes that artificial delay.

It is hard to say. But also work with MediaPipe in a separate thread. When I shine a lamp on the camera, I get a delay. Gradually, it accumulates, makes up, let's say, a minute ... Then, obviously, everything will collapse after a while, when the memory runs out.

Make a test with your camera using only SeeShark and not MediaPipe so that you can make sure that SeeShark is not at fault here. I'm certain that the FFmpeg C API does not buffer frames internally.

Well... maybe it's a feature in Windows? But yes, I did tests without MediaPipe... And again, I don't call MediaPipe on the camera thread.

might be... from my testing months ago on linux using a virtual camera at various fps (i tested 1-240fps) it didn't slow down at all.
can't confirm that right now as I'm not home this week.

Some like this:
diff --git a/SeeShark/Device/VideoDevice.cs b/SeeShark/Device/VideoDevice.cs
index 22e8e75..912cb92 100644
--- a/SeeShark/Device/VideoDevice.cs
+++ b/SeeShark/Device/VideoDevice.cs
@@ -17,6 +17,7 @@ namespace SeeShark.Device
         public bool IsPlaying { get; private set; }

         public event EventHandler<FrameEventArgs>? OnFrame;
+        public event EventHandler<DecodeStatus>? OnEndOfStream;

         public VideoDevice(VideoDeviceInfo info, DeviceInputFormat inputFormat, VideoInputOptions? options = null)
         {
@@ -34,6 +35,11 @@ namespace SeeShark.Device
                 if (!IsPlaying)
                     break;
             }
+            if (status == DecodeStatus.EndOfStream)
+            {
+                OnEndOfStream?.Invoke(this, status);
+            }
+            IsPlaying = false;
         }

         /// <summary>
@@ -77,9 +83,10 @@ namespace SeeShark.Device
             // Decide whether we wait longer during a Thread.Sleep() when there are no frames available.
             // Waiting longer would mean a full frame interval (for example ~16ms when 60 fps), 1ms otherwise.
             // Always wait longer just after receiving a new frame.
-            bool waitLonger = status == DecodeStatus.NewFrame;
-            Thread.Sleep(waitLonger ? 1000 * decoder.Framerate.den / (decoder.Framerate.num + 5) : 1);
-
+            if (status == DecodeStatus.NoFrameAvailable)
+            {
+                Thread.Sleep(1000 * decoder.Framerate.den / decoder.Framerate.num / 2);
+            }
             return status;
         }

those. instead of waiting when a frame is available, wait when it's not available, and only half the time. So that there is time to copy it when it is available.

Are you talking about those changes? If that's the case, try my suggestion to wait before fetching the frame instead of after (with the current code for waiting instead of your modification for testing purposes). Normally, you shouldn't have a significant delay between the frame of the camera and what SeeShark receives.

It seems to me that it does not matter at all when to wait, before receiving a frame or after ... When we wait 1/30 of a second and the delay is 60 seconds ...

I have an idea... as i currently do not own a camera and am planning to get one, could you please point me to exactly which camera you have, so that i can get one and test this too? the ELP IMX 179, as i can see multiple versions of this one.

Some like this. https://aliexpress.ru/item/1005004562138129.html?item_id=1005004562138129&sku_id=12000029625689254&spm=a2g2w.productlist.search_results.12.504b5644JrUaNQ
It's hard to say, it was bought more than 5 years ago, for my previous job. I can't say that this is a good camera. Usually it runs 15FPS, although it declares 640x480 30 FPS. under normal room lighting. (However, in bright light in the Shopping Mall, such cameras increase FPS.). I sent a candle lamp to the camera to increase the FPS.

But this problem seems to be easier to reproduce ... inside, camera.OnFrame, put, say, Thread.sleep (1000), then remove it, let's say 60 times. And then it will all display frames with a lag of 60 seconds.

@Speykious I guess I figured out how to show it. Those changes that I made in the code are applied. So the process does not wait between frames.
Test code:
// Copyright (c) The Vignette Authors
// This file is part of SeeShark.
// SeeShark is licensed under the BSD 3-Clause License. See LICENSE for details.

using FFmpeg.AutoGen;
using SeeShark;
using SeeShark.Decode;
using SeeShark.Device;
using SeeShark.FFmpeg;

namespace Main
{
    class Program
    {

        int i = 0;
        long lastTime = DateTime.Now.Ticks;

        void onEndOfStream(object? sender, DecodeStatus e)
        {
            Console.WriteLine(e);
        }

        private void onFrameEventHandler(object? sender, FrameEventArgs e)
        {
            var frame = e.Frame;
            if ((frame.Width == 0) || (frame.Height == 0) || (e.Status == DecodeStatus.NoFrameAvailable))
                return;

            if ((i > 200) && (i < 300))
            {
                Thread.Sleep(200);
            }
            long nowTime = DateTime.Now.Ticks;
            double iv = (nowTime - lastTime) / (double)TimeSpan.TicksPerSecond;
            lastTime = nowTime;
            Console.WriteLine($"Frame number: {i}, Sec delay between frames:  {iv}");
            ++i;
        }

        public Program()
        {
            Console.WriteLine("Hello, World!");

            FFmpegManager.SetupFFmpeg(@"C:\ffmpeg\v5.0_x64\bin\", "/usr/lib");

            (int, int)? videoSize = (640, 480);
            Camera? camera = null;
            try
            {

                using (CameraManager manager = new CameraManager())
                {
                    camera = manager.GetDevice(0,

                        new VideoInputOptions
                        {
                            InputFormat = null,
                            Framerate = new AVRational
                            {
                                num = (int)30,
                                den = 1,
                            },
                            VideoSize = videoSize,
                        }
                    );
                    Console.WriteLine($"Using camera {camera.Info}");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"cannot initialize camera {ex.Message}");
                return;
            }

            camera.OnFrame += onFrameEventHandler;
            camera.OnEndOfStream += onEndOfStream;

            camera.StartCapture();
            Thread.Sleep(1000000);
            camera.StopCapture();
            Console.WriteLine("Camera stopped!");
            camera?.Dispose();
            GC.Collect();
            GC.WaitForPendingFinalizers();
        }

        public static void Main(String[] args)
        {
            new Program();
        }
    }
}

Output:
output.txt
And llok on output after 300 frame, before we have delay 0.2 sec, next we at all have not delay:
Frame number: 294, Sec delay between frames:  0,2029678
Frame number: 295, Sec delay between frames:  0,2029045
Frame number: 296, Sec delay between frames:  0,2033898
Frame number: 297, Sec delay between frames:  0,2051678
Frame number: 298, Sec delay between frames:  0,2025567
Frame number: 299, Sec delay between frames:  0,2047621
Frame number: 300, Sec delay between frames:  0,007351
Frame number: 301, Sec delay between frames:  0,0048417
Frame number: 302, Sec delay between frames:  0,0061096
Frame number: 303, Sec delay between frames:  0,0088672
Frame number: 304, Sec delay between frames:  0,0043009
Frame number: 305, Sec delay between frames:  0,0030255
Frame number: 306, Sec delay between frames:  0,0025584
Frame number: 307, Sec delay between frames:  0,0026753

and after 575 frame we get normal FPS back:
Frame number: 573, Sec delay between frames:  0,0013264
Frame number: 574, Sec delay between frames:  0,0013013
Frame number: 575, Sec delay between frames:  0,0178284
Frame number: 576, Sec delay between frames:  0,0364166
Frame number: 577, Sec delay between frames:  0,0342118
Frame number: 578, Sec delay between frames:  0,0341714

How was the camera FPS during this test?

I illuminated the camera with a light bulb directed. So the time between frames was about 0.03 seconds. This can be seen up to frame 200. Then I slowed down the camera with a 0.2 second delay between frames, 99 times. those. I did 19.8 seconds delay. During this time, 276 frames have accumulated somewhere. And it threw them out very quickly, when there was no delay. In the interval from 300 to 576 frames.
(Although on the other hand, 570 frames should have accumulated in 19 seconds at 30FPS)
If you make a delay between frames, as it was without my changes, this delay does not allow you to quickly discard the accumulated frames ... And I observe the image lag.

I tested your small modification (without the end of stream event) with my webcam on Linux, and actually observed some catching up as well, which was quite surprising.

Something interesting to note is that I applied your code to our SeeShark.Example.Ascii example, which revealed some amount of buffering with my webcam for a few seconds before eventually giving up and just send its last frames, or should I say the last frame of its limited buffer (all during frame numbers 200 to 300).
I don't know which part of this whole process is buffering, I just know that it is definitely not FFmpeg, and now it seems to depend on the camera or driver.
That's why I can't accurately reproduce your issue, because it might come from the way Windows handles it.
Regardless, thank you for your test, now I understand what's going on.
This is a very simple temporary fix while waiting for SeeShark to send frames on a different thread.

As expected however, we get these pairs of value instead of a more consistent FPS if we only wait half the configured FPS.


how can create button same

hi
very nice library
how can create button like ?
https://github.com/LeBzul/LBZSpinner/blob/master/example_images/spinner_gray.png

Hi !
Thank for you comment. 👍
Just delete UITableviewDelegate method and all Dropdownlist method. Look this attachment example :
LBZSpinner.txt
(Rename to LBZSpinner.swift)

thank you :)


Update ItemDropshipPatch.cs

Delayed rocket landing a bit so you have the time to actually reach the rocket before it leaves.

Bumping the PR as I personally agree that the rocket ship is a little too fast, especially when first landing onto the moon

sadly the code provided here does not achieve the desired result, nor does it change anything at all, so I will close this Pull Request.
But I will release a new version, that hopefully achieves the desired behaviour, by letting the rocket land after 10 seconds, instead of two.
If this does not fix the problem you had with this mod or you would like to add anything else, please make a new PR and explain in detail what you would like to change.
Have a nice day :)


Monorepo

Issue that this pull request solves
Closes: https://github.com/EnsembleUI/ensemble/issues/1058
Proposed changes
Added monorepo using melos so that we can resolve the dependency conflicts between modules and also so that there is a single source of all the code for flutter. Also it allows us to later easily add packages to pub.dev. Mostly its inspired from the flutterfire design.
EDL
(If applicable)
Checklist

[x] I have performed a self-review of my own code

[ ] I have wrote proper schema in studio Check docs

[ ] I have created Ensemble Kitchen Sink Example Over here

[ ] I have made corresponding changes to the documentation Over here

[ ] I have added tests that prove my fix is effective or that my feature works

@hemish11 it's not clear how to review this PR as it is so big that even github can't load it. Can you just walk @vusters through the changes in the standup and then merge right there

Directly pushed to the main so closing it


Feature/fix e2e tests

Draft PR for testing pipelines with changes.

Remove this, if this PR is not to main!
Version to release: v0.7.0
Merging this pull request will automatically:

create a tag using the version in our package.json
publish a release using this tag, referencing the CHANGELOG.md
publish the release on dockerhub using the version of our package.json

Please fill out the following checklist:

[ ] The version of the package.json is different to every other tag in this repository

[ ] The CHANGELOG.md contains all changes (bugfixes, features, dependency updates, ...) for this release

[ ] The deployed backend versions are compatible with the front end changes to be deployed

Description

Fixes #XXX (for bugfixes)
Closes #XXX (for feature implementation)

Reason for this PR

[INSERT REASONS HERE]

Changes in this PR

[INSERT CHANGES HERE]

Dependency update

List all new dependencies (delete if no additions)

Type of change (remove all that don't apply)

Refactoring
Bug fix (non-breaking change which fixes an issue)
Hotfix
New feature (non-breaking change which adds functionality)
Testing
Breaking change (fix or feature that would cause existing functionality to not work as expected)
This change requires a documentation update (README, e.g. deployment changes)

I added the documentation

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[ ] Manually tested all use cases this could alter

Test Configuration:

OS: Windows Mac Linux

Browser: Firefox Chrome Safari Chromium

Frontend: (remove all that don't apply)

[ ] Development build
[ ] Production build
[ ] Dockerized production build

Backend: (remove all that don't apply)

[ ] No backend needed to test this
[ ] deployed production build
[ ] deployed development build
[ ] deployed experimental build
[ ] Local build (commit hash [XXXXXXX])

Checklist: (remove all that don't apply)

[ ] I added corresponding E2E tests (especially for bugfixes)
[ ] I added corresponding unit tests (if API code)
[ ] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new linting warnings or console warnings
[ ] I have updated the package.json version if this is a new release candidate (remove is it is not)
[ ] I have updated the CHANGELOG.md to include any changes made in this PR (add WIP to the top, if there is none already)

[ ] accountListFiltering.spec.ts
[ ] adminAccountManagement.spec.ts
[ ] adminCourseManagement.spec.ts
[ ] certificateManagement.spec.ts
[ ] courseAdmission.spec.ts
[ ] courseListFiltering.spec.ts
[ ] deleteOwnAccount.spec.ts
[ ] examRegCreate.spec.ts
[ ] gdpr.spec.ts
[ ] immatriculationOperation.spec.ts
[ ] lecturerCourseLists.spec.ts
[ ] lecturerCourseManagement.spec.ts
[ ] login_logout.spec.ts
[ ] loginPageLoggedIn.spec.ts
[ ] navbarDesktop.spec.ts
[ ] navbarMobile.spec.ts
[ ] passwordChanging.spec.ts
[ ] privateProfile.spec.ts
[ ] publicProfile.spec.ts
[ ] setUpdateProfilePicture.spec.ts
[ ] snapshot_tests/desktopSnapshots.spec.ts
[ ] softAccountDeletion.spec.ts
[ ] studentCourseView.spec.ts

 find -name "*spec.ts" | sort | cut -c 3-


update: concatenate Arrays when target node is an array

This is a suggestion to be able to update an array by concatenating
the given update array to any target array.
This is done only if target AND update are of array types.
An example overlay is provided as a unit test.

Thanks for proposing this change. I think it's sensible and useful functionality, but it's covering something that isn't particularly clear in the overlays spec itself what the right behaviour is. We should probably try to clarify the intended behaviour before we merge a change to this library.

Another similar conversation over here: https://github.com/OAI/Overlay-Specification/issues/30
It would be good to really flesh out whats meant to happen with an array when its "updated", is it replaced, concatenated, merged (with overrides happening somehow), etc.


Unterminated dollar-quoted string at or near "$$

I had a migration script with the following:
-- this function allows us to create indexes if they don't exist
create or replace function create_index_if_not_exists (t_name text, i_name text, index_sql text) returns void as $$
declare
  full_index_name varchar;
  schema_name varchar;
begin

full_index_name = t_name || '_' || i_name;
schema_name = 'public';

if not exists (
    select 1
    from   pg_class c
    join   pg_namespace n on n.oid = c.relnamespace
    where  c.relname = full_index_name
    and    n.nspname = schema_name
    ) then

    execute 'create index ' || full_index_name || ' on ' || schema_name || '.' || t_name || ' ' || index_sql;
end if;
end
$$
language plpgsql volatile;

Upon running migrations I got the following error:
Error executing migration: pq: unterminated dollar-quoted string at or near "$$

Any ideas?

:dancers:

How  did it fix? It still is a problem for me.


Dialog: no way to easily change the button order?

Regarding the dialog: Not everyone wants the "confirm" button on the right and the cancel button on the left. Not everyone wants these things in the lower-right corner, either.
I had to hijack onOpenComplete to move things around and restyle them (code below). Was there an easier way? Also, it's just about impossible to select DIVs in the dialog because of the emoji class names. If there's a better way to do this, let me know. I'd suggest that the code should allow something as basic as switching the order of the buttons. As for centering the buttons or making other modifications, it would be nice if things were more easily selectable.
          onOpenComplete={
            () => {
              window.$( ".css-1dccw9w > div:last > div" ).css( "float", "none").css( "textAlign", "center")
              window.$( ".css-1dccw9w > div:last > div button:first" ).insertAfter( window.$( ".css-1dccw9w > div:last > div button:last" ) );
              window.$( ".css-1dccw9w > div:last > div button:first" ).css( "marginRight", "8px" );
              window.$( ".css-1dccw9w > div:last > div button" ).css( "width", "120px" ).css( "textAlign", "center" ).css( "display", "inline-block" );
            }
          }

instead of doing that I would have removed default footer and add buttons on the content
and if you need to reuse it multiple times create a custom component wrapping the dialog with hidden footer and add your own footer
I did not try this but I don't see why it should not work

Yes, but the default footer made easy use of the ok/cancel buttons. Changing the order of the buttons seems like a better configuration option.

If this is something that the maintainers would like to support, I'd be more than happy to take this as a first issue.

All of the functionality needed to compose the buttons however you like is already there – as @lBilali suggested.
Rather than bloating the convenience props to accommodate many different configurations, I think it's preferable to use the "I know what I'm doing" approach and render the content and buttons yourself.
Open to other thoughts/opinions of course!

Going to close this thread out - there are workarounds to this, but let us know if you still have issues with the approaches mentioned!


BleCharacteristicNotFoundException after disabling/re-enabling Bluetooth

Summary
I've noticed the BleCharacteristicNotFoundException occurring occasionally after the app is backgrounded or seemingly random times.
I've been able to reproduce this consistently by disabling Bluetooth (while connected) and then re-enabling it and connecting again.
Simply disconnecting and reconnecting doesn't seem to have the same issue.
This may be due to my limited understanding of Rx, but I can't seem to determine why the error is getting thrown.  All old subscriptions should be unsubscribed.
Error
BleCharacteristicNotFoundException{charactersisticUUID=09b0d0a6-f374-4051-a819-67c235f31438}
  at com.polidea.rxandroidble.RxBleDeviceServices.getCharacteristic(RxBleDeviceServices.java:63)
  at com.polidea.rxandroidble.internal.connection.RxBleConnectionImpl.lambda$getCharacteristic$53(RxBleConnectionImpl.java:126)
  at com.polidea.rxandroidble.internal.connection.RxBleConnectionImpl$$Lambda$1.call(Unknown Source)
  at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:69)
  at rx.internal.operators.NotificationLite.accept(NotificationLite.java:135)
  at rx.internal.operators.CachedObservable$ReplayProducer.replay(CachedObservable.java:403)
  at rx.internal.operators.CachedObservable$CacheState.dispatch(CachedObservable.java:220)
  at rx.internal.operators.CachedObservable$CacheState.onNext(CachedObservable.java:191)
  at rx.internal.operators.CachedObservable$CacheState$1.onNext(CachedObservable.java:171)
  at rx.observers.Subscribers$5.onNext(Subscribers.java:235)
  at rx.observers.Subscribers$5.onNext(Subscribers.java:235)
  at rx.subjects.ReplaySubject$ReplayUnboundedBuffer.drain(ReplaySubject.java:644)
  at rx.subjects.ReplaySubject$ReplayState.onNext(ReplaySubject.java:457)
  at rx.subjects.ReplaySubject.onNext(ReplaySubject.java:242)
  at com.polidea.rxandroidble.internal.RxBleRadioOperation.onNext(RxBleRadioOperation.java:86)
  at com.polidea.rxandroidble.internal.RxBleRadioOperation$1.onNext(RxBleRadioOperation.java:75)
  at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134)
  at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onNext(OnSubscribeDoOnEach.java:101)
  at rx.observers.SerializedObserver.onNext(SerializedObserver.java:91)
  at rx.observers.SerializedSubscriber.onNext(SerializedSubscriber.java:94)
  at rx.internal.operators.OperatorTimeoutBase$TimeoutSubscriber.onNext(OperatorTimeoutBase.java:131)
  at rx.internal.producers.SingleProducer.request(SingleProducer.java:65)
  at rx.internal.producers.ProducerArbiter.setProducer(ProducerArbiter.java:126)
  at rx.internal.operators.OperatorTimeoutBase$TimeoutSubscriber.setProducer(OperatorTimeoutBase.java:115)
  at rx.internal.operators.OperatorSingle$ParentSubscriber.onCompleted(OperatorSingle.java:110)
  at rx.internal.operators.OperatorTake$1.onNext(OperatorTake.java:80)
  at rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar(OperatorMerge.java:395)
  at rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit(OperatorMerge.java:355)
  at rx.internal.operators.OperatorMerge$InnerSubscriber.onNext(OperatorMerge.java:846)
  at rx.subjects.PublishSubject$PublishSubjectProducer.onNext(PublishSubject.java:304)
  at rx.subjects.PublishSubject$PublishSubjectState.onNext(PublishSubject.java:219)
  at rx.subjects.PublishSubject.onNext(PublishSubject.java:72)
  at com.polidea.rxandroidble.internal.connection.RxBleGattCallback$1$$Lambda$4.call(Unknown Source)
  at rx.internal.util.ActionSubscriber.onNext(ActionSubscriber.java:39)
  at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134)
  at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:224)
  at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
  at rx.internal.schedulers.ExecutorScheduler$ExecutorSchedulerWorker.run(ExecutorScheduler.java:107)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
  at java.lang.Thread.run(Thread.java:761)

Preconditions
My setup is as follows:
(subList is a SubscriptionList that gets unsubscribed before this connect/reconnect)
private PublishSubject<byte[]> inputSubject = PublishSubject.create();
private ResponseSubject outputSubject = ResponseSubject.create();

...

Observable<RxBleConnection> connectionObservable = bleClient.getBleDevice(macAddress).establishConnection(context, true);
if (subList != null)
    subList.unsubscribe();
subList = new SubscriptionList();
Subscription raw = connectionObservable
    .flatMap(
            rxBleConnection -> {
                Log.d(TAG, "Test...");
                rxBleConnection.writeCharacteristic(writeUuid, "?test".getBytes()).first().subscribe((bytes) -> Log.d(TAG, "Wrote test"), (tr) -> Log.d(TAG, "RxTest", tr));
                // connection is established and notification prepared
                subList.add(inputSubject.onBackpressureBuffer().flatMap(bytes -> {
                    Log.d(TAG, "Writing " + bytes.length + " bytes");
                    return rxBleConnection.writeCharacteristic(writeUuid, bytes);
                }).subscribe());
                return getNotif(rxBleConnection, notificationUuid, withAck);
            })
    .flatMap(observable -> observable)
    .doOnTerminate(() -> subList.unsubscribe())
    .subscribe(response -> { }, throwable -> outputSubject.onError(throwable));
subList.add(raw);

Note: The "test" write does not throw an error.
Steps to reproduce actual result

Connect to device.
Send/receive data.
Disable Bluetooth from Android system menu.
Re-enable and re-connect.
Attempting to write new data will result in the BleCharacteristicNotFoundException, but the data actually gets written (and I see the proper response come back from the device.)

Actual result
Error is thrown, but characteristic seems to be written.
Expected result
Error should not be thrown.

Hello,
I am trying to reason about your code but it is hard as I do not see what exactly is the connectionObservable in your case. There is also no context about when your setup is run. When does your inputSubject emit? Can you confirm that the service discovery on a particular connection worked properly? (I have seen situations that the Android indicated that discovery ended but an empty list of services was returned) Your device, OS version?
Btw. it would be better to call subList.unsubscribe(); in .onTerminate() of your raw Subscription

@dariuszseweryn
I've updated the code in the original post.
connectionObservable is an Observable<RxBleConnection> created by calling bleClient.getBleDevice(macAddress).establishConnection(context, true)
I use inputSubject is simply a PublishSubject<byte[]> and I use it with the following function:
public Observable<String> sendCmd(String data) {
    Log.d(TAG, "Writing data: " + data);
    inputSubject.onNext(data.getBytes());
    return outputSubject.filter(s -> {
        // Allow for potentially corrupted JSON:
        return s.startsWith("{\"CMD\":\"" + data + '"');
    }).first();
}

outputSubject is a custom Subject that reassembles the individual packets into a full response.

But when your code from the first post is executed? It still lacks the context (state).
Point is - it looks like you have some state in your code that is wrong after turning the bluetooth off / on. I am judging this because when you say that you reinitialize everything from scratch the problem is gone and even with the exception being emitted you say that the peripheral receives the data.
I think I was not experiencing this issue when turning off / on the adapter. Will double check on Monday.

This was in a singleton that's passed the context but only initializes the RxBleClient once.
Ultimately, I found that I can re-initialize everything EXCEPT the RxBleClient and RxBleDevice and it seems to get rid of the error, so I don't think there's an issue with the library.

Glad to hear that you have solved your problem. Thing is that everything that is created in a context of a specific connection should be only used within the context. I will think of how to inform about it clearly.


fix not adding first message to controller

In both relay_impl and relay_pool_impl there is a bug which skips the first message in order to call RelayEvent.connect.
You can reproduce this easily if you sub with a Filter with your pubKey as authors and kinds [3] (Contact List), it will simple not add anything to the controller, since there is only 1 event returned.
You can test what it should return on https://www.piesocket.com/websocket-tester.
Using for example wss://relay.damus.io and sending:
["REQ","41a95c31de26671202d7971c0c3e58c9a40afd761dd2e663fb1a54da5f57aaa3",{"authors":["30782a8323b7c98b172c5a2af7206bb8283c655be6ddce11133611a03d5f1177"],"kinds":[3]}]
I fixed this, by always calling controller.add(message) (removing the else) in both relay_impl and relay_pool_impl.

Thanks for the PR @frnandu. I'll take a closer look at this soon and provide my feedback.

I've reviewed the changes you've made, and I'm happy to see the careful improvements you've added. Your bug fix in relay_impl and relay_pool_impl is really helpful. Thanks man!


New release soon?

It's been almost two years since the last release and there have been numerous bugfixes since then. I'd like to start using this in a project, but I'd very much prefer if there was a more recent release that encompasses all of these first.

Done!

Cheers!


Improvements to uptane.org domain

Currently http://uptane.org (https://uptane.org is broken) redirects to https://uptane.github.io. It is possible for github pages to directly support serving the page at the custom domain address. Should we configure our site to support this? IMO, the page would look considerably more "official" sitting at the uptane.org domain.
Additional info for supporting this:
https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site

@hexsecs as you have the special org access now, I believe you can set the custom domain for the site, and instead of using: https://uptane.github.io/, we can now use https://uptane.org/ as a custom site domain for the official uptane site, the: https://uptane.github.io/  is still be live but using:  https://uptane.org/  will be more preferable, both the domain will point to the same.
in order to set the custom domain you can go to the pages under settings and on the scroll you will see a custom domain tab simply just add the custom domain there (which is: https://uptane.org/) and don't forget to enforce HTTPS
it might require further configurations, not sure about that but the links you mentioned in the issues description will be used for the same.

@Abhijay007  - I think we need @JustinCappos to adjust the dns entries. Right now it's a redirect I believe.

Okay, I've done this.  Right now, I've set it as a temporary redirect (301), but will change that to a permanent redirect (302) once it is confirmed this is working right.  It does look correct to me, but please check.

@JustinCappos, github can allow actually serving the page from the custom domain. So instead of a redirect, it would actually be served as https://uptane.org/docs/...
The instructions on doing this are here..
https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-an-apex-domain

It's fairly straightforward, but it needs the domain owner to add the correct domain records to point to github.

Working! Thanks @JustinCappos !


[francetv] Accept mobile URLs

Which URLs have you tried with?, http://pluzz.francetv.fr/videos/un_ora_,130129525.html works but the mobile version http://m.pluzz.francetv.fr/videos/un_ora_,130129525.html fails (instead of looking for data-diffusion it seems that we need to look for <meta name="id_video" content=").

Thanks for fixing it! I missed adding the s%://m.%://% part in there…


How can we use other LMs other than distilgpt2 and gpt2

Hi,
What kind of models do you want to use?

I want to use something like Falcon 7b,
Can you tell me what hyper-parameters I will need to adjust, and what change modules other than the trainer?

I have the same problem, is it possible to use GPT3 in this model

I have the same problem. If it is possible to use GPT3 in this model ?

@Travisma2233
In general, replacing the model name within the HuggingFace library in GReaT's initialization is typically all you need. For example:
model = GReaT(llm='EleutherAI/gpt-neo-1.3B', batch_size=32, epochs=25)

However, we cannot guarantee that all models will function correctly within this setup. Please open an issue if you need a partially model or even better make a PR.
As for GPT-3, yes, our algorithm is model-agnostic, meaning it can be used with any generative LLM. However, our framework specifically supports only HuggingFace models. If you wish to use OpenAI's GPT-3, a new implementation will be required.

@Travisma2233
In general, replacing the model name within the HuggingFace library in GReaT's initialization is typically all you need. For example:
model = GReaT(llm='EleutherAI/gpt-neo-1.3B', batch_size=32, epochs=25)

However, we cannot guarantee that all models will function correctly within this setup. Please open an issue if you need a partially model or even better make a PR.
As for GPT-3, yes, our algorithm is model-agnostic, meaning it can be used with any generative LLM. However, our framework specifically supports only HuggingFace models. If you wish to use OpenAI's GPT-3, a new implementation will be required.

Thanks a lot for your answer. Because my network environment is not good, is there a way to run pytorch_model.bin locally


Two questions about keypoint scale

HI, thank you for the great work, it helps me a lot when learning SIFT, I have to 2 questions about keypoint.size

When computing keypoint.size in localizeExtremumViaQuadraticFit(), you used octave_index + 1 instead of octave_index, is this because the origin input image is doubled by linear interpolation?

In computeKeypointsWithOrientations, the scale is muliplied by 0.5 and divided by 2 ** octave_index, it's a little different from the origin paper, am I missing something？

HI, thank you for the great work, it helps me a lot when learning SIFT, I have to 2 questions about keypoint.size
1. When computing keypoint.size in localizeExtremumViaQuadraticFit(), you used octave_index + 1 instead of octave_index, is this because the origin input image is doubled by linear interpolation?

2. In computeKeypointsWithOrientations, the scale is muliplied by 0.5 and divided by 2 ** octave_index, it's a little different from the origin paper, am I missing something？

I think the scale to compute the orientation should be 2 ** ((image_index + extremum_update[2]) / float32(num_intervals))) * (2 ** (octave_index ))
it's different from the scale in computeKeypointsWithOrientations()

Hi there, sorry for the slow response. Thanks a lot for investigating the code in this repo so closely.
The way keypoint.size is computed in localizeExtremumViaQuadraticFit() is actually consistent with the way it's used in computedKeypointsWithOrientations(). Let me explain.
The way I compute keypoint.size is a direct translation of the way it's done in OpenCV:
https://github.com/opencv/opencv_contrib/blob/master/modules/xfeatures2d/src/sift.cpp
Take a look at line 572 here, which corresponds to line 181 in pysift.py:
kpt.size = sigma*powf(2.f, (layer + xi) / nOctaveLayers)*(1 << octv)*2;  (OpenCV sift.cpp)
keypoint.size = sigma * (2 ** ((image_index + extremum_update[2]) / float32(num_intervals))) * (2 ** (octave_index + 1))  (PythonSIFT pysift.py)
Note the last part in sift.cpp:  (1 << octv)*2. This is mathematically equivalent to 2 ** (octave_index + 1).
Now take a look at line 661 in sift.cpp, which corresponds to line 227 in pysift.py:
float scl_octv = kpt.size*0.5f/(1 << o);  (OpenCV sift.cpp)
scale = scale_factor * 0.5 * keypoint.size / float32(2 ** octave_index)  (PythonSIFT pysift.py)
Again, this is just a direct translation. I'm recovering sigma * (2 ** ((image_index + extremum_update[2]) / float32(num_intervals))). The * 0.5 / float32(2 ** octave_index) operation reverses the * (2 ** (octave_index + 1)) operation done before.
I see now that these two lines don't have consistent syntax. I'll change line 181 to this:
keypoint.size = sigma * (2 ** ((image_index + extremum_update[2]) / float32(num_intervals))) * 2 * (2 ** octave_index)
and line 227 to this:
scale = scale_factor * keypoint.size / float32(2 * (2 ** octave_index))
This will make it clearer how these two lines are related. There's no change mathematically -- I've just rearranged the expressions. I'll also add comments.
Now you're wondering why there's an extra * 2 when computing the size. To be honest, I'm not sure myself why OpenCV creates the size this way. When I was writing PythonSIFT, my first instinct was to not include this * 2. However, I wanted the sizes to be consistent with the way OpenCV does them so that you can directly compare PythonSIFT keypoints and OpenCV keypoints at every step of SIFT computation.
I don't think it has anything to do with the double-size base image, because later on we are multiplying keypoint.size by 0.5 in convertKeypointsToInputImageSize().
I don't believe this is a bug in OpenCV, because it's used very consistently throughout their code. For example, see lines 1065 and 1072 in sift.cpp. Since they keep going back and forth between multiplying by 2 and multiplying by 0.5, and they do so consistently, at the moment I don't see why they need this * 2 in the first place. I included it in PythonSIFT just to be consistent with OpenCV. However, I may consider removing it to make the code easier to understand. Please allow me to think about this for a bit.
Thanks for pointing this out! Does this answer your questions?

Hi there! Thanks for looking into PythonSIFT so deeply.

Yes, I'm using octave_index + 1 instead of octave_index because we double the input image size. Later in convertKeypointsToInputImageSize(), we do keypoint.size *= 0.5 to account for this.

Actually, the way scale is computed in computeKeypointsWithOrientations() is consistent with the way keypoints.size is computed in localizeExtremumViaQuadraticFit(). Let's compare line 181:
keypoint.size = sigma * (2 ** ((image_index + extremum_update[2]) / float32(num_intervals))) * (2 ** (octave_index + 1))
with line 227:
scale = scale_factor * 0.5 * keypoint.size / float32(2 ** octave_index)
Note that we can rewrite line 227 like this, and it's mathematically equivalent:
scale = scale_factor * keypoint.size / float32(2 ** (octave_index + 1)).
In fact, I made this change in the latest commit in order to be consistent with line 181. Sorry for the confusion. However, there's nothing wrong with the original line 227. We are simply reversing the * (2 ** (octave_index + 1))operation done in line 118 to recover the scale. We then multiply by scale_factor, as mentioned in the paper.
Note that size here corresponds to the same size variable used in OpenCV's SIFT implementation, which you can find here:
https://github.com/opencv/opencv_contrib/blob/master/modules/xfeatures2d/src/sift.cpp
If you take a look at lines 572 and 661, you can see they compute size and scale the same way. You can even set up breakpoints in OpenCV's sift.cpp and PythonSIFT's pysift.py, and compare the keypoints at each step of the computation and verify they are the same within rounding error. The size variable isn't mentioned in the original SIFT paper -- it's just a convenient way to store the scale across different octaves and layers using a single number.
I hope this helps! Does this answer your questions?

I believe this issue has been resolved, so I'm going to close it. Please feel free to reopen this issue if you feel your question hasn't been answered.


Add mainline option

Closes https://github.com/sqren/backport/issues/150
Released as 5.1.6-beta.1:
npm install<EMAIL_ADDRESS>

Thanks for adding this!

Released in v5.2.0


modify syntax error

a syntax error @piiswrong

Thanks for catching this.
@ZiyueHuang next time please verify your code by running it.

Sorry for this mistake. I will be more careful next time. I'm running on my own mx-faster-rcnn, not exactly this example, but I modified the codes in this example to pull request without running. My fault. @piiswrong
Thanks for correcting this mistake. @qingzhouzhen


Kestrel Http/3 localhost

The "Localhost testing" section is inaccurate. It turns out that localhost isn't the problem, the real issue is that browsers won't do HTTP/3 with self-signed certs like the Kestrel dev cert. There are workarounds but they're complicated.
@JamesNK can you share the workaround here? Or can we link to instructions elsewhere if we think it's too complex?

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

ID: 57282931-0741-9ae0-1bc3-1918160769e2
Version Independent ID: d8ff0551-6287-7921-b18d-2cad70fce012
Content: Use HTTP/3 with the ASP.NET Core Kestrel web server
Content Source: aspnetcore/fundamentals/servers/kestrel/http3.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @wtgodbe
Microsoft Alias: wigodbe

The workaround is really hard.

.\chrome.exe --user-data-dir=c:\Temp\chrometemp --no-proxy-server --enable-quic --origin-to-force-quic-on=www.kestrelhttp3.com:443 --host-resolver-rules='MAP www.kestrelhttp3.com:443 <IP_ADDRESS>:5001' --ignore-certificate-errors-spki-list=usAHwUNu8W7Q/aV3QQFRhtL118F7yJBTpVbfXF0bbw4= --log-net-log=c:\Temp\chrometemp\chrome.json --net-log-capture-mode=IncludeSensitive --quic-version=h3 https://www.kestrelhttp3.com

Getting this bit - --ignore-certificate-errors-spki-list=usAHwUNu8W7Q/aV3QQFRhtL118F7yJBTpVbfXF0bbw4= depends on your cert and requires getting a value that is deep in the cert and encoding it a certain way.
I think it is too hard to do reliably.


Compiler Hangs on "applyl" type function

Wasn't obvious to me whether or not this was covered in Issue 1240. The following code causes the compiler to spin up to 100% resource utilization:
applyl : List (a -> a) -> a -> a
applyl fns start =
    List.foldl (\acc fn -> fn acc) start fns

Elm 0.18 on OSX and Ubuntu

With the latest version, the error is like this:
-- INFINITE TYPE -------------------------------------------------------

I am inferring a weird self-referential type for the 2nd argument to function
`foldl`:

133|     List.foldl (\acc fn -> fn acc) start fns
                                        ^^^^^
Here is my best effort at writing down the type. You will see ∞ for parts of the
type that repeat something already printed out infinitely.

    a -> ∞

Usually staring at the type is not so helpful in these cases, so definitely read
the debugging hints for ideas on how to figure this out:
<https://github.com/elm-lang/elm-compiler/blob/0.19.0/hints/infinite-type.md>

Thanks for the report!


Add Twitter analytics ignore patterns

Due to phantomjs, ArchiveBot grabs numerous copies of these.

Sorry, I just now saw this.  Evidently I have misconfigured my Github email notifications.
LGTM


elasticsearch7: Add suppress_type_name configuration parameter

FIxes #459
Signed-off-by: Hiroshi Hatake<EMAIL_ADDRESS>

Thank you for fixing it.
Is an update for fluent-plugin-elasticsearch to version 4.0.10 required?
Gemfile includes gem "fluent-plugin-elasticsearch", "~> 4.0.9"
Should it be gem "fluent-plugin-elasticsearch", "~> 4.0.10" to ensure that the version with the suppress_type_name-option will be used?

gem "fluent-plugin-elasticsearch", "~> 4.0.9"

This should be interpreted as gem "fluent-plugin-elasticsearch", "4.0.10". But, yeah, it is better to ensure newer version of ES plugin by using gem "fluent-plugin-elasticsearch", "~> 4.0.10".


feat: BI-5952 WIP file-uploader-api handler for processing presigned file from bucket

TODO
Going to move the rest of s3_utils to dl_s3 and switch to minio in all packages in a separate PR


Include additional factors to improve the prediction accuracy

Description
The current program uses linear regression analysis to predict the number of wins for a given baseball team based on its performance statistics in the previous season. However, there are additional factors that can influence a team's performance, such as the quality of its pitching or defense. Therefore, including these factors can improve the accuracy of the model.
Proposed Solution
To improve the accuracy of the program, we can include additional factors such as pitching statistics and defensive metrics in the regression analysis. These factors can be obtained by scraping relevant data from the team's page on Baseball Reference or other sources. We can also use more sophisticated regression techniques such as multiple linear regression or logistic regression to account for the relationships between multiple independent variables and the dependent variable.
Expected Outcome
By including additional factors and using more sophisticated regression techniques, we can improve the accuracy of the program in predicting the number of wins for a given baseball team. This can help analysts make better predictions and inform decision-making in various fields, including sports analytics.
Additional Information
It is important to consider the trade-off between model complexity and prediction accuracy. Adding too many variables can lead to overfitting and reduced predictive power, while too few variables can result in an oversimplified model that does not capture all the relevant factors. Therefore, it is important to carefully select the variables to include in the model based on their statistical significance and practical relevance.

Using my notes here:
The error "mat: negative dimension" indicates that a matrix with a negative dimension is being created, which is not allowed. In this case, it seems to be happening in the line where the matrix X is being created from the data slice:
X := mat.NewDense(len(data), len(headers)-1, nil)
The length of the headers slice is being subtracted by 1 to account for the first column of data being used for the dependent variable Y, so if headers is empty or only contains one element, the resulting length would be negative.
To fix this error, I am thinking I should make sure that headers contains at least two elements, or handle the case where it does not separately. I am going to try and modify the code to check the length of headers before creating the matrix, like:
if len(headers) < 2 {
    fmt.Fprintln(output, "Not enough headers found in HTML")
    return
}

X := mat.NewDense(len(data), len(headers)-1, nil)

I think this will prevent the creation of a matrix with a negative dimension and handle the case where there are not enough headers.


Refresh "Pin Your Packages" article

Hello @nvie. In the README we've got very first paragraph:

A set of command line tools to help you keep your pip-based packages fresh,
even when you've pinned them. You do pin them, right?.

... with a link to your great article about pinning packages and some basis of pip-tools. It's outdated now, since pip-dump and pip-review are no longer exist. How could we help you to update it?

Hey @atugushev! Thanks for reaching out. If you want to keep linking it to a blog post that provides context, you could link it to the follow-up post instead: https://nvie.com/posts/better-package-management/

@nvie thanks for quick answer! How would you like to link it in the text?

I don't personally maintain this library anymore – it's a jazzband collective now! But I would suggest you open a PR for it and make everyone part of the discussion.

I've seen you've updated the article:

Update: A newer blog post about the future of pip-tools is available too: Better Package Management.

This, probably, should be enough.

Thanks @nvie!


Bootstrap icons v1.0.0-alpha2

Bootstrap icons for use inside Inkscape as symbols. It is currently in alpha stage. Hopefully, if there are no other issues, I will try to update when the stable branch arrives.

Ok.  I will try and update.

Why did you close it?? It only needs minor changes!!

I am not familiar with Github procedures. I tried to add the new file. I thought I need to make another PR. I will do that in a minute.
Kindly let me know how to edit keeping the open ( for future use ). Thanks.

Oh, no problem, you can just enter into the same branch you created, edit the file and commit again. A PR can (and usually) have more than one commit.
Since there are many ways to do it, is hard to explain in a comment.


add checker for webdriver/selenium automation

initial detection for webdriver and/or possible selenium (QA browser automation) usage using
navigator.webdriver

Thanks for the PR! It seems like there are still ways to bypass this, but it does require a few extra steps now


[build] Introduce a parent pom

Have a parent pom that contains most/all common things for the sub-projects.
Note that it is separate from the root aggregator pom: not mixing the aggregator and the parents makes things slightly easier.
If this change makes it harder to do releases, there might be a possibility to generate the effective poms for each subproject, but on the other hand releasing everything should not be too problematic.

It fails during release :( Seems the same/similar problem that I faced earlier.
[ERROR] Rule failure while trying to close staging repository with ID "devlangchain4j-1018".
[ERROR]
[ERROR] Nexus Staging Rules Failure Report
[ERROR] ==================================
[ERROR]
[ERROR] Repository "devlangchain4j-1018" failures
[ERROR]   Rule "pom-staging" failures
[ERROR]     * Invalid POM: /dev/langchain4j/langchain4j-parent/0.1.7/langchain4j-parent-0.1.7.pom: Project name missing, Project description missing, Project URL missing
[ERROR]
[ERROR]
[ERROR] Cleaning up local stage directory after a Rule failure during close of staging repositories: [devlangchain4j-1018]
[ERROR]  * Deleting context 155d599e9ce63b.properties
[ERROR] Cleaning up remote stage repositories after a Rule failure during close of staging repositories: [devlangchain4j-1018]
[ERROR]  * Dropping failed staging repository with ID "devlangchain4j-1018" (Rule failure during close of staging repositories: [devlangchain4j-1018]).

Waiting for operation to complete...
...

[ERROR] Remote staging finished with a failure: Staging rules failure!

We could release parent as well, not a big deal... Another option: we can do BOM style. Wdyt?
This is how junit does it:
https://repo1.maven.org/maven2/org/junit/junit-bom/5.9.3/junit-bom-5.9.3.pom
https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-api/5.9.3/junit-jupiter-api-5.9.3.pom

I'm not sure a BOM can replace whatever it is that causes issues?
From the error message it could also be that the parent pom misses some fields:
[ERROR]     * Invalid POM: /dev/langchain4j/langchain4j-parent/0.1.7/langchain4j-parent-0.1.7.pom: Project name missing, Project description missing, Project URL missing
I've added them to the parent: could you try it now?


Improve on a symbolic function

I'm trying to optimize a heuristic someone wrote manually, with gold data I have.
Right now, I'm training an MLP, but it would be nice to create a KAN if I could start it off from the heuristic -
The heuristic is, given (x1, y1, z1), (x2, y2, z2), (x3, y3, z3), calculate:
5.4*\sqrt{(x_3 - \frac{2*x_1 + x_2}{3})^2 + (y_3 - \frac{2*y_1 + y_2}{3})^2}

Wow thanks for sharing the use case! If I understand correctly, the problem is essentially compiling a symbolic formula into a KAN?

yes! compiling the formula into a (pruned) KAN so that I can then optimize the KAN to find use for my extra inputs (for example, here I have a z axis that is unused by the formula)

Any update on this @KindXiaoming ? Would love to be able to init like this

@AmitMY  Introducing KAN compiler :)
Tutorial: https://github.com/KindXiaoming/pykan/blob/master/tutorials/Interp_3_KAN_Compiler.ipynb


Demo to Kayla and Jacob 0721

NO description here.

Is this a round-trip comment?  Will this one show up on Jira TP?


C# tests sometimes fails on Windows

Seen multiple times on Windows. Based on the log, the test process probably crashes without printing anything and the "no connection could be made" error comes from nunit agent being unable to connect to the process running the tests.
***** Grpc.Core.Tests.ClientServerTest.UnaryCall_DisposedChannel
I7/25/2015 8:52:50 AM 0 c:\jenkins\workspace\grpc_pull_requests\config\dbg\language\csharp\platform\windows\src\core\surface\server.c:1154: grpc_server_request_call(server=040D4A78, call=003ED0AC, details=003ED0B0, initial_metadata=003ED0CC, cq_bound_to_call=040BA800, cq_for_notification=040BA800, tag=003ED060)
I7/25/2015 8:52:50 AM 0 c:\jenkins\workspace\grpc_pull_requests\config\dbg\language\csharp\platform\windows\src\core\surface\server.c:995: grpc_server_shutdown_and_notify(server=040D4A78, cq=040BA800, tag=003ECD18)
I7/25/2015 8:52:50 AM 0 c:\jenkins\workspace\grpc_pull_requests\config\dbg\language\csharp\platform\windows\src\core\surface\completion_queue.c:182: RETURN_EVENT[040BA800]: OP_COMPLETE: tag:003ED060 ERROR
I7/25/2015 8:52:50 AM 0 c:\jenkins\workspace\grpc_pull_requests\config\dbg\language\csharp\platform\windows\src\core\surface\completion_queue.c:182: RETURN_EVENT[040BA800]: OP_COMPLETE: tag:003ECD18 OK
Unhandled Exception:
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it <IP_ADDRESS>:55921
Server stack trace:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint)
at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
at System.Runtime.Remoting.Channels.RemoteConnection.GetSocket()
at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.IDisposable.Dispose()
at NUnit.Core.ProxyTestRunner.Dispose()
at NUnit.Util.ProcessRunner.Dispose()
at NUnit.ConsoleRunner.ConsoleUi.Execute(ConsoleOptions options)
at NUnit.ConsoleRunner.Runner.Main(String[] args)

#2708 partially fixes that.

I haven't seen this for a while and I am unable to reproduce when running tests locally.


Verify Cosmo

Upgrading Asset to Verified
If upgrading an Asset to Verified, please see the requirements specified at LISTING, and ensure the following:

[x] Asset is defined thoroughly at the Cosmos Chain Registry.

[x] A meaningful description (and extended_description, unless classified as 'meme').
[x] Associated socials, including website and twitter.
[x] Logo Image has a square Aspect Ratio, < 250 KB file size, and appropriate visual contrast with Osmosis Zone colors.

[x] This pool contains contains at least $1k USD-worth of liquidity of the asset (Provide Pool ID): 1992

'Verified' Status Validation Checklist (to be completed by Osmosis Zone maintainers):

[x] Verify appearance and metadata
[x] Accurate Price
[ ] Trading and routing functionality (wasn't routing--being investigated)
[x] Withdraw and Deposit

[x] Deposit Transaction URL (if in-app)

I don't know why the routing doesn't work. When I select "Trade Pair" on Osmosis, it works, but it doesn't when I do it from the "Trade" section.

I don't know why the routing doesn't work. When I select "Trade Pair" on Osmosis, it works, but it doesn't when I do it from the "Trade" section.

The fix was pushed recently, so it's working by now.


Verify search records

After running initindex on production, there was a study record that wasn't showing up as a search item. I want to make sure that all resources are making it into search and being updated properly.

As of right now there are 495 resources to be seen at /api/resource (database records) vs 467 search results. I'm not sure about what is causing this discrepancy. Maybe something to do with delete and/or save getting disrupted?

The discrepancy is coming from the old events that are still in the database -- no search records are created for events in the past. I've talked briefly with Wendy about giving admins a way to interact more with the resource records and verify this sort of thing for themselves in the future. I think when we give them the CSV/excel download that will be sufficient, though the packet printing may dictate needing a resource admin screen anyway.


[macosx] cannot change svn server address

i need to change the svn server address, but i can't find how. maybe should be addedd in the preferences.

I think you must do the checkout again. Can it fix the problem?


Discord?

I need your discord or some contact, thanks

I need your discord or some contact, thanks

Hi, my discord BoomEaro#4486


[macos] Compilation issue.

Godot version: 3.0.6 stable.
Godotsteam version: latest godot3 branch sourcecode.
Steamworks SDK version: 1.44
platform: Macos Mojave.
This is the compilation error that appears after the nullptr issue has been fixed, see PR #82
Without the godotsteam module inserted it compiles without any problems so i believe it's not a problem with the engine.
Console log/error:

Mikes-iMac:godot-3.0.6-stable thisismike97$ sudo scons p=osx bits=64 tools=no target=release
scons: Reading SConscript files ...
Checking for C header file mntent.h... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
[Initial build] Compiling ==> platform/osx/crash_handler_osx.mm
[Initial build] Compiling ==> platform/osx/os_osx.mm
platform/osx/os_osx.mm:1569:24: error: cannot initialize a variable of type
'NSSearchPathDirectory' with an rvalue of type 'int'
NSSearchPathDirectory id = 0;
^    ~
1 error generated.
scons: *** [platform/osx/os_osx.osx.opt.64.o] Error 1
scons: building terminated because of errors.

This issue is actually a problem with the engine and is fixed in future versions of godot.
as a workaround for this version edit the file "platform/osx/os_psx.mm"
Around line 1580 replace:

NSSearchPathDirectory id = 0;

With:

NSSearchPathDirectory id;
bool found = true;

In the switch (p_dir) add:

default: {
found = false;
}

and lastly change "if (id)" to "if (found)"

Hey, did you managed to compile it using the 3.1 version too? I'm having a lot of issues.

I don't have any Mac installations but I'm assuming your speaking to @thisismike97 anyway.  That being said, what issues are you getting?

Hey, did you managed to compile it using the 3.1 version too? I'm having a lot of issues.

@coelhucas The last time i compiled this has already been some months ago, im not 100% sure if it compiled for me back then, i can see what is up with it somewhere in the next few days, ill get back to you on this when i have time.

@coelhucas And also feel free to open a new issue with whatever problems you are having!

@coelhucas I can compile just fine.
Please tell us more about what exact issues you are dealing with.


Support Dialog Boxes

Support pop-up dialogues in an easier way. This is a GUI-related enhancement.

Need to test the secondary screens.