Sensu handler ignoring filter

Right now I am configuring an email handler to send an email after a check's status as been critical for a while. I want the email to be sent, every hour that the check's event history has been critical for a long time. Below is the filter, handler and the check configuration.
/etc/sensu/conf.d/filter_alert.json
{
  "filters": {
    "alert": {
      "attributes": {
        "history": "eval: value.split(',').all? { |status| status.gsub("'","") == '2' }",
        "occurrences": "eval: value % 12 == 0"
      }
    }
  }
}

/etc/sensu/conf.d/handlers/handler_memory-email.json
{
  "handlers": {
    "memory-email": {
      "type": "pipe",
      "filter": "alert",
      "severities": [
        "critical"
      ],
      "command": "mailx -s 'The memory usage is more than 80%'<EMAIL_ADDRESS>    }
  }
}

/etc/sensu/conf.d/hardware/check_memory_metrics.json
{
  "checks": {
    "memory_metrics": {
      "handlers": ["default","influxdb", "memory-email"],
      "type": "metric",
      "command": "/etc/sensu/plugins/memory-metrics.rb -t 70",
      "subscribers": [
        "moc-sensu"
      ],
      "interval": 300
    }
  }
}

Unfortunately instead of receiving an email every hour, I am not receiving any. When I took out the history attribute in my filter it worked as expected, so the problem is with the history attribute.
In my filter, how do you evaluate every status in the history attribute, so it returns true when all of the statuses are 2?
For example if my history is "["2","2","2","2","2","2","2","2"]", the evaluation should return true.  If my history is "["2","2","2","2","2","2","2","0"]", the evaluation should return false.

I fail to see why you would want to test both occurrences and history since they are the same in this case. The occurrences counts how many times the check have been returning the same value. So if the occurrences is 12, then per definition the last 12 values in the history will have the same value.
(Since this is a pure ruby problem, sensu issue tracker might not be the best place to ask.)

@genagain there isn't enough information here to suggest that this is an issue with Sensu itself so I'm going to go ahead and close this as a "Training" issue.
If you need help learning Sensu, please consider Sensu Training, or try hanging out in the #sensu Freenode channel - there are usually many Sensu users there who can help.
Please feel free to comment here if you should have any further questions.

@genagain
history is array of strings, thus you need to convert it to array of numbers, like this:
value.map { |x| x.to_i;}

i am commenting it, just in case someone else would be looking for this

@p53 I tried that in the "history": "eval: ..." statement but it threw a filter attribute eval error in the log:
"error":"undefined method `map' for nil:NilClass\nDid you mean?  tap"

Perhaps the map method is not available in this context? Is an eval on the history attribute supported?


[BUG] WC modal appears behind connectkit

Describe the bug
the WalletConnect modal appears behind the connectkit modal.
To reproduce
The default demo has this issue as well: https://docs.family.co/connectkit/try-it-out

error on both mobile and desktop layouts

Expected behavior
WCM should be in front of connectkit
Solution
I believe it's because wallectconnect changed their css variables to a wcm prefix instead of w3m and the connectkit z-index setter code uses the old prefix:
https://github.com/family/connectkit/blob/2d0bec5d1be9314811ecf7c8adcd146e0b453e59/packages/connectkit/src/hooks/useWalletConnectModal.tsx#L20C27-L20C36

Fixed in https://github.com/family/connectkit/commit/c77dc936ae35834a6c9a0628c4bd26cdff676197, which will be pushed to npm soon

this still occurs to me on<EMAIL_ADDRESS>— the new updated style is injected correctly into the head but doesn't work because the element's name is wcm-modal, not the old w3m-modal :(

whatever version of wagmi I was testing this on was still using the <w3m-modal> tag with the --wcm-z-index variable 🤦
added that tag in https://github.com/family/connectkit/commit/e2a9d2d77447143ec58822ced55b1fa66f05be8e which we'll push to npm with the next update


You should follow the instructions in https://github.com/junegunn/vim-plug?tab=readme-ov-file#installation

          You should follow the instructions in https://github.com/junegunn/vim-plug?tab=readme-ov-file#installation

MY~ LOCATION IS C:/USERS/USER
I TRIED TO USE THE AUTOLOAD DIRECTORY FOR THE VIM-PLUG FILE BUT IT DOESN'T WORK
I NEED TO KNOW HOW TO USE IT
Originally posted by @junegunn in https://github.com/junegunn/vim-plug/issues/1284#issuecomment-2206039819

I'm having a similar problem; I've followed the directions as given by the tutorial but I keep getting an error on PlugInstall (E492 Not an editor command). LMK if anyone happens to figure this out.


[WIP]Semantic tokens-refactor

What does this PR do?
Refactor SSL Discrete Tokens:

bitrate scalability of semantic tokens
Deduplication option
some cleaning

Fixes #<issue_number>

Before submitting

[ ] Did you read the contributor guideline?
[ ] Did you make sure your PR does only one thing, instead of bundling different changes together?
[ ] Did you make sure to update the documentation with your changes? (if necessary)
[ ] Did you write any new necessary tests? (not for typos and docs)
[ ] Did you verify new and existing tests pass locally with your changes?
[ ] Did you list all the breaking changes introduced by this pull request?
[ ] Does your code adhere to project-specific code style and conventions?

PR review

Reviewer checklist

[ ] Is this pull request ready for review? (if not, please submit in draft mode)
[ ] Check that all items from Before submitting are resolved
[ ] Make sure the title is self-explanatory and the description concisely explains the PR
[ ] Add labels and milestones (and optionally projects) to the PR so it can be classified
[ ] Confirm that the changes adhere to compatibility requirements (e.g., Python version, platform)
[ ] Review the self-review checklist to ensure the code is ready for review

@salah-zaiem  and @Chaanks,   I have refactored the Diceret-Hubert  to include bitrate scalability(getting tokens from multiple layers)  and Deduplication option. Please check and let me know what you think. If we agree on that, I will apply the same modifications on Disceret-WavLm and Discrete-wav2vec. I am still working on adding checkpointing for kmeans and  subwording. The models are training.. I just some upload some sample on HF...so don't expect good quality for wo. I will upload the correct models once done training.

Have you checked how do the "for loops" in the forward affect downstream training duration ?


[BEAM-13538] Workaround to fix go-licenses crash.

go-licenses was recently updated to version 1.1.0 which only works for go modules. Since our Go license script hasn't been updated to use modules yet, that causes it to fail. This change works around that by fixing the version to 1.0.0, which worked.

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

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

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

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

R: @lostluck @TheNeuralBit

I'll go ahead and close https://github.com/apache/beam/pull/17344

Based on numbers, I think you beat me to PR creation by a very small amount of time haha


Initial registration of EnergyModelsRenewableProducers

@JuliaRegistrator register

Registration pull request created: JuliaRegistries/General/99876
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.5.3 -m "<description of version>" e82c5acbf8e5deaeb1c4d20dec29b382afed1d8a
git push origin v0.5.3

Also, note the warning: This looks like a new registration that registers version 0.5.3.
Ideally, you should register an initial release with 0.0.1, 0.1.0 or 1.0.0 version numbers
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.


TrendMicro: fix naming

I close this PR in favor of https://github.com/SEKOIA-IO/automation-library/pull/384


Migrate HCL files to Lua

Motivation
We are using 2 different formats, HCL and Lua, both of which allow us to customize Elona foobar. HCL is used for configuration files, mod manifest files, and locale resources (with HIL). Any other scripts for modding are written in Lua. Since HCL is designed as a configuration language, not a programming language, as its name says, it has some advantages over Lua: simple, safe, and easy to deserialize/serialize. I think, however, two different languages confuse those who want to customize foobar or create mods due to their similar but different notations.
Lua script object notation
Lua has its own object literal notation that can represent what HCL can do.
# mod.hcl
mod {
    id = "core"
    name = "Core Content"
    author = "KI, Ruin0x11"
    version = "0.2.6"
    license = "MIT"
    description = "snip"
}

-- mod.lua
id = "core"
name = "Core Content"
author = "KI, Ruin0x11"
version = "0.2.6"
license = "MIT"
description = "snip"

LuaRocks is using Lua script for configuration like this.
cf. https://github.com/luarocks/luarocks/blob/v3.1.3/src/luarocks/core/persist.lua#L56

Migrate HCL files to Lua and JSON5
After discussion in Discord, we decided to migrate HCL files like this:

mod.hcl -> JSON5
config_def.hcl -> Lua
locale/*.hcl -> Lua
config.hcl -> JSON5
keybindings.hcl -> JSON5

Pros/cons of alternatives
XML
Cons
It is for machine, not for human.
INI
Cons
There is no reason to select INI instead of TOML, a more well-designed superset.
JSON
Pros

There are many tools, libraries, and documents.
There is only one way to represent something. (It can also be said a disadvantage, but I think it is more suitable for a configuration language than having a lof of syntax sugar)

Cons

Comments and trailing commas are disallowed.

YAML
Pros

It has high enough expressiveness as a configuration language.

Cons

Since its specification is complex, there are several ways to write the same data.

TOML
Pros

It has high enough expressiveness as a configuration language.

Cons

If a data has deeply-nested structure, you have to write the same key many times.

HCL
Pros

It has been used in this project.
It has high enough expressiveness as a configuration language.

Cons

There are few documents about the forma, especially Japanese one.
Low Googlability due to HCl.
HashiCorp is now fpcusing on HCL version 2, and the version 1 that foobar uses will be deprecated.

Lua
Pros

It has been used in this project.
We can unify a script language and a data language.

Cons

As it is a true programming language, not a configuration language, you can do anything in config file.
It is hard to safely extract data from files in the server side. (It is not impossible, but the means is a bit tricky.)

Elona conf format
key1. "value1"
key2. "value2"

Pros

It has been used in Elona.
There is only one way to represent data.

Cons

It cannot represent complex (e.g., nested) structure.
We need to reinvent wheel more or less.


FormBuilderTouchSpin missing in  flutter_form_builder: ^6.0.0-nullsafety.1

I just upgraded to   flutter_form_builder: ^6.0.0-nullsafety.1 due to the many issues faced on previous versions.  Now it seems FormBuilderTouchSpin has vanished?

According to the changelog TouchSpin was removed dull to null safety issues with that version.

We're using this in our project and can't find a suitable replacement widget from this package.
Maintainer might want to revisit adding this back since they've just recently addressed null safety


FIX Revert beta tag fix

Issue https://github.com/silverstripe/.github/issues/23

Tagged as 1.3.4


Add GitHub Actions workflow for running tests

Attempt to set up GitHub Actions for running tests.

Closing as outdated.


Webhook (Emby) - User matching failed

Looks like there may be another user-related issue.  I'm able to setup connectivity to Plex and Emby and manual syncing seems to be going correctly now (thanks again for that fix earlier today).
I am noticing, though, that the webhook from Emby seems to be hitting an error.  The WatchState logs show this:
| [2022-06-03T00:01:00+00:00] status: 401 - origin: "-" - text: "Webhook token is valid, User matching failed."...
This comes whenever a state is changed on an item or when using the "test webhook" function from within Emby.
Plex doesn't appear to be complaining about webhooks nor does WS appear to be complaining about Plex.
Let me know if the above is enough to identify the problem (if there is one) or if there is additional information/testing that I can supply to help.  In the grand scheme, this seems minor since the actual functionality is still there.

Hi, Sadly my Emby premium subscription ended a while back,
for test event it's expected to fail as Emby does not send peyload that include user data info. however try to play something it should work. if still fails then, i need you to make adjustments to dump the request payload. change the url for webhook to
http://localhost:8081/?rdebug=1&apikey=[api_token]
after doing that check /config/debug/ you should see json files there. check your docker output for failed attempt there should be a id: "[random_string]" here, get me the contents of the request id. be sure to check the log for personal info though

Ah, you are correct.  I could swear that the test used to work from Emby but its also possible I was testing this without limiting it to a specific user at the time.  Yes, playback of an episode does in fact show that webhooks from Emby are working.
Thanks again for the quick reply!

No problem glad it's working for you.
Do not hesitate to report any problems


Proprietary oracle driver breaking the maven build as ojdbc8 dependency not satisfied

mvn clean install
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building n-cube 4.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.oracle:ojdbc8:jar:<IP_ADDRESS> is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.954 s
[INFO] Finished at: 2017-04-16T18:16:08+10:00
[INFO] Final Memory: 20M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project n-cube: Could not resolve dependencies for project com.cedarsoftware:n-cube:jar:4.0.0-SNAPSHOT: Failure to find com.oracle:ojdbc8:jar:<IP_ADDRESS> in xxxx was cached in the local repository, resolution will not be reattempted until the update interval of repo has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Hi Nabeel,
It's not a proprietary ojdbc driver. You can find it here: http://www.oracle.com/technetwork/database/features/jdbc/jdbc-ucp-122-3110062.html
Here are instructions on how to install it locally:
https://www.mkyong.com/maven/how-to-add-oracle-jdbc-driver-in-your-maven-local-repository/
I also just found this. I haven't tried it personally, but it may be helpful for you:
http://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9010

Hi Josh,
I could'nt find any usage of this library, in the project(except a commented block), any place where we are using it?

The Oracle driver is intended to be used by application by setting the following in application.properties:
spring.datasource.driver-class-name=org.hsqldb.jdbcDriver
spring.datasource.url=jdbc:hsqldb:mem:testdb
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.tomcat.validation-query=SELECT 1 FROM n_cube WHERE 1=0```

Instead of using the defaulted HSQLDB properties, you would set up an Oracle connection there.

shouldn't that driver be added to classpath separately? probably as part of the particular application build instead of here?

The most recently integrated PR should address this issue.


How to return to app after getting token successfully ?

Hi, I am able to print the token in console, but after fetched token, "net::ERR_NAME_NOT_RESOLVED"
error displayed on page, without returning to appllication.

Hi, jay-web,
how you get AAD_RESOURCE
thanks Sam

Hi Jay-web,
what is AAD_REDIRECT_URI
thnaks Sam


[AutoRelease] t2-containerservicefleet-2024-10-31-52528(can only be merged by SDK owner)

https://github.com/Azure/sdk-release-request/issues/5648
Recording test success

issue link:https://github.com/Azure/sdk-release-request/issues/5648


Document Pip PEP 517 installation quirks

I try to install brainiak on MacOS Mojave just by
python3 -m pip install -U brainiak

following the instruction on Docs » Installation page.
But at the end I still encounter an error as
ERROR: Could not build wheels for brainiak which use PEP 517 and cannot be installed directly

So what's the problem with me? Did I do something wrong?
Thanks,
Zhao

Thank you @mihaic ! It works!
I downgraded pip from 19.2.3 to 9.0.3 as you recommend and it works.
Module brainiak is installed and imported (in PyCharm) successfully.
I also tried --no-use-pep517 option but nothing happened.
It seems that something is wrong when compiling at the step pep517(I found some errors about cpp and cython), though I am not sure what it is.
Thank you again!

Thanks for the feedback, @GuannanZhao. I am re-purposing this issue to improve our documentation.
Could you please paste the command the error you see when installing with pip >=19 and --no-use-pep517?

It seems that everything will be OK if brainiak-0.9.1-cp37-cp37m-macosx_10_9_x86_64.whl is already built under the path ~/Library/Caches/pip/.
I could uninstall and install brainiak by pip 19.2.3 successfully as many times as my wish without an error. When I deleted this cache, the PEP 517 error occurred again.
Then I tried python3 -m pip install --no-use-pep517 brainiak, it did works this time, but nothing happened last time. Neither was an error reported nor was the module successfully installed.
I am not sure why. Maybe last time I made some mistakes or changed something without awareness about that.

The PEP 517 error is as follow:
Building wheels for collected packages: brainiak
  Building wheel for brainiak (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/guannanzhao/testvenv/bin/python3 /Users/guannanzhao/testvenv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpf5wjdptx
       cwd: /private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-install-y3h2tutg/brainiak
  Complete output (209 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.7
  creating build/lib.macosx-10.9-x86_64-3.7/brainiak
  copying brainiak/isc.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak
  copying brainiak/io.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak
  copying brainiak/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak
  copying brainiak/image.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak
  creating build/lib.macosx-10.9-x86_64-3.7/brainiak/searchlight
  copying brainiak/searchlight/searchlight.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/searchlight
  copying brainiak/searchlight/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/searchlight
  creating build/lib.macosx-10.9-x86_64-3.7/brainiak/hyperparamopt
  copying brainiak/hyperparamopt/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/hyperparamopt
  copying brainiak/hyperparamopt/hpo.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/hyperparamopt
  creating build/lib.macosx-10.9-x86_64-3.7/brainiak/funcalign
  copying brainiak/funcalign/sssrm.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/funcalign
  copying brainiak/funcalign/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/funcalign
  copying brainiak/funcalign/rsrm.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/funcalign
  copying brainiak/funcalign/srm.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/funcalign
  creating build/lib.macosx-10.9-x86_64-3.7/brainiak/factoranalysis
  copying brainiak/factoranalysis/tfa.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/factoranalysis
  copying brainiak/factoranalysis/htfa.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/factoranalysis
  copying brainiak/factoranalysis/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/factoranalysis
  creating build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
  copying brainiak/fcma/mvpa_voxelselector.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
  copying brainiak/fcma/classifier.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
  copying brainiak/fcma/util.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
  copying brainiak/fcma/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
  copying brainiak/fcma/preprocessing.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
  copying brainiak/fcma/voxelselector.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
  creating build/lib.macosx-10.9-x86_64-3.7/brainiak/reprsimil
  copying brainiak/reprsimil/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/reprsimil
  copying brainiak/reprsimil/brsa.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/reprsimil
  creating build/lib.macosx-10.9-x86_64-3.7/brainiak/utils
  copying brainiak/utils/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/utils
  copying brainiak/utils/fmrisim.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/utils
  copying brainiak/utils/utils.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/utils
  creating build/lib.macosx-10.9-x86_64-3.7/brainiak/eventseg
  copying brainiak/eventseg/event.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/eventseg
  copying brainiak/eventseg/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/eventseg
  copying brainiak/utils/grey_matter_mask.npy -> build/lib.macosx-10.9-x86_64-3.7/brainiak/utils
  running build_ext
  creating var
  creating var/folders
  creating var/folders/jw
  creating var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn
  creating var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T
  /usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c /var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpx0pzm1oq.cpp -o var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpx0pzm1oq.o -std=c++14
  /usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c /var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpywztyla6.cpp -o var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpywztyla6.o -std=c++14
  /usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c /var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmplbb8jvyk.cpp -o var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmplbb8jvyk.o -std=c++14
  /usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c /var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpwi7stw2f.cpp -o var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpwi7stw2f.o -std=c++14
  building 'brainiak.factoranalysis.tfa_extension' extension
  creating build/temp.macosx-10.9-x86_64-3.7
  creating build/temp.macosx-10.9-x86_64-3.7/brainiak
  creating build/temp.macosx-10.9-x86_64-3.7/brainiak/factoranalysis
  /usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c brainiak/factoranalysis/tfa_extension.cpp -o build/temp.macosx-10.9-x86_64-3.7/brainiak/factoranalysis/tfa_extension.o -g0 -fopenmp -stdlib=libc++ -mmacosx-version-min=10.9 -ftemplate-depth-1024 -DVERSION_INFO="0.9.1" -std=c++14
  brainiak/factoranalysis/tfa_extension.cpp:242:1: warning: 'pybind11_init' is deprecated: PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE [-Wdeprecated-declarations]
  PYBIND11_PLUGIN(tfa_extension) {
  ^
  /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pybind11/detail/common.h:261:20: note: expanded from macro 'PYBIND11_PLUGIN'
              return pybind11_init();                                            \
                     ^
  brainiak/factoranalysis/tfa_extension.cpp:242:1: note: 'pybind11_init' has been explicitly marked deprecated here
  /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pybind11/detail/common.h:256:5: note: expanded from macro 'PYBIND11_PLUGIN'
      PYBIND11_DEPRECATED("PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE")  \
      ^
  /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pybind11/detail/common.h:90:41: note: expanded from macro 'PYBIND11_DEPRECATED'
  #  define PYBIND11_DEPRECATED(reason) [[deprecated(reason)]]
                                          ^
  1 warning generated.
  /usr/local/opt/llvm/bin/clang++ -bundle -undefined dynamic_lookup -arch x86_64 -g -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -I/usr/local/opt/llvm/include build/temp.macosx-10.9-x86_64-3.7/brainiak/factoranalysis/tfa_extension.o -o build/lib.macosx-10.9-x86_64-3.7/brainiak/factoranalysis/tfa_extension.cpython-37m-darwin.so -g0 -fopenmp -stdlib=libc++ -mmacosx-version-min=10.9 -ftemplate-depth-1024 -DVERSION_INFO="0.9.1" -std=c++14
  building 'brainiak.fcma.fcma_extension' extension
  creating build/temp.macosx-10.9-x86_64-3.7/brainiak/fcma
  creating build/temp.macosx-10.9-x86_64-3.7/brainiak/fcma/src
  /usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c brainiak/fcma/src/fcma_extension.cc -o build/temp.macosx-10.9-x86_64-3.7/brainiak/fcma/src/fcma_extension.o -g0 -fopenmp -stdlib=libc++ -mmacosx-version-min=10.9 -ftemplate-depth-1024 -DVERSION_INFO="0.9.1" -std=c++14
  brainiak/fcma/src/fcma_extension.cc:60:17: warning: unknown pragma ignored [-Wunknown-pragmas]
          #pragma simd
                  ^
  brainiak/fcma/src/fcma_extension.cc:54:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
      for(int v = 0 ; v < nSelectedVoxels*nSubjs ; v++)
                      ~ ^ ~~~~~~~~~~~~~~~~~~~~~~
  brainiak/fcma/src/fcma_extension.cc:61:27: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
          for(int j = 0 ; j < nVoxels ; j++)
                          ~ ^ ~~~~~~~
  brainiak/fcma/src/fcma_extension.cc:87:1: warning: 'pybind11_init' is deprecated: PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE [-Wdeprecated-declarations]
  PYBIND11_PLUGIN(fcma_extension) {
  ^
  /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pybind11/detail/common.h:261:20: note: expanded from macro 'PYBIND11_PLUGIN'
              return pybind11_init();                                            \
                     ^
  brainiak/fcma/src/fcma_extension.cc:87:1: note: 'pybind11_init' has been explicitly marked deprecated here
  /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pybind11/detail/common.h:256:5: note: expanded from macro 'PYBIND11_PLUGIN'
      PYBIND11_DEPRECATED("PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE")  \
      ^
  /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pybind11/detail/common.h:90:41: note: expanded from macro 'PYBIND11_DEPRECATED'
  #  define PYBIND11_DEPRECATED(reason) [[deprecated(reason)]]
                                          ^
  4 warnings generated.
  /usr/local/opt/llvm/bin/clang++ -bundle -undefined dynamic_lookup -arch x86_64 -g -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -I/usr/local/opt/llvm/include build/temp.macosx-10.9-x86_64-3.7/brainiak/fcma/src/fcma_extension.o -o build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma/fcma_extension.cpython-37m-darwin.so -g0 -fopenmp -stdlib=libc++ -mmacosx-version-min=10.9 -ftemplate-depth-1024 -DVERSION_INFO="0.9.1" -std=c++14
  cythoning brainiak/fcma/cython_blas.pyx to brainiak/fcma/cython_blas.c
  building 'brainiak.fcma.cython_blas' extension
  /usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c brainiak/fcma/cython_blas.c -o build/temp.macosx-10.9-x86_64-3.7/brainiak/fcma/cython_blas.o -g0 -fopenmp -stdlib=libc++ -mmacosx-version-min=10.9 -ftemplate-depth-1024 -DVERSION_INFO="0.9.1"
  brainiak/fcma/cython_blas.c:1:2: error: Do not use this file, it is the result of a failed Cython compilation.
  #error Do not use this file, it is the result of a failed Cython compilation.
   ^
  1 error generated.
  /private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-install-y3h2tutg/brainiak/brainiak/fcma/cython_blas.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  #  limitations under the License.

  # Authors: Yida Wang
  # (Intel Labs), 2016

  cimport scipy.linalg.cython_blas as blas
         ^
  ------------------------------------------------------------

  brainiak/fcma/cython_blas.pyx:18:8: 'scipy/linalg/cython_blas.pxd' not found

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      A = py_a
      cdef float[:, ::1] B
      B = py_b
      cdef float[:, :, ::1] C
      C = py_c
      blas.sgemm(trans_a, trans_b, &M, &N, &K, &alpha, &A[0, 0], &lda,
         ^
  ------------------------------------------------------------

  brainiak/fcma/cython_blas.pyx:115:8: cimported module has no attribute 'sgemm'

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      beta = py_beta
      cdef float[:, :, ::1] A
      A = py_a
      cdef float[:, ::1] C
      C = py_c
      blas.ssyrk(uplo, trans, &N, &K, &alpha, &A[py_start_voxel, 0, 0], &lda,
         ^
  ------------------------------------------------------------

  brainiak/fcma/cython_blas.pyx:197:8: cimported module has no attribute 'ssyrk'

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      beta = py_beta
      cdef float[:, ::1] A
      A = py_a
      cdef float[:, :, ::1] C
      C = py_c
      blas.ssyrk(uplo, trans, &N, &K, &alpha, &A[0, 0], &lda,
         ^
  ------------------------------------------------------------

  brainiak/fcma/cython_blas.pyx:286:8: cimported module has no attribute 'ssyrk'

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      beta = py_beta
      cdef float[:, ::1] A
      A = py_a
      cdef float[:, :, ::1] C
      C = py_c
      blas.sgemm(trans_a, trans_b, &M, &N, &K, &alpha, &A[0, 0], &lda,
         ^
  ------------------------------------------------------------

  brainiak/fcma/cython_blas.pyx:385:8: cimported module has no attribute 'sgemm'

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      A = py_a
      cdef float[:, ::1] B
      B = py_b
      cdef float[:, :, ::1] C
      C = py_c
      blas.sgemm(trans_a, trans_b, &M, &N, &K, &alpha, &A[0, 0], &lda,
         ^
  ------------------------------------------------------------

  brainiak/fcma/cython_blas.pyx:477:8: cimported module has no attribute 'sgemm'

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      A = py_a
      cdef float[:, ::1] B
      B = py_b
      cdef float[:, ::1] C
      C = py_c
      blas.sgemm(trans_a, trans_b, &M, &N, &K, &alpha, &A[0, 0], &lda,
         ^
  ------------------------------------------------------------

  brainiak/fcma/cython_blas.pyx:559:8: cimported module has no attribute 'sgemm'
  error: command '/usr/local/opt/llvm/bin/clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for brainiak
  Running setup.py clean for brainiak
Failed to build brainiak
ERROR: Could not build wheels for brainiak which use PEP 517 and cannot be installed directly

Thanks for the detailed output. I will modify the documentation to include the --no-use-pep517 flag.


Handle internationalized quote headers

See e.g<EMAIL_ADDRESS>Le 19/08/2020 à 23:56, Simon Ser a écrit :

Do we even need to rely on them in the first place?

Do we even need to rely on them in the first place?

We want to strip these, so we need some way to detect them.

We want to strip these, so we need some way to detect them.

Now I see, I thought it was requiring it to be present

Now I see, I thought it was requiring it to be present


android: consistant ML_API_COMMON macro

ML_API_COMMON macro has been inconsistent for Android build, where it is force-defined 1 in Android.mk while it may become 0 or 1 depending on build system in meson.
Because android build uses meson and Android.mk simultaneously, this must become consistent.

:memo: TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #2635. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.


npm install failed

$ npm install &&  karma start --single-run --no-auto-watch
npm WARN package.json<EMAIL_ADDRESS>No repository field.
npm WARN package.json<EMAIL_ADDRESS>No license field.
npm ERR! git clone --template=/tmp/lambci/home/.npm/_git-remotes/_templates --mirror https://github.com/uberVU/Sinon.JS.git /tmp/lambci/home/.npm/_git-remotes/https-github-com-uberVU-Sinon-JS-git-5ff91d4d: Cloning into bare repository '/tmp/lambci/home/.npm/_git-remotes/https-github-com-uberVU-Sinon-JS-git-5ff91d4d'...
npm ERR! git clone --template=/tmp/lambci/home/.npm/_git-remotes/_templates --mirror https://github.com/uberVU/Sinon.JS.git /tmp/lambci/home/.npm/_git-remotes/https-github-com-uberVU-Sinon-JS-git-5ff91d4d: fatal: Unable to find remote helper for 'https'
npm ERR! Linux 4.1.19-24.31.amzn1.x86_64
npm ERR! argv "/usr/local/lib64/node-v4.3.x/bin/node" "/usr/local/lib64/node-v4.3.x/bin/npm" "install"
npm ERR! node v4.3.2
npm ERR! npm  v2.14.12
npm ERR! code 128

locally everything works great, any ideas?

Interesting – those git clone commands work for me:
https://lambci-public-buildresults-e3xwlufrwb3i.s3.amazonaws.com/gh/mhart/test-ci-project/builds/101/3794306266881797e24b74c4785545b9.html
Is something modifying the PATH variable?
Is there a project I can reproduce this on?

Ah, I've been able to reproduce:
npm install https://github.com/uberVU/Sinon.JS

Interestingly enough, this works:
npm install uberVU/Sinon.JS

So if you can change your dependencies as a workaround, that might work.
I'm looking into it – I suspect npm must be messing with the PATH somehow because the git commands it is trying to run work normally

Ok, I've been able to fix this, mostly, by bundling in our own custom version of npm with the specific fix needed for this problem: https://github.com/npm/npm/pull/13358
Released as v0.9.4 – let me know if that works for you!

For anyone stumbling on this issue – because we bundle our own version of npm, this won't fix the problem if you're using nave to test a specific version of node because it will use the version of npm that comes with that version of node.
To get around it – at least, until npm fixes this bug – you'll either need should be able to specify the full path to our bundled version of npm, or install your own custom version of npm

👍  it works for me in v0.9.4

(sorry this is slightly unrelated) I had this issue trying to run git in lambda to an https://repository.com url as I did not install curl.  I then tried it with an ssh://repository.com url and had a similar error about ssh, which I then bundled into my zip file, and got to the seteuid issue that I am trying to get around at the moment.  TLDR; - you might be able to get around it by choosing the ssh protpcol instead of https any where you are able to edit the urls.


How to acquire synchronized frames from depth and main(1280x720) RGB cameras?

Depth and RGB frames in the Hololens are not aligned. I'm trying to get information about the depth in the scene the Hololens user is seeing, but to do so i must establish a correspondence between the coordinates of the two kinds of frame, probably with some stereo calibration algorithm or something similar. The problem is that any way i can think of for achieving the alignment requires the RGB frames to be acquired "at the same time" as the ones i can easily get from the Recorder tool, any idea on how to do that?

Hi @mauronano, poses of the sensors in different timestamps are available in research mode. For depth maps, there is an unprojection model for the depth sensor as well. Therefore, Using the unprojection model, you can get 3D coordinates of the points in the depth map. Knowing the relative pose between depth sensor and RGB camera, you should be able to transform the 3D points to RGB camera coordinate system and project the points to RGB camera view, which means that you can create depth maps for RGB camera view. In this case, RGB frame and depth frame are not necessary to be acquired at the same time. However, if the acquired time gap is too large, there are some other issues, like occlusion.

@mauronano, what @Huangying-Zhan said is exactly right. In my case I have an additional set of steps where I keep the latest frame from each of the streams, but only send the data from the last frame of each if the wearer hasn't moved very much in the last second. This is mainly to prevent blurry images, but also helps to make debugging a little bit easier. While the CameraStreamCoordinateMapper and CameraStreamCorrelation samples seem to indicate you can directly convert from one image to the other, I found this to simply not be true. Likely because those two samples use a stationary Kinect, which acts differently. In my case I ended up doing: ColorProjectionMatrix * ColorViewMatrix * DepthSpaceToColorSpace * InverseDepthViewMatrix * DepthCameraPoint. It's a whole ordeal, but all in all a pretty standard 2D->3D->3D->2D graphical space conversion pipeline. To get the DepthSpaceToColorSpace matrix you can use the TryGetTransformTo method with the two SpatialCoordinateSystems like they do in the MediaFrameReaderContext::FrameArrived function. Seeing in your previous question that you are using Unity, be sure to convert the matrices before doing anything with them. The Mixed Reality Toolkit has a preview sample that shows how to do that.

I would like to add, the projection returned by the streams for the color image is very wrong. I ended up needing to fake it. Once you get it dialed in though, you can capture things as small as individual wires pretty well.

Folds in fabric come out pretty well too. Keep in mind, the data is rough, and full of holes.

@Huangying-Zhan , @FracturedShader thank you both for your answers. Just to make sure if i understand what you suggest: after i manage to get the 3D coordinates of the unprojected depth pixel (which you refer to as "DepthCameraPoint") i use the cameraViewTransform matrix provided by the Recorder tool to map them to the depth camera space. Regarding the DepthSpaceToColorSpace, i'm not sure about the meaning of the "FrameToOrigin" matrix produced at the place in the code you pointed at, maybe grasping that could help me better understand the math behind this trasformation. As for the "ColorViewMatrix " which stores the camera extrinsics, should i edit the Recorder project to provide me that too? As at the moment it returns only the parameters of the low resolution RGB cameras and not the 1280x720 one.

@mauronano, unfortunately I ended up writing my own custom application. I haven't actually tried to use the Recorder project directly. As a result I don't know much about how it specifically works.

I want to thank you both very much for your answers as i'm only approaching to computer vision and the stuff i find online is still pretty obscure to me. I have one last question, can i only find the alignment once, offline, and then use it to map every depth frame on my rgb frames or it is something i should do continuously?

@mauronano, given that the depth frames and rgb frames are generally taken at different timestamps, which means that, if you have many RGB-D pairs, the relative poses (between RGB and D) for these pairs are not constant and you can't use a single transformation for all the alignments. Therefore, you need to do this for each RGB-D pair. If RGB-D pairs are always taken at same timestamp, then a single transformation is enough for all the alignments. Unfortunately, it is not the case in here.

@mauronano were you able to convert between the 2 co-ordinate systems? I tried the mapping by going from 2D depth -> World States -> 2d rgb, using the matrices provided by the csv file in the recorder app. However I am following this is to project into the rgb space: https://docs.microsoft.com/en-us/windows/mixed-reality/locatable-camera. Somehow I see the point clouds for the 2 views but they have some offset in each coordinate. Maybe the multiplication by 0.5 etc. as provided in the shader code example (above link) should not be exactly implemented. Do you know the correct approach? Thanks!

For anyone who comes from Google, see my implementation of such mapping. Might not be the best code, but works fast and accurate enough for my purpose.

Hi everyone,
I am working on the same problem you have. I cannot get my depth images and hd images aligned. The following picture visualizes my problem. I try to align a calibration pattern. First I filter the 3D depth points, which belong to the calibration pattern, then I project these points into the HD image.

To figure out the problem I investigated in some detail the meaning of the tranformation matrices. In the following I outline my understanding of the transformation matrices. Then I describe how I try to align my images. I would appreciate your help very much!
1. CameraCoordinateSystem (MFSampleExtension_Spatial_CameraCoordinateSystem)
In the example HoloLensForCV this coordinate system is used to obtain the transformation "FrameToOrigin". The FrameToOrigin transformation is obtained by transforming the CameraCoordinateSystem to the OriginFrameOfReference. (line 140-142 in MediaFrameReaderContext.cpp)
I still do not exactly know what is described by this transformation. What is meant by "frame"?
Through experimenting I found out that the translation vector changes when moving. In fact, the changes do make sense: If I move forward, the z-component becomes smaller. This agrees with the coordinate system in the image below. The z-axis is pointing in the opposite direction of the image plane.

The same applies for moving left or right: moving right makes the x component increase. The y component is about stable. This makes sense as I am not moving up or down.
What I am really uncertain about is the rotational part of the transformation matrix. The rotational part is almost an Identity Matrix. The rotation of my head seems to be contained in the CameraViewTransform, which I describe in the second point.
As far as I understand, the FrameToOrigin Matrix looks as follows:
[1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
x, y, z, 1]
For me the "FrameToOrigin" seems to describe the relation between a fixed point on the HoloLens to the Origin (The Origin is defined each time the app is started, this helps to map each frame to a frame of reference). In the Image above the Origin is probably the "App-specific Coordinate System".
2. CameraViewTransform (MFSampleExtension_Spatial_CameraViewTransform )
The CameraViewTransform is directly saved with each frame (In contrast to FrameToOrigin, no transformation is neccessary).
The rotation of the head seems to be saved within the rotational part of this matrix. I testes this by moving my head around the y-axis. If I turn about 180 ° to the right around my y-axis, the rotational part looks as follows:
[0, 0, 1,
0, 1, 0,
-1, 0, 0].
This corresponds to a 180° rotation around the y-axis - what we expect..
The translational part seems to stay about stable. This would make sense if the translational part described the translation between the fixed point on the HoloLens and the respective camera (hd or depth). However, I would expect the translational part to stay exactly equal. This is not the case. The translational part is only "about" equal and not exactly.
If I do not turn my head (rotational part is an Identity Matrix) the CameraViewTransform looks as follows:
CameraViewTransform for HD Camera
[1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0.00631712, -0.184793, 0.145006, 1]
CameraViewTransform for Depth Camera
[1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0.00798517, -0.184793, 0.0537722, 1]
So the CameraViewTransform seems to capture the rotation of the users head. What is captured by the translational part? If the translational part is the distance between a fixed point on the HoloLens and the respective camera - why is the translational part not always exactly equal?
3. CameraProjectionTransform (MFSampleExtension_Spatial_CameraProjectionTransform)
This transformation is described on the following github page:
https://github.com/MicrosoftDocs/mixed-reality/blob/5b32451f0fff3dc20048db49277752643118b347/mixed-reality-docs/locatable-camera.md
However, what is still unclear: What is the meaning of the terms A and B?
My aim is to map between the depth camera and the hd camera of the HoloLens. To do this I do the following:

I record images with the Recorder Tool of the HoloLensForCV sample
I take a depth image and look for the corresponding hd image by checking the timestamps.
I use the unprojection mapping to find the 3D points in the CameraViewSpace of the Depth Camera.
I transform the 3D points from the Depth Camera View to the HD Camera View and project them onto the image plane I use the following transformations:
Pixel Coordinates = [3D depth point,1] * inv(CameraViewTransform_Depth) * FrameToOrigin_Depth * inv(FrameToOrigin_HD) * CameraViewTransform_HD * CameraProjectionTransfrom_HD

These Pixel Coordinates are in the range from -1 to 1 and need to be adjusted to the image size of 720x1280. This is done as follows:
 x_rgb = 1280 * (PixelCoordinates.x + 1) / 2;
 y_rgb = 720 * (1 - ((PixelCoordinates.y +1)/2));

Result: When transforming my detections from the depth camera to the hd image camera, the objects (In this case the Calibration Pattern) are not 100 % aligned. So I am trying to figure out where the misalignment is coming from. Am I understanding the transformation matrices wrong or has anyone experienced similar problems?
The problems might occur if the spatial mapping of the HoloLens is not 100% working correctly. This might happen If the HoloLens cannot find enough features to map the room. Thus, I tested my setup in different rooms. Especially, in smaller rooms with more clutter in the background (such that the HoloLens can find more features). However, the problem still occurs. As I outlined above, the rough appearance of the transformations seems to be correct. I do not have any idea of how to test the transformation matrices further to grasp the problem.
I would appreciate your help very much! Thanks a lot in advance!
Lisa

Hello. I haven't tried it myself, but it looks like you're very close to the solution. Could the error come from which matrix are you using for the reprojection? (each camera has it's own CameraViewTransform and FrameToOriginTransform even if they're very close to each other).
Also, if it helps, I personally have found useful to check the ARUco Sample in the HololensForCV project in order to understand how to use these matrices. In the attachment I've extracted the important lines. In this case they have the correspondence already and they're triangulating the 3d point back to the world coordinates. Let us know if you find the solution, I'll apprecciate it.
2DPairTo3DPipelineHololens_arucoSample.pdf

I thought it might be better to open a a new case (#119 ), as this one is already closed. I found a solution for the correct alignment, which I noted down in the comments. The exact content of the transformation matrices is still unclear to me. So the case #119 is still open.


HDFS-16445. Make HDFS count, mkdir, rm cross platform

Description of PR
The source files for hdfs_count, hdfs_mkdir and hdfs_rm uses getopt for parsing the command line arguments. getopt is available only on Linux and thus, isn't cross platform. We need to replace getopt with boost::program_options to make these tools cross platform.
How was this patch tested?
In progress.
For code changes:

[x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
[ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
43m 33s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  0s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 9 new or modified test files.

_ trunk Compile Tests _

+1 :green_heart:
mvninstall
34m 55s

trunk passed

+1 :green_heart:
compile
3m 18s

trunk passed

+1 :green_heart:
mvnsite
0m 23s

trunk passed

+1 :green_heart:
shadedclient
60m 37s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
0m 14s

the patch passed

+1 :green_heart:
compile
3m 18s

the patch passed

+1 :green_heart:
cc
3m 18s

the patch passed

+1 :green_heart:
golang
3m 18s

the patch passed

+1 :green_heart:
javac
3m 18s

the patch passed

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

+1 :green_heart:
mvnsite
0m 15s

the patch passed

+1 :green_heart:
shadedclient
21m 59s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
unit
92m 16s

hadoop-hdfs-native-client in the patch passed.

+1 :green_heart:
asflicense
0m 30s

The patch does not generate ASF License warnings.

224m 52s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3945/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/3945

Optional Tests
dupname asflicense compile cc mvnsite javac unit codespell golang

uname
Linux 517049edfaf0 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / 08bb31e819a242dc585e0644532fd8fc0c5645f0

Default Java
Red Hat, Inc.-1.8.0_322-b06

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3945/1/testReport/

Max. process+thread count
529 (vs. ulimit of 5500)

modules
C: hadoop-hdfs-project/hadoop-hdfs-native-client U: hadoop-hdfs-project/hadoop-hdfs-native-client

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3945/1/console

versions
git=2.9.5 maven=3.6.3

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
26m  5s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  0s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 9 new or modified test files.

_ trunk Compile Tests _

+1 :green_heart:
mvninstall
25m 19s

trunk passed

+1 :green_heart:
compile
3m 30s

trunk passed

+1 :green_heart:
mvnsite
0m 34s

trunk passed

+1 :green_heart:
shadedclient
51m 53s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
0m 19s

the patch passed

+1 :green_heart:
compile
3m 26s

the patch passed

+1 :green_heart:
cc
3m 26s

the patch passed

+1 :green_heart:
golang
3m 26s

the patch passed

+1 :green_heart:
javac
3m 26s

the patch passed

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

+1 :green_heart:
mvnsite
0m 22s

the patch passed

+1 :green_heart:
shadedclient
22m 26s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
unit
99m 59s

hadoop-hdfs-native-client in the patch passed.

+1 :green_heart:
asflicense
0m 39s

The patch does not generate ASF License warnings.

207m 32s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3945/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/3945

Optional Tests
dupname asflicense compile cc mvnsite javac unit codespell golang

uname
Linux ffd8e2cd596b 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / 08bb31e819a242dc585e0644532fd8fc0c5645f0

Default Java
Red Hat, Inc.-1.8.0_312-b07

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3945/1/testReport/

Max. process+thread count
519 (vs. ulimit of 5500)

modules
C: hadoop-hdfs-project/hadoop-hdfs-native-client U: hadoop-hdfs-project/hadoop-hdfs-native-client

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3945/1/console

versions
git=2.27.0 maven=3.6.3

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
15m 47s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  1s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 9 new or modified test files.

_ trunk Compile Tests _

+1 :green_heart:
mvninstall
32m 30s

trunk passed

+1 :green_heart:
compile
3m 10s

trunk passed

+1 :green_heart:
mvnsite
0m 21s

trunk passed

+1 :green_heart:
shadedclient
66m 54s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
0m 15s

the patch passed

+1 :green_heart:
compile
3m 10s

the patch passed

+1 :green_heart:
cc
3m 10s

the patch passed

+1 :green_heart:
golang
3m 10s

the patch passed

+1 :green_heart:
javac
3m 10s

the patch passed

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

+1 :green_heart:
mvnsite
0m 15s

the patch passed

+1 :green_heart:
shadedclient
30m 50s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
unit
99m 38s

hadoop-hdfs-native-client in the patch passed.

+1 :green_heart:
asflicense
0m 30s

The patch does not generate ASF License warnings.

219m 46s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3945/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/3945

Optional Tests
dupname asflicense compile cc mvnsite javac unit codespell golang

uname
Linux 260bfc1e4d0a 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 11:38:05 UTC 2021 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / 08bb31e819a242dc585e0644532fd8fc0c5645f0

Default Java
Debian-11.0.14+9-post-Debian-1deb10u1

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3945/1/testReport/

Max. process+thread count
586 (vs. ulimit of 5500)

modules
C: hadoop-hdfs-project/hadoop-hdfs-native-client U: hadoop-hdfs-project/hadoop-hdfs-native-client

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3945/1/console

versions
git=2.20.1 maven=3.6.0

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
0m 57s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  1s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 9 new or modified test files.

_ trunk Compile Tests _

+1 :green_heart:
mvninstall
24m  2s

trunk passed

+1 :green_heart:
compile
3m 39s

trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
compile
3m 44s

trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07

+1 :green_heart:
mvnsite
0m 23s

trunk passed

+1 :green_heart:
shadedclient
54m 34s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
0m 15s

the patch passed

+1 :green_heart:
compile
3m 38s

the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
cc
3m 38s

the patch passed

+1 :green_heart:
golang
3m 38s

the patch passed

+1 :green_heart:
javac
3m 38s

the patch passed

+1 :green_heart:
compile
3m 42s

the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07

+1 :green_heart:
cc
3m 42s

the patch passed

+1 :green_heart:
golang
3m 42s

the patch passed

+1 :green_heart:
javac
3m 42s

the patch passed

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

+1 :green_heart:
mvnsite
0m 15s

the patch passed

+1 :green_heart:
shadedclient
22m  7s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
unit
106m  9s

hadoop-hdfs-native-client in the patch passed.

+1 :green_heart:
asflicense
0m 29s

The patch does not generate ASF License warnings.

194m 32s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3945/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/3945

Optional Tests
dupname asflicense compile cc mvnsite javac unit codespell golang

uname
Linux e5365535cf36 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / 08bb31e819a242dc585e0644532fd8fc0c5645f0

Default Java
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07

Multi-JDK versions
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3945/1/testReport/

Max. process+thread count
597 (vs. ulimit of 5500)

modules
C: hadoop-hdfs-project/hadoop-hdfs-native-client U: hadoop-hdfs-project/hadoop-hdfs-native-client

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3945/1/console

versions
git=2.25.1 maven=3.6.3

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.


Ubuntu 18 compatibility: SSHD configuration

As we discovered during the installation process deployment-playbooks are not fully compatible with Ubuntu 18. The following code breaks the SSH server on the node making it isolated for any further connections:
- name: Fix ssh Ciphers
  blockinfile:
    path: /etc/ssh/sshd_config
    insertafter: '^ServerKeyBits'
    content: |
      Ciphers aes256-ctr,aes192-ctr,aes128-ctr
      MACs hmac-sha1,hmac-ripemd160
  notify:
    - restart sshd

The roots of that issue lies in fact that starting from OpenSSH 7.6 insecure hmac-ripemd160 MAC were removed. This issue is a point to reconsider MACs that should be used now.

According to https://www.sshaudit.com/hardening_guides.html I am going to change the MACs above to the following => hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm<EMAIL_ADDRESS>and check if it works.


Add new purchase information on summary report view

Resolves #4680
Description
this is additional information for the purchase reports, it includes :
Total spent on diapers: -- sum of the amount spent on diapers on all purchases during the filter time period
Total spent on period supplies: sum of the amount spent on period supplies on all purchases during the filter time period
Total spent on adult incontinence: -- sum of the amount spent on adult incontinence on all purchases during the filter time period
Total spent on other: -- sum of the amount spent on other on all purchases during the filter time period
Total Items -- total number of items purchased during the filter time period
Type

New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I modified the existing tests for that view
I tested manually

Screenshots

Looks good, thanks!


backport to 1.16: examples: Fix more deprecations/warnings in configs (#13529)

Signed-off-by: Ryan Northey<EMAIL_ADDRESS>Signed-off-by: Antonio Vicente<EMAIL_ADDRESS>

Addressed by #14125


add ollama provider

This PR add basic support for Ollama.
Prompts are copied from openai provider
Testing

install ollama
launch ollama
ollama pull codellam
modify helix languages.toml

[[language]]
name = "go"
language-servers = ["gopls", "gpt"]

[language-server.gpt]
command = "bun"
args = [
  "--inspect=<IP_ADDRESS>:6499",
  "run",
  "helix-gpt/src/app.ts",
  "--handler",
   "ollama",
   "--logFile",
   "helix-gpt.log"
]

Notes
I am new to coding with LLM and just wanted to play around with using helix and local hosted ollama.
As I don't have access to other providers for comparison, and not much experience with prompt engineering, this is just something that seems working. Please help to test it out and let me know what is missing.
Discussion

for user without strong hardware, some actions with larger file may takes too long and trigger helix Async job failed: request 8 timed out
prompt and parameters may need some more fine tuning

Thanks a lot for the PR, merged.


Extensions glob matching

This PR adds pattern matching to the --extensions argument. It also changes the script to not require either one of --extensions or --include-extensionless in order to run. Instead if --extensions is not provided it will always default to the Unix pattern *. Includes some code cleanup to support this change.
Open to hearing your thoughts on this. I'm guessing the potentially controversial bit will be defaulting to * and not requiring the above args.
The only strange behavior I noticed with this change is that if you are invoking the program with a wildcard extension you need to add a comma for argparse to work:
codemod --extensions *  '<match>' '<change>'            -->        fails
codemod --extensions *, '<match>' '<change>'            -->        works fine

Not sure how important this is if we keep the default * argument though.
This resolves https://github.com/facebook/codemod/issues/30 and https://github.com/facebook/codemod/issues/56. Also, unrelated but https://github.com/facebook/codemod/issues/59 should be closed as it is resolved.

Thanks!! Sorry for not providing feedback on this sooner, though! 😅
Overall this looks great! Unfortunately you'll have to rebase this in order to get it back into a mergeable state. I think #69 caused a merge conflict.

The only strange behavior I noticed with this change is that if you are invoking the program with a wildcard extension you need to add a comma for argparse to work

Strange indeed!! I suppose since that's now the default, there's no need for users to ever invoke the script with --extensions *, right? Also, could it be that the shell is doing something weird here? Does --extensions "*" behave any differently?
In any case, this looks great. Please rebase and I'll merge (or if you can't be bothered, I'll rebase it myself).
Thanks for pointing out #59 was already fixed--I closed it. 🙇

No problem, thanks for the review. When I opened this PR I did some digging and it looks like this script has a long history! Not sure when during that history you become the de facto maintainer haha.
I just rebase out one of my commits because it did the exact same thing as #69. Also running --extensions "*" works 👍 , but yeah I guess it doesn't really matter as it is the default and it probably won't ever be run with that arg.

Not sure when during that history you become the de facto maintainer haha.

The original maintainer no longer works at Facebook, and without a clear successor this repository was in danger of being archived. Still, several Facebook employees are die-hard users, and the maintenance burden is so low, so I figured: "why not?" 😅

I just rebased out one of my commits because it did the exact same thing as #69.

Oomph, my bad. I didn't realize, should have just cherry-picked that commit. Sorry!

Thanks, @keyan!! 💐


Fmm sdid

Description

This adds an error message if the now deprecated stationary block setting ("stationaryBlocks") is used. Also added a description to the settings to clarify its use for fuel management only.

Checklist

[ ] The code is understandable and maintainable to people beyond the author.
[ ] Tests have been added/updated to verify that the new or changed code works.
[ ] There is no commented out code in this PR.
[ ] The commit message follows good practices.
[ ] All docstrings are still up-to-date with these changes.

If user exposed functionality was added/changed:

[ ] Documentation added/updated in the doc folder.
[ ] New or updated dependencies have been added to setup.py.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

4 of 5 (80.0%)  changed or added relevant lines in 3 files are covered.
116 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.002%) to 83.574%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

armi/reactor/reactors.py
2
3
66.67%

Files with Coverage Reduction
New Missed Lines
%

armi/physics/fuelCycle/fuelHandlerInterface.py
8
81.03%

armi/physics/fuelCycle/fuelHandlers.py
108
80.62%

Totals

Change from base Build<PHONE_NUMBER>:
-0.002%

Covered Lines:
24513

Relevant Lines:
29331

💛  - Coveralls


Error catch bypass?

How do I bypass the default error handling and make my own? I would like to show the user an error message when they try to upload a file that is not an image. I see the error handling is in index.js but how do I access that to change it? It's not in my node modules folder in vs code.
Thanks!

You can use a try-catch block to wrap the function call and write you own error handling codes.
try {
    const compressedFile = await imageCompression(imageFile, options);
    console.log('compressedFile instanceof Blob', compressedFile instanceof Blob); // true
    console.log(`compressedFile size ${compressedFile.size / 1024 / 1024} MB`); // smaller than maxSizeMB

    await uploadToServer(compressedFile);
  } catch (error) {
    console.log(error);
    // write your own error handling
  }


Datacoves' dbt-core-interface improvements + new response

Various dbt-core-interface improvements in terms of code clarity.
Added response when .sqlfluff file is broken (Unfixable, unlintable)

Hey @RobertOstermann, could you review this? Thanks!

@RobertOstermann I don't have access to do so.


Errors in the notebook

I have an error when I run MealModel.ipynb from start to end on snellius with julia 1.8
Cell:
loss = make_loss(model, glucose_data, time, insulin_data, time, tg_data, time, nefa_data, time)
optimizer = LBFGS(linesearch = BackTracking(order=3))

# select bounds for the latin hypercube sampler
lhc_lb = [0.005, 0, 0, 0, 0, 60., 0.005, 0]
lhc_ub = [0.05, 1., 10., 1., 1., 720., 0.1, 1.]

# create preselected samples
initial_parameters = perform_preselection(model, loss, 100, lhc_lb, lhc_ub)

Error:
MethodError: no method matching perform_preselection(::MixedMealModel, ::MealModel.var"#_loss#24"{Float64, MixedMealModel, MealModel.var"#_error#35"{Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Vector{Int64}}, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}, Vector{Int64}, Vector{Float64}}, ::Int64, ::Vector{Float64}, ::Vector{Float64})
Closest candidates are:
  perform_preselection(::Any, ::Int64, ::Vector{<:Real}, ::Vector{<:Real}; selection_criterion, rng) at /gpfs/home6/scur0037/MealModel.jl/src/assimilation/LHCSampling.jl:1

Stacktrace:
 [1] top-level scope
   @ In[10]:9

From then on the rest of the cells can't succeed either because they depend on initial_parameters.

I've found the issue. Fixing it now.
I remember I changed the function signature of perform_preselection last minute, because I realised that model was unnecessary. Must've remained in the notebook in the old style. I modified the notebook code to:
initial_parameters = perform_preselection(loss, 100, lhc_lb, lhc_ub)

which should run now.


brew<EMAIL_ADDRESS>when is it coming

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

A detailed description of the proposed feature
May i know when is brew<EMAIL_ADDRESS>coming ?
The motivation for the feature
There are lot of features in terraform we can use specially foreach loop for module
How the feature would be relevant to at least 90% of Homebrew users
We can use new upgrade new terraform with new changes
What alternatives to the feature have been considered
To manually replace the terraform file

Homebrew includes only stable versions so the best place for you to know the general availability (GA) date for 0.13 would be the Terraform project itself.
Turns out the maintainers even have a tracking issue at https://github.com/hashicorp/terraform/issues/25016. Currently it says August 10 but the date may be postponed at their discretion.


Expanded widget not working properly on Android API 30

When using the Expanded widget inside a column with another widget it is taking up all the space, not just filling the available space as usual.
Simple build function for reproducing the problem:
Widget build(BuildContext context) {
    return Scaffold(
      key: _scaffoldKey,
      appBar: AppBar(
        title: const Text('Despesa'),
        centerTitle: true,
      ),
      body: Column(
          children: <Widget>[
            Expanded(
              child: Container(
                color: Colors.yellow,
              )
            ),
            ElevatedButton(child: Text('test button'), onPressed: () {}),
          ],
        ),
      );
  }

When testing the code above on API 29 or below it renders the following:

When testing the same code on API 30 it shows only the Expanded:

As stated by the Flutter documentation, the Expanded makes a child of a Row, Column, or Flex expand to fill the available space along the main axis, but on API 30 it seems to not be working properly.

@rafaelhks
Can you provide flutter doctor -v ? Can you also try by using SafeArea and see if you get same behavior ?


Question: How to Stream Data?

I'm not a Microsoft guy at all, I just have to implement a few things for a project but, of course, performance is terrible even when using transactions, multiple inserts per Exec, and with the smallest of datasets (which are being streamed over the network and piped to a csv.Reader).
I'm looking at "BULK INSERT" and it appears to only operate on files.
In searching I see people talking about IDataReader and CreateDataReader, but those appear to be .Net specific.
Any ideas on how to get performant streaming inserts?
My best guess is that maybe I should write out about 100mb at a time to a CSV file, Exec a BULK INSERT, and then remove it right after (assuming that it should block until the file has been read), and commit the transaction when however many gigs are uploaded.
Any sage advice?

Bulk insert is part of the protocol. There is a new doc I think that has some examples in the docs folder. Actually, it is in code review still. I will be there soon.
https://github.com/denisenkom/go-mssqldb/pull/457/files


Feature: ion-select using ion-picker-cmp

Would be nice to have the ion-select displaying the options in ion-picker-cmp, similar to the ion-datetime and similar to native
Ie: Display the options of a select like;

Which Ionic Version? 2

Hello! Thanks for using Ionic. I am going to close this issue as a duplicate of https://github.com/driftyco/ionic/issues/5424.


Disabled joining whilst mid-loading

Disable joining whilst loading into a map/loading out of a map to reduce occasions of desync.

Thanks!


puts no newline

Your puts implementation lacks newlines or carriage returns (\r\n)
here's the fix
serial_terminal_t* puts(const char* s) {
    serial_message(s);
    putc(0xa);
    return putc(0xd);
}

Unknown if you intended this, though.

puts shouldn't make newlines

Alright.


[Reactive] [multi tenant app] Provide admin consent support

Closing this issue, use task like in this issue instead: https://github.com/Azure/azure-sdk-for-java/issues/21581


AssertionError with --standalone & pydantic

See test below with develop, but I get the same error with 1.9
john@Johns-MacBook-Pro pydantic_test % ls -a
.       ..      main.py

john@Johns-MacBook-Pro pydantic_test % cat main.py
from pydantic import BaseModel

john@Johns-MacBook-Pro pydantic_test % python3 -m venv test_env

john@Johns-MacBook-Pro pydantic_test % ./test_env/bin/pip install "https://github.com/Nuitka/Nuitka/archive/develop.zip" pydantic
Collecting https://github.com/Nuitka/Nuitka/archive/develop.zip
  Using cached https://github.com/Nuitka/Nuitka/archive/develop.zip
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pydantic
  Using cached pydantic-2.5.2-py3-none-any.whl.metadata (65 kB)
Collecting ordered-set>=4.1.0 (from Nuitka==2.0rc1)
  Using cached ordered_set-4.1.0-py3-none-any.whl (7.6 kB)
Collecting zstandard>=0.15 (from Nuitka==2.0rc1)
  Using cached zstandard-0.22.0-cp311-cp311-macosx_11_0_arm64.whl.metadata (2.9 kB)
Collecting annotated-types>=0.4.0 (from pydantic)
  Using cached annotated_types-0.6.0-py3-none-any.whl.metadata (12 kB)
Collecting pydantic-core==2.14.5 (from pydantic)
  Using cached pydantic_core-2.14.5-cp311-cp311-macosx_11_0_arm64.whl.metadata (6.5 kB)
Collecting typing-extensions>=4.6.1 (from pydantic)
  Using cached typing_extensions-4.8.0-py3-none-any.whl.metadata (3.0 kB)
Using cached pydantic-2.5.2-py3-none-any.whl (381 kB)
Using cached pydantic_core-2.14.5-cp311-cp311-macosx_11_0_arm64.whl (1.7 MB)
Using cached annotated_types-0.6.0-py3-none-any.whl (12 kB)
Using cached typing_extensions-4.8.0-py3-none-any.whl (31 kB)
Using cached zstandard-0.22.0-cp311-cp311-macosx_11_0_arm64.whl (703 kB)
Building wheels for collected packages: Nuitka
  Building wheel for Nuitka (pyproject.toml) ... done
  Created wheel for Nuitka: filename=Nuitka-2.0rc1-cp311-cp311-macosx_14_0_arm64.whl size=3196800 sha256=9bc4ddd68a836acd0445d9ccdc7b08d26b2d13138d18ba9d6f43987b6eeafc8b
  Stored in directory: /private/var/folders/bg/ncfhn34x10b5m6cw_n_kr8580000gn/T/pip-ephem-wheel-cache-6m22vu0f/wheels/82/73/76/93e4e3aa0a95e81c5738b08ef30b6c118c24811ede4422a559
Successfully built Nuitka
Installing collected packages: zstandard, typing-extensions, ordered-set, annotated-types, pydantic-core, Nuitka, pydantic
Successfully installed Nuitka-2.0rc1 annotated-types-0.6.0 ordered-set-4.1.0 pydantic-2.5.2 pydantic-core-2.14.5 typing-extensions-4.8.0 zstandard-0.22.0

john@Johns-MacBook-Pro pydantic_test % ./test_env/bin/python -m nuitka --version
2.0rc1
Commercial: None
Python: 3.11.6 (main, Oct  2 2023, 13:45:54) [Clang 15.0.0 (clang-15<IP_ADDRESS>)]
Flavor: Homebrew Python
Executable: /Users/john/Git/pydantic_test/test_env/bin/python
OS: Darwin
Arch: arm64
Version C compiler: /usr/bin/clang (clang 15.0.0).

john@Johns-MacBook-Pro pydantic_test % ./test_env/bin/pip freeze
annotated-types==0.6.0
Nuitka @ https://github.com/Nuitka/Nuitka/archive/develop.zip#sha256=d0ef5ed0374d2cf984f23cd250c69213cf6c2ec7c457dc46e7cbcbfe5b933b44
ordered-set==4.1.0
pydantic==2.5.2
pydantic_core==2.14.5
typing_extensions==4.8.0
zstandard==0.22.0

john@Johns-MacBook-Pro pydantic_test % ./test_env/bin/python -m nuitka --standalone main.py
Nuitka-Options:INFO: Used command line options: --standalone main.py
Nuitka:INFO: Starting Python compilation with Nuitka '2.0rc1' on Python '3.11' commercial grade 'not installed'.
Problem with statement at main.py:1:
-> from pydantic import BaseModel

Nuitka:INFO: Interrupted while working on '<Node 'PYTHON_MAIN_MODULE' with {'filename': 'main.py', 'module_name': <ModuleName '__main__'>, 'main_added': False, 'mode': 'compiled', 'code_flags': ''}>'.
Nuitka-Reports:INFO: Compilation report written to file 'nuitka-crash-report.xml'.
PASS 1: 0.0%|                         | 0/1, __main__Traceback (most recent call last):
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/__main__.py", line 170, in <module>
    main()
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/__main__.py", line 156, in main
    MainControl.main()
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/MainControl.py", line 1116, in main
    _main()
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/MainControl.py", line 965, in _main
    main_module = _createMainModule()
                  ^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/MainControl.py", line 255, in _createMainModule
    optimizeModules(main_module.getOutputFilename())
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/optimizations/Optimization.py", line 344, in optimizeModules
    finished = makeOptimizationPass()
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/optimizations/Optimization.py", line 300, in makeOptimizationPass
    changed = optimizeModule(current_module)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/optimizations/Optimization.py", line 176, in optimizeModule
    changed = optimizeCompiledPythonModule(module)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/optimizations/Optimization.py", line 92, in optimizeCompiledPythonModule
    scopes_were_incomplete = module.computeModule()
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/nodes/ModuleNodes.py", line 549, in computeModule
    result = module_body.computeStatementsSequence(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/nodes/StatementNodes.py", line 149, in computeStatementsSequence
    new_statement = statement.computeStatementsSequence(trace_collection)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/nodes/FrameNodes.py", line 188, in computeStatementsSequence
    new_statement = trace_collection.onStatement(statement=statement)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/optimizations/TraceCollections.py", line 657, in onStatement
    new_statement, change_tags, change_desc = statement.computeStatement(self)
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/nodes/VariableAssignNodes.py", line 352, in computeStatement
    source = trace_collection.onExpression(self.subnode_source)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/optimizations/TraceCollections.py", line 643, in onExpression
    new_node, change_tags, change_desc = expression.computeExpressionRaw(self)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/nodes/ChildrenHavingMixins.py", line 11293, in computeExpressionRaw
    expression = trace_collection.onExpression(self.subnode_module)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/optimizations/TraceCollections.py", line 643, in onExpression
    new_node, change_tags, change_desc = expression.computeExpressionRaw(self)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/nodes/ChildrenHavingMixins.py", line 11524, in computeExpressionRaw
    return self.computeExpression(trace_collection)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/nodes/ImportNodes.py", line 1026, in computeExpression
    trace_collection.onModuleUsageAttempt(module_usage_attempt)
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/optimizations/TraceCollections.py", line 1152, in onModuleUsageAttempt
    decision, _reason = decideRecursion(
                        ^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/importing/Recursion.py", line 154, in decideRecursion
    Plugins.onModuleUsageLookAhead(
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/plugins/Plugins.py", line 1074, in onModuleUsageLookAhead
    plugin.onModuleUsageLookAhead(
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/plugins/standard/ImplicitImports.py", line 587, in onModuleUsageLookAhead
    sub_module_name = module_name.getChildNamed(sub_module_name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/utils/ModuleNames.py", line 211, in getChildNamed
    return ModuleName(".".join([self] + list(args)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/Git/pydantic_test/test_env/lib/python3.11/site-packages/nuitka/utils/ModuleNames.py", line 58, in __init__
    assert checkModuleName(value), value
AssertionError: pydantic.pydantic_core.
Nuitka-Reports:INFO: Compilation crash report written to file 'nuitka-crash-report.xml'. Please include it in your bug report.

had to add .txt to make github accept the file
nuitka-crash-report.xml.txt

I have the same error (

You are not using the latest version of Nuitka

You are not using the latest version of Nuitka

I'm confused. I initially ran the test with the latest version installed by pip install nuitka, which was at the time 1.9. I think I followed the instructions for submitting an issue, which includes the suggestion to try with develop, which I did. I got the same error & that experiment is what I shared above.
What did I do wrong? Which version should I have used?

I just tried again with 1.9 (same crash, as expected) and then with 1.9.1 and the bug seems fixed. Hooray! Thanks whoever fixed it.
I would like to know what I did wrong to have this bug report closed as invalid though, in case I need to report something again. I think I followed the instructions reasonably.

You reported against 1.9 while 1.9.1 was already out at the time.

And also, develop would have not shown the issue, had you tried it, as asked for in the issue template, although I tend to be very forgiving about skipping that, reports of issues already fixed in the current stable release are invalid by definition.

I reported about 12 hours before 1.9.1 was released (unless there's some timezone confusion happening?). I also did try develop, you can see that in what I posted, that is a copy-paste from my terminal showing me installing develop getting the error. Maybe there is something else going on, idk...

Ok, of course I can be totally wrong, and I didn't properly read it, once I was sure it's a solved issue. The me too post however was clearly wrong. In fact, this may well have been the issue that triggered the hotfix release with the fix. As you can imagine, I am getting a lot of less than optimal interactions in the GitHub. I corrected it.


Spread in History not pointing right way

Make any spread bet.
In history the +- is inverse of the actual bet
Example

-11.5 bet
shows as +11.5 in history

if outcome =5
"spreadPoints": 1150, * -1

if outcome =5
"spreadPoints": 1150, * -1


Machine learning

Description 📜
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Fixes #7489
Summary:
The audio serves as an introduction to object classification in ML. It also lists some classification techniques used and its applications.

Type of change 📝

[x] Audio (Should be in mp3 format Includes speech clarity, Concise ,Low distortion)
[ ] Vi#deo (Animations, screen-recordings, presentations and regular explanatory films are all possibilties etc)
[ ] Doc#umentation (Content Creation in the form of codes or tutorials)
[ ] Other (If you choose other, Please mention changes below)

Domain of Contribution 📊

[ ] Android Dev #(Flutter)
[ ] Android Dev #(Java)
[ ] Android Dev #(Kotlin)
[ ] Backend Dev #(Java)
[ ] Backend Dev #(.NET)
[ ] Backend Dev #(PHP)
[ ] Backend Dev #(Python)
[ ] C/#CPP
[ ] Competitive #Programming
[ ] Cyber #Security
[ ] DS#A
[ ] Data#base
[ ] Datascience with #Python
[ ] Datascience with #R
[ ] Frontend Dev #HTML/CSS/JS
[ ] Frontend Dev #React/Angular/Vue
[ ] Go#lang
[ ] Interview #Prep
[ ] Java_#Domain
[ ] JavaScript_#Domain
[ ] ME#RN
[x] Machine Learning
[ ] Open #Source
[ ] Python_#Domain
[ ] Ru#st
[ ] Statis#tics
[ ] UI/#UX

Checklist ✅

[x] I follow Contributing Guidelines & Code of conduct of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I'm GWOC'21 contributor

Screenshots / Gif (Optional) 📸

Can you check it now


Support yarn berry

Hello,
It seems yarn 2 still needs this. I started working on a version that only supports yarn berry: https://github.com/christophehurpeau/yarn-deduplicate/tree/wip-berry
My findings are:

use of @yarnpkg/parsers instead of @yarnpkg/lockfile. It also means that the packages are not split automaticly like it was the case in @yarnpkg/lockfile, so merging has to be handled manually
there is a new information before the version (I called it source, but not sure if it's the right name). In my lockfiles, it's almost awlays npm, except for different versions of resolve, like<EMAIL_ADDRESS>and other patched versions of resolve, like resolve<EMAIL_ADDRESS>
Do you plan to work on a berry version ?

yarn berry is under very active development,
I believe it will be possible to bake that into it

@scinos @rjatkins any thoughts on this? For v2/berry it could be designed as a plugin rather than a separate tool, so we could run yarn deduplicate instead of yarn-deduplicate. I.e. the approach of (the unmaintained?) https://github.com/eps1lon/yarn-plugin-deduplicate

It makes a lot of sense to use the new plugin framework.
I'll try to look into writing a plugin (or reviving https://github.com/eps1lon/yarn-plugin-deduplicate) soon, first I need to understand how the plugin system works and get my hands on a few yarn v2 repos with duplicated packages to test everything.
If anyone wants to start working on it meanwhile, it would be great :)

There is also this https://github.com/yarnpkg/berry/pull/1558

https://github.com/yarnplugins/yarn-plugin-deduplicate/issues/13
I hope we can reconsider this.
I'll raise a PR for it like https://github.com/ds300/patch-package/pull/507.

@JounQin note that I have working fork here https://github.com/christophehurpeau/yarn-deduplicate / https://www.npmjs.com/package/yarn-berry-deduplicate
I hope to convert it to a yarn plugin some day if this is still not implemented in yarn

@christophehurpeau Thanks for your information, but I'd like to raise a PR for yarn-deduplicate itself to support yarn v1 and v2+ at the same time~

Yarn V2+ supports yarn dedupe natively. What's the goal of adding support for V2 to this tool?

Yarn V2+ supports yarn dedupe natively. What's the goal of adding support for V2 to this tool?

It doesn't support --strategy fewer, yet.
See also https://github.com/yarnpkg/berry/issues/2297

Looks like nobody is opposed to add the fewer strategy to Yarn.
I haven't looked at the yarn dedupe code in ages, but, from memory, it was really similar to yarn-deduplicate. Meaning that implementing the strategy should be relatively easy.
I may have some time this week to have a look.

I may have some time this week to have a look.

Do you mean you want to work this this week? That would be great! I and my colleague were going to working on this feature also.


The project has been abandoned?

up

up

Hello, i find a good repo.  https://github.com/php-enqueue

up

up

up

up

Duplicate of #274


Ability for the app to read the connection status from the SDK while in WAITING_TO_RECONNECT state.

During normal condition, the  client device is connected to the iotHub and we transmit data as needed. We also receive Device Twin patch update whenever required.
From time to time, we lose the connection (ex WiFi out of range). An error message from the SDK is displyed on the output device.
The message reads:
ReconnectStage: DisconnectEvent received while in unexpected state - WAITING_TO_RECONNECT, Connected: False
Once the network is again available, the client eventually re-establishes the connection. All is well but we face a problem, especially when the disconnection last a very long period of time.
In order to take some disposition on the client side, it would be nice to know when the connection is "False".
ideally, we should be able to check the connection state from the IoTHubDeviceClient
Exemple:
IoTHubDeviceClient.isConnected()
which would return a boolean value True or False based on the "Connected" state.
Having this information would allow the application to buffer the MQTT messages until the connection is restored.
Alternative:
One alternative is connect and disconnect each time I need to send a message. That works, but not a full feature solution since it prevents from receiving ioTHub Device Twin Patch  events.

@pchevallier
Good news - the feature you ask for already exists. It is not a method, but an attribute you can check: .connected
e.g.
client = IotHubDeviceClient.create_from_connection_string("<your conn string>")
client.connect()

assert client.connected

Another option you may be interested in is using the .on_connection_state_change handler. You can define a function or coroutine yourself, and set it to the above attribute on the client. Your function will be called each time that the client connects or disconnects.
e.g.
client = IotHubDeviceClient.create_from_connection_string("<your conn string>")

def on_connection_state_change():
    if client.connected:
        print("Connected!")
    else:
        print("Disconnected!")

client.on_connection_state_change = on_connection_state_change

Do note however that no matter which way you go about it, if a connection drops it will take the client a short while to detect that this is the case (by default 60 seconds). You can modify this by providing a value (in seconds) to the optional keep_alive parameter at client instantiation

Thanks @cartertinney, that definitely fits the purpose.
Perhaps that could be documented accordingly in here:
https://docs.microsoft.com/en-us/python/api/azure-iot-device/azure.iot.device.iothubdeviceclient?view=azure-python

It is documented there, under the "attributes" section.