hotfix broken import stable_baselines

The tests in test_no_mpi.py didn't actually check whether we can import stable_baselines with MPI uninstalled because import stable_baselines simply loads stable_baselines from the sys.modules cache.
This PR uses a recursive reload of stable_baselines to ensure that each auto-imported file in the stable_baselines module can be loaded without error.

Now we correctly get an ImportError:
ImportError while importing test module '/home/steven/stable-baselines/tests/test_no_mpi.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_no_mpi.py:5: in <module>
    import stable_baselines
stable_baselines/__init__.py:7: in <module>
    from stable_baselines.td3 import TD3
stable_baselines/td3/__init__.py:3: in <module>
    from stable_baselines.ddpg.noise import NormalActionNoise, OrnsteinUhlenbeckActionNoise
stable_baselines/ddpg/__init__.py:1: in <module>
    from stable_baselines.ddpg.ddpg import DDPG
stable_baselines/ddpg/ddpg.py:12: in <module>
    from mpi4py import MPI
E   ModuleNotFoundError: No module named 'mpi4py'

The source of the error is a ddpg import (mpi4py) in stable_baselines/td3/__init__.py.
from stable_baselines.ddpg.noise import NormalActionNoise, OrnsteinUhlenbeckActionNoise

I patched this here by moving ddpg.noise to common.noise. This decouples *ActionNoise from the TD3 dependency.
Other possible solutions:

Removeddpg.noise.*ActionNoise imports from td3/__init__.py. (A quick git grep ActionNoise didn't show anything in the codebase accessing *ActionNoise via stable_baselines.td3.*ActionNoise.)
Only import *ActionNoise in td3 if mpi4py is installed.

Hello,
In fact, we had that discussion with @hill-a with the td3 pr. Moving to common is the best option i think.
For completely not breaking the api, you should keep the noise file in ddpg but import the noises from common in that file too.

Thanks for catching this mistake. The recursive reload seems quite complex. Ideally we'd just run that test in a fresh Python interpreter, but seems hard to do with pytest. I think a simpler solution is to delete stable_baselinesand all submodules fromsys.modules` as in https://stackoverflow.com/questions/45462374/mark-test-to-be-run-in-independent-process I've pushed a change that does this, but I may well have missed a subtlety, so feel free to revert if this is worse.

Thanks for catching this mistake. The recursive reload seems quite complex. Ideally we'd just run that test in a fresh Python interpreter, but seems hard to do with pytest. I think a simpler solution is to delete stable_baselinesand all submodules fromsys.modules` as in https://stackoverflow.com/questions/45462374/mark-test-to-be-run-in-independent-process I've pushed a change that does this, but I may well have missed a subtlety, so feel free to revert if this is worse.

Nice this simpler solution is working well!

It looks like there's a lot of breakage in seemingly unrelated tests from this. My guess is we somehow have different versions of imported stable_baselines floating around after this, which causes issues with uses of isinstance and issubclass.
Not sure how to fix this, unfortunately. Could try changing test_no_mpi to restore the original sys.modules at the end of the test.

I usually have that kind of error using jupyter notebook with autoreload when changing the modules that are imported into it.
So, unfortunately, a quick fix is to put it at the end, I would be happy if you have a better solution ;).

I usually have that kind of error using jupyter notebook with autoreload when changing the modules that are imported into it.
So, unfortunately, a quick fix is to put it at the end, I would be happy if you have a better solution ;).

Restoring sys.modules seeems to have fixed it

@shwang do you want to update the docs? I think then we can merge.

@AdamGleave : Should be good now. Thanks for the reminder


[Bug]: When I add the same email id multiple times on the share modal and click invite, the API responds with multiple users with the same info

Is there an existing issue for this?

[X] I have searched the existing issues

Description
When I add the same email id multiple times on the share modal and click invite, the API responds with multiple users with the same info.
Thread: https://theappsmith.slack.com/archives/C02K2MZERSL/p1697201766174849
Steps To Reproduce

Go to any Appsmith instance
Open share modal for a workspace
Add an email, eg<EMAIL_ADDRESS>multiple times in the text field
Select a role and click invite
Notice the response of the API. It returns same number of users with exactly same info, instead of returning just 1 user info.

Public Sample App
No response
Environment
Production
Issue video log
No response
Version
Cloud / Self Hosted - latest

This looks like a good first issue, I can take it up. The approach would be simple, filter for unique users before entering the inviteUsers business logic.
If some other solution has to implemented let me know

It is displayed only once now , closing the isssue


[BUG] Items don't display correct tab while searching

In the search tab, items show up as being in different tabs than what they're meant to be. For example, searching "sword" and hovering over the swords shows them as being in the "Food & Drinks" tab.
I'm using the Amended resource pack as well.

Minecraft Version: 1.19.2
Modloader: Forge
Mod Loader Version: 43.2.8
Mod Version: 1.2.0

This is a known issue with the mod. The idea was to address this along with any bugs that popped up in the 1.19.3/4 version, of which there are a couple now.

Fixed with 1.2.1


Feature: add progress callbacks for methods that download models

Is your feature request related to a problem? Please describe.
The problem is poor user experience when downloading models with Model.get_model_path or Model.download. None of these methods provide any feedback at all nor expose argument that allow for such feedback to be implemented by the developer.
Describe the solution you'd like
Expose arguments to hook in the download process. There are multiple possible solutions:

expose a single progress_callback(current, total) where total and current refers to the entire model folder, not just a single file.
expose two callbacks, one for logging the number of files that were downloaded and one for the current file being downloaded.

