Optimize R.interesction to lookup the smaller list

~~http://bit.ly/1RJVPp4~~
http://goo.gl/7dxGjG

looks like a good idea

One problem I see is callers relying on the order.

intersection seems to me to be a set operation, so ordering should not matter. let 'em sort if order is important. I don't think we should pick an order.

I think it's less picking an ordering more preserving it. See this haskell example.
[1,2,2,3,4] `intersect` [6,4,4,2] == [2,2,4]

The results are [2,2,4] because that's the order they appear in the first array.
If it was using the shortest array first internally it would produce [4,4,2]

It bleeds into other things like R.union:
R.union([1,2,3], [4,5]); // [1,2,3,4,5]
R.union([4,5], [1,2,3]); // [4, 5, 1, 2, 3]

and R.uniq
R.uniq([1,3,1,2,3,2]) // [1, 3, 2]

First list priority is established with R.difference and R.symmetricDifference too
R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5]
R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2]

I think #1638 may remove many of these issues.

I think #1638 may remove many of these issues.

I don't think so. At present, we treat intersection etc. as Set operations (i.e. no dupes). But it's not clear to me if that should still be the case for lists if we have a Set type. If we treat lists like bags, then we'll need to define consistent behaviors, as suggested by @jdalton above. That's beyond the scope of #1638 IMO.

FWIW we tried this kind of optimization in Lodash but reverted it because folks complained. The bang wasn't worth the cost as it only really mattered for arrays of significant size difference which was something we couldn't predict and the inconsistency wasn't worth it. Instead we went for optimizations that didn't effect expected or behavior consistent with the rest of the methods.

@buzzdecafe: I'd forgotten that we already had done that.  I'm quite happy with the Set-like interface for lists for these operations.  I don't see any real advantage in pursuing Bags for these.
@jdalton: What inconsistency did you introduce?  Ramda already is different from the Haskell example above:
intersection([1,2,2,3,4], [6,4,4,2]); //=> [4, 2]

I don't right now have a significant concern about whether that should be [2, 4] instead.  Do you think I should?

Ramda already is different from the Haskell example above:

Uniqing the results aside it shows order of first array is preserved.

What inconsistency did you introduce? ... Do you think I should?

The same same issue I outlined above for Ramdas other APIs. It made _.intersection the only one to not use the order of the first array or subsequent arrays (as methods like union). Added that it only kicked in when the second array was shorter was a point of confusion and a gotcha for users.

Which is why it was reverted.

We're in a problematic situation here because it's hard to keep value-equality semantics without introducing such optimizations. When the difference between the list is large enough, the performance improvement is quite impressive.
Having said that, my intuition that this should not be a problem for consumers may be very wrong, and if many lodash users complained we should consider reverting the optimization.

@jdalton: Do you have lodash discussion thread numbers?

I'll see if I can find them. The gist is that though the win is big when the size difference is significant its not otherwise. The root issue is large lists are slow, so that's where we focused our attn to get more generic wins without introducing inconsistencies.

Here's @davidchambers thoughts on a similar change in Underscore https://github.com/jashkenas/underscore/pull/1511#issuecomment-37154114.

@jdalton, Thanks.  I read through  the  issues.  I'll take a look at the code in question when I'm in front of a computer again.  It's still unclear to me whether this is of interest to Ramda or not, but thanks for bringing it to our attention.

It's as if Dave's replying to @buzzdecafe.

order of elements in a set is not important and we must not relay on order of elements

You're absolutely correct that the order of elements in a set is not important. Unfortunately, we're not returning a set, we're returning an ordered list. If _.intersection is called twice with the same arguments, it should return the same value in both cases. Thus, there must be rule for determining the order of elements. The current rule is relatively straightforward:

Elements in the resulting list appear in the same order
as they (first) appear in the first of the given lists.

If this pull request is accepted, the rule will be more complex:

Elements in the resulting list appear in the same order
as they (first) appear in (the first of) the shortest of
the given lists.

The problem is that changing the ordering rule is a breaking change. One can argue — perhaps rightly — that code should never have relied on the current ordering rule, but there must surely be code in the wild which does (in much the same way that many JavaScript projects rely on for–in enumeration order).


Add debug CLI and wrap errors

Adds a debug CLI that helps inspecting a local trader database. Also wraps some errors to give more information about the cause.

Split the actual bug fix off into https://github.com/lightninglabs/pool/pull/179 and removed the RelevantBatchSnapshot RPC there.


Create LICENSE.md

Coverage remained the same at 100.0% when pulling 05021f6b4fc9b8d0dab1eed18db80309d7452ffa on kellybigley:patch-1 into a783d46ae942d72ec83d06e0e5893b6917a69959 on mapbox:master.


[Feature Request] Prompt Generator

Describe the solution you'd like
Input a summary of the task, the LLM will propose a prompt optimized for that task.
Why the solution needed
Because of the need to optimize prompts for accuracy.
To assist those who have no knowledge of prompt engineering.
Additional context
Implementation feasibility
Are you willing to discuss the solution with us, decide on the approach, and assist with the implementation?

[x] Yes
[ ] No

Reference: https://note.com/kyutaro15/n/nb89cce6e4d63

MetaPrompt : https://docs.anthropic.com/ja/docs/helper-metaprompt-experimental


Added an enum for file attributes on Windows

Also updated relevant documentation for "remove" which may indirectly be tied to "setAttributes" and the "FileAttribute" enum.
This will help people who get "misleading" error messages on Windows when ex. removing a file, because the documentation now specifies what you can do etc.

ping @bausshf


Reranker dynamic quantization

Feature request
--dtype support for rerankers
Motivation
Easily quantize cross encoder models
Your contribution
. (will look into this)

Correct, there should be an option.
If you add a line like in https://github.com/michaelfeil/infinity/blob/65afe2b3d68fda10429bf7f215fe645be20788e4/libs/infinity_emb/infinity_emb/transformer/embedder/sentence_transformer.py#L87C9-L90C14
and a test (verifying that the quantization of a reranker model works). Please use BGE-reranker BASE  or mixedbread-xsmall reranker for the test


Add checks for MDO metadata file

Follows this change in iromlab: https://github.com/KBNLresearch/iromlab/issues/69

Done: https://github.com/KBNLresearch/omSipCreator/commit/b40fc65470947e561125ca54765d9e5674267760 + added check for well-formedness of XML: https://github.com/KBNLresearch/omSipCreator/commit/17cc3bb9a60082aeac06225adf4ebe7b6af71ea0


JSON serialization of InputMedia Types

The InputMedia Classes were not serialized as JSON and instead printed as default data class strings. This implements a possible fix for that problem.
This Problem was reported in issue #213

I resolved the merge conflict.
I have little knowlege about retrofit and based the toString overrides on the ReplyMarkup Types like InlineKeyboardMarkup.
I looked into the retrofit converters you mentioned but as far as i can see they are not called when using functions like editMessageMedia. If they were i think the GsonConverter would take care of it.

I added a new InputMediaConverterFactory and removed the toString methods.
I had to add the TelegramFileAdapter and InputMediaAdapter to GsonFactory.createForApiClient()


Fix portal scissor test

Width and height in glScissor() must not be negative, so if surfRect has lower x2 or y2 than x1 or y1, then flip the scissor parameters. Tested on test-portals-recursion on viewpos -2223 639 65 91 3.
Fixes a GL_INVALID_VALUE at https://github.com/DaemonEngine/Daemon/blob/1872b92274fbd9533e622633c56a515a4ff899c0/src/engine/renderer/tr_backend.cpp#L359

Sure


Replace Buffers with simplier lists

These lists function similarly to buffers but do not error if they are added to when they have excess.

Current coverage is 78.74% (diff: 85.71%)

Merging #50 into master will increase coverage by 2.30%

@@             master        #50   diff @@
==========================================
  Files            25         22     -3
  Lines           972        922    -50
  Methods           0          0
  Messages          0          0
  Branches        135        124    -11
==========================================
- Hits            743        726    -17
+ Misses          185        158    -27
+ Partials         44         38     -6

Diff Coverage
File Path

••••••••   85%
...m/wepay/kafka/connect/bigquery/BigQuerySinkTask.java

Powered by Codecov. Last update 589ffc9...30602d5


Ramen Graph: Need to add a node to select an entry in a list

This pull does it for transform data
https://github.com/louisVottero/vtool/pull/502


UI: [Refresh List] button to implement

As a repo power user I want to look for the new repos on current Core and update Organikos DB accordingly, by clicking Refresh List button.

Depends on #4


fixed #173 added checksum file to the result folder. It checks crc fo…

…r: mm, coe and output.csv
btw: do any if you know why debugging in electron no longer works. I can add breakpoints but they seem to set them self on a line of their choice and the context does not match when hit.

LGTM
I don't know why the app is not debugging. I'm experiencing the same. The sourcemaps are embedding and getting picked up so I'm not sure what the problem is.
I also get a ton of type errors when building the current master.
Someone please open an issue about this.

@ldcouto try deleting your typings folder and do gulp init gulp build

Looks fine by me...

