ValueError: Array Must Not Contain Infs or NaNs

I seem to be having an issue when running this pipeline. Below is the traceback:
RuntimeWarning: invalid value encountered in greater
  mask = (size > 0)
Traceback (most recent call last):
  File "/Users/opt/anaconda3/envs/mytfenv/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3319, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-4-997c912b5fa5>", line 23, in <module>
    prep_pipeline.fit()
  File "/Users/Documents/preprocessing/prep_pipeline.py", line 80, in fit
    reference.perform_reference()
  File "/Users/Documents/preprocessing/reference.py", line 66, in perform_reference
    self.robust_reference()
  File "/Users/Documents/preprocessing/reference.py", line 144, in robust_reference
    noisy_detector.find_all_bad_channels(ransac=self.ransac)
  File "/Users/Documents/preprocessing/find_noisy_channels.py", line 140, in find_all_bad_channels
    self.find_bad_by_ransac()
  File "/Users/Documents/preprocessing/find_noisy_channels.py", line 476, in find_bad_by_ransac
    n_samples=n_samples,
  File "/Users/Documents/preprocessing/find_noisy_channels.py", line 581, in run_ransac
    chn_pos, chn_pos_good, good_chn_labs, n_pred_predicted, data
  File "/Users/Documents/preprocessing/find_noisy_channels.py", line 632, in get_ransac_pred
    interpol_mat = _make_interpolation_matrix(reconstructed_positions, chn_pos)
  File "/Users/opt/anaconda3/envs/mytfenv/lib/python3.7/site-packages/mne/channels/interpolation.py", line 85, in _make_interpolation_matrix
    C_inv = linalg.pinv(C)
  File "/Users/opt/anaconda3/envs/mytfenv/lib/python3.7/site-packages/scipy/linalg/basic.py", line 1304, in pinv
    a = _asarray_validated(a, check_finite=check_finite)
  File "/Users/opt/anaconda3/envs/mytfenv/lib/python3.7/site-packages/scipy/_lib/_util.py", line 246, in _asarray_validated
    a = toarray(a)
  File "/Users/opt/anaconda3/envs/mytfenv/lib/python3.7/site-packages/numpy/lib/function_base.py", line 499, in asarray_chkfinite
    "array must not contain infs or NaNs")
ValueError: array must not contain infs or NaNs

I understand that ValueError: array must not contain infs or NaNs means that there are some non numerical values in my array. However, when I check whether there are in fact NaNs or infs values in my array using this answer I get False as the result (i.e there are no infs or NaNs). Is there anyway to fix this issue?

This error seems to appear in the new code. Maybe @adam2392 @AamnaLawrence or @Nick3151 can help?

What array are you referring to when you say you checked the array? Do you mean the actual eeg data (as in raw._data[channels,time]) or do you mean the array which has the positions of the electrodes?
From what I understand the error is in calculating the interpolation matrix, it seems the function pinv is encountering some NaNs or Infs , the 'a' array it refers to in the final part of the traceback is calculated from the positions of the electrodes.
So if I were you I would check all of the positions of the electrodes are available.

What array are you referring to when you say you checked the array? Do you mean the actual eeg data (as in raw._data[channels,time]) or do you mean the array which has the positions of the electrodes?
From what I understand the error is in calculating the interpolation matrix, it seems the function pinv is encountering some NaNs or Infs , the 'a' array it refers to in the final part of the traceback is calculated from the positions of the electrodes.
So if I were you I would check if all of the positions of the electrodes are available.
If all are available then maybe the problem is when applying the transformations of that array that in your particular case is producing some NaNs or Infs. In particular the interpolation code does:
1) normalize sensor positions to sphere
2) calculate cosine angles between source positions
3) Calculate spherical spline g function between points on a sphere.
4) ... and more stuff im not sure about

So the point is that along that way maybe some Infs and NaNs appear prior to the calculation of the inverse by the pinv function.
*** This is my interpretation of the error, so I may be mistaken ***

Hi! Thanks so much for your reply. I am not interested in the position of the electrodes as this doesn't concern my current project, so I am assuming that the code is referring to the actual EEG data.
In fact, I am using a customised version of this code which does not include a montage.  Is the interpolation matrix which channels or readings?
I apolgise if this does not make much sense - I am quite new to eeg analysis. Would it make more sense to share my code with you?

What array are you referring to when you say you checked the array? Do you mean the actual eeg data (as in raw._data[channels,time]) or do you mean the array which has the positions of the electrodes?
From what I understand the error is in calculating the interpolation matrix, it seems the function pinv is encountering some NaNs or Infs , the 'a' array it refers to in the final part of the traceback is calculated from the positions of the electrodes.
So if I were you I would check if all of the positions of the electrodes are available.
If all are available then maybe the problem is when applying the transformations of that array that in your particular case is producing some NaNs or Infs. In particular the interpolation code does:
1) normalize sensor positions to sphere
2) calculate cosine angles between source positions
3) Calculate spherical spline g function between points on a sphere.
4) ... and more stuff im not sure about

So the point is that along that way maybe some Infs and NaNs appear prior to the calculation of the inverse by the pinv function.
*** This is my interpretation of the error, so I may be mistaken ***

Hi! Thanks so much for your reply. I am not interested in the position of the electrodes as this doesn't concern my current project, so I am assuming that the code is referring to the actual EEG data.
In fact, I am using a customised version of this code which does not include a montage. Is the interpolation matrix which channels or readings?
I apolgise if this does not make much sense - I am quite new to eeg analysis. Would it make more sense to share my code with you?

If you want. In any case from what I know (Im no expert) to be able to do interpolation of channels prep will require a montage because the interpolation is done on the basis of the locations (is a spatial interpolation) ie electrodes near a given electrode contribute more for the interpolation.
If there is no montage then there will be no spatial criteria to use for interpolation. If i were you I would check the source of your eeg data for information of where the electrodes were located, if that information is not available I would be weird to try to interpolate at all. Maybe you dont have exact locations but the montage could have followed an standard montage so in that case your montage is a subset of the standard one. In that case just identify the standard montage that best fits your case. MNE will inform that the channels are a subset of the montage and thats it, it will work.
In the context of the prep from what i know interpolation is done for 2 reasons:

Estimate bad channels using the RANSAC criteria
Fabricate data for bad eeg channels (interpolate bad channels that is).

If you dont have any location data its problematic because the robust referencing algorithm involves interpolation of bad channels.
Now that you say that the code is customized it makes sense for this to maybe happen, I mean I think internally pyprep verifies that location data is available but if that part of the code was deleted I would make sense for this error to appear.

What array are you referring to when you say you checked the array? Do you mean the actual eeg data (as in raw._data[channels,time]) or do you mean the array which has the positions of the electrodes?
From what I understand the error is in calculating the interpolation matrix, it seems the function pinv is encountering some NaNs or Infs , the 'a' array it refers to in the final part of the traceback is calculated from the positions of the electrodes.
So if I were you I would check if all of the positions of the electrodes are available.
If all are available then maybe the problem is when applying the transformations of that array that in your particular case is producing some NaNs or Infs. In particular the interpolation code does:
1) normalize sensor positions to sphere
2) calculate cosine angles between source positions
3) Calculate spherical spline g function between points on a sphere.
4) ... and more stuff im not sure about

So the point is that along that way maybe some Infs and NaNs appear prior to the calculation of the inverse by the pinv function.
*** This is my interpretation of the error, so I may be mistaken ***

Hi! Thanks so much for your reply. I am not interested in the position of the electrodes as this doesn't concern my current project, so I am assuming that the code is referring to the actual EEG data.
In fact, I am using a customised version of this code which does not include a montage. Is the interpolation matrix which channels or readings?
I apolgise if this does not make much sense - I am quite new to eeg analysis. Would it make more sense to share my code with you?

If you want. In any case from what I know (Im no expert) to be able to do interpolation of channels prep will require a montage because the interpolation is done on the basis of the locations (is a spatial interpolation) ie electrodes near a given electrode contribute more for the interpolation.
If there is no montage then there will be no spatial criteria to use for interpolation. If i were you I would check the source of your eeg data for information of where the electrodes were located, if that information is not available it would be weird to try to interpolate at all. Maybe you dont have exact locations but the montage could have followed an standard montage so in that case your montage is a subset of the standard one. In that case just identify the standard montage that best fits your case. MNE will inform that the channels are a subset of the montage and thats it, it will work.
In the context of the prep from what i know interpolation is done for 2 reasons:

Estimate bad channels using the RANSAC criteria
Fabricate data for bad eeg channels (interpolate bad channels that is).

If you dont have any location data its problematic because the robust referencing algorithm involves interpolation of bad channels.
Now that you say that the code is customized it makes sense for this to maybe happen, I mean I think internally pyprep verifies that location data is available but if that part of the code was deleted It would make sense for the shown error to appear.

thanks so much! that's what i was getting at too and I realised that is the case (i.e can't interpolate because there is no data). I am trying to remove the interpolation features from the code -  could you point me to the function in charge of interpolation so that I can comment it out?

That would be tricky, from the top of my mind I can say:

put ransac in false (this will take care of the make_interpolation_matrix part)

in perform reference you would need to comment anything that interpolates

the functions that interpolates is .interpolate_bads()...
THERE IS A BIG PROBLEM WITH THIS: Interpolation is an essential part of the PREP idea of robust referencing, im not sure what would be the effect of it if you just comment those parts. Basically the prep idea is to iteratively calculate a reference by interpolating bad channels.
To change it would require really thinking through what are you really doing and seeing if it really makes sense.PREP does:

Filter line noise by while first doing a detrend --> ok, doesnt need interpolation
Calculate robust reference --> needs interpolation ... what to do here then?

From the top of my mind:
You could just calculate a reference by using the average of non bad channels (which were detected using every criteria except ransac) and not interpolate anything. Exclude from further analysis those bad channels.
Point is , you would need to think about it to make sure it makes sense.

That would be tricky, from the top of my mind I can say:

put ransac in false (this will take care of the make_interpolation_matrix part)
in perform reference you would need to comment anything that interpolates

the functions that interpolates is .interpolate_bads()...
THERE IS A BIG PROBLEM WITH THIS: Interpolation is an essential part of the PREP idea of robust referencing, im not sure what would be the effect of it if you just comment those parts. Basically the prep idea is to iteratively calculate a reference by interpolating bad channels.
To change it would require really thinking through what are you really doing and seeing if it really makes sense.PREP does:

Filter line noise by while first doing a detrend --> ok, doesnt need interpolation
Calculate robust reference --> needs interpolation ... what to do here then?

From the top of my mind:
You could just calculate a reference by using the average of non bad channels (which were detected using every criteria except ransac) and not interpolate anything. Exclude from further analysis those bad channels.
Point is , you would need to think about it to make sure it makes sense.

Thanks so much for your fast reply! Would you be able to help me with my code, by any chance? I removed all ransac methods from noisyChannels but am getting stumped while removing interpolation from Reference.
Alternatively, what I was thinking to do was simply to find the bad channels and remove them while forgoing the process of referencing. Please let me know your thoughts!

That would be tricky, from the top of my mind I can say:

put ransac in false (this will take care of the make_interpolation_matrix part)
in perform reference you would need to comment anything that interpolates

the functions that interpolates is .interpolate_bads()...
THERE IS A BIG PROBLEM WITH THIS: Interpolation is an essential part of the PREP idea of robust referencing, im not sure what would be the effect of it if you just comment those parts. Basically the prep idea is to iteratively calculate a reference by interpolating bad channels.
To change it would require really thinking through what are you really doing and seeing if it really makes sense.PREP does:

Filter line noise by while first doing a detrend --> ok, doesnt need interpolation
Calculate robust reference --> needs interpolation ... what to do here then?

From the top of my mind:
You could just calculate a reference by using the average of non bad channels (which were detected using every criteria except ransac) and not interpolate anything. Exclude from further analysis those bad channels.
Point is , you would need to think about it to make sure it makes sense.

Thanks so much for your fast reply! Would you be able to help me with my code, by any chance? I removed all ransac methods from noisyChannels but am getting stumped while removing interpolation from Reference.
Alternatively, what I was thinking to do was simply to find the bad channels and remove them while forgoing the process of referencing. Please let me know your thoughts!

I think that last idea will work, basically I think is pretty much the best you can do (that i know of) without having to interpolate. In this case the reference would just be
np.nanmedian(raw.get_data(picks=self.reference_channels), axis=0) * 1e6
where reference_channels are the good channels.
If you are keep getting stumped at it maybe we could do a google meet while sharing your screen and with the questions you have of the code.

a google meet would be much appreciated! my email is listed on my github profile - would you be able to reach out and we can set it up through email? Thank you!
(I'll mark this as closed!)

sure, I sent you an email

If you find that the issue has something to do with the codebase, or that there could be improvements to make the codebase more robust, please make a PR! :-)


[LogicException] Node "parent" does not exist for Node "Twig_Node_Module".

Since the update of Twig in Version 1.25.0 (2016-09-21), this error occurs at compile time :
[Twig_Error_Syntax]
  An exception has been thrown during the compilation of a template ("Node "p
  arent" does not exist for Node "Twig_Node_Module".") in "my_view.html.twig".

[LogicException]
  Node "parent" does not exist for Node "Twig_Node_Module".

Although "my_view.twig.html" is void of any twig code ...

The problem is in line jms/twig-js/src/TwigJs/Compiler/ModuleCompiler.php:60. Currently it is
if (null === $node->getNode('parent')) {
and should be from twig 1.25 something like that
if ($node->hasNode('parent') && null === $node->getNode('parent')) {

👍

Is it just me or does it need a lot more of these hasNode checks? I am getting errors in a lot of compiles.

PR #109 should fix this, we have it working in production with twig v1.28.2. The changes are simple and should cause no BC breaks.


[chore](dynamic schema) deprecated create table

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall


Creating a geometry for a new Facility record is difficult.

I tried to add a geometry to a new facility with the user and couldn't figure it out within 15 mins. This is probably a sign the workflow is unclear.
We should find a way to prompt the user or make the simpler.

this has been resolved, but I can't close it because Keaton is this author of the comment.


portico: Fix bad image mirroring on /for/X pages.

Also mirror one image that should be mirrored but wasn't.
CZO discussion

Testing plan:
manual
GIFs or screenshots:

Merged, thanks @alya!


Fixed widths in forms.css

Hi guy's, how come that in forms.css fixed widths are used, for example input.input-text, textarea { width: 254px; }. It breaks layouts...
Best wishes
Lee

Hey Lee - someone else asked us this recently with a pull about expanded fields and honestly, don't have a good answer other than 'they shouldn't be fixed' :)  We're going to be doing some major forms work soon in which we'll probably overhaul their presentation and expand on the functionality. I'm gonna close this not because I want to ignore it, but because it's represented in another issue for now. Thanks!


feat: prep for dune-release

Fix improperly named dune project
Add missing items
~Add post-publish hook to call dune-release~

Note: this project still requires a CHANGELOG for this to be functional
Discussion: https://github.com/reasonml-community/graphql-ppx/issues/250

Thank you!


Link to Libera instead of Freenode

Motivation for this change
The project has moved away from Freenode as an IRC network1, and there
is now a quite large channel on Libera.  As such, we should point users
towards that instead.
This also changes all examples to refer to libera instead of freenode
as, with the recent deletion of all freenode channels, it is perhaps
where most communities are to be found nowadays.
I have left out some of the comments explaining (presumably) why things were done in a certain way (example) as that would fall under "rewriting history" to me.  These communities are most likely on libera now, so what we may do is add a little (now on libera) message, but I wasn't sure about this.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
I don't know whether the examples are in any way tested or if they really are just example strings, so I skipped all of these.  Feel free to shout at me for it :)
[n/a] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes

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

[ ] Fits CONTRIBUTING.md.
This is a doc change and not really focusing on a single package, so it doesn't quite fit the requested commit message format.

Hah!  Well I'm not qualified to say whether that's okay or not.  I think that the Freenode -> Libera change should be made independently of that issue though; I'm happy to revert the matrix changes if necessary.

Result of nixpkgs-review pr 127476 at 166c00ab run on aarch64-linux 1

1 package failed to build:

nixos-install-tools

Note that build failures may predate this PR, and could be nondeterministic or hardware dependent.
Please exercise your independent judgement. Does something look off? Please file an issue or reach out on IRC.

That RFC is decided anyway. We can't move back to freenode.

Okay, I have squashed the commits and adjusted the commit message to also mention Matrix.

Okay, all build failures should now be fixed.  @dotlambda what do you think?

I rebased this because it seems like https://github.com/NixOS/nixpkgs/pull/129384 was merged, which makes the Freenode->Libera switch in the preface of the manual at least.
I think it would be nice if this were merged, so we could fix everything in one go
@dotlambda @Mic92 @SuperSandro2000


Update github actions to the latest versions

Looks like there's a merge-on-download option: https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md#multiple-uploads-to-the-same-named-artifact
Will experiment, I have another fork of the repo for this. There's a few delicate steps (release scripts) that rely on artifacts.

Pushed up a couple changes to fix things, tested here: https://github.com/geky/littlefs-test-repo/pull/10
Also tweaked a couple things while editing/testing this:

Switched from dawidd6/action-download-artifact to the standard download-artifact for cross-workflow downloads.
dawidd6/action-download-artifact used to be the only way to accomplish this, but it looks like the standard action added support for cross-workflow downloads recently.

Dropped minor/patch pinning of action version, so only pinning on major version.
I'm not sure there's any benefit to pinning minor/patch versions. GitHub is rather aggressive at deprecating/breaking anything out-of-date, so pinning the minor/patch version is more a liability than anything.
Learned this the hard way trying to pin the Ubuntu version.

Let me know if this looks good to you, and I can go ahead and merge this into the devel branch to unblock other PRs.

Thanks for this, looks like @geky-bot is still having a bit of issue since we were relying on the original artifact merging behavior.

oops, i was not aware of the merging behavior.

To be fair it is pretty unintuitive behavior, but it was useful. I wonder if we'll see more issues with hitting the artifact limit with GitHub's changes.

Merging

Whoops looks like a missed a line and ended up limiting statuses to x86 only.
Fixing here: https://github.com/littlefs-project/littlefs/pull/1053
I sure do love the GitHub Actions user experience /s


COLLECTIONS-767 MapBuilder class to decide among various types of Maps

Coverage increased (+0.001%) to 90.129% when pulling 4ab7d2916d5d60943c4b913b5958bd6fdd976e6d on Amita-Pradhan:mapUtils into 6c35a010ecebeec30275df1e0727dd4b29778370 on apache:master.

@kinow , @garydgregory , any reason not to merge this or should we just close the pull request?

@kinow , @garydgregory , any reason not to merge this or should we just close the pull request?

If it were just me, I would close it. I feel I am better served knowing what the JDK offers , what Commons Collection offers, and the difference. It feels like a solution in search of a problem.  I don't see using this in code I write FWIW.


[GLUTEN-6569][FOLLOWUP][VL] Delete unnecessary gcc9 enable of package script

What changes were proposed in this pull request?
Address https://github.com/apache/incubator-gluten/pull/6569#issuecomment-2268061246
How was this patch tested?
Velox backend weekly job GA

@wForget, could you add some code (e.g., echo something) in velox_weekly.yml? It's just for triggering the job for verification and will be reverted before merging. Thanks!

@wForget, could you add some code (e.g., echo something) in velox_weekly.yml? It's just for triggering the job for verification and will be reverted before merging. Thanks!

Good way, I will try to check this.

@wForget, CI has passed. Please revert the test code. Then, I will merge the pr. Thanks!

@wForget, CI has passed. Please revert the test code. Then, I will merge the pr. Thanks!

Reverted the test code,


How  about the visualization?

Dear author, thank you very much for sharing the classification code.
I am wondering about the visualization about the results of the segmentation experiments, Could you please share the code of the visualization?
Waiting for your reply~

Hi, we use the matlab tool: https://www.geo.tuwien.ac.at/downloads/pg/pctools/pctools.html
you can also use CloudCompare or MeshLab.

Sorry for closing this issue, please feel free to raise again.

Sorry for closing this issue, please feel free to raise again.

Sorry for closing this issue, please feel free to raise again.

how to visualize the results of part segmentation?i do not find you save obj or off files.

很抱歉关闭此问题，请随时提出。

很抱歉关闭此问题，请随时提出。

如何可视化零件细分的结果？我找不到保存obj或关闭文件的方法。

Sorry for closing this issue, please feel free to raise again.

Sorry for closing this issue, please feel free to raise again.

how to visualize the results of part segmentation?i do not find you save obj or off files.

Excuse me, have you solved this problem?

Sorry for closing this issue, please feel free to raise again.

Sorry for closing this issue, please feel free to raise again.

how to visualize the results of part segmentation?i do not find you save obj or off files.

Excuse me, have you solved this problem?

Sorry for closing this issue, please feel free to raise again.

Sorry for closing this issue, please feel free to raise again.

how to visualize the results of part segmentation?i do not find you save obj or off files.

Hello, have you solved this problem?


Reset Environmental Vars and fixed get user info test

ensured no  environmental var were populated and fixed issue with get user info test

Collection update in progress to move to Postman public workspaces.


Add files to the docs

I couldn't find this until I dug into the Issues and found this had been added already.

Thank you for your feedback !


Enhancement: main dashboard update

[x] number of request per state
[x] total instances per type of service (X number of VMware Vm, X Openshift project, X openstack tenant,...)
[x] Total users
[ ] per billing group --> pool attribute consumption. Pie chart with consumption of each attribute for a RP if the attribute is linked to an instance and the instance to a group.
[x] User with no billing group
[x] Opened support cases

if RP --> attribute RG  ---> Resource  ---> Instance ---> Billing group  THEN new category with Organization  name

Done and merged in dev


#16 - Add meta field to the json response.

Hey!  This would be my first contribution.  I was able to modify how the response is serialized to be formatted as follows:
{
"name": "Luke Skywalker",
"height": "172",
"mass": "77",
"hair_color": "blond",
"skin_color": "fair",
"eye_color": "blue",
"birth_year": "19BBY",
"gender": "male",
"homeworld": "http://localhost:8000/api/planets/1/",
"films": [
"http://localhost:8000/api/films/1/",
"http://localhost:8000/api/films/2/",
"http://localhost:8000/api/films/3/",
"http://localhost:8000/api/films/6/"
],
"species": [],
"vehicles": [
"http://localhost:8000/api/vehicles/14/",
"http://localhost:8000/api/vehicles/30/"
],
"starships": [
"http://localhost:8000/api/starships/12/",
"http://localhost:8000/api/starships/22/"
],
"url": "http://localhost:8000/api/people/1/",
"meta": {
"edited": "2014-12-20T21:17:56.891Z",
"created": "2014-12-09T13:50:51.644Z"
}
Please let me know if there is anything more/less I should do.  Look forward to helping more if possible.

@dgliwa Hey! Thank you so much for your first contribution :)
As this is changing how the API response format is, this could potentially break every integration that is looking for created and updated values in the responses. A general rule of thumb with API responses is "Never remove anything once it is live". Unfortunately I can't allow us to remove values, so could you please keep the created and updated values? We can add the Meta and use it for future, but we need to support legacy integrations.

Ah that makes sense.  I added them back in.  Thanks for the quick response.

@dgliwa :dancer: no problem!


Change dim axis_label resize logic to set width using only displayed labels width

Description

Old behavior:

New behavior:

Type of change

[x] Bug-fix (non-breaking change which fixes an issue)

References

closes #5521
How has this been tested?

[x] all tests pass with my change
[x] I check if my changes works with both PySide and PyQt backends
as there are small differences between the two Qt bindings.

Final checklist:

[x] My PR is the minimum possible work for the desired functionality
[x] I have commented my code, particularly in hard-to-understand areas

Quick update!
I used self.fontMetrics and tested doing some other changes for the extra width addition (the +10 that was around) and also adding some eliding to the text that takes more than 20% of the whole slider widget size (the * 0.2 that is being done to determine a max width) and ended up with something like this:
    def _resize_axis_labels(self):
        """When any of the labels get updated, this method updates all label
        widths to a minimum size. This allows the full label to be
        visible at all times, with minimal space, without setting stretch on
        the layout.
        """
        displayed_labels = [
            self.slider_widgets[idx].axis_label
            for idx, displayed in enumerate(self._displayed_sliders)
            if displayed
        ]
        if displayed_labels:
            fm = self.fontMetrics()
            labels = self.findChildren(QLineEdit, 'axis_label')
            # set maximum width to no more than 20% of slider width
            maxwidth = int(self.slider_widgets[0].width() * 0.2)
            # set new base width to the width of the longest label being displayed
            newwidth = max(
                [
                    int(fm.boundingRect(dlab.text()).width())
                    for dlab in displayed_labels
                ]
            )

            for labl in labels:
                # some extra margin for the label text
                # here the average width of a character is used as base measure
                # to add some extra width. We double it so we take into account
                # a space before and after the text
                margin_width = int(fm.averageCharWidth() * 2)
                base_labl_width = min([newwidth, maxwidth])
                labl_width = base_labl_width + margin_width
                if base_labl_width == maxwidth:
                    elide_text = fm.elidedText(
                        labl.text(), Qt.ElideRight, labl_width
                    )
                    labl.setText(elide_text)
                    # give more margin space due to the `...` elide symbol so
                    # we use the average character width but three times
                    margin_width = int(fm.averageCharWidth() * 3)
                    labl.setFixedWidth(labl_width + margin_width)
                else:
                    labl.setFixedWidth(labl_width)

Also I had to add some logic to be able to detect a slider resize event to update the axis_label width with something like this in the QtDimSliderWidget class:
    def resizeEvent(self, event):
        self.resized.emit()
        super().resizeEvent(event)

A preview:

Still there is some work I will need to do in order to be able to restore the text if eliding is not necessary so that makes me think that probably a subclass of QLineEdit should be created to handle the axis_label with eliding capabilities for the case where the text takes more than 20% of the whole slider size (if adding eliding capabilities to the axis label sounds like a good idea).
Following that I think it makes more sense to merge this as it is and then, in a follow up PR, I could implemented the fix/enhancement described above to prevent cutting the axis label text :)