Hi @janluke - Would you be able to specify the SDK that you are referring to in this feature request?
(I'm assuming that it is the same as #21740.)

https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.model(class)?view=azure-ml-py

Is azureml closed-source?

Closing legacy issue. @janluke AzureML SDK v2 is open source. Please create a different issue if you have the same ask for v2 Python SDK.
Please consider upgrading to AzureML v2 CLI/SDK. https://learn.microsoft.com/en-us/azure/machine-learning/concept-v2

Isn't Model still part of the Python SDK for v2?

Okay, I guess in v2 you use the Model class from azure.ai.ml: https://learn.microsoft.com/en-us/python/api/azure-ai-ml/azure.ai.ml.entities.model?view=azure-python


[FR] Jump to the End of a word

Please see Jump to the End of a word.

I will be handling this differently.  Closing.


Not overridable variable

Describe the bug
As you can see here, the $clr-table-fontsize variable is not declared as !default so there sadly is no way to override it properly. This is the only variable in this file not declared as !default, is it normal?
Expected behavior
The $clr-table-fontsize should be declared as !default.
Versions
App

Angular: 8
Node: 12
Clarity: 2.0.1

Maybe this is not the only variable declared without !default.


Ignore RSA multi-prime JSON Web Keys

RSA keys can have more than two primes. This is known as a multi-prime key. Currently, this project will parse a multi-prime RSA key as if it were a normal RSA key with only two primes. This is a bug according to this section of the RFC: https://www.rfc-editor.org/rfc/rfc7518#section-<IP_ADDRESS>

Actually, since this package doesn't deal with marshaling private keys, there is no bug.


Question 3. Missing declaration of 'emp1', 'emp2', 'emp3' and 'displayIncreasedSalary'

emp1, emp2, emp3 and displayIncreasedSalary are all mentioned in the explanation of the example in question 3, but not actually mentioned in the example

thanks! I will fix it!

I rewrote the question 3 completely, I hope it's clearer now!


180 cleanup for 195

Description

This issue handles points 3, 4, 5, 6 from #180
Does not fully fix any issues, only partially #180
This issue should be marked as closed once #195 is merged.
Motivation and Context

Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Test configuration details:

OS: Windows 10
Python version: Python 3.9.16
Java version: N/A
Python management system: MiniConda

Advice for reviewer

Checklist:

[x] My code follows the intended structure of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

Additional comments

Hi @r-leyshon . Point 5 as addressed in you review comment above is fixed in this PR. More specifically, this line of code.


Don't require () TypeInfo for schema language methods

The as_schema_language and as_parser_document methods are currently only implemented when QueryT::TypeInfo = () (and the same for MutationT and SubscriptionT). This requirement is superfluous, so we can just move these methods to the other impl block that doesn't have these constraints on TypeInfo.

Hmm, it looks like the failing actions are also broken on master. Let me know if I should take another look.

Thanks for the pr! 🍻 . Sorry it took so long to merge.

Yep, I plan to do it tonight!

This is now released on crates.io


Android - No OpKernel was registered to support Op 'Cos' with these attrs.  Registered devices: [CPU], Registered kernels:                                                                                [[Node: stft/hann_window/Cos = CosT=DT_FLOAT, _device="/device:CPU:0"]]

I've exported a model to Android that uses :
stfts = tf.contrib.signal.stft(transwav, frame_length=2048, frame_step=512,
fft_length=2048,window_fn=functools.partial(tf.contrib.signal.hann_window, periodic=False), pad_end=True)
the model works properly in pyhton
but when i load it in Android using the downloaded compiled tensorflow - compile 'org.tensorflow:tensorflow-android:+'
I get this error -
FATAL EXCEPTION: main
Process: org.tensorflow.demo, PID: 25836
java.lang.IllegalArgumentException: No OpKernel was registered to support Op 'Cos' with these attrs.  Registered devices: [CPU], Registered kernels:
 	 [[Node: stft/hann_window/Cos = CosT=DT_FLOAT, _device="/device:CPU:0"]]
which comes from the hann_window
any recommended work around?

This is a very common issue with Android development. You need to make sure all the kernels you need are in your build. Please check StackOverflow and search Google for similar issues.

Please note that C++ kernels use a registration pattern.

I have recompiled libtensorflow_inference.so with print_selective_registration_header
and i see in the ops_to_register.h file the Cos OP -
...
constexpr inline bool ShouldRegisterOp(const char op[]) {
return false
|| isequal(op, "Add")
|| isequal(op, "BatchToSpaceND")
|| isequal(op, "CTCBeamSearchDecoder")
|| isequal(op, "Cast")
|| isequal(op, "Complex")
|| isequal(op, "ComplexAbs")
|| isequal(op, "ConcatV2")
|| isequal(op, "Const")
|| isequal(op, "Conv2D")
|| isequal(op, "Cos")
|| isequal(op, "DecodeWav")
|| isequal(op, "Exp")
|| isequal(op, "ExpandDims")
|| isequal(op, "Fill")...
there for it should be compiled into the libtensorflow_inference.so
but i still get the same error message when trying to run the model in my android app

@eli99999 Please let me know if this help.

@bobeo thanks,
I looked into it, and it seems that there is  a problem with the bazel compilation
i changed the models a few time and then did the ops_to_register.h process,
each time the ops_to_register.h file changed but the libtensorflow_inference.so  does not.
I tried all sort of bazel clean and bazel dump, and not chaned the resulted  libtensorflow_inference.so
so i think that either there is some issue with the bazel caching or that the  bug is in the print_selective_registration_header process
i'm working on ubuntu 16.04
bazel 0.7.0
tf 1.4

I've answered a similar question on StackOverflow: https://stackoverflow.com/questions/49116833/no-opkernel-was-registered-to-support-op-cos-when-running-inference-on-android
Apparently, you might need to "hack" the BUILD file, according to one of the TensorFlow developers: https://github.com/tensorflow/tensorflow/issues/11804#issuecomment-318415228


Dev

Implement the whole app functionality and match the wireframe design

No need for review since the app was fully reviewed on our original repository.


[Build scripts] Update maven publishing

This is a tentative to bring the publish scripts to Kotlin and to the newmaven-publish plugin.
The new tasks should be:

publishMavenPublicationToMavenLocal to publish to ~/.m2
publishMavenPublicationToUnitTestRepository to publish to $rootProject/build/localMaven for plugin unit tests.
publishMavenPublicationToOssRepository to publish snapshots
bintrayUpload doesn't change

This should hopefully fix https://github.com/apollographql/apollo-android/issues/1823 although I haven't tested since it requires a bintray upload.

I wonder if it is possible to publish a SNAPSHOT version to try it out.

Same here 🙋♂🙂 . Every commit on master pushes to sonatype so we'll see quite fast if the SNAPSHOTS still work...

Looks liked it worked well: https://travis-ci.org/apollographql/apollo-android/builds/622706218
Is there a way to verify the upload time of a snapshot ?


callback function not called on ESP32

Hi,
I'm using JPEGDEC to decode a jpeg file in a ESP32.
I have defined the following callback function:
int callback_jpeg(JPEGDRAW *pDraw) {
  Serial.println("CALLBACK");
  return 1;
}

And I'm passing it to jpeg.open, that reads the image from a file.
JPEGDEC jpeg;
File file = SPIFFS.open(TMP_IMAGE_PATH, "r");
boolean decoded = jpeg.open(file, callback_jpeg); // callback function registered here
if (decoded) {
  Serial.printf("Image size: %d x %d", jpeg.getWidth(), jpeg.getHeight());
}

The image is successfully decoded because I see this output:
Image size: 1280 x 960

However, the callback function is never called (I don't see the "CALLBACK" output). What could be the reason? It should be supported according to https://github.com/bitbank2/JPEGDEC#the-callback-functions= but I am not able to get it to work.
Thank you for your time!

From your example, you haven't invoked the decoder. Opening the file just parses the header. You need to call decode() to get the decoder to run. Please see the example code.

Thanks, it worked. I could have been looking at it for days...


MSSyncTable.m and other Offline Sync files missing from repository.

The WindowsAzureMobileServices.framework source appears to still be the previous version (pre Sync Tables version)
Can you please update the WindowsAzureMobileServices.framework so it contains all the code for the MSSyncTables.
Thanks

While offline for iOS is in beta, the beta framework source is in the offline branch, https://github.com/Azure/azure-mobile-services/tree/offline.
When it goes to GA it will be merged into the Dev & Master branches.


Provide a Flatpak/Submit to Flathub

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

[X] I'm requesting a feature unrelated to a specific site
[X] I've looked through the README
[X] I've verified that I have updated yt-dlp to nightly or master (update instructions)
[X] I've searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue

Provide a description that is worded well enough to be understood
First off, thank you for this great project!
Atomic systems like Fedora Silverblue are commonly designed around using flatpaks as the primary, if not only, way of installing software, leaving users unable to use yt-dlp. There are some graphical programs available on Flathub that use yt-dlp, but they are limited in how much you can do compared to the command line. I believe the project should either build a flatpak or make a submission request to Flathub to allow affected users the ability to use this software.
Flatpak also helps provide a standardized environment for users; what works on one system should work exactly the same on another. This might help weed out issues that are from distros/users rather than the project.
I have written a preliminary manifest that someone can use as a start if there is interest:
downloaders.yaml.txt
org.yt_dlp.yt_dlp.yaml.txt
python3-modules.yaml.txt
I am willing to answer any questions about this to the best of my ability.
Provide verbose output that clearly demonstrates the problem

[ ] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[ ] If using API, add 'verbose': True to YoutubeDL params instead
[ ] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
No response

i'm running fedora silverblue, you can already run the yt-dlp release binary and flatpak isn't that well designed for gui apps

This is not something I would be interested in maintaining, but I'd like to hear from the other maintainers

Why not provide the flatpak yourself?
General philosophy is that all packaging should be done third party and only the release binaries are officially maintained.

from flathub:

App developers can submit their apps to be distributed to Flathub's growing user base, thus providing a single gateway to the entire Linux desktop ecosystem.
Some apps have a checkmark on the app page under the developer name. This means the app is published on Flathub by its original developer or a third party approved by the developer.
Some apps are published by third parties that are unaffiliated with the original developer. This is allowed, but such apps are not eligible for the checkmark.

If a flatpak is submitted to flathub by a third party, we will not officially approve it nor we will claim any affiliation with it, since then we would need to consistently monitor it and it would be no less work than maintaining it ourselves.
If none of the other maintainers want to take this on, then you can feel free to submit an unofficial flatpak.

In case you didn't see it, the manifest sources the necessary python dependencies from the python3-modules file.

Ah, I just took a quick glance and missed that. Looking over the python3-modules, I'm noticing that the curl-cffi version included is not supported (only 0.5.10 is currently supported by yt-dlp)

For us to support a package,

The update process must be fully automated
Someone needs to be willing to maintain any future breakages

This is why we used to provide brew taps, but dropped it when the contributor in charge of maintaining it disappeared.
Since flathub recommends manual checking before each release, it's probably not suitable for us to maintain.
If that is a non-issue, and you are volunteering to help us maintain it in case of future breakages, then we can support it.
Honestly, I think the needed coordination is more work than it's worth just to get marked as "official", but your choice


Automated cherry pick of #4844

Cherry pick of #4844 on release-5.20.

#4844: Wrap list elements in a span

/cc  @ethervoid

Creating a new SpinWick test server using Mattermost Cloud.

Mattermost test server created! :tada:
Access here: https://mattermost-webapp-pr-4872.test.mattermost.cloud

Account Type
Username
Password

Admin
sysadmin
Sys@dmin123

User
user-1
User-1@123

Test server destroyed


Use ADD instead of Curl

Use ADD instead of Curl to download Terraform.
Fixes https://rules.sonarsource.com/docker/RSPEC-7026/

Why did you only change terraform and did leave TFLINT as is?

Because of the necessary redirect, but seems like ADD can handle this as well.


net/wireguard: Reworked widget

The old WireGuard widget was there, but honestly wasn't providing much information:

So I decided to rework it. It now looks like this:

Following to note:

When WireGuard is disabled, nothing will appear.
Disabled Locals or Peers are not shown. If they are disabled, they will disappear on the next refresh cycle.
The data is refreshed via AJAX every 10 seconds.
When there is one Interface with 2 Peers, there're 2 entries in the table (see 2x wg4 and end4 and end5 entries)
The code sometimes looks a bit complicated - but the handshakes are retrieved from the CLI with only 1) the interface name, 2) the public key of the peer. So to get more details from the WireGuard configuration, I had to do some matching. The matching is based on 1) searching the same interface, 2) and then matching the public key. Works fine.

It also works just fine on my production firewall:

Looks better than #1970 so thanks for that :)

Ok for me, but can we stick to naming "Endpoint" for now? Explaining in other PR #3116

Done!

Looks better than #1970 so thanks for that :)

Wasn't aware there was another attempt in the past. I've added the idea of showing "Never connected" instead of "0000-00-00 00:00:00+00:00" in the UI. I think that's more user-friendly.
My initial attempt had "Online" and "Offline" tags in the widget. But I don't find a clever way determining if the WireGuard interface is up, or not. I know that WG/UDP is connection-less and therefore difficult to check.
My idea initial idea was to check if the handshake was missing too long to consider it down, but after reading the WireGuard documentation how often handshakes appear ("every few minutes") and how this works in detail, I think it's not worth adding such complexity in 'just' a widget.

resolves #3056

Any further changes you would like to see here, @fichtner?
Would be cool to see my PRs, if possible, in the next release so I don't need to fear about my manual changes on my production-lab-firewall to be overwritten.

I have applied this patch and tested it and it works fine. However, I would still like to see the first couple of characters of the public key, like it was before.
The benefit would be: This would give you a mapping between "nice name" and peer which is handy when working on the command line.

The widget shows the interface name which is the same on the CLI. That's IMHO enough and most user-friendly way in identifying it on the backend?

If you have a one interface <-> one peer setup, then yes, I'd agree. However, I have multiple peers per interface and in that case you can only match peers by their pubkey, hence I asked.

@fichtner The input from @Curly060 is a good one. So I'm not sure if I can make those changes before deadline/next patch release, as I only have time later today. I guess we'll keep that one for next patch release?

If you want to make changes to this PR it's better to leave this open indeed

Based on @Curly060's input I've added the public key to the widget. On 1900px width it looks like:

It looks a bit crowded. Not sure if we should:

Truncate it and only show first x characters.
Require to click/move mouse on the public key to see the full public key
Use a smaller font just for the public key
Leave it as it is

Any suggestions?

1+2 would be my opinion

Yep would be really nice

Now looking like with 1900px width:

I'm truncating the public key to 19 characters + the three dots. So we end up with 22 characters, which is half the length of the key (including the dots).
I've just used the boring title="bla" browser-feature to show it during mouseover. Is that fine? Any more visual appealing suggestions?

Nice, also adding the following might make it a bit more appealing:
data-toggle="tooltip"

I tried that attribute, but didn't change it visually. If that's still fine, I think it might be ready to merge.
When is the next OPNsense release where all those changes could be shipped with? The other changes for frr and wireguard also seem to have been too short-term for the recent one.

Merged, thanks! Tooltip doesn’t work because scripts don’t pick it up after page load because data is filled later on. I’ll take a look…
reallistically in two stable releases, one for devel test and one for production. If code changes are light might make it into next stable.

It's almost perfect, but unfortunately the table is now broken when you make the browser window smaller in width:

This did not happen before. I didn't have time to look what causes this and maybe someone with better frontend skills than me should have a look.

Known problem. It’s really not solvable forcing too little screen width for too much text.

@patschi possibly related to your change https://forum.opnsense.org/index.php?topic=30916.0


Bug: Inkbar colors since MUI-update

The inkbar color doesn't work anymore since the update to the newest MUI.

(the bottom bar used to be gold)
That results in this error in the console:

Issue is related to this breaking change in MUI:
https://github.com/mui-org/material-ui/pull/10457
same thing for search-inkbar in the header

Show how to do it in current version of MUI here under customized input: https://material-ui-next.com/demos/text-fields/

Thank you @NickyMeuleman ! I will work on this soon.
If anyone else wants to take this one, that is OK with me too.

This has been fixed!


Could you add an easy possibility for retrieving unrestangularized data?

First of all, I love Restangular, I'm used to be very happy with it. I then encountered this problem and I am aware that this has been discussed before (s. issue #100) and I am also aware of the solution proposed in the FAQ (https://github.com/mgonto/restangular#how-can-i-access-the-unrestangularized-element-as-well-as-the-restangularized-one).
However, I still have an issue with that:
My application is an analysis and reporting tool which receives its data via Restangular from a REST resource. The problem is that I expect many many data events coming. The solution proposed in the FAQ effectively doubles the volume of data which the Javascript app has to hold. This might not be an issue for most apps, but it is for mine.
That being said, I am unhappy with Restangular turning:
[
    {
        "data1":0.75,
        "data2":2.0,
        ... <<many more>>...
        "data100":1.45
    },
    {
        "data1":0.83,
        "data2":2.1,
        ... <<many more>>...
        "data100":1.65
    }
]