@CThuleHansen that works, thanks.
Debugging is still broken for the co-sim configs, which are also broken in general (see #203).
I do get an error when trying to create cosims, etc.:
zone-node.js:158 Uncaught Error: Command failed: git add -f "C:\Users\CoutoLD\projs\workspaces\into-app\tests\Multi-models\mm-new (70)\co-sim-62\coe.json"
fatal: Not a git repository (or any of the parent directories): .git

@ldcouto guess it is because the project is not a git repository? Then you need to turn traceability off

I guessed as much. But...
I never chose to make the project a git repository (or not make it). If git is needed for app traceability, a repository needs to be created in the background when we create a project.
Anyway, even with traceability disabled, debugging and co-sim config is still broken:
I tried to pause in the debuger a few times and it always seems to hit patchTimer in zonde-node.js. Could it be looping there?

@ldcouto  same error or different error?

It's still the thing in #203
We should move this discussion elsewhere.

Sorry. Thought I had.


Test all metrics on GPU

🚀 Feature

Add an option to run tests on a single GPU.
Motivation

Currently tests for metrics are usually run via  run_class_metric_test, which defaults to CPU if only a sinlge GPU is present. This can cause issues with CUDA to go into a release unnoticed.
Pitch

Fix quietly switching to cpu even if ddp=False and GPUs are available.
Updating run_class_metric_test to test on single gpu, cpu and both using ddp if available/selected.
Alternatives

Accept incomplete test coverage.
Additional context

Hi @twsl,
All metrics should already run on single GPU:
https://github.com/PyTorchLightning/metrics/blob/d071eb2f1245112c599b7fe0d165b8ac55663083/tests/helpers/testers.py#L450

@SkafteNicki You are correct, this mistake on my end was probably caused by a reset of the devcontainer settings disabling the gpu and me then just carelessly checking the device value..
However these is still no option to test all four combinations (single and multi cpu,gpu). Depending on the machine configuration, some tests are never considered. I'd much rather see a dedicated skipped test, if the machine config doesn't allow something.

@twsl I see your point.
Any recommendation how to do this the most easy way?

@SkafteNicki the refered proposal takes care of the pytest arguments. Each method there accepts a device to run on. I just dont know if that option is already supported in the ddp implementation


Error when handlebars used for generating

Got an error after try to start (node keystone) keystone with fresh generated KeystoneJS and Handlebars as a templating language. With Jade everything works fine.
Error: getaddrinfo ENOTFOUND
at errnoException (dns.js:37:11)
at Object.onanswer [as oncomplete] (dns.js:124:16)

Got almost the same error when generating keystone only with User model.

The current generated KeystoneJS with Handlebars isn't all there. Issues:

You may need to setup the templating engine yourself: https://github.com/keystonejs/keystone/issues/1441
There is no enquiry-notification.hbs template (https://github.com/keystonejs/generator-keystone/pull/119)

I also encountered an issue where the path to the template is wrong. It may be the same https://github.com/keystonejs/generator-keystone/issues/110.
If you have this issue then, in addition to ppiekarczyk's workaround on Issue 1441, you may also need to add to the keystone.Email options object passed in templateBasePath: path.normalize(path.join(__dirname, '..', 'templates', 'views', 'emails')). All together:
new keystone.Email({
    templateExt: 'hbs',
    templateEngine: require('express-handlebars'),
    templateName: 'enquiry-notification'
    templateBasePath: path.normalize(path.join(__dirname, '..', 'templates', 'views', 'emails')),


ANDI violation for Star Rating component.

Star Rating should be focusable using tab and trigger click event on pressing enter.

48 targeted ANDI accessibility scripts.

Fixed in latest release v1.0.47


Update dynamodb, s3, sqs to 2.17.171

Updates

software.amazon.awssdk:dynamodb
software.amazon.awssdk:s3
software.amazon.awssdk:sqs

from 2.17.159 to 2.17.171.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "software.amazon.awssdk" } ]

labels: library-update, early-semver-patch, semver-spec-patch, commit-count:1

Not necessary as we are already using a newest version


IBMCloud: Hiveutil fixes

HIVE-1620

Remove --resource-group-name from hiveutil deprovision ibmcloud. Use provided InfraID as ResourceGroupName.
Remove --cis-instance-crn and --account-id from hiveutil deprovision ibmcloud usage. These were removed in #1706 and I missed removing them here.
Add --cluster-name to hiveutil deprovision ibmcloud usage. --cluster-name is a required parameter (needed for cleaning up DNS entries) should be in the usage example.
Fix an inconsistency with hiveutil create-cluster I noticed writing usage docs. --ibm-instance-type should also be reflected in the generated install config as should the default.

/hold

/unhold

Tested install + uninstall w/ InfraID as ResourceGroupName.

/lgtm


update packages.json [closes #26]

Adding types for the two packages ws and body-parser somehow fixes the issue.
Really weird that everyone else working on the project did not have the problems

Good you got it work with pnpm. But I'm a bit worried about this change as it implies we now have to maintain both a npm package-lock.json file and a pnpm lock file during development. I'd prefer to just stick with package-lock.json if possible.


Grove: Parent request timeout is not working

Hi,
I have tried to use all the config parameters documented on grove README to set a parent request timeout without success.

parent_request_timeout_ms: no effect
timeout_ms on remap and rules: no effect

I took a glance at cache/retryinggetter.go and web/util.go and I suspect that any timeout param is considered, specifically on web.Request. RemappingProducer.GetNext does not consider any timeout at HTTP Transport creation, either:
newURI, proxyURL, transport := p.rule.URI(p.oldURI, r.URL.Path, r.URL.RawQuery, p.failures)

I made a ugly hack to limit to 5 seconds the response waiting time to get over the issue for now:
https://github.com/nedmedia/trafficcontrol/commit/f08023171ba30accdf7278320156af06aa2f7e3c
but I wonder if I missing something, can you guys confirm that?

parent_request_timeout_ms should be renamed, it's the connection establish timeout, not the request timeout, the name is misleading, sorry.

timeout_ms on remap and rules: no effect

That's the right timeout. It looks like it's not getting set.
So, retryinggetter.GetAndCache takes the timeout parameter that comes from the rules. We need to fix it to pass that timeout to web.Request.
So, change this to pass timeout:
https://github.com/apache/trafficcontrol/blob/6e9ff6380f8cfec2c69312ad3344364a24b7c998/grove/cache/retryinggetter.go#L139
Change web.Request to func Request(transport *http.Transport, r *http.Request, timeout time.Duration)
https://github.com/apache/trafficcontrol/blob/6e9ff6380f8cfec2c69312ad3344364a24b7c998/grove/web/util.go#L111
And, I think there was a reason web.Request used transport.RoundTrip, instead of making an http.Client, but I can't remember what it was now. So, it might just work to change
https://github.com/apache/trafficcontrol/blob/6e9ff6380f8cfec2c69312ad3344364a24b7c998/grove/web/util.go#L116
to:
httpClient := &http.Client{Transport: transport, Timeout: timeout}
resp, err ≔ httpClient.Do(rr)


Sparse environment revamp

Improve the atom environment navigation functionality by storing it in a sparse format in the JSON,
and making it clear how to navigate a structure/property map when only a few atoms are actual centers.
These would be features that should be included. Perhaps the PR can actually be merged at intermediate steps.

[x] adapt python preprocessor to generate a json in the appropriate format
[x] fix map to function with sparse environment list
[x] fix structure to highlight clickable atoms and only allow clicking on valid centers

build an UI element to switch between structure and environment view

That's #1, and should be done as a separate PR from the sparse environments.

Just finished cleaning up and rebasing the Python side of the PR, and implementing the website part of it. Here are some example input files if you want to try it:
Created with the code in chemiscope/python/examples/molecular_map.py
C3H5OH.json.gz
Using the example zeolite file and removing the NaN values with this script (I tried to make the script re-usable in case there are other NaN-filled files around)
Zeolites.json.gz
@ceriottm would you have time to review/try to break this? Otherwise I'll find someone else!

Also, TypeScript really shines in this kind of code change! I basically changed the return type of EnvironmentIndexer.from_structure_atom to also return undefined, and then let the compiler tell me where I needed to make changes!

I don't have time to do a proper review in the near future but I downloaded
and tried it. Works, it seems but I have some comments

displaying an error that must be clicked away when trying to select a
missing environment seems overkill. we could think of something less
intrusive (see also 3. below)
the environment slider should only run over the existing environments, I
don't see the point of having it index also "missing" environments.
I don't know if it's feasible but it'd be ideal if environments center
atoms would display a faint highlight sphere upon hover. then, clicking on
a non-environment center could be silently ignored.

On Wed, 21 Jul 2021 at 17:40, Guillaume Fraux @.***>
wrote:

Also, TypeScript really shines in this kind of code change! I basically
changed the return type of EnvironmentIndexer.from_structure_atom to also
return undefined, and then let the compiler tell me where I needed to make
changes!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cosmo-epfl/chemiscope/pull/166#issuecomment-884290031,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAIREZZY5YY7MPASG2HOSY3TY3TABANCNFSM475HBK4Q
.

displaying an error that must be clicked away when trying to select a
missing environment seems overkill.

I agree, this might be alleviated by #176 as well. I think we have to to tell the user in some way that they last action did nothing because the environment is missing, but a warning might not be the best way.

the environment slider should only run over the existing environments, I
don't see the point of having it index also "missing" environments.

That makes sense, but the box displaying the numeric id of the atom still needs to deal with the user inputing the id of a missing atom.

I don't know if it's feasible but it'd be ideal if environments center
atoms would display a faint highlight sphere upon hover. then, clicking on
a non-environment center could be silently ignored.

This should be doable, since 3Dmol exposes a setHoverable function. I'll see how much work it is to make it work!

Also, still to-do:

[ ] add user-facing documentation for the new input functionalities
[ ] add unit tests for the EnvironmentIndexer

Can we resurrect this?

I won't have time for this until January. If you wanna help, you can write some of the user facing documentation (docstring & something in this section of sphinx doc: https://chemiscope.org/docs/tutorial/index.html)

There's an issue (IDK if solvable) with hover. The hover selects an atom even if it is behind another (non-clickable) atom. However, the click won't select it unless it is in the foreground. This can get confusing, particularly if the atom in the foreground that is "covering" the one you are trying to select is semi-transparent. Ideally, it should be possible to "click through" just as you can "hover through" non-selectable atoms.

Another "bug or feature depending how you see it" - you can hover on atoms outside the unit cell, but when you click it'll select the corresponding atom in the unit cell. Personally I'd rather have only atoms in the central box as hoverable/selectable.

There's an issue (IDK if solvable) with hover. The hover selects an atom even if it is behind another (non-clickable) atom. However, the click won't select it unless it is in the foreground. This can get confusing, particularly if the atom in the foreground that is "covering" the one you are trying to select is semi-transparent. Ideally, it should be possible to "click through" just as you can "hover through" non-selectable atoms.

This would require changes on 3Dmol.js, so I think we might have to live with it for now

Another "bug or feature depending how you see it" - you can hover on atoms outside the unit cell, but when you click it'll select the corresponding atom in the unit cell. Personally I'd rather have only atoms in the central box as hoverable/selectable.

I'll have a go!

Ok, this is good to go on my side. @ceriottm do you want to test it again?


Jerkyll

Jerkyll

Ok, listen up carefully because I'm only going to say this once: Next spam PR you open is gonna result in me blocking you. Spam will not be tolerated!


OpenCV with CUDA fails to build with linker errors

I am attempting to configure OpenCV with CUDA for an Orin NX like so:
{ pkgs ? import <nixpkgs> { } }:

let
  jetpack = pkgs.callPackage ./path/to/jetpack { };
in
pkgs.appendOverlays [
  (self: super: {
    cudaPackages = jetpack.cudaPackages // {
      inherit (jetpack) cudaVersion;
      # https://github.com/anduril/jetpack-nixos/blob/ddaff1bfceafb93ea67cb4ef953ba8eff5cf942b/cuda-packages.nix#L35
      inherit (pkgs.cudaPackages_11_3) backendStdenv;
      cudaFlags = self.cudaPackages_11_4.cudaFlags.override {
        config.cudaCapabilities = [ "8.6" ];
        config.cudaForwardCompat = false;
      };
    }

    opencv4 = (super.opencv4.override ({
      enableGtk3 = true;
      cudaPackages = self.cudaPackages;
      enableCuda = true;
      enableCudnn = true;
    };
  })
];

This, however, is failing with glibc-related liker errors like the following.
opencv> /nix/store/6f700gwk2wvy8rp9licldryx0hbvhapn-binutils-2.40/bin/ld: /nix/store/sn546k2nnp9fd4fcfhdp1ni0ql8yclkn-openexr-2.5.8/lib/libIlmImf-2_5.so.26: undefined reference to<EMAIL_ADDRESS>opencv> collect2: error: ld returned 1 exit status
opencv> make[2]: *** [apps/annotation/CMakeFiles/opencv_annotation.dir/build.make:103: bin/opencv_annotation] Error 1
opencv> make[1]: *** [CMakeFiles/Makefile2:8698: apps/annotation/CMakeFiles/opencv_annotation.dir/all] Error 2
opencv> make[1]: *** Waiting for unfinished jobs....

Disabling OpenEXR or the OpenCV apps module only postpones the error. Whatever the configuration, the same linker error always shows up at some point.
How can OpenCV be built? If this is a configuration issue, I think it would be useful to add a version of OpenCV with the relevant CUDA overrides to this repository's package set.

https://github.com/NixOS/nixpkgs/issues/220341 may have something to do with this.


[CARBONDATA-3002] Fix some spell error

Fix some spell error
Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:

[x] Any interfaces changed?
No
[x] Any backward compatibility impacted?
No
[x] Document update required?
No
[x] Testing done
No
[x] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
No

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder2.1/1088/

Build Success with Spark 2.2.1, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/1300/

Build Success with Spark 2.3.1, Please check CI http://<IP_ADDRESS>:8080/job/carbondataprbuilder2.3/9352/

LGTM


how to install

how to install?

It's available through F-Droid.

Just wait

how to install?

https://f-droid.org/es/packages/me.billdietrich.fake_contacts/

Install F-Droid, then install Fake Contacts from inside F-Droid.


Empty output when using python interface

Hi,
I have tried your tool using the command line interface which works fine. When I use this from a python script, however, I am getting empty output .png files.
The code I am running is
import stltovoxel
stltovoxel.convert_file('stl-to-voxel/data/Stanford_Bunny.stl', 'out/test.png', 100, 1)

using the .stl file provided in this repository.
Any ideas why this is happening?

I can confirm that png images return black. But converting stl to xyz works well, because i can validate it via plotting the xyz in matplotlib.
`
import stltovoxel
stltovoxel.convert_file('your_model.stl', 'output2.xyz',resolution=6)
import numpy as np
a = np.loadtxt("output2.xyz")
X,Y,Z = a[:,0],a[:,1],a[:,2]
plt.ion()
%matplotlib notebook
fig = plt.figure()
ax = axes3d.Axes3D(fig)
ax.scatter(X, Y, Z)
pyplot.show()
`
It may be specific to png files. Also, I didn't see full list of convertible formats, I don't know if it exists for gif-mp4 conversion, but there's no error  shown in terminal for these to types, but when it's gif or mp4 it doesn't produce any files, but in png it produces black images. xyz format works well.

Saving to .xyz is working for me as well. Thanks @mburaksayici!

Hi @mareikethies you found a bug where the program defaulted to using black as the color of the model (on a black background) when it should have defaulted to a white model. I have fixed the issue. Please let me know if you have any other problems. :)
Hi @mburaksayici right now we only support png, xyz, and svx.
This does something slightly different than the code you posted, but to get the raw numpy array output, you can get that directly by calling stltovoxel.convert_mesh which takes a list of triangles and returns a 3d numpy array of voxels.
import stltovoxel
from stl import mesh
import numpy as np
mesh_obj = mesh.Mesh.from_file('data/Stanford_Bunny.stl')
org_mesh = np.hstack((mesh_obj.v0[:, np.newaxis], mesh_obj.v1[:, np.newaxis], mesh_obj.v2[:, np.newaxis]))
a = stltovoxel.convert_mesh(org_mesh)


Usage query_params in Function Source Tiles

How can I pass query_params in Function Source Tiles from tile source url MapBox?
source: {       type: 'vector',       url: 'http://localhost:3000/rpc/public.function_source.json?param1=param1' // doesn't work for me }
And how do I need to use query_params here? I want to filter my table by condition from query_params.
CREATE OR REPLACE FUNCTION public.function_source_test(z integer, x integer, y integer, query_params json) RETURNS bytea AS ...

Hi @liskaole! You should add a vector source with:
{
  type: 'vector',
  url: 'http://localhost:3000/rpc/public.function_source.json?param1=param1'
}

And then, you can access param1 in your function with query_params->>'param1'
Eg.
CREATE OR REPLACE FUNCTION public.function_source(z integer, x integer, y integer, query_params json) RETURNS bytea AS $$
DECLARE
  bounds geometry;
  mvt bytea;
BEGIN
  SELECT INTO bounds TileBBox(z, x, y, 3857);

  SELECT INTO mvt ST_AsMVT(tile, 'public.function_source', 4096, 'geom') FROM (
    SELECT
      ST_AsMVTGeom(geom, bounds, 4096, 64, true) AS geom
    FROM public.table_source
    WHERE geom && bounds
    AND param1 = query_params->>'param1' -- filter records
  ) as tile WHERE geom IS NOT NULL;

  RETURN mvt;
END
$$ LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE;

@stepankuzmin this is still not clear, where does this postgis function lives ?!!

Hey @mapsgeek! What do you mean by "lives"? It's just a user-defined PostgreSQL function

@stepankuzmin i need to make sql like queries for tables to generate the tiles for the matching criteria only, i thought that this function is required to be on the server side somehow but i understand now what is it mean, it's on the database level but i still don't understand where does it get the table_source or what is the function should look like to be able to just run sql queries per table
like points.json?id=100, i understand this function generates a bbox geometry and trying to do one similar for what i have mentioned

The public.table_source is just an example for your PostGIS table with geometry. You can look for example tables in the fixture directory.

so in my case i need to repeat the same function for each table i want to query, is there away to implement sql like queries without the need to these functions ?

You can pass your table as an argument into query_params and use it to query your tables

@mapsgeek if you're copy/pasting from the example in the documentation, you have to remember to manually load the TileBBox to your database.


Configure the default claim configurations in the IS pack itself

Moved from: https://wso2.org/jira/browse/IDENTITY-6870
According to the current implementation of SCIM 1.1/SCIM 2.0 for ask password option, a user/developer needs to manually define the additional claim configurations in the scim-schema-extension.config which we can avoid by having those claim mapping configured in the pack itself. This will reduce the work to the developer and server restarts.
Additionally, we can guide the user about the claim configurations that are configured and why those are necessary, which will help them to troubleshoot issues.

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


Dandelion

Interface for Dandelion API

Would probably just use [salient[(https://github.com/nyxtom/salient) for this.


ForEach-Object -Parallel situationally drops pipeline input

Note: I can only reproduce this reliably on macOS 10.15.4.
I see it occasionally on Ubuntu 18.04, and can never reproduce it on Windows.
It may be connected to using Start-Sleep inside the script block; not sure if the fact that a custom class is used across thread boundaries is relevant [update: it is]
Steps to reproduce
class Foo { static [object] Echo($val) { return $val } }
$cls = [Foo]
while ($true) {
  $res = 1..10 | ForEach-Object -Parallel {
    Start-Sleep -ms 100; ($using:cls)::echo($_)
  }  |  Sort-Object
  Compare-Object $res (1..10) | Should -BeNullOrEmpty
  Write-Host -NoNewline .
}

Expected behavior
The loop should run indefinitely, because the test should alway succeed.
Actual behavior
The loop eventually - after a varying number of iterations - breaks due to intermittent test failures, stemming from a missing output; e.g.:
Expected $null or empty, but got @(@{InputObject=5; SideIndicator==>})

That is, not all input objects were echoed.
Environment data
PowerShell Core 7.1.0-preview.3  on macOS 10.15.4

not sure if the fact that a custom class is used across thread boundaries is relevant.

Yeah.  It tries to marshal back to the original pipeline execution thread, but since a pipeline is already running it just runs in the current thread while pretending it's the pipeline thread.  As a result a whole bunch of state corruption and other weird side effects are possible.

You can see it by doing this:

class Foo {
    static [object] Echo($val) {
        return [PSCustomObject]@{
            ThreadId = [Threading.Thread]::CurrentThread.ManagedThreadId
            RunspaceId = [runspace]::DefaultRunspace.Id
        }
    }
}

$cls = [Foo]
while ($true) {
    1..10 | ForEach-Object -Parallel {
        Start-Sleep -ms 100
        ($using:cls)::echo($_)
    }
}

You'll get a whole bunch of different thread ID's with the same runspace.  Also occasionally some other evidence of state corruption like "Global scope cannot be removed" errors.

That's a long winded way of saying it's basically a dupe of #4003.

/cc @PaulHigin @daxian-dbw
A possible "solution" is to try to block PowerShell classes from being carried over.  Sort of like how script blocks currently work.
If #4003 was fixed, this would just dead lock.  Personally I'd prefer if runspace affinity was just removed from classes but I understand it's next to impossible to know the impact of a change like that.  Something should probably be done though, many folks are going to turn to classes as a way to "get around" the script block problem.  It might even appear to work for awhile.

Thanks for the detailed analysis, @SeeminglyScience.
If removing runspace affinity is too risky, perhaps another option is to simply recreate classes in the target runspace, similar to what is already being discussed for script blocks - #12378 - and in line with making the planned opt-in for transferring runspace state comprehensive - #12240.

I mean doing that would already be effectively removing runspace affinity anyway -- you'd just be binding their affinity to the new runspace. It would be largely indistinguishable from always having the code execute in whichever thread it's called and just looking for the default runspace for that thread. More or less about the same there, I'd guess.

Just straight up recreating it is a little sketchy though because you'd lose state from static properties.  Property accessors don't (currently) invoke any PowerShell so they aren't subject to the same problems necessarily.  Not that you should use them for state sharing in all your threads, but more that it would be confusing if it "appeared" to be gone randomly.  Also recreating the classes would create a lot of confusion around type identity.

While disallowing cross-thread class use is definitely the safest option, it also takes away potentially useful functionality.
Given the "less solid" nature of PowerShell classes my guess is that loss of type identity would be less of an issue - it's a case where documenting the issue may suffice (just as users will have to understand that script blocks that are recreated in a different thread no longer form closures around the original runspace's variables, if any); the .FullName properties will be identical, but -is and -as won't work (perhaps a little white lie could fix that)?
Good point about static properties, however - that sounds more problematic.
But couldn't we special-case this to copy any static property values after recreating (just like script blocks will be special-cased, as discussed in https://github.com/PowerShell/PowerShell/issues/12378#issuecomment-616660763)?

I'd prefer if runspace affinity was just removed from classes but I understand it's next to impossible to know the impact of a change like that.

Has anyone ever looked into this?
Isn't the current behavior never useful, or are there legitimate scenarios where existing code relies on it?

Isn't the current behavior never useful, or are there legitimate scenarios where existing code relies on it?

It's probably accidently relied on.  Apparently a class method converted to a delegate can run on any thread, even one without a runspace.  I was having trouble coming up with a scenario where this would appear useful because I assumed you needed a thread with a default runspace other than the one it was originally bound to. Knowing this, it makes a lot of .NET interop appear to work as expected.
class Test {
    static [psobject] GetInfo() {
        return [PSCustomObject]@{
            ThreadId = [Threading.Thread]::CurrentThread.ManagedThreadId
            RunspaceId = [runspace]::DefaultRunspace.Id
        }
    }
}

[Threading.Tasks.Task[psobject]]::
    Run([Func[psobject]][Test]::GetInfo).
    GetAwaiter().
    GetResult()

[Test]::GetInfo()

Gives some variant of:
ThreadId RunspaceId
-------- ----------
      19          1
      15          1

Here's something that really surprised me, if you don't block until completion, it'll actually properly marshal it to the right thread:
class Test {
    static [psobject] GetInfo() {
        return [PSCustomObject]@{
            ThreadId = [Threading.Thread]::CurrentThread.ManagedThreadId
            RunspaceId = [runspace]::DefaultRunspace.Id
        }
    }
}

$task = [Threading.Tasks.Task[psobject]]::Run([Func[psobject]][Test]::GetInfo)
while (-not $task.AsyncWaitHandle.WaitOne(200)) { }
$task.GetAwaiter().GetResult()

[Test]::GetInfo()

ThreadId RunspaceId
-------- ----------
      15          1
      15          1

So the answer is yes, it probably accidently makes a lot of complicated .NET interop work where it would otherwise throw. Any API where you pass a delegate and that delegate gets called on another thread.

Personally I think these behaviors would be the most ideal for method invocations.
If called on:

The origin runspace thread, run with SessionState affinity like normal
A thread with a default runspace but one where the class or instance was not defined, run in the thread's runspace without SessionState affinity.  Maybe with TopLevelSessionState affinity
A thread with no default runspace, throw ScriptBlockDelegateInvokedFromWrongThread like ScriptBlock.Invoke currently does

Though 2 and 3 would be breaking changes, I think they're worth it considering how dangerous they can be.
cc @rjmholt @PaulHigin @daxian-dbw if any of y'all want to weigh in.

With #3, is it more desirable to throw there, or take the time to spin up a runspace to execute in anyway, so as to "make" it work without corrupting the state of another runspace?

With #3, is it more desirable to throw there, or take the time to spin up a runspace to execute in anyway, so as to "make" it work without corrupting the state of another runspace?

I've thought about that a lot but there's a lot of questions

What kind of state should it have? InitialSessionState.CreateDefault()?
Is it better to do that transparently? There's a potential for a significant amount of extra overhead in a way that isn't super visible to the user.
If you throw instead, you know exactly what happened.  If you create a new runspace, it's next to impossible for even the above average user to know their delegate was invoked in a different thread.
When would the runspace be disposed? Directly after invocation?

As much as the error has been frustrating for me in the past, it's also been pretty helpful in informing me that I basically just shouldn't use that API.  It's a hard call.  I'd like option, but I'm also not super sure how you'd go about surfacing that option.  Or if it'd be worth the development time.

Another consequence of this is that if you call a second method from the first one, you get a dead lock.
class Test {
    static [void] FirstMethod() {
        [Console]::WriteLine('First method starting')
        [Test]::SecondMethod()
        [Console]::WriteLine('First method finishing')
    }

    static [void] SecondMethod() {
        [Console]::WriteLine('Second method starting')
        [Console]::WriteLine('Second method finishing')
    }
}

[System.Threading.Tasks.Task]::Run([action][Test]::FirstMethod).GetAwaiter().GetResult()

The first method isn't actually running on the pipeline thread, so the second method call also tries to use PowerShell eventing to retake the pipeline thread.  The first method will never complete, because it's waiting on the second method, which is waiting on the first method.
I accidently ran into this trying to use the PSDataCollection<>.DataAdding event with PowerShell class methods as event handlers.

Well, just ran into this today with trying to reference a class instance created in the parent script.

PowerShell classes are not thread safe.  This is true whether they are run in ForEach-Object -Parallel or any of the PowerShell threading APIs.  It would be worth looking into whether this can be detected through a using reference.

@SeeminglyScience Thanks for taking the time to look at #17957 .
As someone who isn't a developer, but uses PS a lot, classes have been great. Their introduction helped me structure my work a lot better.
I have two questions. It does not seem that the documentation pages for "about_Classes" or "about_ThreadJob" mention anywhere that PS classes are not thread safe. I'm not sure if this does in fact appear anywhere in the PS documentation?
Secondly, is there any chance that this might change in future? Or will it be a case of PowerShell not really being the correct tool for the job, and people who might need to use classes with threading moving away from PS, to complied C# code or A.N.Other solution?
Cheers again.

I'd prefer if runspace affinity was just removed from classes but I understand it's next to impossible to know the impact of a change like that.

Has anyone ever looked into this?
Isn't the current behavior never useful, or are there legitimate scenarios where existing code relies on it?

More precisely, it's affinity to session state. A runspace could have multiple session states.
The current behavior is useful for classes or class instances exposed from modules. The implementation of static/instance methods of a powershell class may depend on states within the module scope, such as functions and variables. The affinity to session state makes sure those states is accessible when calling the static/instance methods of the powershell class.
I think a cleaner and safer solution is to introduce an attribute to explicitly opt out of session state affinity for a powershell class. And for such a class definition, its instances object and static method calls simply ignores the session state affinity, which means they will run in the current default runspace, with the current session state in that runspace.
[OptOutSessionStateAffinity()]
class Foo
{
    static [object] Echo($val) { return $val } }
}

Of course, once declaring the attribute to the class, the class implementation should not depend on any states of a particular session state, because there is no guarantee the dependencies would be available at runtime.
I will work on this idea a bit more to see if there are any potential blockers.

At the meanwhile, there is a way today to create a powershell class instance without any session state affinity (no such workaround for static members though). See https://github.com/PowerShell/PowerShell/issues/3651#issuecomment-306968528 for the details.
Note that, we officially support this "workaround": https://github.com/PowerShell/PowerShell/pull/3871


CLI doesn't fail inside a Github Action

Hi :wave:
I am using this package inside one of my workflow, but it looks like it doesn't seem to fail inside Github Actions.
Errors are well displayed, but whatever happen, the action still success.

Thanks for your feedback! :wink:

Thanks @dpilafian for the fix, its work fine now! 🎉


Implement PKCE for Vapor OAuth

This pull request introduces support for Proof Key for Code Exchange (PKCE) parameters to enhance the security of OAuth implementation in Vapor. PKCE is a crucial security feature when dealing with public clients, such as mobile and single-page applications.
Changes Made:

Added PKCE parameters to the AuthorizationRequestObject to ensure secure code exchange.
Updated the Vapor dependency version to maintain compatibility with the latest features.
Added PKCE parameters to the OAuthCode class, enabling PKCE support for code exchange.
Refactored the AuthorizationRequestObject initializer signature to accommodate PKCE parameters.
Updated the CodeManager protocol to include methods for handling PKCE parameters.
Implemented PKCE validation for the code challenge method, ensuring code integrity.
Updated the EmptyCodeManager to include PKCE parameters, enhancing code management.
Added token generation and retrieval methods to the TokenManager protocol, necessary for PKCE.
Included PKCE parameters in the AuthorizePostRequest to support PKCE for OAuth.
Imported CryptoKit and included the code_verifier parameter for PKCE code generation and validation.

These changes will greatly enhance the security of OAuth implementation in Vapor, making it more robust and resilient to potential security threats.

Thanks a lot. I am happy to see that this will get added.

Noting here that adding test cases is important for OpenID Configuration.

Hi, I am already trying out the PKCE flow. I might have found a bug:

As you can see, the authorizationRequestObject doesn't return the codeChallenge and the codeChallengeMethod.
Therefore, the customised authorisation handler doesn't receive these values

MyAuthorizeHandler().handleAuthorizationRequest()
Authorization request received from the client:
AuthorizationRequestObject(responseType: "code", clientID: "1", redirectURI: http://localhost:8089/callback, scope: ["admin"], state: Optional("ping-pong"), csrfToken: "d491fe9c9c3f0eb59554e101782b131a41f1c407e5e0b6c1aa72377dea106413", codeChallenge: nil, codeChallengeMethod: nil)
If this is intentional then please excuse this remark. I just try to be helpful.

Hey @mynona, I appreciate you bringing up the issue, and I'm aware of it as well. Thank you for checking out the work in progress, and I'll continue to address it.

Noting here that adding test cases is important for OpenID Configuration.

Moving to Implement OpenID Connect and will be done there.


Fix a couple of bundler issues with keyword argument separation

What was the end-user problem that led to this PR?
make test-bundler in Ruby repository failed with recent changes to separate keyword arguments from positional arguments (see https://bugs.ruby-lang.org/issues/14183).
What was your diagnosis of the problem?
Bundler's specs check for lack of warnings, and the new changes cause warnings that cause Bundler's specs to fail.
What is your fix for the problem, implemented in this PR?
In one case, I fix the code to work with keyword arguments and positional arguments in positional arguments.  In the other case, I fix the spec to ignore the keyword argument separation warnings.
I fixed this upstream in Ruby already (https://github.com/ruby/ruby/commit/b5b3afadfab4072f55320075ccac6afe333a140c). So this is a request to make bundler use the same patch.  You can certainly fix it differently, and there are more related issues to fix I think (they just don't cause test failures yet).  The issues definitely need to be fixed if you want bundler's specs to run correctly in Ruby 2.7.
Why did you choose this fix out of the possible options?
Because it was the least amount of effort.

@jeremy Can you update rubocop warning? https://travis-ci.org/bundler/bundler/jobs/578964090#L618

@hsbt Sure, I forced push a commit that should fix it.

@jeremy Thanks, We need to send the same patch to https://github.com/erikhuda/thor as the upstream.

@bundlerbot r+

@bundlerbot retry


Initialize redis client with extra keyword parameters

Is it possible to pass to pyramid redis client some extra parameters like decode_responses, socket_connect_timeout, health_check_interval etc like in documentation?
https://redis-py.readthedocs.io/en/stable/#redis.Redis

Hey, happy to merge a PR. Note that I don't use or maintain this actively any more.


Cask request: Surge

Cask details
Name - Surge
Homepage - https://surge.run/manual/
License - commercial
Download URL - https://surge.run/Surge-Mac.zip
Description - Surge is a web developer tool and proxy utility for iOS and OS X.

https://github.com/caskroom/homebrew-cask/pull/20097.
Please search before posting.

Sorry...


Allow DVT to run multiple YAMLs in parallel up to specified concurrency

DVT should allow users to run multiple YAML configs in parallel up to specified concurrency. This will be beneficial to users that want to run validations that cover chunks of the same table (Issue #598).
Example:
data-validation configs run --config-dir /path/to/yamls --concurrency 10
Document that this will create multiple DB connections.

Work in progress:
Implemented --config-dir support. Still working out multiprocessing; stalled due to pickling errors (unpickleable objects).

Closed with PR #654


#10 sign block locally

In this PR blocks are now hashed and signed locally.
Work generation (call at the rpc) is now separated in a work module.
The hash and sign methods have been added in the blocks module.
blocks.create uses theses functions with work.generate to format a new block.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (950505d) to head (3d9f3c3).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff            @@
##              main       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           25        27    +2
  Lines          402       422   +20
  Branches        66        67    +1
=========================================
+ Hits           402       422   +20

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


 Please assign this to me.

Go Ahead @Ishnoor-kaur

Hello,
Please assign me this.I have already worked on this.


promiscuous mode not supported?

Hi guys,
I am rather new to the ESP32 world. I would like to ask when will promiscuous mode be supported. I tried to activate it:
        esp_wifi_result!(esp_wifi_set_promiscuous(true))?;
        esp_wifi_result!(esp_wifi_set_promiscuous_rx_cb(Some(recv_cb_prom)))?;
        esp_wifi_result!(esp_wifi_set_channel(1, 0))?;

But I receive this error:
$ screen /dev/ttyUSB0 115200
$ # press EN/RST button
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0048,len:12
ho 0 tail 12 room 4
load:0x3fff0054,len:4800
load:0x40078000,len:17448
load:0x4007c428,len:4840
entry 0x4007c6a0
WiFi started!

               !! A panic occured in 'esp-wifi/esp-wifi/src/wifi/os_adapter.rs', at line 599, column 5

                                                                                PanicInfo {
                                                                                payload: Any { .. },
                        message: Some(
                                              not yet implemented: queue_msg_waiting,
                                                                                ),
                                                                                location: Location {
                                                                                file: "esp-wifi/esp-wifi/src/wifi/os_adapter.rs",
                                                              line: 599,
                                                                                col: 5,
                                                                                },
                                                                                can_unwind: true,
                                                                                }

                                                                                Backtrace:

         0x4008afa8
                   0x401045e4
                             0x400870e0
                                       0x40087312
                                                 0x40083d80
                                                           0x400d8e03
                                                                     0x400d5e04
                                                                               0x40000000

As I understood this is the problem:
pub unsafe extern "C" fn queue_msg_waiting(_queue: *mut crate::binary::c_types::c_void) -> u32 {
    todo!("queue_msg_waiting")
}

There might be more information available in my sandbox if necessary.

The PR implementing this was just merged, took some time to make, but implementing queue_msg_waiting wasn't all that complicated.


Keep log files from projects after they disable ocaml-ci

When a repository enables ocaml-ci, then disable it after some commit have been pushed the log files from those commits don't seem to be available anymore. For instance: https://ci.ocamllabs.io/github/ocaml-ppx/ppx/commit/40e5a35a4386d969effaf428078c900bd03b78ec/variant/(lint-fmt) previously showed some content but the ocaml-ci has been disabled for this project since and the page is now showing Error: Failed: Invalid GitHub repo "ocaml-ppx"/"ppx".

We disabled this previously (in https://github.com/ocurrent/ocaml-ci/pull/204). Since the project doesn't appear, things under it don't either.
It would be good to show a perma-link to the log from the main page (which only shows the latest build at the moment). Also, it would be nice to link to previous builds in the public UI (the admin UI already does this).


How do you download and commit to a shared Drive folder?

Anytime I commit new changes to my shared folder it goes to MyDrive instead. How do I correct that?

Hey @dulanism, if you have cloned it from the shared folder itself and making changes, then it will make changes to the shared folder itself provided you have the access to it.
If it isn't let me know how to recreate the error and we'll try to solve it.

I am having a similar issue where I can't access Team drives (I have admin access to the team drive). Is there a way to enable Team drives?

Hey @BrennerSpear, you can't access Team Drive through this.

@nurdtechie98 we can add a new feature to access team drive.

@raghav-dalmia even I was thinking it would be great. I just had a skim through the docs but couldn't find me much. Let me know if you find something.

@nurdtechie98 every call need one extra parameter IncludeTeamDrive = True . You can find it here https://developers.google.com/drive/api/v3/reference/


Add support to multiple secrets read for the configuration provider

Implemented by https://github.com/thiagoesteves/deployex/pull/55


cmd: set up history accounts command

We want to set up a history accounts command, which will eventually get account history in a specified timerange. This will live in cmd/history_accounts.go .

This requires Postgres-specific data, which wouldn't be outputted by the ingestion engine. So there's no way we could reconstruct this specific table. This won't impact any of our data operations until we transition to this dataset, which would be after the full system is deployed. So we'll just have to rethink queries at that point. This was poor planning on my part, but glad we tried implementing it, so we figured it out.


fix: remove donation prevention

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] All the files I changed are in the same world language (for example: only English changes, or only Chinese changes, etc.)
[x] My changes do not use shortened URLs or affiliate links.

Closes #XXXXX

@ojeytonwilliams turns out we don't need to prevent donation since donation prompts happen less often on the previous donation modal logic.
could you take a look please?

@ojeytonwilliams you are right. although I am not sure I follow logic for using preventDonationRequests for setting canRequestDonation back go false. in that case what would flip canRequestDonation to true?
How about flipping tryToShowDonationModal back to false after the donation pop up?

in that case what would flip canRequestDonation to true?

That will happen each time you finish a block, same as before.  The idea (in my last commit) is to have block completion flip canRequestDonation to true and then the modal's appearance (i.e. the saga) flips it back to false.  That way the modal appears, once, each time you finish a block.


Public access to private repo Releases

The option for public access to wiki and issues of private repos should also be extended to releases. We would like to upload compiled versions for testers to pickup without giving them access to the source code.

+1
期望能夠讓發佈中的自上傳(執行檔，壓縮包)可以訪問
但原始碼下載保持隱密狀態，如果設為私人的話

I would like this as well.
Something similar has already been done here https://github.com/gogits/gogs/commit/8196430f47842fba4f227b105cd96d4b981d077d for wiki and issues.


msg stdout has been dropped

vssh: client.go:174: msg stdout has been dropped

It could happen at streaming, when stdout doesn't scan/read on time.
I suggest you to read the stdout like below right after executing a command.
Please let me know if you still has issue (w/ a sample code)
for stream.ScanStdout() {
  txt := stream.TextStdout()
  fmt.Println(txt)
}

it is not work!

Why is there still this problem when the timeout is set to 60 seconds?

when you run a command on multiple hosts, you get multiple responses at the same time.
here's an example to handle multiple responses.
func main() {
	var wg sync.WaitGroup

	vs := vssh.New().Start()
	config, err := vssh.GetConfigPEM("ubuntu", "myaws.pem")
	if err != nil {
		log.Fatal(err)
	}

	for _, addr := range []string{"<IP_ADDRESS>:22", "<IP_ADDRESS>:22"} {
		vs.AddClient(addr, config, vssh.SetMaxSessions(4))
	}

	vs.Wait()

	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	cmd := "uname -a"
	timeout, _ := time.ParseDuration("6s")
	respChan := vs.Run(ctx, cmd, timeout)

	for resp := range respChan {
		if err := resp.Err(); err != nil {
			log.Println("error", err)
			continue
		}

		wg.Add(1)
		go func(resp *vssh.Response) {
			defer wg.Done()
			myfunc(resp)
		}(resp)
	}

	wg.Wait()
}

func myfunc(resp *vssh.Response) {
	stream := resp.GetStream()
	defer stream.Close()

	for stream.ScanStdout() {
		txt := stream.TextStdout()
		fmt.Println(txt)
	}

	if err := stream.Err(); err != nil {
		log.Println("error", err)
	}

        fmt.Println("host", resp.ID())
	fmt.Println("exit code", resp.ExitStatus())
}


Documentation of Drawio Self Hosted through a Puppet Module

Documentation for installing and configuring drawio can be achieved through a declarative, configuration management tool such as Puppet.  The Puppet code functions as the documentation.  This is a simpler approach than trying to maintain a parallel documentation wiki (which requires much effort); and, superior to bash scripts such as those currently used in docker files.
Here is a puppet module that you may find useful:
https://github.com/jjarokergc/puppet-drawio
This module describes how to install drawio as a Tomcat instance and configure the various integrations.  The various parameters are kept in a separate yaml data file.  This module expects to be installed behind a reverse proxy, so it does not manage SSL or firewall.  It has been tested with drawio 16.5.6, Tomcat 10.0.16 and Java 11.0.13 in a Debian host.

What's the ETA on this?


Allow unauthenticated CMP server if missing -trusted, -srvcert, and -secret options

If the user did not provide means to authenticate a CMP server
this is no more an error but just means that server authentication is skipped (with a warning given).

I've carved this commit out of #12655 because it can be seen as a feature extension
and this way it as better chances to be merged before feature freeze on beta1.
To this end I'd appreciate a swift review.

Merged - thanks @slontis


The target process exited without raising a CoreCLR started event

Working on a WPF .Net App project.
The UI project won't launch after this I added reference to MahApps.Metro 2.4.3.  I see the below error.
The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.
The program '[20892] .exe' has exited with code -2147450740 (0x8000808c).
The program '[20892] .exe: Program Trace' has exited with code 0 (0x0).
After I remove references to MahApps* things seems to be working again.

It is a netcoreapp2.2 known issue and probably already resolved.
Could you test it again for netcoreapp3.3 once again and update the version?

@khanziaullah I don't know exactly what to look for? Can you provide this sample?

Create a WPF .Net App
My .csproj looks like below:

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <UseWPF>true</UseWPF>
  </PropertyGroup>

Run the Application. It launches fine.

Added reference to MahApps.Metro

  <ItemGroup>
      <PackageReference Include="MahApps.Metro" Version="2.4.3" />
  </ItemGroup>

Now when I run the project. I see the error from the issue.

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.
The program '[20892] .exe' has exited with code -2147450740 (0x8000808c).
The program '[20892] .exe: Program Trace' has exited with code 0 (0x0).

@khanziaullah It seems like that there is something missing on your machine. Idk exactly what, but maybe this link helps
https://stackoverflow.com/a/56672195/920384

I've tried this already. Updated .NET Core SDK and the Visual Studio. Created New Projects. I see this in other new projects as well.

Hi @khanziaullah
can you share a test project via github please? Maybe we can see what is going on there and provide a solution if it does not compile on our side as well.
Happy coding
Tim

The problem occurs when I add a reference to a .net standard project (which is using NHibernate)

I had a similar problem with a project where I had to remove any Post-build events.


WIP Revert "Revert simplify cleanup update code"

Reverts openSUSE/qem-bot#90
Just because we want to bring in those changes again after ensuring proper functionality

@kalikiana @perlpunk @kraih can you mention what broke in the original PR and what should be tested additionally?

@kalikiana @perlpunk @kraih can you mention what broke in the original PR and what should be tested additionally?

Besides what was already addressed by #88 and #89 there was another case: https://gitlab.suse.de/qa-maintenance/bot-ng/-/jobs/1260025

AFAIK, https://github.com/openSUSE/qem-bot/pull/84/commits/cfd40e1634775dd7b46c7bb05267c206be99f3d0 is the most problematic one

Codecov Report
Base: 44.39% // Head: 44.86% // Increases project coverage by +0.47% :tada:

Coverage data is based on head (df10b86) compared to base (bf1c8c4).
Patch coverage: 34.71% of modified lines in pull request are covered.

 Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Bugfix/42/42 comments any user can create and get comments for a cooperation they are not involved in

I added the additional checking layer for the cooperation

Now if the user is not involved in this cooperation, he is not able to post comment


Data.all CLI and SDK

Description:
Introduce a command-line interface (CLI) and a software development kit (SDK) tool for data.all and publish these tools as separate packages through a publishing pipeline to PyPI. This feature aims to provide users with a seamless and efficient means of interfacing with data.all programmatically, allowing for enhanced automation, scripting, and integration into existing workflows. This not only facilitates ease of distribution but also enhances version control, making it simpler for users to incorporate and manage the tools in their environments.The CLI/SDK tool should encompass a comprehensive set of commands and functions, enabling users to perform operations related to data.all features such as datasets, dataset share, environment, organization and consumption role through programmatic interfaces. This enhanced CLI/SDK tool, coupled with PyPI publishing capabilities would significantly improve the overall user experience, empowering developers and administrators to leverage data.all functionalities in a programmatic manner.
Details:
Command-Line Interface (CLI):

A user-friendly command-line interface offering a set of commands for core data.all operations.
Support for scripting and automation, allowing users to seamlessly integrate data.all interactions into their workflows

Software Development Kit (SDK):

A comprehensive SDK providing programmatic access to core data.all functionalities.
Libraries for popular programming languages, with a focus on Python for seamless integration.

PyPI Publishing Component:

CLI/SDK  Packaging Automation: Develop a automated pipeline that automates the process of packaging the dataall CLI and SDK. This should include the creation of Python packages compatible with PyPI standards.
Version Management: Implement version management within the automated pipeline to allow for easy tracking and updating of the dataall CLI/SDK tool.
Dependency Resolution: Ensure that the automated pipeline resolves and includes any required dependencies or libraries for the CLI/SDK tool, simplifying installation for users.
Documentation Integration: Integrate documentation generation into the pipeline, generating documentation for the dataall CLI/SDK and making it available on platforms such as ReadTheDocs.
Testing and Validation: Implement testing and validation steps in the pipeline to ensure the packaged dataall CLI/SDK works as expected across different environments and scenarios.
Release Automation: Automate the release process to PyPI, streamlining the release workflow.

Benefits:

Automated Distribution: Facilitates easy distribution of CLI/SDK tools through PyPI, streamlining installation for users.
Automation and Scripting: Empowers users to automate routine tasks and scripting of complex workflows using the CLI. Enables seamless integration of data.all operations into existing automation pipelines.
Version Control and Compatibility: Enables versioned releases, ensuring users can manage and select specific tool versions based on compatibility and requirements.
Enhanced Accessibility: Improves accessibility by making the CLI/SDK tools readily available through a widely used package repository like PyPI.
Improved Efficiency: Reduces manual effort and enhances efficiency by allowing users to perform data.all tasks programmatically.

@noah-paige

Could be useful.. Especially for those who want to run scripts to do bunch of things like import a lot of datasets etc. Today when I want to validate things I'm querying RDS directly and it would be nice not to have to do so and query via CLI or APIs. I would say authentication is a big one to figure out here..... especially for IDP users. For example we use OKTA and I'm not even sure that I can register headless users in our IdP. Definitely think about that how headless users will get access who are not just using pure Cognito.

Appreciate the feedback @zsaltys. This feature has been requested frequently and has been implemented by some in different capacities. We believe it adds value to various use cases, including the ones you highlighted. I agree that examining authentication aspects will be crucial. We intend to address this initiative in a phased approach. As we delve deeper and gain more insights, we'll use this issue/PR to document and manage feedback and suggestions.

Design Considerations
Repository Location
For the data.all SDK/CLI, we will host the SDK and CLI packages within a new repository (separate from data.all OS but within the same GitHub Org) with release cycles for each of the respective packages (repo name TBD)
A separate repository to host this code will provide the following benefits:

Physical Isolation of different repositories that are serving different users/purposes (application vs. tooling)
Separate versioning and release cycles between application code and SDK/CLI utility
Independent documentation, examples, etc. focused on upskilling the community on how to use these libraries specifically

Repository Structure
GraphQL Schema File:
The key information that powers the SDK/CLI utility will the be GQL schema file which defines all of the supported API requests (i.e. queries and mutations) along with input and output types for those requests. We will leverage this file to dynamically generate the me
For reference in data.all OS today, we build this GQL schema already in the api_handler.py  similar to the following code:
from dataall.base.api import bootstrap as bootstrap_schema, get_executable_schema
from graphql import print_schema
schema = get_executable_schema()
print(print_schema(schema))

Repo Layout
The below is a high-level look at how the SDK/CLI data.all programmatic tools library will be organized:
schema/
    schema.graphql         # ---> GQL Schema File
    ...
dataall_core/
    loader.py              # ---> Load Schema GQL File
    dataall_client.py      # ---> Generate Methods Dynamically
    base_client.py         # ---> Class Where Methods Attached
    auth/                  # ---> Auth Classes (i.e. Cognito, Okta, etc.)
    ...
api/
    __init__.py
    Client.py
    utils/
        __init__.py
        stacks_utils.py
    ...
cli/
    __init__.py
    Client.py
    ...

The above file layout follows similar design principals to other widely used SDK/CLI tooling (such as botocore, boto3 and awscli). A more in-depth description of the above file structure follows:

schema/ → GraphQL Schema File
dataall_core/ → Base Client that generates the classes and methods for all of the queries / mutations

Generates Query Strings
Determines Input Variables and Handles Output Responses
Interacts with API Endpoint
Includes Auth Interface for different modes (i.e. Cognito, Okta, etc.) (...discussed in more detail below)

api/

Any SDK Specific Configuration Built on top of dataall_core

May include added features such as paginators, waiters, etc.

High-Level Abstractions → More user-friendly and Pythonic interface for interacting with AWS services.
Session Management & Configuration → Making it easier to work with multiple data.all Users

cli/

Dynamic creation of CLI Commands mapped back to dataall_core API
Any CLI Specific Configuration Built on top of dataall_core

Authentication Flows
Configuration & Profiles

CLI Command dataall_cli configure to set up client - provide all user information (i.e. username, password, client_id, endpoint_url, and region)

Similar to aws configure

dataall_cli client configure \
--username  "dataall-username" \
--password  "********" \
--client_id "********" \
--url       "https://******.execute-api.<AWS_REGION>.amazonaws.com/prod/" \
--region    "<AWS_REGION>" \
--profile   "dataall-team";

Storing Credentials Locally

User information saved in ~/.dataall_cli/config.yaml with password base64 encoded
When Client() initialized

Token retrieved by calling cognito_client.initiate_auth (**kwargs) with user information
Saved token at ~/.dataall_cli/{DATAALL_USERNAME}.cfg
Pass this token as header to API Endpoint for all future requests and refresh if expired
Defaults to default profile unless specified

Running CLI

dataall_cli list_organizations --profile dataall-team

Running SDK

da_client = dataall.client(profile="dataall-team")
list_org_response = da_client.list_organizations()

Supporting Custom Auth (i.e. Okta, ...)

Introduce an optional client-level parameter of auth_strategy (default: ‘Cognito’) for custom auth data.all deployments

Requires additional specification of authorization server endpoints (i.e. authorize, token, etc.)
Retrieval of tokens by using OAuth2.0 Flow (instead of abstraction using built-in Cognito API methods )

dataall_cli list_organizations --profile dataall-team --auth-strategy Custom

OR
da_client = dataall.client(profile="dataall-team", auth_strategy="Custom")

Supporting AWS Compute Services (i.e. Lambda, Glue, etc.)

Leverage AWS Secrets Manager to store configuration details in AWS Account
AWS Compute Services Considerations

Pre-requisite:  User creates secret in AWS Account containing user information(profile, username, password, client_id, region, url)
Introduce an optional parameter to point dataall Client to secret_arn instead of configuring client locally
Ex: Using SDK in Lambda

import dataall_sdk

def lambda_handler(event, context):
    # Set Up DA Client - UserA
    da_client = dataall_sdk.client(profile="dataall-team-lambda", secret_arn="<SECRET_ARN>")

    # # List Org - Ensure Org Creatd
    list_org_response = da_client.list_organizations()
    print(list_org_response)

Certainly ,  great feature to have. Q. As there are plans to use AppSync for GQL , will the also seemlessly work with AppSync ?

Some feedback on design @noah-paige:
I like the idea of a separate repo. I like the idea of a python package that will provide both the SDK and the CLI utils.

Generating schema.graphql. When will this happen? Do we want to generate this automatically during the build of the SDK? If so we need to somehow specify the version of data.all to know which repo of data.all to use to generate the schema? Or perhaps we should have data.all publish this file as part of its own build and then during SDK build we store in configuration which version of data.all we're building against and then the build will simply fetch the schema file from data.all repo? Could you add some details how exactly this will work how developers of the SDK will get a version of schema.graphql and how it will be included into the python package during the build?

There's a plan to move to AppSync and I believe this would mean the schema starts living in AppSync? And the Schema would be defined in CDK? It means that we would still need some way to generate the schema? Can you add some clarity in the design how the schema file would work in the AppSync world and how would that affect local development and building of the library.

Profiles are a nice idea for CLI but I'm struggling to make sense how they would work for SDKs. In your example for Lambd with secret_arn what is the purpose of passing a profile name there? Why is it needed?

I dislike the idea of '--auth-strategy Custom' or auth_strategy="Custom". That doesn't look right to me. In my view if you are creating a profile you should select what type of profile you're creating cognito or custom_idp .. if you're selecting custom_idp then you need to provide all the extra things that needs and that creates a new profile for you and then you use that as normal. Then it will also make sense for the lambda example if I'm connecting from a lambda then my secret will hold the full profile that can either be a cognito profile or custom_idp profile and the client will figure out what type it is.

Going a bit further I can see 2 types of custom IDP profiles with Oauth2 flows. One is a basic one which uses what's called a username/password flow in Oauth2 where there's no authorization flow. This is suitable when you want to call data.all apis from a lambda via SDK. But for example if you're a human user running CLI commands then you could create a profile that doesn't use a username/password but where the CLI will open your browser and guide you to authorization screen (for example google cli utils do that when you want to get credentials for GCP environments). You could start with basic support username/password but that will make some users unhappy who do not use username/passwords with their IDP.
We can meet to discuss this last point a bit more..

When authenticating the user with the CLI, the user information is also stored (~/.dataall_cli/config.yaml). Does that mean when the token is expired the same user information can be used to fetch another token? Or is it used for some other reason ?

Thanks both for the great comments + questions above, here are some thoughts/response
Response to @zsaltys Comments:

(1)For building the schema file - the simplest case and the initial idea is to have a static schema file already present in the SDK repo (or can be fetched from data.all repo if required). You bring up a good concern around versioning:

What dataall version is the schema file representing?
What if modules are disabled? How will schema file be updated to remove APIs that do not exist?
What if users add additional custom modules (and thus custom APIs) to their specific dataall deployment?

With the above in mind I propose we still keep a set of static schema files (using latest release static schema by default), with a user able to specify a particular data.all versions schema if need a version earlier than the latest release. (to handle version matching)
Additionally, if moving to AppSync to host the GQL endpoint, we can have the schema be retrieved on initialization of the SDK client automatically by running introspection queries against the endpoint… meaning we can generate the schema file specific to that dataall deployment removing any disabled modules and including any additional APIs developed (to handle modules enabled/disabled and custom development)

(2) When moving to AppSync the creation of the schema file becomes quite easy. To retrieve the schema we can either use a built-in boto3 api get_introspection_schema (link) or can run introspection queries against the endpoint to find out the schema (link)

(3) Think that the SDK can be run either in local scripting or in AWS compute resources:

For local python scripts, profile here would be very similar to boto3.session(profile_name=“PROFILE_NAME”) where the profile has already been configured (i.e. by running dataall_cli configure - similar to awscli configure) and saved in a local file ~/.dataall_cli/config.yaml . Then we can use profile to reference different users onboarded to a dataall deployment (this would be the default behavior unless secret_arn specified - and by default would likely try to use a profile named “default”)
For AWS compute resources we needed another way to store user information separate from ~/.dataall_cli/config.yaml  and that is why we also introduced this parameter for secret_arn. This is so that the Lambda, Glue, EMR, or whatever service role can pull the user information from Secrets Manager securely

(4) Agreed - I have since removed auth_strategy parameter from the client method and have added it as an option to select when configuring a dataall user. Depending on the type of user being configured (via dataall_cli configure) the user with be prompted to provide specific information required. Then it is the same pattern to use either type of profile

Last point is interesting to have redirects directly to an auth screen to have a user pass auth that way - something I will look into with google cli and we can discuss further for sure

Response to @TejasRGitHub Comments:

Yes we store the user profile information in ~/.dataall_cli/config.yaml so that we can fetch a new token if the current one is expired. Felt like a far better user experience than to have a user manually enter all of the required information every time a token expires (which could super quick such as ~1 hour)


Button to @ mention in discussion

We could add a button to quickly mention someone. It can either go by the "Edit comment" button or near/below the user/avatar, as such:

Clicking it would instantly @mention the user and focus the comment field, like the r key does when quoting the selection.
This would also be a solution/replacement for https://github.com/sindresorhus/refined-github/issues/1003 and fix the annoyance caused by show-names (it makes it harder to copy-paste usernames)

If anyone is interested, I maintaining the Github Reply Comments userscript.

It’s not clear what that does. What does “reply to a comment” entail? Why does it depend on a markdown parser?

@fregante commented on Nov 12, 2019, 1:17 PM GMT+1:

It’s not clear what that does. What does “reply to a comment” entail? Why does it depend on a markdown parser?
I think it’s different from what is being asked here.

It adds the content above ⬆. The Markdown parser is there to support (most) Markdown syntax.

You should probably include that in the readme or screenshot.
Anyway the feature I’m suggesting only includes the username, e.g.
@jerone

Maybe add this behavior to alt click on username instead of making it a button?

Currently we use only such shortcut to mean "click this and all the buttons like this," it's not great for discoverability.
I'd rather show the button on hover rather than hide it under a click modifier.

PR ready


After delete and create new it alway show error

Step

Go to Monitor - Logs
Create 1st resource
Delete resource is create at 2.
Create new resource difference name with 1st
Always show error below can't create new one or access new resource  is create from 4.

Error is
This resource was not found, it may have been deleted. /subscriptions/529bc395-404b-4c9f-a407-59913b16ad12/resourceGroups/application-insight-group/providers/Microsoft.OperationalInsights/workspaces/{myWorkSpaceName}
**{myWorkSpaceName} is name or resource  is create at 1st

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

ID: 86984751-da7f-c77b-c78b-a9c9ffacb4a3
Version Independent ID: 57838082-5ee8-097c-9814-803a5077ba4e
Content: Delete an Azure Log Analytics workspace
Content Source: articles/azure-monitor/platform/delete-workspace.md
Service: log-analytics
GitHub Login: @MGoedtel
Microsoft Alias: magoedte

@uopeydel Thank you for the feedback! We are investigating this and will get back to you shortly.

@uopeydel Sorry for the issue you encountered. Since this channel is reserved for documentation related feedback, I recommend either posting your question on the MSDN Forum for Log Analytics or engaging the Azure technical support team. Either of these channels will guanrantee you the best possible answer/ support for your issue.
we will now close this issue and look forward to you engaging via our support /forum channels.
Cheers.


studying code

how can  i  convert   ungoogled-chromium  to a standard+automatized build process?

dpkg-build package

pkgbuild  just bash

ebuild  bash with aliases...complex

slackbuild

rpm yeah, its a hell

That's an interesting question. fpm for instance can generate platform-specific packages for dpkg, RPM, pacman and some other package managers.

I don't think I understand your question @nyancat18, but based on what @xsmile said, utilikit is supposed to be an extensible framework to build for multiple different platforms. But I haven't heard of fpm before; might be interesting to look into.

@eloston  i  talk  about  how translate utilkit's work  to bash (good for pkgbuild)

@nyancat18 utilikit can already be scripted based on the build instructions if you want that. Otherwise, utilikit can generate a shell script for buliding on Linux.


Fix typing, mostly related to async_generator

While running the "advanced" example from the readme with pyright, i noticed it was alerting me to some typing issues, relating to asynccontextmanager and Client.__aexit__.

Pyright errors
Argument of type "Client" cannot be assigned to parameter "cm" of type "AsyncContextManager[_T@enter_async_context]" in function "enter_async_context"
  "Client" is incompatible with protocol "AsyncContextManager[_T@enter_async_context]"
    "__aexit__" is an incompatible type
      Type "(exc_type: Type[Exception], exc: Exception, tb: TracebackType) -> Coroutine[Any, Any, None]" cannot be assigned to type "(__exc_type: Type[BaseException] | None, __exc_value: BaseException | None, __traceback: TracebackType | None) -> Awaitable[bool | None]"
        Parameter 1: type "Type[BaseException] | None" cannot be assigned to type "Type[Exception]"
          Type "Type[BaseException] | None" cannot be assigned to type "Type[Exception]"
        Parameter 2: type "BaseException | None" cannot be assigned to type "Exception"
          Type "BaseException | None" cannot be assigned to type "Exception"
        Parameter 3: type "TracebackType | None" cannot be assigned to type "TracebackType"

Argument of type "AsyncIterator[AsyncGenerator[MQTTMessage, None]]" cannot be assigned to parameter "cm" of type "AsyncContextManager[_T@enter_async_context]" in function "enter_async_context"
  "AsyncIterator[AsyncGenerator[MQTTMessage, None]]" is incompatible with protocol "AsyncContextManager[_T@enter_async_context]"
    "__aenter__" is not present
    "__aexit__" is not present

Argument of type "AsyncIterator[AsyncGenerator[MQTTMessage, None]]" cannot be assigned to parameter "cm" of type "AsyncContextManager[_T@enter_async_context]" in function "enter_async_context"
  "AsyncIterator[AsyncGenerator[MQTTMessage, None]]" is incompatible with protocol "AsyncContextManager[_T@enter_async_context]"
    "__aenter__" is not present
    "__aexit__" is not present

The issue with Client.__aexit__ was simple, the arguments were missing the Optional[] around their type hint, and also need to use BaseException instead of Exception.
After a LOT of time trying to figure out what the issue wth asynccontextmanager was, i noticed that the compatibility import async_generator was missing type information, which caused pyright to fail at inferring the AsyncContextManager type for Client.filtered_messages and Client.unfiltered_messages.
I solved this by redefining the asynccontextmanager imported from async_generator with the proper typehints, and ignoring the type issues on those lines. This could potentially be moved to a type stub, though im not very comfortable working with them yet.
After these changes there are no more issues running pyright on the advanced readme example.
MyPy still throws a few errors relating to SocketOption, but this is behaviour that has not changed.
I have tested running the advanced readme example on python 3.6 and with modifications to the example due to missing features it runs fine.

Hi @laundmo and @sdwilsh. Thanks for opening these pull requests. I'll tackle both #86 and #87 in here since they cover the same underlying issue.
Good catch on the type errors in general. :+1:  I'm happy to merge this as-is.
I guess the only open question is how to deal with the untyped async_generator.asynccontextmanager in python 3.6. Again, I'll happily accept either of the approaches that you propose. Do you guys agree on a specific approach or do you need a BDFL decision? :)

@frederikaalund why not both? replace the try/except with the version if, and leave my type overwrite in that. That way, 3.6 has correct typing and pyright can still understand it won't ever get to use async_generator.asynccontextmanager on versions > 3.6

You're right, we need both. :+1: I'll merge this as soon as that last change lands in this PR.

I'll credit you both in CHANGELOG.md, by the way. :)

@frederikaalund i don't have any more changes planned. Feel free to merge, or do you want me to merge the other PR into this one first?


selection.trigger("type", details) should dispatch a CustomEvent

d3-selection now supports selection.dispatch, so closing as fixed in 4.0.


Bower install for addons

Currently i use the Dexie.Observable an saw that since version 1.3 they are removed from the distribution. So im unable to use 1.3 with bower. Are you planning to add these again?

Apologies for any inconvenience regarding the addons. The addons are published in their own npm packages now. I'll see what I can do to make them installable over bower.
Once i've put a bower.json for both addons, you can use
bower install https://npmcdn.com/dexie-observable/bower.zip

But right now, that doesnt work because bower.json is missing.
There are several reasons for not supporting bower for each addon. First reason is that addons are now es6 based and dependant of a build process. Second reason is that I would like addons to be their own packages (even though some addons may be placed in the same repo). And then, it's about the problem that comes with having to commit build output to github. For dexie, I'll keep supporting bower by temporarily checking in build output when releasing, and then deleting it from the repo afterwards. This is all done in a release script so I don't have to think about it.
To sum it up, bower support will be fixed very soon (tonight/tomorrow). I hope it feels ok to install each addon as its own package from the npmcdn.com url and not included in dexie package?

I've published dexie-observable 0.1.3 and dexie-syncable 0.1.3 with bower support through npmcdn.com.
bower install https://npmcdn.com/dexie-observable/bower.zip
bower install https://npmcdn.com/dexie-syncable/bower.zip

Please let me know if you are ok with that, and we can close the issue.

I noticed that bower.zip only contains the main file, not min, map, or es6.
How do you bower users react to having the addons installed this way? Please :+1:  or  :-1: . I could add a script that builds the addons and includes them in the Dexie bower package again if people thinks the current way is too cumbersome. Looks like there are a lot of bower users.

Ok, so I updated the release script so that the dexie bower package also includes the transpiled addons under addons/Dexie.Observable/dist/dexie-observable.js. Dist dir also includes minified and map files.
Like it was before, just do:
bower install<EMAIL_ADDRESS>
$ ls -Rla bower_components/dexie/addons/*/dist
bower_components/dexie/addons/Dexie.Observable/dist:
total 144
drwxr-xr-x 1 David 197610     0 Mar 21 13:45 ./
drwxr-xr-x 1 David 197610     0 Mar 21 13:45 ../
-rw-r--r-- 1 David<PHONE_NUMBER>9 Mar 21 13:45 dexie-observable.js
-rw-r--r-- 1 David<PHONE_NUMBER>7 Mar 21 13:45 dexie-observable.js.map
-rw-r--r-- 1 David<PHONE_NUMBER>3 Mar 21 13:45 dexie-observable.min.js
-rw-r--r-- 1 David<PHONE_NUMBER>3 Mar 21 13:45 dexie-observable.min.js.map

bower_components/dexie/addons/Dexie.Syncable/dist:
total 188
drwxr-xr-x 1 David 197610     0 Mar 21 13:45 ./
drwxr-xr-x 1 David 197610     0 Mar 21 13:45 ../
-rw-r--r-- 1 David<PHONE_NUMBER>0 Mar 21 13:45 dexie-syncable.js
-rw-r--r-- 1 David<PHONE_NUMBER>6 Mar 21 13:45 dexie-syncable.js.map
-rw-r--r-- 1 David<PHONE_NUMBER>3 Mar 21 13:45 dexie-syncable.min.js
-rw-r--r-- 1 David<PHONE_NUMBER>7 Mar 21 13:45 dexie-syncable.min.js.map

David@DavidHPEnvy2 MINGW64 /c/repos/lab2
$

Will continue to support bower for addons by including them in the dexie package.
Those who use npm or jspm will install addons as separate packages. This only applies to bower since it is coupled to the github repo.


Redis Cache Tags Breaks With Read Only Replica

Laravel Version: 6.20.17
PHP Version: 7.3.27
Database Driver & Version: Redis 5.0.5

Description:
If you use Cache Tags and have a master/replica setup using Redis it will fail with READONLY You can't write against a read only replica. when you try to get a key that is not in the cache yet.
Steps To Reproduce:
app/config/cache.php:
<?php

'stores' => [
        'redis' => [
            'client' => 'predis',
            'driver' => 'redis',
            'connection' => 'default',
        ],

        'redis_read_only' => [
            'client' => 'predis',
            'driver' => 'redis',
            'connection' => 'redis_read_only',
        ],

    ],

General code:
Cache::store('redis_read_only')->tags(['some_tag'])->get('my_key', function() {
  return Cache::store('redis')->tags(['some_tag'])->put('my_key', 'value');
});

On initial request the get causes a failure because we try to set the tagIds since they don't exist (stack trace below).
I would think that we don't want to write when doing a read command.
Stack trace:
{
    "exception": {
        "class": "RedisException",
        "message": "READONLY You can't write against a read only replica.",
        "code": 0,
        "file": "/var/www/html/gdm/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php:116",
        "trace": [
            "/var/www/html/gdm/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php:116",
            "/var/www/html/gdm/vendor/laravel/framework/src/Illuminate/Redis/Connections/PhpRedisConnection.php:519",
            "/var/www/html/gdm/vendor/laravel/framework/src/Illuminate/Redis/Connections/PhpRedisConnection.php:85",
            "/var/www/html/gdm/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php:171",
            "/var/www/html/gdm/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php:54",
            "/var/www/html/gdm/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php:87",
            "/var/www/html/gdm/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php:76",
            "/var/www/html/gdm/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php:66",
            "/var/www/html/gdm/vendor/laravel/framework/src/Illuminate/Cache/TaggedCache.php:102",
            "/var/www/html/gdm/vendor/laravel/framework/src/Illuminate/Cache/TaggedCache.php:91",
            "/var/www/html/gdm/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:97",
            ...snip
        ]
    }
}

Hey there,
Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to report back and I'll gladly help you out and re-open this issue.

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

Thanks!

Hi @driesvints, yes I will check those out, but could you explain what you mean by 'identify this as a bug'?
The framework tries to write on a read command and it breaks if you have a master/replica setup. What else is needed for me to 'identify this as a bug'?

I'm not sure what you wanted so I just created PR #37851 37851


How to train HifiGAN-Singing from scratch?

Could you please give some instructions? Thank you very much

https://github.com/MoonInTheRiver/DiffSinger/issues/13

#13

Hi. Thank you for your reply. Do you mind sharing the code of training HiFiGAN-Singing, for users who needs to change the parameters of the vocoder and train it from scratch (e.g. sample rate.etc)? Thank you very much.

#13

Hi. Thank you for your reply. Do you mind sharing the code of training HiFiGAN-Singing, for users who need to change the parameters of the vocoder and train it from scratch (e.g. sample rate.etc)? Thank you very much.

This part of codes was purchased by an enterprise.


#2: Adding coloring for git patches

Added several statements to make git patches more readable, nothing super fancy, everything inline with the original theme.

Ooops... I have run automatic formatting and it replaced inconsistent indentation with the consistent one apparently, so it looks like more changes than it actually is.

Thanks.