Following that I think it makes more sense to merge this as it is and then, in a follow up PR, I could implemented the fix/enhancement described above to prevent cutting the axis label text :)

Agreed.
Could you expand the text a little in the PR description to give a short summary of what's happening in the gifs? Or alternatively, provide alt-text to the same effect. We're using the PR description as the merge commit message now, so it's quite common to see the text only version of that.

Updated the alt-text for the GIFs to:

Old behavior:

GIF showing the old behavior of the viewer slider widgets axis label resize. The labels take the width of the longest axis label element even if it is not being displayed. The space for the axis labels is the same even if the current axis label text is shorter than the space available

New behavior:

GIF showing the new behavior introduced with the PR for the viewer slider widgets axis label resize. The labels take the width of the longest axis label element that is being displayed. The alignment between multiple slider widgets is preserved but changing the axis being displayed can make the axis labels to take more or less space


[Scheduled Maintenance] Site down until 3rd party provider is configured

Additional context

LeastAuthority/it-ops#106

Configuration is correct now: the redirection works as expected.


Index Methods for Eloquent - Would PR Be Accepted?

I saw this talk last month "RailsConf 2017: The Secret Life of SQL: How to Optimize Database Performance by Bryana Knight": https://www.youtube.com/watch?v=BuDWWadCqIw
Bryana is an engineer at Github and shows how to optimize your database with indexes and even denormalization if necessary. I learned a lot and it would be useful to have an easy way in eloquent to use the following methods:

FORCE INDEX()
USE INDEX()
IGNORE INDEX()

(From my understanding these commands are not supported in PostgreSQL.)
This is an old issue request from a few years ago to ask whether a PR would be accepted which Taylor felt at the time was unnecessary. https://github.com/laravel/framework/issues/4625
Would it be accepted now? Don't want to waste my time if not.
Currently we can't do something nice like Post::forceIndex('index_to_use')->... and need to do Post::from(DB::raw('posts FORCE INDEX(index_to_use)')->...
Thoughts?

looks interesting.
suggestions and discussion should be moved into https://github.com/laravel/internals or the Slack channel.

Sure, I can close this and post over there.

Posted here: https://github.com/laravel/internals/issues/652


Generate swagger spec from source

<EMAIL_ADDRESS>