into:
[
    {
        "data1":0.75,
        "data2":2.0,
        ... <<many more>>...
        "data100":1.45,
        "originalElement":{
            "data1":0.75,
            "data2":2.0,
            ... <<many more>>...
            "data100":1.45
        },
        "route":"/data",
        "reqParams":null,
        "fromServer":"localhost:8083",
        "parentResource":null,
        "restangularCollection":false
    },
    {
        "data1":0.83,
        "data2":2.1,
        ... <<many more>>...
        "data100":1.65,
        "originalElement":{
            "data1":0.83,
            "data2":2.1,
            ... <<many more>>...
            "data100":1.65
        },
        "route":"/data",
        "reqParams":null,
        "fromServer":"localhost:8083",
        "parentResource":null,
        "restangularCollection":false
    }
]

I am voting strongly for some kind of switch or additional parameters to the fetch methods (one() getList()) or whatever to let the user choose on a per-resource basis whether the response should be restangularized or not. After all, in my special case:

retrieve a whole lot of data
I don't want to write the data back
I don't want to change the data
I don't need to remember the request info

... I simply want the data fetched as efficient as possible - and I would not like an responseInterceptor doubling the volume of the data, which could lead to performance issues in my SPA.
I hope this does not sound rude - I think you guys did/do a terrific job. But if you would add such functionality, I think it would quite help to stretch the application scenarios for Restangular.
Currently I am thinking about requesting such mass data with ngResource of $http instead of Restangular - but I would not like to.

There is an easy way to do this. Just use the plain() method on your response. Took me forever to find this since it's not in the docs. Something like this hooked to an ng-click worked for me:
$scope.showData = function () {
  baseUrl.post(someData).then(function(response) {
    console.log(response.plain());
  });
};

Thanks a lot @elliotec. Your answer has saved me a lot of time :)

Side note -> Plain should be documented. Thanks @juanchavezlive  and @elliotec .

Agreed @grabbou. I've updated the readme in pull request #1049, hopefully it gets merged and can help others looking for this.

Ok. Although @mgonto probably is going to kill me, I am merging that PR as it's only a readme update :)


[code-infra] Automate canary releases

Added a GitHub Action to run the canary publish script after each commit to master or next.
Additionally, changed the versioning pattern to include the original prerelease specifier (so 6.0.0-alpha.0 will become 6.0.0-alpha.0-dev..., not 6.0.0-dev... as before).
Unfortunately, I don't see a way to test it in PR, as workflows triggered from PRs don't have access to secrets. I also can't enable manual triggers, as the workflow file needs to be on default branch to be enabled. I tested the access token locally and it publishes without errors. I guess we'll have to test in production...

I changed the action to be only triggered manually, as we agreed on.


HTTP Error 429: Too Many Requests

Checklist

[ x] I'm reporting a broken site support issue
[x ] I've verified that I'm running youtube-dl version 2019.07.02
[ x] I've checked that all provided URLs are alive and playable in a browser
[ x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x ] I've searched the bugtracker for similar bug reports including closed ones
[x ] I've read bugs section in FAQ

Verbose log
youtube-dl https://www.youtube.com/watch?v=s3O1Xro7oAI --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://www.youtube.com/watch?v=s3O1Xro7oAI', u'--verbose']
WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2019.07.02
[debug] Python version 2.7.13 (CPython) - Linux-4.9.184-xxxx-std-ipv6-64-x86_64-with-debian-9.9
[debug] exe versions: ffmpeg 4.1.2, ffprobe 4.1.2, phantomjs 2.1.1
[debug] Proxy map: {}
[youtube] s3O1Xro7oAI: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 429: Too Many Requests (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 627, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 2227, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 467, in error
    result = self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 654, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

Description
Hello, since tonight I can no longer download youtube video, I get this message and this from several different servers.
Could you help me ? Thank you

Same since 1 hour. Same as closed https://github.com/ytdl-org/youtube-dl/issues/21700
With a total of 90 servers times 4 ip addresses at the same time all reporting 429.

Works again.... I didn't understand everything. @hedii

Not anymore....


Need to centralize balance values on the Receive page on Android devices.

Need to centralize balance values on the Receive page on Android devices.
Tested on Version 1.35.1-3 (2325)
Devices:
Samsung A80 // Android 10
Samsung S20 FE // Android 11
Attachements:

@TomasGonzalez
The issue is not reproduced.
Tested on:
Version 1.35.16 (2328) PROD
Version 1.35.1-3 (2325) DEV
Devices:
Samsung A80 // Android 10
Samsung S20 FE // Android 11


Best Practices for implementing APIs (on both client and server side)

Background
During today's meeting, we discussed an issue that can happen with compatible API changes, when the client doesn't follow our guidelines strictly. Specifically, if a client does an update via a GET / edit / PUT sequence, if implemented naively (by ignoring unknown fields after GET), data in fields unknown to the client will get lost.
Our guidelines in rule 108 already cover this case, though only mentioned in a sub-clause:

Be tolerant in processing and reading data of API responses, more specifically service clients must be prepared for compatible API extensions of response data:

Be tolerant with unknown fields in the payload (see also Fowler’s "TolerantReader" post), i.e. ignore new fields but do not eliminate them from payload if needed for subsequent PUT requests.

(Highlight by me.)
Problem
We don't give any guidance on how to implement this, and we suspect that many clients in fact do not implement it this way.
The naive way of implementing it would map the JSON object from the GET to a domain object (e.g. a Java POJO), then apply the edits on that domain object, then map the domain object back to a JSON object for sending it via PUT.
Suggested solution
We have a section with best practices and examples for how to implement specific use cases in various programming languages (optimally covering all ones on ADOPT in our tech radar, but let's start with e.g. Java.)

Idea: add a section in the "Best Practices" appendix, which has some language-independent text and a short summary for how to do this with Java/Jackson, inspired by internal PR.

@a1exsh Given that you've written this already in the Java-docs, would you like to contribute this?

Sure! :)


NP-660: use systemd-resolved in CoreDNS configmap

systemd-resolved conf is used by kubelet as alternative
dns resolver when exists. This commit aligns the DNS
Corefile conf with kubelet resolvConf when default
systemd-resolved config is detected.

/lgtm

/retest

/retest

/hold cancel

/retest

/retest


feat: support kwargs in compile

This PR should fix
https://github.com/ibis-project/ibis-substrait/issues/384

Alias is also an issue. I checked with ibis-framework==2.0.0 (which should be supported according to the pyproject.toml) and got this running unit tests:
E   AttributeError: module 'ibis.expr.operations' has no attribute 'Alias'

Thanks for the PR @icexelloss and sorry about the 3.0 breakage -- I have a fix that (I think) should maintain functionality across 3.x, testing that locally now.  If you can trim this down to the kwargs passthrough I'm happy to merge this in

Thanks @gforsyth I trimmed down to just supporting kwargs

Looks good @icexelloss !  Just need to drop the capital letter on your commit message (commitlint is very picky).
feat: support kwargs in compile

Updated commit message and PR title

Hmm - looks like some style issue - I probably don't have the proper environment setup (would be good to have a doc for developers / pre-commit hook setup).

Trying to set up my dev environment - didn't see docs in this repo so I was trying to follow the ibis one to setup nix-shell.. I assume that is the right way to dev ibis-substrait as well?

Hey @icexelloss -- for now, you just need to run black to fix the formatting error in CI.
I know the developer docs here are nonexistent, I'll try to something together later this week.

kk fixed style - let's see if this works this time

Hey @icexelloss -- can you squash down your lint fixes?  That's what's failing the commit linter.

squashed and rebased - see if better luck this time

Thanks @gforsyth for the help!


EatingAnimation Compat

EatingAnimation is now compatble with CITResewn, pls change your fabric.mod.json ඞ

yep yep


TST add sparse group lasso testing against GSROPTIM

for the record, if one want s to compare against gsrpotim (by Eugene Ndiaye), here's a script showing that we get the same results:
from skglm.utils.data import make_correlated_data
from skglm.datafits import QuadraticGroup
from skglm.penalties import WeightedL1GroupL2
from skglm import GeneralizedLinearEstimator
from skglm.utils.data import (make_correlated_data, grp_converter)
from skglm.solvers import GroupBCD

from gsroptim.sgl import sgl_path

import numpy as np

n_features = 30
n_samples= 40
X, y, _ = make_correlated_data(n_features=n_features, n_samples=n_samples, random_state=0)

grp_indices, grp_ptr = grp_converter(3, n_features)
n_groups = len(grp_ptr) - 1

alpha = 0.1
weights_g = np.ones(n_groups, dtype=np.float64)
# beware of tau in GSR optim implem: need to scale alpha by 2
res = sgl_path(X, y, size_groups=[3] * n_groups, lambdas=[alpha*2 * n_samples], omega=weights_g)[0]

weights_f = 1. * np.ones(n_features)
pen = WeightedL1GroupL2(
    alpha=alpha, weights_groups=weights_g,
    weights_features=weights_f, grp_indices=grp_indices, grp_ptr=grp_ptr)

solver = GroupBCD(ws_strategy="fixpoint", verbose=3,
                    fit_intercept=False, tol=1e-10)

model = GeneralizedLinearEstimator(
    QuadraticGroup(grp_ptr, grp_indices), pen, solver=solver)

model.fit(X, y)
print(model.coef_.reshape([-1, 3]))
print(res.reshape([-1, 3]))

gsroptim requires a bit of work to install on the CI but it's doable

@wassimmazouz maybe you can have a look
install gsrtopim in the test requirement of pyproject.tom by adding "gsroptim@git+https://github.com/EugeneNdiaye/Gap_Safe_Rules/"  to the list of requirements for test
then one needs to install Cython I reckon


Fix typo

Javascript -> JavaScript

Learn Build status updates of commit f9dbca1:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/postgresql/flexible-server/concepts-extensions.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

Looks good; thanks, @changeworld


CLIMATE-657 - Adding functions to calculate metrics

Remove metrics.SpatialMeanOfTemporalMeanBias
Add metrics.SpatialPatternTaylorDiagram
Add functions calc_bias, calc_stddev, calc_stddev_ratio, calc_correlation, calc_rmse
Update test_metrics.py

Merged build triggered. Test Failed.

Merged build started. Test Failed.

Merged build finished. Test Passed.

Merged build triggered. Test Failed.

Merged build started. Test Failed.

Merged build finished. Test Passed.

Truthfully @huikyole I don't see how managing this in a different branch is too complicated. The changes aren't dependent upon each other in any way so the branches don't even need to be merged together while you're doing your work right?
# Notice the thing to fix, make new JIRA for it
git checkout master
git checkout -b CLIMATE-<new ticket id>
# make the quick changes and commit
git push github CLIMATE-<new ticket id>
# make PR

And you're back to working on your old issue in just a few minutes. Worst case is there's some minor merge conflict here that takes all of 5 seconds to fix when you go to merge the PR. Concerns are easily separated then and we're not burying changes in unrelated tickets. There's also no reason to just remove the test and not the relevant metric, and that's big enough of a change to be in its own ticket I would think.

Merged build triggered. Test Failed.

Merged build started. Test Failed.

Merged build finished. Test Passed.


Luigi memory consumption causing spark jobs to crash

Hey guys,
Just discovered that when running luigi with spark, found my jobs were failing due to OOM errors. When running the same job without luigi in spark, the job succeeds successfully.
Spark jobs with large data sets fail when running via luigi. Small spark jobs relative to cluster size succeed when running through luigi.
Cheers!
Cory

We're not using spark for luigi at Spotify. So I can't help this time. :)
I think you'll have to dig through the code and see if something strange is going on. Btw, are the OOM exceptions locally or on the cluster?

The OOM are occurring on the cluster

Aha I see. I have no idea how luigi could be related to that

I have not used luigi with spark myself yet, but have intention in doing so, hence this issue is quite relevant to my interest.
@cqnguyen could you provide a code example of how you use SparkSubmitTask, PySparkTask or luigi.contrib.pyspark_runner (I am assuming you are using one of those).
Also how much memory do the executors in your cluster have?
From looking at the code the most critical parts of the code are:

https://github.com/spotify/luigi/blob/master/luigi/contrib/pyspark_runner.py#L43 (I would add before the pickle.load something that prints out the pickle file so that you can inspect if it's too big and why)

https://github.com/spotify/luigi/blob/master/luigi/contrib/spark.py#L366, I am not sure exactly how addFiles works, but it may be worthwhile looking in here too

Furthermore to help in debugging you should also print out the available memory on the executor by adding something like:
print(sc._conf.get('spark.executor.memory'))

in your main.

Ha, I just ran into this issue.
Here is some debug log output in case somebody can help me look into this issue:
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate<PHONE_NUMBER> bytes for committing reserved memor
y.
# Possible reasons:
#   The system is out of physical RAM or swap space
#   In 32 bit mode, the process size limit was hit
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Use 64 bit Java on a 64 bit OS
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (os_linux.cpp:2745), pid=8799, tid=139924741879552
#
# JRE version:  (7.0_71-b14) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.71-b01 mixed mode linux-amd64 compressed oops)
# Core dump written. Default location: /home/hadoop/ooni-pipeline-ng/core or core.8799
#

---------------  T H R E A D  ---------------

Current thread (0x00007f42bc016000):  JavaThread "Unknown thread" [_thread_in_vm, id=8804, stack(0x00007f42c478f000,0x00007f42c4890000)]

Stack: [0x00007f42c478f000,0x00007f42c4890000],  sp=0x00007f42c488e230,  free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x9a0a1a]  VMError::report_and_die()+0x2ea
V  [libjvm.so+0x4974bb]  report_vm_out_of_memory(char const*, int, unsigned long, char const*)+0x9b
V  [libjvm.so+0x81e4de]  os::Linux::commit_memory_impl(char*, unsigned long, bool)+0xfe
V  [libjvm.so+0x81ea29]  os::pd_commit_memory(char*, unsigned long, unsigned long, bool)+0x29
V  [libjvm.so+0x8187da]  os::commit_memory(char*, unsigned long, unsigned long, bool)+0x2a
V  [libjvm.so+0x88b2e3]  PSVirtualSpace::expand_by(unsigned long)+0x53
V  [libjvm.so+0x879f73]  PSOldGen::initialize(ReservedSpace, unsigned long, char const*, int)+0x103
V  [libjvm.so+0x29a593]  AdjoiningGenerations::AdjoiningGenerations(ReservedSpace, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)+0x3e3
V  [libjvm.so+0x83f325]  ParallelScavengeHeap::initialize()+0x4d5
V  [libjvm.so+0x97295a]  Universe::initialize_heap()+0xca
V  [libjvm.so+0x973b29]  universe_init()+0x79

[snip]

/proc/meminfo:
MemTotal:       15407772 kB
MemFree:         1157972 kB
MemAvailable:    1240180 kB
Buffers:            3324 kB
Cached:           229348 kB
SwapCached:            0 kB
Active:         13968580 kB
Inactive:          35192 kB
Active(anon):   13771120 kB
Inactive(anon):       20 kB
Active(file):     197460 kB
Inactive(file):    35172 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:              5152 kB
Writeback:             0 kB
AnonPages:      13771196 kB
Mapped:            40692 kB
Shmem:                40 kB
Slab:              68052 kB
SReclaimable:      26784 kB
SUnreclaim:        41268 kB
KernelStack:       15176 kB
PageTables:        57576 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     7703884 kB
Committed_AS:   50820668 kB
VmallocTotal:<PHONE_NUMBER>7 kB
VmallocUsed:       37740 kB
VmallocChunk:<PHONE_NUMBER>1 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:    15736832 kB
DirectMap2M:           0 kB

CPU:total 4 (16 cores per cpu, 2 threads per core) family 6 model 62 stepping 4, cmov, cx8, fxsr, mmx
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 62
model name      : Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
stepping        : 4
microcode       : 0x415
cpu MHz         : 2500.112
cache size      : 25600 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes

So from the looks of it I'm running out of 16GB of RAM. Is this normal?
This is the spark task I am running: https://github.com/TheTorProject/ooni-pipeline-ng/blob/master/pipeline/batch/spark_apps.py#L134

I continue to have a hard time seeing how luigi could relate to this. First, luigi is just running a given command line when shelling out to spark (I assume), second, the failure is on the cluster, the jobs running there don't know about luigi, right? Last, I've heard over and over again that spark is still a bit beta and that it's suddenly starts to hog memory.
Now with this said, the problem can still be with luigi of course, but it wouldn't be the first place I would look at when debugging this.

Yes you are probably right, I probably would not have opened a ticket on luigi if I hadn't already found one present here.
By doing some finer tuning of the amount of workers I used I was able to run my spark queries just fine on the same cluster.
As a rule of thumb I would say use 1 worker * the number of nodes in your cluster (I previously had a number of workers that was more than double that).
The luigi code specific to spark does indeed support your claim that it doesn't do much apart from packaging the dependencies and running the spark-submit command with the dependencies + the task script.
I think this can be closed.

Cool, but don't hesitate to open if you find something. :)


BLE Server Get RSSI, MAC, Name etc