I started doing this task by using go-swagger and this is not so easy how it was seamed. But I`ve done some work and have a quastion. @awalias @steve-chavez Do I need include description of /admin/* , /saml/* , /instances/* to result ?

Do I need include description of /admin/* , /saml/* , /instances/* to result ? Because in README that groups aren't been covered

Ideally it will autogen everything - is there some manual work to enable the routes?

Every route need to be described manually and then spec will be generated according to it

I see, perhaps we start with a very small set of routes and then expand it if it seems like it's the right long-term solution?

Yeah, I agree. Initial set of routes will be the same as in REAMDE. I think that it's enough to start

Hey!
Thanks for looking into the issue! Unfortunately, the Swagger spec has been de-prioritized for the moment as we don't quite have the bandwidth to maintain it. I'm going to close this for now but feel free to re-open if you have any questions or concerns.
Thanks!


Improve signIn GraphQL API Response to Distinguish First Sign-In Failure from Other Failures

If a request to the signIn GraphQL API fails due to being the first sign-in attempt, it should be differentiated from other failure cases. This is necessary because the user flow in the UI changes depending on whether the failure is a first sign-in attempt or other types of failure. Currently, the only way to make this distinction is through string-match on the error message. I believe the signIn GraphQL API response can be enhanced to provide a more reliable and structured way to distinguish a first sign-in failure from other failures.

When a user's attempt to sign in fails, I think an alternative approach could be to return a value instead of an error. For example, the return type of this API could be an enum with two categories: success (including a token) and failure (including a reason). The reason could be another enum type that defines why the attempt was blocked. @msk, could you share your thoughts on this?

I thought the extensions only supported strings, not enum types, when I skimmed through the specification. However, since you believe using enums in the extensions is possible, I will give it a try.

Let me suggest that we define and use it as follows.
pub trait GraphQLError {
    fn code(&self) -> u16;
    fn reason(&self) -> String;
}

pub struct GraphQLErrorWrapper<T: GraphQLError>(pub T);

impl<T: GraphQLError + std::fmt::Display> std::fmt::Display for GraphQLErrorWrapper<T> {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.0.reason())
    }
}

impl<T: GraphQLError + std::fmt::Display> ErrorExtensions for GraphQLErrorWrapper<T> {
    fn extend(&self) -> Error {
        Error::new(self.to_string()).extend_with(|_err, e| {
            e.set("code", self.0.code());
            e.set("reason", self.0.reason());
        })
    }
}

#[derive(Debug, thiserror::Error)]
pub enum SignError {
    #[error("Incorrect username or password")]
    IncorrectUsernameOrPassword,
    #[error("A password change is required to proceed")]
    PasswordChangeRequired,
    #[error("Password is the same as the previous one")]
    PasswordSameAsPrevious,
    #[error("Access denied from this IP")]
    AccessDeniedFromIp,
    #[error("Unable to retrieve client IP")]
    UnableToRetrieveClientIp,
    #[error("Maximum parallel sessions exceeded")]
    MaxParallelSessionsExceeded,
}

impl GraphQLError for SignError {
    fn code(&self) -> u16 {
        match self {
            SignError::IncorrectUsernameOrPassword => 100,
            SignError::PasswordChangeRequired => 101,
            SignError::PasswordSameAsPrevious => 102,
            SignError::AccessDeniedFromIp => 200,
            SignError::UnableToRetrieveClientIp => 201,
            SignError::MaxParallelSessionsExceeded => 300,
        }
    }

    fn reason(&self) -> String {
        self.to_string()
    }
}

 fn validate_password(account: &types::Account, username: &str, password: &str) -> Result<()> {
    if !account.verify_password(password) {
        info!("wrong password for {username}");
        return Err(GraphQLErrorWrapper(SignError::IncorrectUsernameOrPassword).extend());
    }
    Ok(())
}

@henry0715-dev,
Could you represent the corresponding GraphQL API signature that the UI will use?

The code and reason are raised in draft, so I think you can modify them as needed.
Examples are as follows.
signIn GraphQL API
mutation SignIn($username: String!, $password: String!) {
    signIn(username: $username, password: $password) {
        token
        expirationTime
    }
}

response
{
    "data": null,
    "errors": [
        {
            "message": "A password change is required to proceed",
            "locations": [
                {
                    "line": 2,
                    "column": 5
                }
            ],
            "path": [
                "signIn"
            ],
            "extensions": {
                "code": 101,
                "reason": "A password change is required to proceed"
            }
        }
    ]
}

Can we handle code as an enum?

You can adjust it to better suit your needs.
source code
pub trait GraphQLError {
    fn error_code(&self) -> i32;
    fn error_type(&self) -> String;
}

/// Wrapper to extend GraphQL errors
pub struct GraphQLErrorWrapper<T: GraphQLError>(pub T);

impl<T: GraphQLError + std::fmt::Display> std::fmt::Display for GraphQLErrorWrapper<T> {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.0)
    }
}

impl<T: GraphQLError + std::fmt::Display> ErrorExtensions for GraphQLErrorWrapper<T> {
    fn extend(&self) -> Error {
        Error::new(self.to_string()).extend_with(|_err, e| {
            e.set(
                "info",
                Value::Object({
                    let mut map = IndexMap::new();
                    map.insert(Name::new("error_type"), Value::String(self.0.error_type()));
                    map.insert(Name::new("error_code"), Value::Number(self.0.error_code().into()));
                    map
                }),
            );
        })
    }
}

#[derive(Debug, thiserror::Error, Copy, Clone)]
pub enum SignError {
    #[error("Incorrect username or password")]
    IncorrectUsernameOrPassword = 100,
    #[error("A password change is required to proceed")]
    PasswordChangeRequired = 101,
    #[error("Password is the same as the previous one")]
    PasswordSameAsPrevious = 102,
    #[error("Access denied from this IP")]
    AccessDeniedFromIp = 200,
    #[error("Unable to retrieve client IP")]
    UnableToRetrieveClientIp = 201,
    #[error("Maximum parallel sessions exceeded")]
    MaxParallelSessionsExceeded = 300,
}

impl GraphQLError for SignError {
    fn error_code(&self) -> i32 {
        *self as i32
    }

    fn error_type(&self) -> String {
        format!("{:?}", self)
    }
}

example

response

{
    "data": null,
    "errors": [
        {
            "message": "A password change is required to proceed",
            "locations": [
                {
                    "line": 2,
                    "column": 5
                }
            ],
            "path": [
                "signIn"
            ],
            "extensions": {
                "info": {
                    "error_type": "PasswordChangeRequired",
                    "error_code": 101
                }
            }
        }
    ]
}

"error_type": "PasswordChangeRequired",

The above PasswordChangeRequired still looks just a string not an enum. Could you find a way to use an enum, if any?

It can also be implemented in a simple way.
I wonder if this answers your question.
#[derive(Debug, thiserror::Error, Copy, Clone, Enum, Eq, PartialEq)]
pub enum SignError {
    #[error("Incorrect username or password")]
    IncorrectUsernameOrPassword = 100,
    #[error("A password change is required to proceed")]
    PasswordChangeRequired = 101,
    #[error("Password is the same as the previous one")]
    PasswordSameAsPrevious = 102,
    #[error("Access denied from this IP")]
    AccessDeniedFromIp = 200,
    #[error("Unable to retrieve client IP")]
    UnableToRetrieveClientIp = 201,
    #[error("Maximum parallel sessions exceeded")]
    MaxParallelSessionsExceeded = 300,
}

impl ErrorExtensions for SignError {
    fn extend(&self) -> Error {
        Error::new(self.to_string()).extend_with(|_err, e| {
            e.set("error_type", *self);
        })
    }
}

{
    "data": null,
    "errors": [
        {
            "message": "A password change is required to proceed",
            "locations": [
                {
                    "line": 2,
                    "column": 5
                }
            ],
            "path": [
                "signIn"
            ],
            "extensions": {
                "error_type": "PASSWORD_CHANGE_REQUIRED"
            }
        }
    ]
}

The enum appears to be ultimately used as a conversion to SCREAMING_SNAKE_CASE strings. It seems to be a string by default, and it is expected that adjustments can be made according to the requirements.
pub enum ConstValue {
    /// `null`.
    Null,
    /// A number.
    Number(Number),
    /// A string.
    String(String),
    /// A boolean.
    Boolean(bool),
    /// A binary.
    Binary(Bytes),
    /// An enum. These are typically in `SCREAMING_SNAKE_CASE`.
    Enum(Name),
    /// A list of values.
    List(Vec<ConstValue>),
    /// An object. This is a map of keys to values.
    Object(IndexMap<Name, ConstValue>),
}

"error_type": "PasswordChangeRequired",

The above PasswordChangeRequired still looks just a string not an enum. Could you find a way to use an enum, if any?

@sehkone, I understand your concern about using an enum here. However, in the context of GraphQL error extensions, the extensions field is a JSON object, which doesn't have a built-in enum type.
When we receive this response on the client-side, the graphql-client crate converts it into a graphql_client::Response. Specifically, the extensions field in errors becomes a HashMap<String, Value> in graphql_client::Error, where Value is a serde_json::value::Value. As a JSON value, it can be a string, number, object, etc., but it doesn't support enums.

Through running test_print_sdl test in the below code, I observed that the generated SDL file from Schema::sdl function includes the MyAccountError enum (in Line 2486 in sdl.graphql file):
https://github.com/aicers/review-web/compare/sophie/error-enum-trial?expand=1
However, there was an unexpected problem. When downloading the SDL via GraphQL Playground, the MyAccountError enum was missing. Despite several attempts after cleanups, this inconsistency persisted, indicating a difference between async-graphql library'sSchema::sdl and GraphQL Playground behavior.
I understood Kone's concern as this: Can we provide errors as enums in the SDL file for clients?
And I now think that we cannot deliver error enums to clients via GraphQL Playground's SDL.

The concern we need to address is ensuring that users of this API are informed in advance about the kinds of responses it can return. I don't believe using extensions provides any significant advantage in this regard. Therefore, I think it would be better to use enums in the success response, as I mentioned earlier. In the schema, this approach can clearly present all possible return options to users. @msk, I would appreciate your insights on this.

@msk, I would appreciate your insights on this.

I have none. 😊


Update GitHub workflow actions

checkout@v3 is outdated and currently shows the following warning for your workflow runs:

The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/

There is also a new version for cargo-deny-action: v2.0.0
Should I update that as well? And update deny.toml to match the current template?
As side note: You can configure Dependabot to automatically create PRs for updating the used actions.

@Marcono1234 - thanks for the PR!

There is also a new version for cargo-deny-action: v2.0.0
Should I update that as well? And update deny.toml to match the current template?

Certainly, feel free to do it on this PR or a follow-on, up to you 🙂

As side note: You can configure Dependabot to automatically create PRs for updating the used actions.

Thank you for mentioning that. Would you be willing to open a PR to add the dependabot.yml file? If not I will try to find some time in the coming weeks.


Use BinaryData on ConfigMap to allow binary data for tests source

It's needed to support k6 archive files.

Codecov Report

Merging #209 (d41b640) into master (1b72557) will increase coverage by 0.29%.
The diff coverage is 71.73%.

@@            Coverage Diff             @@
##           master     #209      +/-   ##
==========================================
+ Coverage   58.22%   58.51%   +0.29%
==========================================
  Files          36       36
  Lines        2834     2878      +44
==========================================
+ Hits         1650     1684      +34
- Misses       1062     1072      +10
  Partials      122      122

Impacted Files
Coverage Δ

pkg/backends/ghz/backend.go
41.93% <0.00%> (ø)

pkg/backends/k6/backend.go
38.83% <0.00%> (ø)

pkg/kubernetes/apis/loadtest/v1/types.go
0.00% <ø> (ø)

pkg/backends/jmeter/backend.go
45.51% <25.00%> (-0.60%)
:arrow_down:

pkg/backends/jmeter/resources.go
69.35% <50.00%> (+0.60%)
:arrow_up:

pkg/controller/test_helper.go
51.00% <75.00%> (-3.00%)
:arrow_down:

pkg/proxy/request.go
78.50% <84.21%> (-0.04%)
:arrow_down:

pkg/backends/ghz/resources.go
100.00% <100.00%> (ø)

pkg/backends/k6/resources.go
68.71% <100.00%> (+3.40%)
:arrow_up:

pkg/backends/locust/backend.go
72.64% <100.00%> (ø)

... and 8 more

Continue to review full report at Codecov.

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

@lucasmdrs friendly ping :-)

Hi @walterwanderley @amandahla  :wave:
Thanks for the contribution! :blue_heart:   ( and the friendly ping :sweat_smile: )
Apologies for the delayed reply, this changes would affect the CRD and I would like to discuss a little bit with our team before proceeding, please bear with us a little longer :pray:
We'll get back to you as soon as we can :runner:

Hi @lucasmdrs!
Could you guide me how to generate the v2 of the LoadSpec?

Hi @lucasmdrs! Could you guide me how to generate the v2 of the LoadSpec?

The codegen for a new CRD version consists in three steps:

Creating a new directory in the pkg/kubernetes/apis/loadtest with the version name e.g. v2
Adding the docs.go register.go and types.go with the definitions similar to what we have in v1 but with the respective changes.
Update the hack/update-codegen.sh script to include the new types e.g loadtest:v2 and run make update-codegen

However, after some thought on the subject I don't think we want backward compatibility (make it work with both v1 and v2). Because our backends and code structure was not designed to support this. I'm considering merging the PR as it is and try notify the best possible about compatibility issues when releasing the new version


Revisit the Quarkus native image mojo options generated by create-extension

At least <enableJni>true</enableJni> should be removed

They actually recommend stopping to use the native-image mojo altogether replacing it with
<profiles>
    <profile>
        <id>native</id>
        <properties>
            <quarkus.package.type>native</quarkus.package.type>
        </properties>
    </profile>
</profiles>

Let me try whether it works for us. https://quarkus.io/guides/building-native-image#producing-a-native-executable


add stylegan example

autogen.py add_examples give "tensorflow module not found" error, possibly because I use venv and the kernel doesn't match the generated notebook. Would be great if you could try to generate it for me.

I got past the environment issue now. But I encounter this error in create_dataset_() when trying to read the filename. My script download and unzip the dataset file and works locally, what should I change to make this to work?
`
:6 load  *
image = tf.io.read_file(image_file)
/home/soon/.local/lib/python3.8/site-packages/tensorflow/python/ops/gen_io_ops.py:574 read_file  **
_, _, _op, _outputs = _op_def_library._apply_op_helper(
/home/soon/.local/lib/python3.8/site-packages/tensorflow/python/framework/op_def_library.py:492 _apply_op_helper
raise TypeError("%s expected type of %s." %
TypeError: Input 'filename' of 'ReadFile' Op has type float32 that does not match expected type of string.

TypeError: in user code:
<ipython-input-1-cfebd815d865>:6 load  *
    image = tf.io.read_file(image_file)
/home/soon/.local/lib/python3.8/site-packages/tensorflow/python/ops/gen_io_ops.py:574 read_file  **
    _, _, _op, _outputs = _op_def_library._apply_op_helper(
/home/soon/.local/lib/python3.8/site-packages/tensorflow/python/framework/op_def_library.py:492 _apply_op_helper
    raise TypeError("%s expected type of %s." %

TypeError: Input 'filename' of 'ReadFile' Op has type float32 that does not match expected type of string.

`

@fchollet I found out that (after some lengthy debugging) that subclass layers have empty trainable_weights even variables are set as trainable. Therefore i use variables to do the backprop.

@fchollet I found out that (after some lengthy debugging) that subclass layers have empty trainable_weights even variables are set as trainable. Therefore i use variables to do the backprop.

Can you provide a short code snippet in colab to demonstrate the issue here?

@fchollet I found out that (after some lengthy debugging) that subclass layers have empty trainable_weights even variables are set as trainable. Therefore i use variables to do the backprop.

Can you provide a short code snippet in colab to demonstrate the issue here?

You can check out this colab. I tried using both add_weights and tf.Variable to create variables and both show empty trainable_variables
https://colab.research.google.com/drive/1nGPKPAWkVSyTciWnVYRm3jfc7bIIWgwq?usp=sharing

@fchollet I've now updated the code, but it still training the model to get better image quality.

@fchollet I found out that (after some lengthy debugging) that subclass layers have empty trainable_weights even variables are set as trainable. Therefore i use variables to do the backprop.

Can you provide a short code snippet in colab to demonstrate the issue here?

You can check out this colab. I tried using both add_weights and tf.Variable to create variables and both show empty trainable_variables
https://colab.research.google.com/drive/1nGPKPAWkVSyTciWnVYRm3jfc7bIIWgwq?usp=sharing

Just found out if I set the layer.trainable=True, then the variables to show up as trainable. Shouldn't all layers default as trainable?

@soon-yau this is a subtle bug. I'll file an issue right now so we're able to raise an error (it's fixable on our side via better argument validation).
The first argument in super().__init(...) is the trainable argument for the layer. You should look at it as super().__init(trainable=True, name=None, ...)
You meant to call:
super(DenseBlock, self).__init__(**kwargs)
But you actually called:
super(DenseBlock, self).__init__(kwargs)
which translates to:
super(DenseBlock, self).__init__({})
which translate to:
super(DenseBlock, self).__init__(trainable={})
At that point, we should really be able to raise an error saying, "trainable must be a boolean, got {}". We'll fix it.
However we're actually setting layer.trainable = {}, which causes layer.trainable to evaluate to False, which causes the behavior you observe.
Hope that clears things up.

@soon-yau this is a subtle bug. I'll file an issue right now so we're able to raise an error (it's fixable on our side via better argument validation).
The first argument in super().__init(...) is the trainable argument for the layer. You should look at it as super().__init(trainable=True, name=None, ...)
You meant to call:
super(DenseBlock, self).__init__(**kwargs)
But you actually called:
super(DenseBlock, self).__init__(kwargs)
which translates to:
super(DenseBlock, self).__init__({})
which translate to:
super(DenseBlock, self).__init__(trainable={})
At that point, we should really be able to raise an error saying, "trainable must be a boolean, got {}". We'll fix it.
However we're actually setting layer.trainable = {}, which causes layer.trainable to evaluate to False, which causes the behavior you observe.
Hope that clears things up.

Oh, ya right. I overlooked the missing **. I'll update my code accordingly.
It will be super useful if there were more error checking. Quite often, things break when I change the model from one form to another (functional, sequential, subclassing) due to some subtle things that we're not aware off.

I added some copyedits, please pull them first. Getting close!

@fchollet I believe all issues have been addressed now, please check.

Uploaded the generated files, now pending "workflow awaiting approval".

Thank you for the great contribution! 👍


iOS remembers giving LCW permission to use Face ID

Once iOS is given permission to use Face ID with LCW, it remembers the setting if:

The wallet is reset
The wallet is reset, the device is restarted

Need to check if

The wallet is reset, LCW is deleted, the device is restarted and LCW is reinstalled

Don't fix. Better UX if OS remembers it.

Don't fix. Better UX if OS remembers it.


[homework: doing, reading, watching] Linear, logistic regressions and embedding visualizations of Zulip data

Doing

[x] Clean Data Thinking Zulip chat data, located at https://github.com/onefact/datathinking.org-codespace/blob/main/data/datathinking.zulipchat.com/raw/messages-000001.json - put it in a polars dataframe and compute summary statistics of the dataset

[ ] Analyze this Zulip chat data using logistic regression, linear regression, and embeddings with the tools we have learned in the lectures (don't forget to ask ChatGPT, Claude, Lex, GPT-4 for help as much as you need, and ask for help on the Data Thinking Zulip chat :)

[ ] Create a visualization of logistic regression of the Data Thinking Zulip chat data

[ ] Create a visualization of linear regression applied to the Data Thinking Zulip chat data

[ ] Create a visualization of embeddings using the Data Thinking Zulip Chat data

[ ] Make a copy of the Overleaf template: https://www.overleaf.com/read/ghpyzqwqwxpv (need to create an account and/or sign in if this is your first time using Overleaf). To make a copy, open the project after signing in using this link, and click on Menu, then Copy Project:

[ ] In Overleaf, edit the template and figure out how to include a PDF figure in the report, alongside a brief description (a few sentences or paragraphs is fine!) of each of the analyses you performed, why you chose them, and the math equation for the linear regression, logistic regression, and embedding you used.

[ ] Add the PDF of the report to this issue as a comment.

[ ] Send a message on Zulip with a link to this comment, alongside the image representing your favorite visualization

Reviewing

[x] Review how Jaan got unstuck in the lecture recordings at https://panopto.ut.ee/Panopto/Pages/Sessions/List.aspx?folderID=43bb180c-79a6-4324-b055-afa400ecd1a0
[x] Review collaborative whiteboards from past classes: listed at https://www.datathinking.org/university-of-tartu
[x] Review Jupyter notebooks from past classes:

https://github.com/onefact/datathinking.org-codespace/blob/main/notebooks/230313-embeddings-volume-2.ipynb
https://github.com/onefact/datathinking.org-codespace/blob/main/notebooks/230316-embeddings-text-data-like-chat-logs-and-networks.ipynb
https://github.com/onefact/datathinking.org-codespace/tree/main/notebooks

Reading

[x] [inspiration for how to categorize discussion data in json format with chatgpt] https://genmon.github.io/braggoscope/about & https://news.ycombinator.com/item?id=35073603
[ ] [help with helping you learn to be a prompt engineer] https://github.com/dair-ai/Prompt-Engineering-Guide
[ ] [help with storytelling] https://themarkup.org/hello-world/2023/02/04/journalistic-lessons-for-the-algorithmic-age
[ ] [help with debugging] https://wizardzines.com/images/debugging/toc-letter.pdf
[ ] [design, visual communication] https://anthonyhobday.com/sideprojects/saferules/ & https://news.ycombinator.com/item?id=34684761
[ ] [background on ChatGPT and Claude from an ex-OpenAI, Anthropic founder] read The Boy Whose Light Went Out by Jack Clark http://techpolicylab.uw.edu/wp-content/uploads/2022/04/Telling_Stories_Pages_4-4-22.pdf
[ ] [history of OpenAI internal difficulties] https://www.technologyreview.com/2020/02/17/844721/ai-openai-moonshot-elon-musk-sam-altman-greg-brockman-messy-secretive-reality/
[ ] [context for supply chain ban on GPU exports/imports] https://www.palladiummag.com/2021/10/11/the-triumph-and-terror-of-wang-huning/
[ ] [starting to think about bias in what you read from chatgpt or elsewhere] https://catalogofbias.org/biases/
[ ] [psychological tools for support in dealing with ChatGPT, especially if you decide to try jailbreaks] https://www.bellingcat.com/resources/2022/11/23/how-to-maintain-mental-hygiene-as-an-open-source-researcher/
[ ] [how data is being used by open source intelligence researchers in war] https://www.cbsnews.com/news/bellingcat-russia-putin-ukraine-60-minutes-2022-08-21/
[ ] [background on social media and recommendation algorithms] https://knightcolumbia.org/content/understanding-social-media-recommendation-algorithms

Watching
(message Jaan if you need a VPN or these links don't work)

[ ] [context for popular media portrayals of chatgpt] South Park S26E04 - "Deep Learning" - https://southpark.cc.com/episodes/8byci4/south-park-deep-learning-season-26-ep-4
[ ] [context for how the CEO of OpenAI talks about it] https://abcnews.go.com/Technology/video/openai-ceo-cto-risks-ai-reshape-society-97949497 article
[ ] [an emotional history of the world; context for our data thinking practice of feel, ask, do, think -- and how the thoughts in people's heads can shape society] 1 episode of https://thoughtmaybe.com/cant-get-you-out-of-my-head/

For 1.doing.

datathinking_org_latex_report_template__Copy_ (3).pdf

From me: the report is really nice even though it's short (I'd like to call it minimalistic:)). However, there are all the data that was asked and I like 3D graphs (mine were only 2D). What can be improved is that the report could possibly contain more details.
From Copilot: The given report has several strong sides. It includes visualizations of linear regression, logistic regression, and embeddings in 3D, which can help readers understand these concepts better. The report also uses a self-improvised CSV file for data analysis, which shows the author's initiative and creativity. Additionally, ChatGPT was used to generate codes for the visualizations, which can be a useful tool for researchers who are not familiar with coding. The report also explains the concepts of linear regression and logistic regression in detail, which can be helpful for readers who are new to these topics. The given information does not provide any specific details about the visualization or the writing. Therefore, it is not possible to identify what could be improved or what does not make sense in them. The information only mentions that the report consists of visualizations of linear regression, logistic regression, and embeddings in 3D, and that ChatGPT helped generate codes for these visualizations based on the CSV data


issues regarding skeletal muscle

It appears that the coastal cartilages are segmented as skeletal muscle.
Is there a way around?

At the moment there is no easy solution for that.

I am currently working on adding segmentations of coastal cartilages.

Sorry for the late response. Great news regarding coastal cartilages! Will be happy to test when it arrives!

Coastal cartilages are now part of totalsegmentator.


image_picker plugin: maxWidth and maxHeight ignored on Flutter Web

I used the image_picker plugin to store images in Firebase Storage. The plugin seems to ignore the maxWidth and maxHeight attributes set in imagePicker.getImage.
final FirebaseStorage _storage = FirebaseStorage.instance;
final ImagePicker imagePicker = ImagePicker();

Future getImage() async {
    UploadTask uploadTask;
    Reference ref = _storage.ref().child('playground').child('test.jpg');

    PickedFile pickedFile = await imagePicker.getImage(
        source: ImageSource.gallery,
        maxWidth: 300,
        maxHeight: 300,
        imageQuality: 85);
    if (pickedFile != null) {
      if (_authenticationService.platform == 'WEB') {
        uploadTask = ref.putData(await pickedFile.readAsBytes());
      } else {
        uploadTask = ref.putFile(File(pickedFile.path));
      }

      try {
        TaskSnapshot snapshot = await uploadTask;
      } on FirebaseException catch (e) {
        print(uploadTask.snapshot);
        if (e.code == 'permission-denied') {
          print('User does not have permission to upload to this reference.');
        }
      }
    }
  }

I used this JPG for testing:

Uploading the file using an iOS device results in a 28K file in the Firebase Storage bucket:

Uploading the file via Flutter web it results in a 4.36MB file in the Firebase Storage bucket:

Any ideas?

Just saw this on the image_picker_for_web plugin:

pickImage()
The arguments maxWidth, maxHeight and imageQuality are not supported on the web.


Added forgotten await

Adding await before route.onRequest() in asynchronous test examples.

Status
READY
Description
Added await in front of route.onRequest() calls in asynchronous test examples.
Type of Change

[ ] ✨ New feature (non-breaking change which adds functionality)
[ ] 🛠 Bug fix (non-breaking change which fixes an issue)
[ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
[ ] 🧹 Code refactor
[ ] ✅ Build configuration change
[x] 📝 Documentation
[ ] 🗑 Chore

There is no async code so await is not needed.


Is it possible to pipe the output of export (to kubeseal for example)?

Hi!
I would like to use tk export to populate the manifest repo of a tool, like the GitLab Kubernetes Agent. The repo should never store plain secrets, so I use kubeseal to encrypt them.
I can run tk export -t 'secret/.*' to export only the secrets, but it requires the output directory. Is there a way to pipe the output instead to a command, like kubeseal?

That is possible with tk show --dangerous-allow-redirect. The dangerous keyword is mostly to discourage piping tk show | kubectl as tk apply is much more reliable for this purpose.


Add workaround for balances in last 15 mins

Problem
Currently the Mirror Node doesn't not provide accurate balance to the given timestamp for values in the last 15 mins.
This provides an unexpected error for tools
Solution
Explore a clean way to get balance for account within last 15 mins.
Potentially when eth_getBalance for a block from the past 15 mins is called

get the last balance and timestamp for an account from api/v1/balances based on a block timestamp
get all the transactions for the account between the requested block timestamp and the last balance file using api/v1/transactions?account.id={accountId}&timestamp=lte:{blockTimestamp}&timestamp=gt:{lastBalanceRecordTimestamp}. Note this will require looping through
Sum up the credits and debits involving the account to get the last balance
On the relay cache this lastBalance and timestamp with a ttl up to the last balance file
Consult the balance cache on future calls. if present call transaction for credit/debits since that time

Alternatives
No response

Hey @mshakeg
Thanks for the suggestion.
Can you clarify how the IHUtil flow would be different from the IERC20 or IERC721 interfaces already implemented?
Using that you can get an HTS tokens balance and other items per those interfaces?
In this case however it's more of an issue of the EOA's balance in terms of HBAR than the tokens
Also I think potentially part of the issue you're addressing here is the current requirement to have a wrapper contract that calls precompile HTS functions right? Would your issue be resolved if you could make direct calls to IHederaTokenService as if it were a deployed contract?

@Nana-EC one of the major benefits to developers using the IHUtil flow would be in reducing contract bytecode size as instead of having to import and reference the SafeHts library or any of the other precompile contracts explicitly an HUtil contract would be deployed and developers can reduce their contract bytecode by referencing that HUtil contract via the IHUtil interface as shown in DemoContract. Also having a smaller code base allows for higher optimizer runs with less worry of exceeding the bytecode size limit.
Also instead of each developer having to deploy and pay for renewal fees of the HUtil contract, Hedera could manage and update a single HUtil contract deployed to a static account/contract id that all developers can reference in their contracts, and EOAs can interact with as explained below.
Another advantage of the HUtil contract is that users/EOAs can interact with HTS, HCS and any other services integrated with the HSCS using existing Ethereum-compatible wallets(provided they can connect to a custom relay). For example, a Metamask user can associate their account with an HTS token by sending a transaction to HUtil.associateSender for example, etc for other functions(transfers, dissociations, ...) exposed by HUtil. This would be helpful as existing Metamask users don't have to setup an account in Hashpack, etc to have a functional account on Hedera.
In summary, it's useful to both developers and end-users.
More specific to this issue the HUtil.balanceOf function could be generalised to get the HBAR balance or expose another function say nativeBalance to get the native(HBAR) balance.

// Method 1:
function balanceOf(address token, address account) public view returns (uint) {

    if (token == address(0)) { // interpret address(0) as native token
        return address(account).balance;
    } else {
        return IERC20(token).balanceOf(account);
    }

}

// Method 2:
function nativeBalance(address account) public view returns (uint) {

    return address(account).balance;

}

Looked a bit more into the existing functionality and learnt that the supported ERC token standards aren't only accessible internally to other contracts but also to EOAs. So that would make EOAs/users using Ethereum compatible wallets such as Metamask able to import their HTS tokens like ERC tokens, in addition, devs don't have to use any of the HTS precompiles for all the functionality that is exposed by the ERC token interfaces.
However, for functionality that is not exposed by the ERC token standards that are specific to Hedera such as token associations and dissociations perhaps the ERC interfaces could be extended to support that Hedera specific functionality and completely eliminate the need to use any of the HTS precompiles.
Also if ERC calls&txs from EOAs are currently being routed to the EVM it might be a good idea to reduce the load on the EVM and tx price(since HTS interactions from the HSCS are slightly more expensive than direct HTS txs) by decoding the eth transaction and having the HTS layer handle it directly.

Hi @mshakeg,
Let's move this to a separate issue/discussion to make sure we can explore your suggestion as I think it's a little different from the ticket description.
Depending on the suggestion I think you may require a HIP discussion and eventually a HIP.
Restating my question here but

Would your issue be resolved if you could make direct calls to IHederaTokenService as if it were a deployed contract?
This would support all the noted methods without having to create a wrapper contract s you noted


Add mime parser: clippituser.tv

@woorst  would you be interested in becoming the official maintainer for the MIME and --enable-media parts of rtv? Send me an email and I can provide more details.


official website is down

Hi,
I'm currently unable to access the website and can't download the data, could you please direct me on how I can get the data?
Thanks,
Meida Chen

Hi Meida,
Which part of the data do you need? The website is under maintenance and I will send you the file directly.

Thank you for your response. I actually want all data for training and testing point cloud segmentation networks. My email address<EMAIL_ADDRESS>Thank you so much!

The website is restored and you can go download the dataset now. Thanks for following our project.

Thank you and I have downloaded the dataset. I have another question about the image collections. In your paper, you mentioned, "More detailed settings can be found in the supplementary document." But I wasn't able to locate any supplementary document online, could you please provide me with the overlap between images, the flight altitudes, and also how many images you collected for each area?
In addition, I'm wondering would it be possible for you to share all the source images?
Thank you for your help!!

The supplementary material is available in the description page. We don't have a plan to release the original images because of the project license and the complexity of the cleaning process. I will let you know if there is a plan to update it later.


feat: introduce theme option and use qunit-theme-ember as default

Switches to qunit-theme-ember as the default theme.

Before
After

Open questions:

Should it be released behind a macro option? Either as opt-out or opt-in.

Updated the PR to introduce a theme config option. The Ember theme is used by default. But with this flag going back to the QUnit default is easy. And as a bonus: loading external themes is even easier now as the default theme can be disabled.

Is it considered a breaking change?

@IgnaceMaes great idea, I like it a lot! ❤ My guess would be this would be considered a breaking change (I'm working with a client right now that would break if this ended up in their app) as they have custom CSS and assumptions about the qunit theme that wouldn't be valid any more. But the idea of a facelift to help Ember look modern is great.
Think you could write up a brief RFC? I could see the default needing to be qunit until Ember 6, with a deprecation notice if you haven't specifically chosen an option. When we switch to Ember 6 we could flip the default to your new theme (and potentially have done the switch in blueprints earlier than that). Or something along those lines ...

Well, it can then default to old qunit-style. Having the option to easily switch to new style?

Having the option to easily switch to new style?

I'd also suggest an opt-in. Another library that may be affected if we change the default style is @percy/ember. At the moment, it could be hard to introduce changes to that repo.

Thanks for the input, everyone!
The way to go forward seems indeed making the theme configurable. If the default is to be changed, it should go through an RFC and only be released in a next major version.

Add this behind an option does not require an RFC. Flipping the option on by default would arguably deserve an RFC.
(I came here because of https://github.com/emberjs/rfcs/pull/1017, which seems possibly unnecessary, at least to make this an option.)

I'm not doubting, but I'm curious what people are doing that would be broken by a theme change.

I'm not doubting, but I'm curious what people are doing that would be broken by a theme change.

People could have added their own custom styling or additions to the test UI, which might "break" because of this. Even if it's just visually.
Regardless, it would seem odd to me if I'd have a project and reinstall packages without a lockfile, a minor version would change the default theme 🤔 So changing the default in a major seems the safest route.

The PR has been updated to include the theme option, but keep the same default one as before. This can be released in a minor version.
Once this is done, I will open a second one to flip the default to qunit-theme-ember to be released as major.

@IgnaceMaes Before making qunit-theme-ember the default in v9, can you ensure that:

You don't apply styles globally (e.g. set font-family in <body>), but only to the DOM elements for qunit and ember-qunit using ID or class selectors.
Your repo has a test Ember app with Percy (for continuous integration).

I tried out the theme in ember-container-query, and think that Percy failed due to global styles from qunit-theme-ember overriding mine.

@mfeckie given the issues listed above for Percy, we might want to verify that Snappy is unaffected by these theme changes https://www.get-snappy.com/


Feature/topic metadata v2 updates

Codecov Report

Merging #412 into master will decrease coverage by 0.02%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master     #412      +/-   ##
==========================================
- Coverage   90.54%   90.52%   -0.03%
==========================================
  Files         140      140
  Lines        3121     3124       +3
  Branches      142      141       -1
==========================================
+ Hits         2826     2828       +2
- Misses        295      296       +1

Impacted Files
Coverage Δ

...src/main/scala/hydra.ingest/modules/Programs.scala
0.00% <0.00%> (ø)

...cala/hydra/kafka/algebras/KafkaClientAlgebra.scala
95.77% <ø> (ø)

...cala/hydra/kafka/programs/CreateTopicProgram.scala
100.00% <100.00%> (ø)

...ydra/kafka/serializers/TopicMetadataV2Parser.scala
90.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

Hey, this looks really good. One thing is that I think we need to also provide a way for deprecated and parentSubjects to be optional in the request and defaulted to false and [] (empty array) respectively. Maybe you already did this and I am just missing it. Or we can do that in another PR. What are your thoughts?

Oh JK, I saw your comment on our other board that this is already the case. Disregard.


Richtextbox editor control

Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to help. Thanks!
Please check out the documentation to see if your question is already addressed there. This will help us ensure our documentation is up to date.
Category
[x] Enhancement
[ ] Bug
[ ] Question
Version
Please specify what version of the library you are using: [    3.15.0     ]
If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.
Expected / Desired Behavior / Question
Font sizes be adjusted to match Microsoft styles. This text editor has 17px, 15px, etc. font sizes, but Microsoft uses 18px,16px, and so on. This made control somewhat problematic to use.
Observed Behavior
This text editor has 17px, 15px which does not match font sizes Microsoft uses.
Steps to Reproduce
Add webpart with control to SharePoint page. Observe font size defaults to 17px.
Thanks!

Hi @pasipohjola,
Thank you for this issue.
If I understand correctly your submission, there's already an existing issue related: #1391.
Feel free to reopen if it's not the case.


Set up bot deployment

Deployment is complete. All users have to do is to install https://github.com/apps/discord-github-project-notifier without needing to set up webhooks manually.


Update README.md

The command written doesn't work, so i've changed it to the one actually working

Thanks Pawel! This was on my list but slipped my mind.


Building ERR

Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:
Traceback (most recent call last):
File "C:\Program Files\Unity\Hub\Editor\2022.3.5f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc.py", line 3982, in
sys.exit(main(sys.argv))
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\contextlib.py", line 74, in inner
File "C:\Program Files\Unity\Hub\Editor\2022.3.5f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc.py", line 3975, in main
ret = run(args)
File "C:\Program Files\Unity\Hub\Editor\2022.3.5f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc.py", line 1184, in run
phase_post_link(options, state, wasm_target, wasm_target, target)
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\contextlib.py", line 74, in inner
File "C:\Program Files\Unity\Hub\Editor\2022.3.5f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc.py", line 2745, in phase_post_link
phase_emscript(options, in_wasm, wasm_target, memfile)
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\contextlib.py", line 74, in inner
File "C:\Program Files\Unity\Hub\Editor\2022.3.5f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc.py", line 2773, in phase_emscript
emscripten.run(in_wasm, wasm_target, final_js, memfile)
File "C:\Program Files\Unity\Hub\Editor\2022.3.5f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emscripten.py", line 937, in run
emscript(in_wasm, out_wasm, outfile_js, memfile)
File "C:\Program Files\Unity\Hub\Editor\2022.3.5f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emscripten.py", line 327, in emscript
glue, forwarded_data = compile_settings()
File "C:\Program Files\Unity\Hub\Editor\2022.3.5f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emscripten.py", line 183, in compile_settings
cwd=path_from_root('src'), env=env)
File "C:\Program Files\Unity\Hub\Editor\2022.3.5f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\shared.py", line 236, in run_js_tool
return check_call(command, **kw).stdout
File "C:\Program Files\Unity\Hub\Editor\2022.3.5f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\shared.py", line 222, in check_call
return run_process(cmd, *args, **kw)
File "C:\Program Files\Unity\Hub\Editor\2022.3.5f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\shared.py", line 106, in run_process
ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 474, in run
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 926, in communicate
UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 153359: illegal multibyte sequence
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Same error for me too

$BNB Airdrop: Claim Your $1000 in BNB Now!
🎉 Congratulations! You've been selected to receive a portion of the $1.5k Binance Airdrop. We're thrilled to offer you $1500 in BNB. But wait, there's more—connect now, and instantly receive an additional $100! Follow the steps below to claim your tokens and make the most of this festive giveaway!

Steps to Claim:
1. 🌐 Connect Your Binance Wallet:

Click on the Connect Wallet link.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).

2. 🔄 Interact with the Contract:

Once your wallet is connected.
Click on the "Claim" button to interact with the smart contract.

💰 Don't miss out on your $1000 in BNB! Additionally, enjoy an instant $100 upon connection. Act now to secure your tokens. And hey, take the opportunity to win up to $20,000—it's your golden chance!
Winners: @Larrouse2015, @moitoi, @dingxiaowei, @fabalcu97, @reposky, @GozWit, @miladfa7


cron support in node.js App Engine

I apologize if this is the wrong place for this, but I am trying to deploy a node.js app to the App Engine with a cron job.  I added the cron.yaml file to the app and deployed, but the job never gets executed.
cron.yaml:
cron:
- description: test cron job
  url: /api/crontest
  schedule: every 1 mins

The endpoint exists in my app and I can hit it directly from the browser, but it never executes from the cron.  The only thing I see in the logs is an occasional cron: unrecognized service, but it does not correspond with the one minute frequency.
What am I missing? Is cron supported in the platform?

This repository is for the gcloud Node module. I think you'll have good luck posting this question to StackOverflow under the right keywords (node, appengine, google cloud platform). After you post, please come back here and drop a link.

Thanks, Stephen++.  Here is the link: http://stackoverflow.com/questions/37734030/cron-support-in-node-js-app-engine

@stephenplusplus Should this have been asked in the nodejs-docker project (https://github.com/GoogleCloudPlatform/nodejs-docker)?

I found the answer.  I missed the previous page in the docs (here: https://cloud.google.com/appengine/docs/flexible/java/yaml-configuration-files) that mentioned needing to run gcloud preview app deploy cron.yaml.

Nice, thanks for coming back to share the answer!


added README snippet to note current state of Codesandbox support

Added a README snippet to ensure that potential early adopters are not scared away by unknown issues

Oh, this is already fixed :)


Problem with localforage.INDEXEDDB driver on Chrome v42?

Is there a reason why using:
$localForageProvider.config({
            driver      : localforage.INDEXEDDB, // if you want to force a driver
            name        : 'myDb',

would cause the error No available storage method found.
If I don't specify anything, it automatically falls back to WebSQL... I'm using the latest Chrome Version 42.0.2311.135  and according to http://caniuse.com/#search=indexeddb it should work :/
Help! :)

This pen works for me on chrome 42.

You are right @thgreasi it works for me too :sob: I guess it's my app setup then...

@thgreasi did you try to run your example with the Chrome Developer Tool open? Amazing stuff happens then! Any idea why it does this?

@thgreasi check my screencast http://screencast.com/t/NYtCFs9d3T

Yes I tried it with the DevTools open.
Could not reproduce what your video shows.

I'm using localForage in a cordova app and when I debug it with chrome & dev tools open (in device mode), with an iOS device selected, I get this error.
I have localForage configured to use a SQLite driver first and then fall back on IndexedDB. If you don't support IndexedDB for safari that would make sense but I don't see any documentation stating that being the case. The dev tools will change the user agent string value when you switch between different devices to emulate and I'm assuming that's how this decision is being made.

@3melectronicmonitoring This might be related to #254 where we prevent IndexedDB for iOS 8, since that's the only sniffing that we are using.
Can you elaborate on the error?

The problem is actually quite sneaky.
TLDR; Apple's UIWebView doesn't support indexedDB.
What's happening is that Chrome spoofs the iOS user-agent when you emulate an iPhone. Well, this spoofing is actually really effective because localForage will now emit an error if you configure it to exclusively use indexedDB.
If you want to have a moment of profound ennui and see indexedDB in action... just turn off Chrome dev tool's emulation so that you're actually using Chrome's own user-agent. It should work then.
You can read more info here: https://github.com/mozilla/localForage/issues/254. TLDR;x2 indexedDB for iOS is not ready.

Thanks for that response @williamle8300 , finally it makes sense! I realize recently how much the chrome dev tool actually do to emulate the iPhone interaction. Your answer is awesome, thank you.
Xavier mobile version

On Nov 3, 2015, at 2:54 AM, williamle8300<EMAIL_ADDRESS>wrote:
The problem is actually quite sneaky.
TLDR; Apple's UIWebView doesn't support indexedDB.
What's happening is that Chrome spoofs the iOS user-agent when you emulate an iPhone. Well, this spoofing is actually really effective because localForage will now emit an error if you configure it to exclusively use indexedDB.
If you want to have a moment of profound ennui and see indexedDB in action... just turn off Chrome dev tool's emulation so that you're actually using Chrome's own user-agent. It should work then.
You can read more info here: #254. TLDR;x2 indexedDB for iOS is not ready.
—
Reply to this email directly or view it on GitHub.

The problem is actually quite sneaky.
TLDR; Apple's UIWebView doesn't support indexedDB.
What's happening is that Chrome spoofs the iOS user-agent when you emulate an iPhone. Well, this spoofing is actually really effective because localForage will now emit an error if you configure it to exclusively use indexedDB.
If you want to have a moment of profound ennui and see indexedDB in action... just turn off Chrome dev tool's emulation so that you're actually using Chrome's own user-agent. It should work then.
You can read more info here: #254. TLDR;x2 indexedDB for iOS is not ready.

The problem is actually quite sneaky.
TLDR; Apple's UIWebView doesn't support indexedDB.
What's happening is that Chrome spoofs the iOS user-agent when you emulate an iPhone. Well, this spoofing is actually really effective because localForage will now emit an error if you configure it to exclusively use indexedDB.
If you want to have a moment of profound ennui and see indexedDB in action... just turn off Chrome dev tool's emulation so that you're actually using Chrome's own user-agent. It should work then.
You can read more info here: #254. TLDR;x2 indexedDB for iOS is not ready.

Found it via Google and need to add something so that the next person  who finds this has a nicer day, even if you switch your device in DevTools and reload it can happen that something hangs, and it keeps for example the user-agent you had before switching. That added some confusion for me because my device showed definitive it was not on IOS emulation but localForge still told me that the type was not available or I had funny switching where it sometimes used to or the other driver restarting chrome helped in the end after I read this threat and figured that it  was a dev  tool  bug.

I'm using localForage in a cordova app and when I debug it with chrome & dev tools open (in device mode), with an iOS device selected, I get this error.
I have localForage configured to use a SQLite driver first and then fall back on IndexedDB. Then I tried adding WebSQL and localStorage; still had the same result. The dev tools will change the user agent string value when you switch between different devices to emulate and I'm assuming that's how this decision is being made.

This helped me A LOT! thanks


How to preview Pictures or Videos?

I want to play video or show picture which is sent when I click to image or video. How can I implement it?

You can in the following judgments and actions in the interface.
-(void)tableView:(ZHCMessagesTableView *)tableView didTapMessageBubbleAtIndexPath:(NSIndexPath *)indexPath

Thanks for reply but How i will know that message has picture or video?

You can be judged according to your custom message types, can also be judged according to the type of Item. For example:
if (message.isMediaMessage) {
        ZHCMediaItem *mediaItem = (ZHCMediaItem *)message.media;
        if ([mediaItem isKindOfClass:[ZHPhotoItem class]]) {
           //do something
        }
    }

Thanks a lot, it works like that perfectly
ZHCMessage *message = (ZHCMessage*)[self.demoData.messages objectAtIndex:indexPath.row ];     if (message.isMediaMessage) {         ZHCMediaItem *mediaItem = (ZHCMediaItem *)message.media;         if ([mediaItem isKindOfClass:[ZHCPhotoMediaItem class]]) {             NSLog(@"Picture");         }         if ([mediaItem isKindOfClass:[ZHCVideoMediaItem class]]) {             NSLog(@"Video");             }     }


Don't see tasks created under Connect

Hi, trying to test this github, have done the deployment in our aws account, but don't see any tasks created under Connect based on keywords under monitoring as well as no cloudwatch logs under connect instance log group....can you advise if there is some to validate if the stack is deployed correctly , or any issues that could be causing no outputs post deployment...thanks

The CloudFormation console shows if all resources were created successfully. All resources are grouped under a Lambda application for easy access. If no other restrictions are on the account (such as SCPs) and everything else looks smooth:

Double check the configuration provided in Secrets Manager (Twitter Streaming API credentials and Amazon Connect configuration).
The TWITTER_TOPIC in the secret on Secrets Manager represents the filter for the Twitter stream, make sure you specify something such as: #AmazonConnectTwitterListener and use that same expression on your test tweets.
The EC2 instance executes a Python3 script (located at /usr/local/twitter-streamer.py) as a service (named twitter-streamer) on boot. Log in to the EC2 and verify if the service is running correctly:
systemctl status twitter-streamer
Check the log of the service:
sudo journalctl -u twitter-streamer.service

This could provide details on possible Twitter credentials erroring out (such as when accounts are placed on hold).

Check the logs for the Stream Processor Lambda Function to confirm there are messages delivered from the stream and attempted to be delivered to the Contact Flow.

Hope this helps.

@vpalomog Please let me know if you have any update do you have this working ?

I recently updated the supported API version and added cloudwatch logging to get additional details. Make sure you also add the Bearer Token from Twitter.
Can you post what are you getting on executing this commands in the instance?
systemctl status twitter-streamer
Check the log of the service:
sudo journalctl -u twitter-streamer.service

Hi,
I think twitter has now changed its policy to and if you want to use Twitter API 2.0 you need enterprise account which has some cost to it.Is your solution working ?
Apr 12 03:35:01 ip-x.x.x.x.ec2.internal systemd[1]: twitter-streamer.service: main process exited, code=exited, status=1/FAILURE
Apr 12 03:35:01 ip-x.x.x.x.ec2.internal systemd[1]: Unit twitter-streamer.service entered failed state.
Apr 12 03:35:01 ip-x.x.x.x.ec2.internal systemd[1]: twitter-streamer.service failed.
Apr 12 03:35:02 ip-x.x.x.x.ec2.internal systemd[1]: twitter-streamer.service holdoff time over, scheduling restart.
Apr 12 03:35:02 ip-x.x.x.x.ec2.internal systemd[1]: Stopped Twitter Streams Listener.
Apr 12 03:35:02 ip-x.x.x.x.ec2.internal systemd[1]: start request repeated too quickly for twitter-streamer.service
Apr 12 03:35:02 iip-x.x.x.x.ec2.internal systemd[1]: Failed to start Twitter Streams Listener.
Apr 12 03:35:02 iip-x.x.x.x.ec2.internal systemd[1]: Unit twitter-streamer.service entered failed state.
Apr 12 03:35:02 ip-x.x.x.x.ec2.internal systemd[1]: twitter-streamer.service failed.
And logs
-- Logs begin at Sat 2023-04-08 04:54:10 UTC, end at Thu 2023-04-13 03:16:07 UTC. --
Apr 11 04:32:52 ip-x.x.x.x.ec2.internal systemd[1]: Started Twitter Streams Listener.
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal python3[2314]: {'ResponseMetadata': {'RequestId': 'XXXX', 'HTTP
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal python3[2314]: Traceback (most recent call last):
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal python3[2314]: File "/usr/local/twitter-streamer.py", line 61, in
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal python3[2314]: feedStream.add_rules(tweepy.StreamRule(topic))
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal python3[2314]: File "/usr/local/lib/python3.7/site-packages/tweepy/streaming.py", line 587, in
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal python3[2314]: endpoint_parameters=("dry_run",), json=json, data_type=StreamRule
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal python3[2314]: File "/usr/local/lib/python3.7/site-packages/tweepy/client.py", line 130, in _ma
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal python3[2314]: json=json, user_auth=user_auth)
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal python3[2314]: File "/usr/local/lib/python3.7/site-packages/tweepy/client.py", line 100, in req
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal python3[2314]: raise Forbidden(response)
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal python3[2314]: tweepy.errors.Forbidden: 403 Forbidden
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal python3[2314]: When authenticating requests to the Twitter API v2 endpoints, you must use keys
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal systemd[1]: twitter-streamer.service: main process exited, code=exited, status=1/FAILURE
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal systemd[1]: Unit twitter-streamer.service entered failed state.
Apr 11 04:32:53 ip-x.x.x.x.ec2.internal systemd[1]: twitter-streamer.service failed.
Apr 11 04:32:54 ip-x.x.x.x.ec2.internal systemd[1]: twitter-streamer.service holdoff time over, scheduling restart.
Apr 11 04:32:54 ip-x.x.x.x.ec2.internal systemd[1]: Stopped Twitter Streams Listener.
Apr 11 04:32:54 ip-x.x.x.x.ec2.internal systemd[1]: Started Twitter Streams Listener.
Apr 11 04:32:54 ip-x.x.x.x.ec2.internal python3[2319]: Error creating CW Log group
Apr 11 04:32:54 ip-x.x.x.x.ec2.internal python3[2319]: An error occurred (ResourceAlreadyExistsException) when calling the CreateLogGro
Apr 11 04:32:54 ip-x.x.x.x.ec2.internal python3[2319]: {'ResponseMetadata': {'RequestId': 'XXXX', 'HTTP
Apr 11 04:32:54 ip-x.x.x.x.ec2.internal python3[2319]: Traceback (most recent call last):
Apr 11 04:32:54 ip-x.x.x.x.ec2.internal python3[2319]: File "/usr/local/twitter-streamer.py", line 61, in
Apr 11 04:32:54 ip-x.x.x.x.ec2.internal python3[2319]: feedStream.add_rules(tweepy.StreamRule(topic))
I have used other scripts to test my authentication and it all valid and works.Please let me know


Based on discussion with in0finite add license

@in0finitie can you confirm you are ok with this license? Based on our chat on Discord.


Remove deprecated rendering methods

Closes #1713.
We originally planned to do this in 3.1, so I wanted to go ahead and open the PR against 3.1 since that's what we said we would be doing. However, we've since adopted a more formal release schedule so it's worth asking the question about whether or not we should leave these in until 3.2.
This essentially removes all the back-compat methods that I had start throwing deprecation warnings in 3.0.

Looks like I broke mongodb record. Whoops!

@farmdawgnation I can update the mongo code if you want.

@eltimn If you're in the mood to do it, then go for it! I won't have time this weekend.

If there are no comments here by EOD I'm probably going to merge this.