Hello everyone,
I want to do something that  seems  really elemental to a server, but at this point I'm not available to do.
I want my BLE server to report, the RSSI, MAC and name of connected devices (first 2 most of all). The scan is not good for me, I need to know which ones are connected.
It seems that the function get RSSI is implemented in the client side (which I don't need) is there a way of doing this. I've seen a post that does the following (https://github.com/nkolban/esp32-snippets/issues/893), but is not working for me, the values of that gives are apparently random, (RSSI and MAC, are very different from the scan).
I want to call a function, lets say myserver.getRssi() or simply getRssi(), and have the RSSI and mac of a device connected to me. At this stage only one client is connected.  I do not understand how this libraries work yet, and how to move functions around, so any tips on that regard will be appreciated.
(I'm working on a robot that follows this signal).
#include <BLEUtils.h>
#include <BLE2902.h>
#include <BLEScan.h>
String valor;
int aleatorio1;
int aleatorio2;
String alea1;
String alea2;
String alea3;
#define SERVICE_UUID        "4fafc201-1fb5-459e-8fcc-c5c9c331914b"
#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8"
//para el servicio 2
#define SERVICE2_UUID        "45ecddcf-c316-488d-8558-3222e5cb9b3c"
#define CHARACTERISTIC2_UUID "4a78b8dd-a43d-46cf-9270-f6b750a717c8"
int data;
int LED_BUILTIN = 2;
bool deviceConnected = false;
int CUTOFF = -60;
class myServerCallback : public BLEServerCallbacks {
void onConnect(BLEServer* pServer, esp_ble_gatts_cb_param_t *param) {
char remoteAddress[18];

sprintf(
  remoteAddress,
  "%.2X:%.2X:%.2X:%.2X:%.2X:%.2X",
  param->connect.remote_bda[0],
  param->connect.remote_bda[1],
  param->connect.remote_bda[2],
  param->connect.remote_bda[3],
  param->connect.remote_bda[4],
  param->connect.remote_bda[5]
);

ESP_LOGI(LOG_TAG, "myServerCallback onConnect, MAC: %s", remoteAddress);
Serial.println("onConnect");
Serial.println(remoteAddress);
deviceConnected = true;

}
void onDisconnect(BLEServer* pServer, esp_ble_gatts_cb_param_t *param) {
char remoteAddress[20];

sprintf(
  remoteAddress,
  "%.2X:%.2X:%.2X:%.2X:%.2X:%.2X",
  param->disconnect.remote_bda[0],
  param->disconnect.remote_bda[1],
  param->disconnect.remote_bda[2],
  param->disconnect.remote_bda[3],
  param->disconnect.remote_bda[4],
  param->disconnect.remote_bda[5]
);

ESP_LOGI(LOG_TAG, "myServerCallback onDisconnect, MAC: %s", remoteAddress);

deviceConnected = false;

}
};
class MyCallbacks: public BLECharacteristicCallbacks {
void onWrite(BLECharacteristic *pCharacteristic) {
std::string value = pCharacteristic->getValue();
if (value.length() > 0) {
    valor = "";
    for (int i = 0; i < value.length(); i++){
      // Serial.print(value[i]); // Presenta value.
      valor = valor + value[i];
    }

    Serial.println("*********");
    Serial.print("valor = ");
    Serial.println(valor); // Presenta valor.

    if(valor == "off") { //esto puede ser moverse adelante por ejemplo
     digitalWrite(LED_BUILTIN, LOW);
     Serial.println("LED turned on OFF");
    pCharacteristic->setValue(alea1.c_str()); // Pone el numero aleatorio
      }
    if(valor == "on") {
      digitalWrite(LED_BUILTIN, HIGH);
     Serial.println("LED turned on");
    pCharacteristic->setValue("LED turned on"); // Pone el numero aleatorio
      }
    if(valor == "r") {
      pCharacteristic->setValue(alea3.c_str());

    }//en if
  }
}

};
static void my_gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t* param) {
Serial.print("RSSI status");
Serial.println(param->read_rssi_cmpl.status);
Serial.print("RSSI ");
Serial.println(param->read_rssi_cmpl.rssi);
Serial.print("Address ");
Serial.println(BLEAddress(param->read_rssi_cmpl.remote_addr).toString().c_str());
}
void setup() {
Serial.begin(115200);
pinMode (LED_BUILTIN, OUTPUT);//pin y su salida
BLEDevice::init("Hide&Seek");// nombre del dispositivo bl
BLEServer *pServer = BLEDevice::createServer(); // Create the BLE Server
BLEService *pService = pServer->createService(SERVICE_UUID);
BLECharacteristic *pCharacteristic = pService->createCharacteristic(
CHARACTERISTIC_UUID,
BLECharacteristic::PROPERTY_READ |
BLECharacteristic::PROPERTY_NOTIFY |
BLECharacteristic::PROPERTY_WRITE
);
pServer->setCallbacks(new myServerCallback());
pCharacteristic->setCallbacks(new MyCallbacks());
BLEDevice::setCustomGapHandler(my_gap_event_handler);
pCharacteristic->setValue("Iniciado.");
pCharacteristic->addDescriptor(new BLE2902());
pService->start();
BLEAdvertising *pAdvertising = pServer->getAdvertising();
pAdvertising->start();
}
void loop() {
delay(1000);
aleatorio1 = random(1,50); // Crea el numero aleatorio.
alea1 = (String) aleatorio1; // Lo convierte en String.aleatorio
aleatorio2 = random(100,200); // Crea el numero aleatorio.
alea2 = (String) aleatorio2; // Lo convierte en String.aleatorio
//alea3 = alea1 + "," + alea2;
//  BLEScan *scan = BLEDevice::getScan();
//  scan->setActiveScan(true);
//  BLEScanResults results = scan->start(1);
//  int best = CUTOFF;
//          Serial.print("---------NUEVO ESCANER-------------------- ");
//            Serial.print('\n');
//          for (int i = 0; i < results.getCount(); i++) {
//            BLEAdvertisedDevice device = results.getDevice(i);
//
//            int rssi = device.getRSSI();
//            if ("Pixel 3a XL"==device.getName()) {
//              alea3=device.getName().c_str()+(String)device.getRSSI();
//              }
//            Serial.print("----------------------------- ");
//            Serial.print('\n');
//            Serial.println(device.getName().c_str());
//            Serial.println((String)device.getRSSI());
//            Serial.println(device.getAddress().toString().c_str());
//            Serial.print('\n');
//            if (rssi > best) {
//             best = rssi;
//            }//endif
//          }//endfor
delay(15000);

After a while I manage to do it:
class myServerCallback : public BLEServerCallbacks {//get the address for example after conection happens
void onConnect(BLEServer* pServer, esp_ble_gatts_cb_param_t *param) {

memcpy(&peerAddress, param->connect.remote_bda, 6); //this way youll have the peerdevice  addres
}
};
static void my_gap_event_handler(esp_gap_ble_cb_event_t  event, esp_ble_gap_cb_param_t* param) {
ESP_LOGW(LOG_TAG, "custom gap event handler, GAP event: %d", (uint8_t)event);
Serial.print("RSSI from gap event"); //be carefull with the speed you ask for the rssi if you have problems
rssi2=param->read_rssi_cmpl.rssi;
Serial.println(rssi2);
}

hi, i tried using this but im getting an error that peerAddress was not declared in this scope, i need to do the same thing, get the rssi of the client connected to my esp, can you please help me on this im new to the ble concept

After a while I manage to do it: class myServerCallback : public BLEServerCallbacks {//get the address for example after conection happens
void onConnect(BLEServer* pServer, esp_ble_gatts_cb_param_t *param) {

memcpy(&peerAddress, param->connect.remote_bda, 6); //this way youll have the peerdevice addres
} }; static void my_gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t* param) { ESP_LOGW(LOG_TAG, "custom gap event handler, GAP event: %d", (uint8_t)event);
Serial.print("RSSI from gap event"); //be carefull with the speed you ask for the rssi if you have problems rssi2=param->read_rssi_cmpl.rssi; Serial.println(rssi2);
}

I also got the same error like KanaJayy, What should i do to solve this problem ?

@hoangducnghi2207 did you get it to work?

I dont remember anything about what I did here, it was to long ago. Here I leave you with the full project so you can check it out. https://github.com/TheUruguayo/BLE-ESP32-tracking-robot
I made a robot that tracks you using BLE.
Hope it helps

I will unsubscribe to this so I will not get further emails about it. If anyone has issues that have no answer my recomendation is to read the documentation.


"CommError, Whoa, you found a bug." when uploading files to misconfigured wandb local

Weights and Biases version: 0.9.5
Python version: 3.7.8
Operating System: Linux

Description
I am trying to set up wandb local. I entered the machine's address on the admin page (in the format http://<ip>:8080), but now due to network topology I am trying to log to that instance using an ssh tunnel: the machine where I am running training code has its local port 8080 forwarded to the 8080 port of the machine where wandb local is running. When I tried to log something to wandb, I got errors like
wandb: ERROR Error uploading "wandb-events.jsonl": CommError, Whoa, you found a bug.
wandb: ERROR Error uploading "wandb-history.jsonl": CommError, Whoa, you found a bug.
wandb: ERROR Error uploading "output.log": CommError, Whoa, you found a bug.
...

I traced the error to this line. Adding a print(err) statement next to it, I got a more meaningful error message as follows:
403 Client Error: Forbidden for url: http://<ip>:8080/local-files/<team>/sample-project/2j7f41g6/output.log?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=<random string>%3D%3D%2F20200819%2Fwandb-local%2Fs3%2Faws4_request&X-Amz-Date=20200819T155213Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=<some long hash>

I see two unrelated problems here:

The true error message is suppressed. Instead, a useless Whoa, you found a bug is printed.
The wandb instance always expects that clients connect to it using the same hostname. This might not be the case due to weird network restrictions.

Thanks @dniku we're working on a new SDK release with better error messages.  Should be out in a couple weeks.  The local hostname issue is something we're tracking and hope to address soon as well.  I'll keep this ticket open and update once we've addressed both issues.

I also ran into this error, but for a different reason: the storage on the server had been exhausted.

In the past year we've majorly reworked the CLI and UI for Weights & Biases. We're closing issues older than 6 months. Please comment to reopen.


[Performance]: Questions about Distributed Inference: A comparison of the two deployment approaches

Misc discussion on performance
When deploying two GPUs for a vllm service, there are two approaches. The first method involves starting two ports and services, with one vllm service running on each GPU, and using Nginx to implement load balancing. The second approach entails starting a single port and service, utilizing tensor_parallel_size=2, and distributing the model weights across different GPUs. Which of these methods is better, and why?
This problem has been bothering me, I need your help, thank you.

If the model is too large to fit in single GPU, then you have to use tensor_parallel_size. If not, start two vllm on two GPUs would be better. tensor_parallel_size=2 requires communication between GPUs, which is quite expensive and complicated.

If the model is too large to fit in single GPU, then you have to use tensor_parallel_size. If not, start two vllm on two GPUs would be better. tensor_parallel_size=2 requires communication between GPUs, which is quite expensive and complicated.如果模型太大而无法放入单个 GPU，则必须使用 tensor_parallel_size .如果没有，在两个 GPU 上启动两个 vllm 会更好。 tensor_parallel_size=2 需要GPU之间的通信，这非常昂贵和复杂。

Thank you for answering my questions.


feat(*): Set PACKAGE_NAME and PACKAGE_VERSION as the user-agent header in BAPI requests

Description
Changes:

Update @clerk/backend test builds to use tsup to supporting testing with build-time constants
Replace Clerk-Backend-SDK header with User-Agent for all server Clerk packages
Add Clerk package version for each SDK in User-Agent header

Checklist

[ ] npm test runs as expected.
[ ] npm run build runs as expected.
[ ] (If applicable) JSDoc comments have been added or updated for any package exports
[ ] (If applicable) Documentation has been updated

Type of change

[ ] 🐛 Bug fix
[ ] 🌟 New feature
[ ] 🔨 Breaking change
[ ] 📖 Refactoring / dependency upgrade / documentation
[ ] other:

Packages affected

[ ] @clerk/backend
[ ] @clerk/chrome-extension
[ ] @clerk/clerk-js
[ ] @clerk/clerk-expo
[ ] @clerk/fastify
[ ] gatsby-plugin-clerk
[ ] @clerk/localizations
[ ] @clerk/nextjs
[ ] @clerk/clerk-react
[ ] @clerk/remix
[ ] @clerk/clerk-sdk-node
[ ] @clerk/shared
[ ] @clerk/themes
[ ] @clerk/types
[ ] build/tooling/chore

!snapshot

Hey @nikosdouvlis - the snapshot version command generated the following package versions:

Package
Version

@clerk/backend
0.38.0-snapshot.v944b9de

@clerk/fastify
0.7.0-snapshot.v944b9de

gatsby-plugin-clerk
4.5.0-snapshot.v944b9de

@clerk/nextjs
4.30.0-snapshot.v944b9de

@clerk/remix
3.2.0-snapshot.v944b9de

@clerk/clerk-sdk-node
4.14.0-snapshot.v944b9de

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/backend
npm i<EMAIL_ADDRESS>--save-exact

@clerk/fastify
npm i<EMAIL_ADDRESS>--save-exact

gatsby-plugin-clerk
npm i<EMAIL_ADDRESS>--save-exact

@clerk/nextjs
npm i<EMAIL_ADDRESS>--save-exact

@clerk/remix
npm i<EMAIL_ADDRESS>--save-exact

@clerk/clerk-sdk-node
npm i<EMAIL_ADDRESS>--save-exact

!snapshot

Hey @nikosdouvlis - the snapshot version command generated the following package versions:

Package
Version

@clerk/backend
0.37.2-snapshot.v790818f

@clerk/fastify
0.6.31-snapshot.v790818f

gatsby-plugin-clerk
4.4.33-snapshot.v790818f

@clerk/nextjs
4.29.3-snapshot.v790818f

@clerk/remix
3.1.15-snapshot.v790818f

@clerk/clerk-sdk-node
4.13.6-snapshot.v790818f

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/backend
npm i<EMAIL_ADDRESS>--save-exact

@clerk/fastify
npm i<EMAIL_ADDRESS>--save-exact

gatsby-plugin-clerk
npm i<EMAIL_ADDRESS>--save-exact

@clerk/nextjs
npm i<EMAIL_ADDRESS>--save-exact

@clerk/remix
npm i<EMAIL_ADDRESS>--save-exact

@clerk/clerk-sdk-node
npm i<EMAIL_ADDRESS>--save-exact


[APIM 1.10] Memory leak in HazzleCast.

There is a memory leak from Hazzlecast and that is occurring due to a known issue [1] in the TCPIpConnectionManager of Hazzlecast. This is fixed in all the latest versions of Hazzlecast and the fix is not available in APIM 1.10.  The pull request for the fix is available at [2].
[1]- https://github.com/hazelcast/hazelcast/issues/6199
[2]- https://github.com/hazelcast/hazelcast/pull/6200

We have provided a patch to update hazelcast version to 3.5.3 in APIM 1.10
The latest version 3.2.0 uses hazelcast_3.12.2.wso2v1.jar which has the above fix.


Fix a bug that ClusterSet status is no longer updated

r.Update() will only update Spec but not status. Revert the change
back to update status only.
Update the ClusterSet's ClusterID in ClusterSet's reconciler.
Refine test codes for leader ClusterSet controller.

/test-multicluster-e2e

In commit description:

r.Update() will only update Spec but not status, revise the logic to update the Spec first

Change ", revise" -> ". Revise".

Hi @jianjuns could you help to move forward? I'd like to back port this to v1.13. Thanks.

/test-multicluster-e2e
/test-all

Hi @jianjuns could you help to move forward? I'd like to back port this to v1.13. Thanks.

Please make sure all required tests are passed.

@jianjuns sure, thanks for triggering all other tests, I double checked that all required tests are passed now.


Support multi-modal items

Currently we consider items as texts or images. But in some real world applications an item may be presented as a set of arbitrary number of images, texts and even categorical or continuous features. For example, in e-commerce an item in catalog may include a few images, a few text fields and some other variables. The idea is to implement Dataset and Model that support may support such kind of data.

A few links that may be useful:

Watch and Buy: Multimodal Product Identification Challenge 2021
Workshop on Open-Domain Reasoning Under Multi-Modal Settings 2023
Shopee - Price Match Guarantee


Firebase Authentication Redirect Not Working Due To Service Worker

I'm having the problem as described in this issue.
TDLR;
The auto generated service worker won't allow hosted firebase applications to redirect when the /__/auth/ url path is hit. This path is essential for firebase authentication.
I recommend providing a service worker prebuild file or excluding the /__/ path from falling back to the index page.

we need to add navigateFallbackWhitelist, here so it takes care of the /__/auth/ as well.
@developit @lukeed @rkostrzewski any thoughts?

Adding this navigateFallbackWhitelist: [/^(?!\/__).*/], after navigateFallback in here will do the work.
Will make a PR if this is good to go

@reznord sounds good to me.


client_secret  issue

all the steps in the  readme are great  i was not able to figure the  client_secret  , the link provided for more details (https://developer.ffdcdev.fusionfabric.cloud/documentation/oauth2-grants) is broken,
Please help

try https://developer.fusionfabric.cloud/

Readme updated


a command for changing the channel whitelist

basically %whitelist [add/remove] <mention>
writing it as an issue here so that i don't forget

Solved in https://github.com/okbuddyhololive/project-cybertard/commit/07325a0fa8374bdb0ee69be9fe2fc7a6b8a23636


nbt data not working

the command
/give @s wares:delivery_agreement{title:'{"text":"A Great Deal"}',requestedItems:[{id:"minecraft:emerald", Count: 4, display:{Name:'{"translate":"item.minecraft.diamond"}'}}],paymentItems:[{id:"minecraft:emerald",Count:1}],ordered:10}

gives me an agreement with regular emeralds

display needs to be a property in the item tag:
/give @s wares:delivery_agreement{title:'{"text":"A Great Deal"}',requestedItems:[{id:"minecraft:emerald", Count: 4, tag:{display:{Name:'{"translate":"item.minecraft.diamond"}'}}}],paymentItems:[{id:"minecraft:emerald",Count:1}],ordered:10}

Ah i see, I followed the example

I've fixed the example. Thanks.

sidenote, it's anoying that github wikis don't have an edit button at the top to make a pr like code has, feels like it should lol


Add Extend > Snippets docs page

Exploring a new docs Extend page for capturing snippets of things folks would probably like to see in the core but aren't popular enough or important enough to make it into the main project.

Components

[x] #33285: Light buttons

Utilities

[x] Extended and responsive width/height
[ ] Responsive borders
[x] Responsive position

Preview: https://deploy-preview-33627--twbs-bootstrap.netlify.app/docs/5.1/extend/snippets/

@mdo use darker background on hover, not lighter. Similar to list group items.

@mdo use darker background on hover, not lighter. Similar to list group items.

@Kopyov it's all about bootstrap mixins list-group, buttons
customize it based on your needs
@import "~/bootstrap/scss/functions";
@import "custom-var";

@import "~/bootstrap/scss/variables";
@import "~/bootstrap/scss/mixins";
@import "~/bootstrap/scss/utilities";

/* custom mixin */
@import "./mixins/buttons";
@import "./mixins/pagination";
/* custom mixin End */

@import "modify-theme";
@import "modify-utilities";

@import "~/bootstrap/scss/root";
@import "~/bootstrap/scss/reboot";
@import "custom-reboot";
@import "~/bootstrap/scss/type";
@import "~/bootstrap/scss/images";
@import "~/bootstrap/scss/containers";
@import "~/bootstrap/scss/grid";
@import "~/bootstrap/scss/tables";
@import "~/bootstrap/scss/forms";
@import "~/bootstrap/scss/buttons";
@import "~/bootstrap/scss/transitions";
@import "~/bootstrap/scss/dropdown";
@import "~/bootstrap/scss/button-group";
@import "~/bootstrap/scss/nav";
@import "~/bootstrap/scss/navbar";
@import "~/bootstrap/scss/card";
@import "~/bootstrap/scss/accordion";
@import "~/bootstrap/scss/breadcrumb";
@import "~/bootstrap/scss/pagination";
@import "~/bootstrap/scss/badge";
@import "~/bootstrap/scss/alert";
@import "~/bootstrap/scss/progress";
@import "~/bootstrap/scss/list-group";
@import "~/bootstrap/scss/close";
@import "~/bootstrap/scss/toasts";
@import "~/bootstrap/scss/modal";
@import "~/bootstrap/scss/tooltip";
@import "~/bootstrap/scss/popover";
@import "~/bootstrap/scss/carousel";
@import "~/bootstrap/scss/spinners";
@import "~/bootstrap/scss/offcanvas";
// Helpers
@import "~/bootstrap/scss/helpers";

// Utilities
@import "~/bootstrap/scss/utilities/api";

/* rtl:begin:ignore */
@import "./custom-theme";
/* rtl:end:ignore */

@mdo @XhmikosR
Hi,
in Modal component we have responsive classes modal-fullscreen-sm-down, modal-fullscreen-md-down, ...
how to do the same for Offcanvas
just like navbar-expand{-sm|-md|-lg|-xl|-xxl}

I almost always add asterisks to the labels for required fields…
label.required::after {
  content: '*';
  color: $danger;
}

@mdo Just to let you know, the text color of btn-light-light doesn't pass on WCAG AA test.
https://color.a11y.com/ContrastPair/?bgcolor=fefefe&fgcolor=7c7d7d
(Love the idea of adding these multiple snippets)

Closing as stale, gotta pick my battles 😬


Generate data required in issue 140

Regarding issue 140.
@NealHumphrey @jkwening
DONE (@ilissablechwapo @HLKwon @ncclementi):

Able to generate CSV file with total housing and bedroom units in a specific zone (ie. ward, zip, anc, census, etc.).
csv file is created in data/processed/zoneUnitCount.
the current python file that creates the csv file runs like a script, cama.py located in python/housinginsights/sources.
Was able to ingest the csv file to create the table in the local DB by following the instructions in the load data tutorial.

TO DO:

Will refactor the code in the coming weeks in order to be able to run in load_data.py (@HLKwon @ncclementi)

Will request to close the issue once the code is refactored.

Hi @HLKwon , @ncclementi @ilissablechwapo - thanks for your work on this!
I'll review this weekend - sorry, been focused on front end stuff the past couple daysy. It would be great to include this data set in V1. As noted in your 'TODO', we definitely want to refactor it so that it works with load_data.py. But, assuming I don't see any logic issues I will probably merge into 'dev' even if it does not yet do this; that way we can include the data in V1 and make sure that it is ready to work with load_data.py (and thus be able to be updated automatically) for V2.

@NealHumphrey @HLKwon I figured out how to push to Louis fork, I'm deleting this files that I assume were generated while testing the docker locally. Same with the other files that look they weren't needed. I assume that all these files were added by mistake because of the use of git add .


The metrics jobs are lasting to long

Closing since the issue is no longer happening. It was related to a db index maintenance action.

thanks for investigating


Improvements

Does not fail horribly if metrics.yml file does not exist.
Create report graph on git environment (i.e. local env, not a PR) and compare to master branch by default, except if CIMETRICS_TARGET_BRANCH env var is set.
Sort metrics on plot alphabetically (for now).

/azp run

Merging this now as I believe that the feedback has been addressed and some changes are necessary for CCF. Will continue further improvements/refactoring in further PRs.


Cannot launch pod in GKE: ReadWriteMany not supported

I'm working my way towards installing ngshare alongside z2jh in a GKE environment. As I went through the instructions (thanks for the excellent documentation!), I am unable to get the ngshare pod running, and it seems to have to do with the fact that the persistent volume cannot be provisioned. The pod never starts up, and when I check on the storage in the google cloud console, I get the the following for the ngshare-pvc:
Failed to provision volume with StorageClass "standard": invalid AccessModes [ReadWriteMany]: only AccessModes [ReadWriteOnce ReadOnlyMany] are supported
To get here, I followed the instructions up to and including Configuring Z2JH to Work with ngshare, and I do see ngshare in the services menu in my JupyterHub account, but clicking on it understandably gives me a 503. I have not yet patched my DockerFile, since it doesn't seem I can even get ngshare to function at all.
In my little research thus far, it looks like GCE doesn't allow ReadWriteMany for PVCs. Is this something that can be handled in the configuration of ngshare, or do I need to go on a GKE spirit journey to learn more about persistent storage with google cloud?

You don't need ReadWriteMany. Add the following to the helm values:
pvc:
  accessModes:
    - ReadWriteOnce

It was ReadWriteMany by default half due to a bug and half due to us
wanting to make ngshare highly available (but we dropped that eventually).
There should be no problems creating the PVC as ReadWriteOnce.
BTW, you can see a list of all the helm values you can specify (and their
defaults) here.
On Sun, Jan 17, 2021, 7:14 PM Bill Wolf<EMAIL_ADDRESS>wrote:

I'm working my way towards installing ngshare alongside z2jh in a GKE
environment. As I went through the instructions (thanks for the excellent
documentation!), I am unable to get the ngshare pod running, and it seems
to have to do with the fact that the persistent volume cannot be
provisioned. The pod never starts up, and when I check on the storage in
the google cloud console, I get the the following for the ngshare-pvc:
Failed to provision volume with StorageClass "standard": invalid
AccessModes [ReadWriteMany]: only AccessModes [ReadWriteOnce ReadOnlyMany]
are supported
To get here, I followed the instructions up to and including Configuring
Z2JH to Work with ngshare
https://ngshare.readthedocs.io/en/latest/user_guide/install_z2jh.html#configuring-z2jh-to-work-with-ngshare,
and I do see ngshare in the services menu in my JupyterHub account, but
clicking on it understandably gives me a 503. I have not yet patched my
DockerFile, since it doesn't seem I can even get ngshare to function at all.
In my little research thus far, it looks like GCE doesn't allow
ReadWriteMany for PVCs. Is this something that can be handled in the
configuration of ngshare, or do I need to go on a GKE spirit journey to
learn more about persistent storage with google cloud?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/LibreTexts/ngshare/issues/138, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABMRGPGXWANKF22GVZ2U3I3S2ORSDANCNFSM4WGUVCOQ
.

You don't need ReadWriteMany. Add the following to the helm values:
pvc:
  accessModes:
    - ReadWriteOnce

It was ReadWriteMany by default half due to a bug and half due to us
wanting to make ngshare highly available (but we dropped that eventually).
There should be no problems creating the PVC as ReadWriteOnce.
BTW, you can see a list of all the helm values you can specify (and their
defaults) here.
On Sun, Jan 17, 2021, 7:14 PM Bill Wolf<EMAIL_ADDRESS>wrote:

I'm working my way towards installing ngshare alongside z2jh in a GKE
environment. As I went through the instructions (thanks for the excellent
documentation!), I am unable to get the ngshare pod running, and it seems
to have to do with the fact that the persistent volume cannot be
provisioned. The pod never starts up, and when I check on the storage in
the google cloud console, I get the the following for the ngshare-pvc:
Failed to provision volume with StorageClass "standard": invalid
AccessModes [ReadWriteMany]: only AccessModes [ReadWriteOnce ReadOnlyMany]
are supported
To get here, I followed the instructions up to and including Configuring
Z2JH to Work with ngshare
https://ngshare.readthedocs.io/en/latest/user_guide/install_z2jh.html#configuring-z2jh-to-work-with-ngshare,
and I do see ngshare in the services menu in my JupyterHub account, but
clicking on it understandably gives me a 503. I have not yet patched my
DockerFile, since it doesn't seem I can even get ngshare to function at all.
In my little research thus far, it looks like GCE doesn't allow
ReadWriteMany for PVCs. Is this something that can be handled in the
configuration of ngshare, or do I need to go on a GKE spirit journey to
learn more about persistent storage with google cloud?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/LibreTexts/ngshare/issues/138, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABMRGPGXWANKF22GVZ2U3I3S2ORSDANCNFSM4WGUVCOQ
.

You don't need ReadWriteMany. Add the following to the helm values:
pvc:
  accessModes:
    - ReadWriteOnce

It was ReadWriteMany by default half due to a bug and half due to us wanting to make ngshare highly available (but we dropped that eventually). There should be no problems creating the PVC as ReadWriteOnce.
BTW, you can see a list of all the helm values you can specify (and their defaults) here.
(Reposted due to email replies not supporting markdown)

You don't need ReadWriteMany. Add the following to the helm values:
pvc:
  accessModes:
    - ReadWriteOnce

It was ReadWriteMany by default half due to a bug and half due to us wanting to make ngshare highly available (but we dropped that eventually). There should be no problems creating the PVC as ReadWriteOnce.
BTW, you can see a list of all the helm values you can specify (and their defaults) here.
(Reposted due to email replies not supporting markdown)

Awesome, and thanks for the clarification. I saw that I could configure pvc.accessModes, but my mind was still stuck thinking of ngshare as a shared database, so it didn't even occur to me to change it up. Now I just need to get the default nbgrader_config.py files updated by my dockerfile and I'll be good to go!

Awesome, and thanks for the clarification. I saw that I could configure pvc.accessModes, but my mind was still stuck thinking of ngshare as a shared database, so it didn't even occur to me to change it up. Now I just need to get the default nbgrader_config.py files updated by my dockerfile and I'll be good to go!


Deleting Messages does no longer work

Build tool used:

[x] Arudino
[ ] Platformio (Visual Studio Code plugin)
[ ] Platformio CLI
[ ] Other

Board used (ESP32/ESP8266/Arudino):

[ ] ESP8266-based
[x] ESP32-based

Other Libraries That are used:

Description of problem:
After updating from library version 1.5.2 to 1.5.5 I noticed, that I can no longer delete messages. In order to ensure the problem was not in my code I reproduced the problem with a slightly adapted version of the Delete_Messages.ino sample sketch (see below).
Share code snippet to reproduce the issue:
/**
 * This example showed how to delete messages from the opened mailbox folder.
 *
 * Email<EMAIL_ADDRESS> *
 * Github: https://github.com/mobizt/ESP-Mail-Client
 *
 * Copyright (c) 2021 mobizt
 *
*/

/** To receive Email using Gmail, IMAP option should be enabled. https://support.google.com/mail/answer/7126229?hl=en
 * and also https://accounts.google.com/b/0/DisplayUnlockCaptcha
 *
*/

/** For ESP8266, with BearSSL WiFi Client
 * The memory reserved for completed valid SSL response from IMAP is 16 kbytes which
 * may cause your device out of memory reset in case the memory
 * allocation error.
*/

#include <Arduino.h>
#if defined(ESP32)
#include <WiFi.h>
#elif defined(ESP8266)
#include <ESP8266WiFi.h>
#endif
#include <ESP_Mail_Client.h>

//To use only IMAP functions, you can exclude the SMTP from compilation, see ESP_Mail_FS.h.

#define WIFI_SSID "xxxxx"
#define WIFI_PASSWORD "xxxxxxxxx"

/* The imap host name e.g. imap.gmail.com for GMail or outlook.office365.com for Outlook */
#define IMAP_HOST "xxxx.xxxx.xxxx.xxx"

/** The imap port e.g.
 * 143  or esp_mail_imap_port_143
 * 993 or esp_mail_imap_port_993
*/
#define IMAP_PORT 993

/* The log in credentials */
#define AUTHOR_EMAIL<EMAIL_ADDRESS>#define AUTHOR_PASSWORD "xxxxxxxxxx"

/* Print the list of mailbox folders */
void printAllMailboxesInfo(IMAPSession &imap);

/* Print the selected folder info */
void printSelectedMailboxInfo(IMAPSession &imap);

/* The IMAP Session object used for Email reading */
IMAPSession imap;

void setup()
{

    Serial.begin(115200);

#if defined(ARDUINO_ARCH_SAMD)
    while (!Serial)
        ;
    Serial.println();
    Serial.println("**** Custom built WiFiNINA firmware need to be installed.****\nTo install firmware, read the instruction here, https://github.com/mobizt/ESP-Mail-Client#install-custom-built-wifinina-firmware");

#endif

    Serial.println();

    Serial.print("Connecting to AP");

    WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
    while (WiFi.status() != WL_CONNECTED)
    {
        Serial.print(".");
        delay(200);
    }

    Serial.println("");
    Serial.println("WiFi connected.");
    Serial.println("IP address: ");
    Serial.println(WiFi.localIP());
    Serial.println();

    /** Enable the debug via Serial port
     * none debug or 0
     * basic debug or 1
     *
     * Debug port can be changed via ESP_MAIL_DEFAULT_DEBUG_PORT in ESP_Mail_FS.h
    */
    imap.debug(333);

    /* Declare the session config data */
    ESP_Mail_Session session;

    /* Set the session config */
    session.server.host_name = IMAP_HOST;
    session.server.port = IMAP_PORT;
    session.login.email = AUTHOR_EMAIL;
    session.login.password = AUTHOR_PASSWORD;

    /* Setup the configuration for searching or fetching operation and its result */
    IMAP_Config config;

    /* Connect to server with the session and config */
    if (!imap.connect(&session, &config))
        return;

    /*  {Optional} */
    printAllMailboxesInfo(imap);

    /* Open or select the mailbox folder to read or search the message */
    if (!imap.selectFolder("INBOX",false))
        return;

    /* Define the MessageList class to add the message to delete */
    MessageList toDelete;

   /* Add message uid to delete to the list */

    toDelete.add(136);
    /* Delete all messages permanently by assign the second param to true*/
    imap.deleteMessages(&toDelete, true);

    ESP_MAIL_PRINTF("Free Heap: %d\n", MailClient.getFreeHeap());
}

void loop()
{
}

void printAllMailboxesInfo(IMAPSession &imap)
{
    /* Declare the folder collection class to get the list of mailbox folders */
    FoldersCollection folders;

    /* Get the mailbox folders */
    if (imap.getFolders(folders))
    {
        for (size_t i = 0; i < folders.size(); i++)
        {
            /* Iterate each folder info using the  folder info item data */
            FolderInfo folderInfo = folders.info(i);
            ESP_MAIL_PRINTF("%s%s%s", i == 0 ? "\nAvailable folders: " : ", ", folderInfo.name, i == folders.size() - 1 ? "\n" : "");
        }
    }
}

And here is the serial output:

Connecting to AP...........
WiFi connected.
IP address:
xxx.xxx.xxx.xxx

> C: ESP Mail Client v1.5.5
> C: connect to IMAP server
> C: host > imap.swizzonic-mail.ch
> C: port > 993
> C: starting socket
> C: connecting to Server
> C: seeding the random number generator
> C: setting up the SSL/TLS structure
! W: Skipping SSL Verification. INSECURE!
> C: setting hostname for TLS session
> C: performing the SSL/TLS handshake
> C: verifying peer X.509 certificate
> C: server connected
> C: check the capability
$ CAPABILITY
* OK swizzonic-mail.ch CommuniGate Pro IMAP Server 7.1.0 ready
* CAPABILITY IMAP4 IMAP4REV1 ACL NAMESPACE UIDPLUS IDLE LITERAL+ QUOTA ID MULTIAPPEND LISTEXT CHILDREN BINARY ESEARCH LOGIN-REFERRALS UNSELECT SASL-IR LIST-EXTENDED SPECIAL-USE CREATE-SPECIAL-USE XLIST AUTH=LOGIN AUTH=PLAIN
$ OK completed
> C: send imap command, LOGIN
$ LOGIN<EMAIL_ADDRESS>xxxxxxxxxxxxx
$ OK completed
> C: send imap command, LIST
$ LIST "" *
* LIST (\HasNoChildren \UnMarked) "/" INBOX
* LIST (\HasNoChildren \UnMarked) "/" Trash
$ OK completed

Available folders: INBOX, Trash
> C: open the mailbox folder
$ SELECT "INBOX"
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $MDNSent $Hidden $Media $Forwarded Junk $Label1 $Label2 $Label3)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft $MDNSent $Hidden $Media $Forwarded Junk $Label1 $Label2 $Label3)] limited
* 4 EXISTS
* 0 RECENT
* OK [UIDNEXT 137] predicted next UID
* OK [UIDVALIDITY 402276210] UIDs valid
* OK [UNSEEN 2] message 2 is first unseen
$ OK [READ-WRITE] SELECT completed
> C: open the mailbox folder
$ SELECT ""
$ NO mailbox does not exist
> E: mailbox does not exist
Free Heap: 174351

Additional information and things you've tried:
Deleting messages still works in version 1.5.3. I assume the problem is related to the introduction of MBSTRING. After some investigation I noticed that _currentFolder seems to be empty when IMAPSession::deleteMessages is called. Deleting messages seems to work, after changing _currentFolder to std::string in ESP_Mail_Client.h (line 2834).

Thanks for reporting this issue.
I will check and update soon.

The MB_String is ok, the error is due to the folder closed in case of different selection mode and the current folder name will be cleared, then any folder name const chars that refers to its own will be empty too.
The issues were fixed in the v1.5.6. Please update.

Works great now, thank you!


When selecting a category should take user to correct type

For Example  If I click on the boxing category button it takes me to an empty pg under futures for Boxing.  All boxing templates are Daily...Should take me to the daily section under boxing
Rule should be, when clicking on a sports category to always take user (or display) Daily first, unless there are currently no daily markets at that moment for that sport, then can show Futures first

When I click car racing it opens Futures, even though there are many daily markets. Does it have anything to do with the incorrect markets being pulled into there (politics)?

Seems fine now!


setText() method doesn't work with Button Rectangle

Me too. Crashes NullPointerExeption on getText(), setText()...

it's caused by textButton inside ButtonRectangle being null.


Adds feature for /api/chat access via OllamaAPI

Fixes #20 as the required functionality is provided by the api/chat endpoint on the Ollama API Server.
The feature adds two endpoints to the OllamaAPI class:
  public OllamaResult chat(String model, List<OllamaChatMessage> messages)  throws OllamaBaseException, IOException, InterruptedException, URISyntaxException;

  public OllamaResult chat(OllamaChatRequestModel request);

For convienience, a request Builder will be provided, such that the following would create a Request that contains a system prompt as well as a user question:
OllamaChatRequestModel requestModel = builder.withMessage(OllamaChatMessageRole.SYSTEM,"Some System-Prompt")
           .withMessage(OllamaChatMessageRole.USER,"The User Question").build()

The Request model also contains the usual Parameters like Options, template, stream and so on.

Implementation for the synchronous part is finished. Here is a short example:
String host = "http://localhost:11434/";
OllamaAPI ollamaAPI = new OllamaAPI(host);
OllamaChatRequestBuilder builder = OllamaChatRequestBuilder.getInstance(OllamaModelType.LLAMA2);
      OllamaChatRequestModel requestModel = builder.withMessage(OllamaChatMessageRole.SYSTEM, "You are a silent bot that only says 'NI'. Do not say anything else under any circumstances!")
             .withMessage(OllamaChatMessageRole.USER,"We need a montage!")
             .build();

      OllamaChatResult chatResult = ollamaAPI.chat(requestModel);
      assertNotNull(chatResult);
      assertFalse(chatResult.getResponse().isBlank());
      assertTrue(chatResult.getResponse().startsWith("NI"));

Tests for this case are succesful, next I'll start to write documentation for it, if the Implementation seems okay for you @amithkoujalgi

Documentation is ready for two use cases, both replying to #20.
@amithkoujalgi would you kindly do a review of this PR? There are some open ends like:

Async Chat
Image usage in Messages

Both of them don't seem to be too much trouble, but I think it would make sense to refactor some of the Image Usage / Async logic to be reused by multiple API endpoints, which would delay the initial implementation too much I'd say. What do you think of this?
Cheers!

Thanks for the PR @AgentSchmecker! Looks good.

@amithkoujalgi I've seen that the build is broken after the merge. I'll provide a PR to fix this. Sorry for the inconvenience!

Ok, as I see you have been faster than me, thanks a lot @amithkoujalgi

Thanks for considering to provide a PR to fix the build @AgentSchmecker. I briefly looked at the javadoc and updated them. 😅 They were minor fixes anyway, so no worries.
Thanks again! Cheers!


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-2.x" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 2659

Questions ?
Please refer to the Backport tool documentation


Review/revisit semantics of font color/italic/bold etc.

Old Jadeite had everything dirty as bold italic.  This seems to be missing in some places under some circumstances.
The purple indicating ownership works but is not visible when selected.

This issue is a placeholder for a full review.

I'm not sure I'm qualified to do a full review. I'd prefer that @LisaAlmarode take this on. Reassigned back to her.
One note ... on the method list display, I'm reserving italics for when https://github.com/dalehenrich/Rowan/issues/276 is resolved.

Reviewed in 3.0.22 for bold/italic = dirty consistency.  Will look at reds and purples separately.
The bold/italics issues have two parts.

One is that I don't think there is method level dirtiness marking, currently, per the rowan bug.
The other issue, which can be addressed now in Jadeite, that that while some actions (e.g. edit a method) update the package and project fonts, most don't.

edit a method
class, category and method are in ordinary font (should be bold italic)
project and package are correctly bold italic.
Move method to a different category, or remove a method.
Nothing is bold italic.
If I refresh project, the Project and Package become bold italic.
edit class definition (that is, modify instance variables), or update class comment
Nothing is bold italic.
click away and back, the package becomes correctly bold italic
on project refresh, becomes correctly bold italic
The class remains incorrect ordinary font.
(category and method are correctly in ordinary font)
Add or remove class
does not make anything dirty.  Should make package and project dirty.
If I click in the packages pane it turns dirty.
It takes refresh to set the project to bold italic.
Add package - behaves correctly.
Add category - reasonable that this has no effect on dirtiness.

The "edit a method" checkbox won't be available until we get method level dirty in Rowan. https://github.com/GemTalk/Rowan/issues/276.  I've submitted https://github.com/GemTalk/Jadeite/issues/130 to cover it.
I believe the rest are going to be fixed in Oscar 3.0.23

[ ]  Removing method does not update project and package fonts correctly.
[ ] Removing a class does not  update project and package fonts correctly.

A refactoring bypassed the invalidation of the views. The fix this time should be general enough to redraw the views after most any action by the user that changes the dirty state. Redraws are fast.
Fixed in 3.0.30

In 3.0.30, as SystemUser, it's not looking any different... after a remove method or remove class, I have to click in the package or project pane before it refreshes.

Fix lost in fix for #128.  Restored in 3.0.31 - should refresh across browsers now.


Split define action

This pull request adds a command to split the window and follow in one command.
Checklist

[x] I have added tests
[ ] I have updated the docs and cheatsheet
[ ] I have not broken the cheatsheet

I think I responded to all your comments. I wasn't sure if I should remove the define split commands. Everything seems to be working at the moment.

We probably gonna deprecate define in favor of follow. No sense adding another define then.

I removed the define command. Only the follow command remains.

I think I addressed all the comments. Anything I missed?

Thanks for cleaning it up! @pokey

Nice exactly what I wanted! :)

Nice exactly what I wanted! :)

I didn't actually read any of your comments, so it's a good sign that we independently arrived at the same conclusion 😄

Nice exactly what I wanted! :)

I didn't actually read any of your comments, so it's a good sign that we independently arrived at the same conclusion 😄

Heh don't know if I should be hurt or impressed by that :D

well they had all been marked as resolved so I assumed they'd already been addressed 😅

Oops, sorry. I was using them kind of like a todo list-should I have left them open?  Appreciate all the guidance-thanks for helping me get this done 😀

Oops, sorry. I was using them kind of like a todo list-should I have left them open?  Appreciate all the guidance-thanks for helping me get this done 😀

That's ok. If you're confident you've resolved them, feel free to mark them resolved. If you have any doubt, though, best to leave them open and let us have a look to see if they've been resolved


[LLGL] port installs header (include) files in \installed<triplet>\include\include\LLGL

Describe the bug
LLGL port installs header (include) files in <vcpkg-root>\installed\<triplet>\include\include\LLGL
Environment

OS: [Microsoft Windows [Version 10.0.19041.331]]
Compiler: Visual Studio 2019 Version: 16.6.3 VS Tools Version: 14.26.28801

To Reproduce
Steps to reproduce the behavior:

 ./vcpkg install llgl[core,direct3d11,opengl]:x64-windows
No error but ... see the Describe the bug section above.

Expected behavior
I believe the header (include) files should be installed in <vcpkg-root>\installed\<triplet>\include\LLGL - in other words, there is one too many include in the destination path.
Failure logs
No Failure logs.
Additional context
Add any other context about the problem here.
Depending on which is installed first, gmp or llgl, the first installs, and the second has a failed rename result - see issue #12237. In my case, I always install port llgl first and then gmp second, hence I get a fail gmp install.
SYSTEM@ANDROMEDA 07/02/2020 22:25:10 D:\Git\vs2019.prod\installed\x64-windows\include\include
->dir
 Volume in drive D is Dev_01
 Volume Serial Number is E857-FDB0
 Directory of D:\Git\vs2019.prod\installed\x64-windows\include\include
07/02/2020  22:18    <DIR>                       BUILTIN\Administrators .
07/02/2020  22:18    <DIR>                       BUILTIN\Administrators ..
07/02/2020  22:18    <DIR>                       BUILTIN\Administrators LLGL
               0 File(s)              0 bytes
               3 Dir(s)  713,928,261,632 bytes free

I close, I no longer use product.


Encodable trait objects

 Issue by kmcallister
Monday Dec 15, 2014 at 10:30 GMT
For earlier discussion, see https://github.com/rust-lang/rust/issues/19874
This issue was labelled with: A-an-interesting-project, E-hard in the Rust repository

<kmc> i want a world where I can send a Box<Encodable + FnOnce(A) -> B> across the network and call it on the other end
<Yurume> kmc: with a built-in AEAD protocol...

I think it's possible to do this without making any changes to how trait objects are handled.  It also doesn't require any form of trait polymorphism.
What is needed is a magical built-in trait (call it TyConst for now):
pub trait TyConst<D>: Any {
    const DATA: D;
}

// Get the DATA field in the impl for the type that matches the given TypeId.
// If no such impl is found, returns None.
pub fn get_ty_const<D>(id: TypeId) -> Option<D>;

There is no way to define get_ty_const in today’s Rust.  In fact, the function get_ty_const can't be generated until the entire program has been compiled because it requires global information.
Using this one trait, the remaining implementation should be straightforward once we get a way to deserialize TypeIds.  We can build a third-party crate that can decode objects such as FnBox as shown in the example:
pub fn decode_type_id(d: &mut Decoder) -> Result<TypeId, Error> { /* ... */ }

pub fn decode_bytes(d: &mut Decoder) -> Result<Vec<u8>, Error> { /* ... */ }

pub fn decode_fn_box(d: &mut Decoder) -> Result<Box<FnBox()>, Error> {
    let type_id = decode_type_id(d)?;
    let decode: fn(_) -> _ = get_ty_const(type_id).ok_or(/* ... */)?;
    decode(d)
}

On the user's side, if they want to support deserialization for a custom data type Foo, they would write:
struct Foo(Vec<u8>);

impl FnOnce<()> for Foo {
    type Output = ();
    extern "rust-call" fn call_once(self, _: ()) {
        println!("Foo has been called with {:?}!", self.0);
    }
}

fn decode_foo(d: &mut Decoder) -> Result<Box<FnBox()>, Error> {
    Ok(Box::new(Foo(decode_bytes(d)?)))
}

impl TyConst<fn(&mut Decoder) -> Result<Box<FnBox()>, Error>> for Foo {
     const DATA: fn(&mut Decoder) -> Result<Box<FnBox()>, Error> = decode_foo;
}

I've taken a stab at this with https://github.com/rust-lang/rust/pull/66113


Feature: Level Feedback

Do we want a simple system that allows players to give feedback and/or ratings to levels?
Feedback would fit the idea of the community, which is to help developers increase their game dev skills.
Ratings could help with the competition aspect of the jam.
Both feedback and ratings could be private and only visible to the level creator.
It would require some back end work and figuring out a good solution for sharing the feedback with the creator. Using e-mail for instance might lead to GDPR and Privacy issues for instance.

Yup this is 100% something we want.
I think feedback and ratings should be private during the competition (but we should get a count for how many ratings a level has had or show all the levels you as a player have rated). This gives us (reviewers) a chance to check through all the reviews ( just to make sure nothing too awful gets posted 😉 ). Then at the end we can publish all responses to everyone.
I'd like to avoid anyone needing to register emails etc. for gdpr/privacy. But if we really needed to I would consider doing discord login or something like that 😉