A way to convert back to Python (tolist)

I think (correct me if I am mistaken) that currently the only way to convert an array object back to a Python representation is to call float, int, bool, etc on 0D arrays. This requires that the user knows the appropriate function to call and does not offer any standard way to retrieve the underlying Python object when the library has additional dtypes, such as object in NumPy.
Moreover, as there is no tolist in the standard, it is also not possible to obtain a list representation of the array (from which the Python object could be retrieved).
I propose to add tolist to the standard, as defined in NumPy and Pytorch to deal with these cases. Although the name is a bit misleading (because for 0D arrays there is no list at all), I think that prior art justifies reusing that name.

There're some difficulties that NumPy folks are discussing: https://github.com/numpy/numpy/issues/24989

Well, maybe the standard should introduce a new name then, such as topython, so that people are not confused by the name.

The semantic issues with tolist are real, and I'm also not sure that this should be supported for n-D arrays. If there's a need for this, it'd be better to add the relevant dunder method so list(x) works, a separate function or method doesn't seem great.
Would one actually need this for arrays of arbitrary dimensionality? Some real-world examples would be good to see.

I don't know which dunder method would that be. I think currently list(x) would return a list of 0D arrays for arrays that follow the standard (not current NumPy ndarray), instead of a list of Python types. If you are interested in just a normal list, a possibility would be to offer an iterator over the elements of the array (like NumPy's ndarray.flat), so that you can do list(x.flat). I am not sure if there are use cases for a multidimensional tolist.
My use case was for 0D arrays, more similar to NumPy's ndarray.item(). However, I thought that it was preferable to have one dimension-independent function to retrieve the Python objects (so, similar to how tolist behaves), rather than including just item() only for it to become redundant if something like tolist is added later.

For 0-D arrays, list(float(x)) should work already. Extend a little if it needs to be generic over all dtypes, by checking with isdtype - that's not a bad thing because it's not clear whether you'd want uint* - Python int.

I think there was a misunderstanding... I do not want a list returned for 0D arrays, but a dtype- independent way to convert them to a Python object that can hold them, that works also for non-standard dtypes.

What you need to use is [float(x) for x in arr.ravel()], since iteration behavior is unspecified (assuming you know you want a Python float).
NumPy has the .tolist()/.item() (also object casts actually) which have a preference to convert to the corresponding Python type when deemed reasonable (not saying that what it deems "reasonable" is actually reasonable).
As I said on the NumPy issue, maybe raveling would be the more useful default behavior, although I am not sure... Loosing dimensions is also surprising!
But then I also think that iterating all elements would generally be a nice thing for array objects (although, I realize that would require user teaching and better ways to iterator a single axis).
Whatever the solution, maybe a new name is fine, maybe one should just keep the tolist name but make raveled/flattened=True/False compulsory (i.e. it is undefined if not passed and the "minimal" implementation used for testing would raise).

This issue made me wonder about converting from one namespace to another. Say from PyTorch to Numpy. This works:
x = array_api_compat.torch.asarray([1,2,3])
array_api_compat.numpy.asarray(x) # -> array([1, 2, 3])

The reason I was thinking about this was that it would be nice to have a consistent way of converting things. Of course, there is no asarray for normal Python, so this is more of a thought experiment.

We did discuss a possibility to standardize bringing data from any array object to Python. It would make sense to have a function that would transfer content of array into another type that exposes Python buffer protocol. From here the content could be converted to NumPy, or passed to xp.asarray in another library.

I think there was a misunderstanding... I do not want a list returned for 0D arrays, but a dtype- independent way to convert them to a Python object that can hold them, that works also for non-standard dtypes.

Non-standard dtypes may not have a pure Python equivalent, so that's quite tricky clearly. Things like datetime may work, for different precisions like float128 it's hard to determine whether it's fine to downcast to 64-bit float's, etc. I don't think there should be a too magical do-it-all function. The current issues with numpy's .tolist show that that's a problem. It's easy enough to write for 0-D arrays with the set of dtypes that you care about something like:
def convert_0D_arrays(x):
    if not x.ndim == 0:
        raise ValueError('...')

    if xp.isdtype(x, 'real floating'):
        return float(x)
    elif xp.isdtype(x, 'complex floating'):
        return complex(x)
    # etc.

Static typing is also easier outside of a magical do-it-all function, because you can add the overloads for the different return types.

The reason I was thinking about this was that it would be nice to have a consistent way of converting things.

This can be done with from_dlpack, or with asarray.

Non-standard dtypes may not have a pure Python equivalent, so that's quite tricky clearly. Things like datetime may work, for different precisions like float128 it's hard to determine whether it's fine to downcast to 64-bit float's, etc. I don't think there should be a too magical do-it-all function. The current issues with numpy's .tolist show that that's a problem. It's easy enough to write for 0-D arrays with the set of dtypes that you care about something like:
def convert_0D_arrays(x):
    if not x.ndim == 0:
        raise ValueError('...')

    if xp.isdtype(x, 'real floating'):
        return float(x)
    elif xp.isdtype(x, 'complex floating'):
        return complex(x)
    # etc.

The thing is that if the arrays implement additional dtypes apart from the standard ones (something allowed in the standard, as far as I know), this is not so easy to do from the user side. Consider for example the datetime extension you mentioned. There is no dunder equivalent like __float__ for datetime. Thus:

datetime(x) will likely not work.
Dlpack does not help here, as it only supports numeric types.
The buffer protocol won't help you either as that format is not supported for a memoryview.

So, what can a user do to retrieve the object?
And note that although it is valid to say "this is not a problem for the standard, as it only requires numerical types with dunder methods", I still see the value in standardizing at least the naming and interface of a function similar to NumPy item that provides the "best" way to represent a scalar quantity as a Python object, as intended by the array developers. Depending on how that is standardized, it could even be the case that the value returned for a, for example, float64 dtype is not a Python float. For example, a library that wraps arrays compatible with the standard and adds physical units on top, presenting itself a similar API to the standard, could implement item as returning objects with units attached.

I still see the value in standardizing at least the naming and interface of a function similar to NumPy item that provides the "best" way to represent a scalar quantity as a Python object,

There's a reasonable amount of consensus, among both NumPy devs and devs from other array libraries, that NumPy's scalars were a design mistake. They add a large amount of complexity, and we'd remove them from NumPy if we could (but, backwards compat). So I don't think this is going to fly.

Consider for example the datetime extension you mentioned. There is no dunder equivalent like float for datetime.

There is only one library that supports datetime dtypes, namely NumPy. So you can explicitly handle that case with a NumPy function.

Just thinking out loud... If we agree that a "0D list" is an ill-defined construct, perhaps we can at least have a clean .tolist() semantics on unambiguous cases? From a purist perspective, in addition to always get a return value of type list, it's also very good to try and preserve the dimension/shape of an array, for facilitating a correct round trip (tolist -> asarray, or vice versa).

For N-D arrays (N > 0):

if all axes have nonzero lengths, .tolist() returns an N-nested Python list, with lengths of the inner lists dictated by .shape

ex: .shape = (2,), output = [1, 2]
ex: .shape = (2, 3), output = [[1, 2, 3], [2, 3, 4]]
...

if any inner-most, fast-running axis has length 0, that axis is an empty list

this is because in order to get a well-defined semantics, .tolist() must assume C order
ex: .shape = (0,), output = []
ex: .shape = (2, 0), output = [[], []]
ex: .shape = (2, 3, 0), output = [[[], [], []], [[], [], []]]
...

otherwise, we either raise an exception, or make the behavior implementation defined (and not standardize it)

ex: .shape = (0, 2)
ex: .shape = (2, 0, 4)
ex: .shape = (0, 3, 4)
...

For 0-D arrays:

Same, we either raise an exception (and tell users to use builtin functions like int(), float(), ... to get a Python scalar),
Or make the behavior implementation defined (and not standardize it)

That seems reasonable @leofang. However, there are going to be other exceptions aside from 0-D arrays, because leaving array land isn't always possible. E.g., what about non-CPU devices or detaching from an autograd graph?

In case that this is implemented I would rather have the natural implementation for 0D arrays: returning a non-list (either a Python representation of the scalar value itself or the array unchanged) so that array(0).tolist() == array([0]).tolist()[0]. If the name tolist is considered problematic for something that does not necessarily return a list, I would change the name, rather than raising an exception for a case where the natural behavior is obvious.

Adding to
@betatim

This issue made me wonder about converting from one namespace to another. Say from PyTorch to Numpy. This works:
x = array_api_compat.torch.asarray([1,2,3])
array_api_compat.numpy.asarray(x) # -> array([1, 2, 3])

The reason I was thinking about this was that it would be nice to have a consistent way of converting things. Of course, there is no asarray for normal Python, so this is more of a thought experiment.

and
@oleksandr-pavlyk

We did discuss a possibility to standardize bringing data from any array object to Python. It would make sense to have a function that would transfer content of array into another type that exposes Python buffer protocol. From here the content could be converted to NumPy, or passed to xp.asarray in another library.

remarks,
should we use a separate issue that covers inter-namespace conversion specifically rather than tolist ?
I want to emphasize with this usecase I have when trying to adapt code for Array API compliance. There is some code that can't compromise on numerical accuracy and absolutly requires at least float64 precision, but I could use an integrated GPU that supports at most float32 (e.g using mps or xpu backends using pytorch) for everything else. For this I would have to transfer data from device to cpu, run the float64 compute, and transfer back to device. But .to_device("cpu"), this is not part of the standard and some array libraries might not support it (like cupy arrays) so I can't rely on it. .from_dlpack does not support inter-device conversion so it's not appropriate either.
For this usecase an intermediate object that enable inter-device and inter-namespace conversion surely would be practical.
tolist have been mentionned but also conversion to and from numpy is commonly supported:

torch have Tensor.numpy and torch.from_numpy
cupy have cupy.asnumpy and cupy.asarray works with numpy arrays
jax have jax.numpy.array and np.asarray works with jax arrays
dask from_array supports numpy inputs and np.asarray works with dask arrays
tensorflow have Tensor.numpy and tf.convert_to_tensor()
mxnet have NDArray.asnumpy and array supports numpy inputs
dpctl.tensor have asnumpy and dpctl.tensor.asarray supports numpy inputs

wouldn't it be practical to add to the Array API a conversion to numpy, e.g to_numpy or asnumpy ? (from_numpy doesn't seem as necessary since asarray or from_dlpack commonly already works with numpy inputs)

But .to_device("cpu"), this is not part of the standard and some array libraries might not support it (like cupy arrays) so I can't rely on it.

Related discussion https://github.com/data-apis/array-api/issues/626

@fcharras thanks for your thoughts! I've copied your comment to gh-626, so we can keep that "to host" topic there, and keep this one for .tolist.


Remove count when lead is converted

I would not want to count the lead once its converted as it will be counted in the contacts as well.
I have created two counts total leads count  and total contacts count. Once a lead is converted it should be removed from the leads count. Right now it is being counted in both.

Still doesnt work.

@preetishetty25 could you post a screen shot? Have you added IsConverted to the Field listing below the actual query field? This should instruct DLRS to monitor for applicable changes. If it still doesn't work we will need to figure out if the trigger is firing at the expected time and that will take a debug log.

I will close this for now. But we can keep discussing for sure. Happy to re-open. Thanks. 😄


Cheetsheat:

Dear all,
To finish a debugging:

Could you let me know if you expect something for <g type="numeral"> or it's association with <num>?
Can you also let me know if you want oto display and how the <g type="filler"/>?

Thanks,

I think that we don’t expect any particular display. If we have abc, then display abc, except if it is possible that fraction such as 1/8 should be displayed as ⅛. A test on presence of / inside  should help identify the cases.
Please display  as §.
Arlo

Le 31 mars 2020 à 15:23, ajaniak<EMAIL_ADDRESS>a écrit :
Dear all,
To finish a debugging:
• Could you let me know if you expect something for  or it's association with ?
• Can you also let me know if you want oto display and how the ?
Thanks,
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or unsubscribe.

I second Arlo: for the time being, there is no need for anything fancy for these elements. One thing that would be good to have is to add a space before and after <g type="numeral> if there isn't already a space there in the XML file, so that if the encoder forgets to type a space, e.g.
<g type="numeral">100</g><g type="numeral">20</g>3
we still get 100 20 3 in display and not 100203.
Also, we need no display in our HTML transformation for <num>, but in the long run, for the website, we might want e.g. a shaded background for the contents of that element, with a tooltip displaying the @value.

Fine with me.


:zap: Reduce Reliance on JSON.stringify/parse and Base64

Describe the task

If the task will only make sense to a dev, add a :zap: to the title.

JSON.Parse/stringify and Base64 operations are thread blocking and slowdown the application,
Value Add
Improved application speed
Acceptance Criteria

[ ] first
[ ] second
[ ] third

Additional Context

Hello, I tried to solve the issue.
This is what I did:
Added a new worker file for handling JSON and Base64 operations, and updated the store and utility files to use the worker.
You can review changes in this commit: https://github.com/lattaai9/bcgov-invasivesbc-3664/commit/65c9f20e81de19b5114d04b8a488eb8c0b035214.

[!CAUTION]
Disclaimer: The commit was created by Latta AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.

This issue was tried to solve for free by Latta AI - https://latta.ai/ourmission
If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.


[Lab E6 Exercise 1] Persistent Developer tunnel URL setup

All steps are good, however when we debug the project locally, the default debug steps will always use "Start Teams App Locally" step which creates non-persist tunnel URL can cause the running failure.
My workaround is to comment this "Start local tunnel" step in task.json:
{
"label": "Start Teams App Locally",
"dependsOn": [
"Validate prerequisites",
//"Start local tunnel",
"Create resources",
"Build project",
"Start application"
],
"dependsOrder": "sequence"
}
And set OPENAPI_SERVER_URL in .env.local.user as the persistent tunnel URL.
After this, local debugging works well with the persistent Tunnel url.

OK this is fixed thanks!
I'm planning to add TTK integration by the way so it will work with the dynamic tunnel.
Here is a sample using this approach FYI
https://github.com/pnp/copilot-pro-dev-samples/tree/main/samples/da-repairs-oauth-validated


Add 5.2 configuration for ACHNBrowserUI

Pull Request Description
Updating ACHNBrowserUI configuration with a new 5.2 commit.
Acceptance Criteria
To be accepted into the Swift source compatibility test suite, a project must:

[x] be an Xcode or swift package manager project
[x] support building on either Linux or macOS
[x] target Linux, macOS, or iOS/tvOS/watchOS device
[x] be contained in a publicly accessible git repository
[x] maintain a project branch that builds against Swift 4.0 and passes any unit tests
[x] have maintainers who will commit to resolve issues in a timely manner
[x] be compatible with the latest GM/Beta versions of Xcode and swiftpm
[x] add value not already included in the suite
[x] be licensed with one of the following permissive licenses:

Apache License, version 2.0

[x] pass ./project_precommit_check script run

PASS: ACHNBrowserUI, 5.2, 3f14c4, ACHNBrowserUI, generic/platform=iOS
========================================
Action Summary:
     Passed: 1
     Failed: 0
    XFailed: 0
    UPassed: 0
      Total: 1
========================================
Repository Summary:
      Total: 1
========================================
Result: PASS
========================================
--- ACHNBrowserUI checked successfully against Swift 5.2 ---

Ensure project meets all listed requirements before submitting a pull request.

@swift-ci test

@swift-ci test

@swift-ci test

@swift-ci test

Looks like the project test passed in a previous PR test, but the build failed for unrelated reason...
15:39:15 PASS: ACHNBrowserUI, 5.2, 3f14c4, ACHNBrowserUI, generic/platform=iOS

The Swift project moved the default branch to main and deleted master branch, so GitHub automatically closed the PR. Please re-create pull request with main branch.
More detail about the branch update - https://forums.swift.org/t/updating-branch-names/40412


Add option to exclude factions

I added the new eem debug mod, and the problem here is that the PB should not be limited, because if they are stopped or removed (because of damage) it will break the whole gameplay.
So i need an option to exclude them by name, tag or exclude npc factions.
This is an important issue!
Just a quick overview:

im actually working on this already, im adding an option to allow people to override the max runtime for certain playernames, so you could for example just tell it that "Civillian" has a max runtime of 10ms or something.

I need an option to disable/skip, not to override. Because eem stuff never be touched by someone elsr

you can use the override i added in version  v<IP_ADDRESS> to give the NPC an overridden limit so the script doesnt interfere, just use the name displayed in the right collumn there to set the override and it should work.


fix #196: prepareGhPages deletes files in the root directory instead …

…of those in the target directory

I'm pretty sure this was resolved by #192. Please correct me if I'm wrong. I do like how you switched around the logic to avoid unnecessary work.

toRemove << path.relativize(f.toPath()).toString().replaceAll('\\\\', '/')

This part seems like it should be handled by grgit rather than this plugin. I don't think it's this plugin's job to fix paths.

You're right. I'm closing this PR.

I have sent to grgit a PR that adds support for paths with backslashes.

Thanks @siordache!!


Support for new Steam Chat feature?

Valve released a new chat a few weeks ago:
https://steamcommunity.com/updates/chatupdate
It has new group chat settings, looks more like Discord now.
For example:
-Group chats can now have multiple text channels and voice channels.
-Steam media upload (pictures) and embedding of content.
Any idea if you will add support for this new chat?

Hi, that depends if the developer of the library (https://github.com/Philipp15b/go-steam) I use will update.
But I think the chance is slim, because latest update was in 2016.
Seems like there is a more up-to-date library at https://github.com/doctype/steam (not sure if it has support for that new chat yet)
If anyone wants to update the steam chat bridge to work with this new library, feel free to open a PR :)

Looks like there is some movement upstream regarding this issue.

@poVoq no not really. Latest changes from upstream are also already in v1.16.0

It looks like the developer of the (https://github.com/Philipp15b/go-steam) library has updated it to use the new SteamKit version.  Can you update matterbridge to use this new library?

Steam chat support is blocking on https://github.com/Philipp15b/go-steam/issues/94
At the moment matterbridge can not support steam anymore until this is fixed, this has now also been noted in the README and the wiki.

Steam chat support is blocking on https://github.com/Philipp15b/go-steam/issues/94
At the moment matterbridge can not support steam anymore until this is fixed, this has now also been noted in the README and the wiki.


Alternative license

Awesome library!
Maybe you should think about switching to another license:
The GPL license is not really adequate for client-side JavaScript code, one may argue.

Thanks that is a great suggestion!

Changed the licence to be MIT. Feel free to do as you want with it!


Strict-Transport-Security header isn't present on all responses

Chef Server Version
Infra Server 14.5.29
Platform Details
[Operating system distribution and release version. Cloud provider and instance type if running in the cloud. Total/Free RAM and disk space. Is this running in a container?]
N/A
Configuration
[Standalone, Tiered, HA, Chef Backend? New install or upgrade? Ideally include your /etc/opscode/chef-server.rb or otherwise provide details of changes from the default]
Scenario
[What you are trying to achieve and you can't?]
We should have the Strict-Transport-Security header present in all responses
Steps to Reproduce
[If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?]
curl -i -k --silent https://server-url/ - Observe the headers, Strict-Transport-Security is missing.
Expected Result
[What are you expecting to happen as the consequence of above reproduction steps?]
The Strict-Transport-Security header to be present on all responses from the server.
Actual Result
[What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.]
The STS header only gets applied to certain paths - when tested it was present in /_status but not on / or /version
Workaround
In our scenario, as we're operating in AWS, we bake AMIs using chef-solo & packer, so this is how I've worked around it for now (after installing the deb omnibus installer):
ruby_block 'Set STS Header' do
  block do
    sts_value = 'Strict-Transport-Security "max-age=<%= @helper.get_max_age_for_hsts %>; includeSubDomains";'
    sts_header = "      <% if @server_proto == 'https' %>add_header #{sts_value}<% end %>"
    fe = Chef::Util::FileEdit.new("/opt/opscode/embedded/cookbooks/private-chef/templates/default/nginx/nginx_chef_api_lb.conf.erb")
    fe.insert_line_after_match(/location ~ "^\/[0-9]{3,3}\.(json|html)|favicon.ico|index.html$" {/, sts_header)
    fe.insert_line_after_match(/location "\/css\/" {/, sts_header)
    fe.insert_line_after_match(/location "\/images\/" {/, sts_header)
    fe.insert_line_after_match(/location \/version {/, sts_header)
    fe.write_file
  end
  action :run
end

Fixed by https://github.com/chef/chef-server/pull/3031 and released in 14.11.36


Sapling Listener / Growth Server Crash

OTG Plugin or Mod

[x] OTG Mod for Forge
[ ] OTG Plugin for Spigot

OTG Version

[x] 1.12.2_v8_r1
[ ] 1.12.2_v7_DEV_r26
[ ] 1.12.2-v6
[ ] 1.12.2-v5
[ ] 1.11.2-v8
[ ] 1.11.2-v9
[ ] 1.10.2-v21
[ ] Other - specify here

Forge or Spigot Versions
Forge [<IP_ADDRESS>31]
Server/Client Log
Complete console log: link
Latest crash report: link
What other plugins are you running?
Life in the Village 1.15 Modpack
List of mods included in the modpack here.
Description
The Server crashes unexpectedly, without prior warning or any event that seems to make it crash.
From the crash report, it seems to be caused by sapling growth linked to OTG.

I've managed to narrow down the issue to only happening when a sapling that has a 2x2 variant, i.e. a jungle, dark oak or spruce sapling, tries to grow when next to a chunk border towards negative x or z

So this is consistently reproducible with only OTG installed by planting saplings on chunk borders, correct?

From what I've experienced, yes. One of my worlds does not have the Biome Bundle generation and the crash still happens, although the mod is indeed installed.

I was testing with a default preset, only mods installed were Biomes o Plenty and the one probe. Was using bone meal to trigger the growth

ok so how do we fix this?

you wait for the next OTG patch

you wait for the next OTG patch

Is  there a way to turn off 2x2 sapling generation in the config and restart the map?

So I did some more testing, and it's more complicated than I thought. Feel free to skip to the end.
Take Chunk A and Chunk B. The two chunks are next to each other, B is west of A. Assume neither chunk has been interacted with since restart.
I still have only Biomes o Plenty and The One Probe installed, running a default OTG preset. Running in Forge single player, with version 1.12.2_v8_r6_Josh4.

Test 1: If I place a sapling in Chunk A but not on the border and grow it, I can then place a sapling in Chunk B on the border to Chunk A and grow it with bonemeal. I can then place a sapling in Chunk A on the border to Chunk B and grow it the same way. No crash.
 No crash.
Test 3: If I grow a sapling in A and in B and then place a sapling down on the border, it will eventually grow. No bonemeal used. I've turned random tick speed up to 300 to speed this process up. No crash.
Test 4: If I grow a sapling in A but not in B and place a sapling down on the border to B, then wait for the sapling to grow on its own, the server does eventually crash. I'm still on random tick speed 300 here.
Test 5: Place a sapling down on any border between two chunks that haven't been interacted with at all. If the border is on the east, west or north side of the chunk, the game will soon crash. If it's on the north side, it will merely grow into a tree normally.

Conclusion: There seems to be a system in place to prevent this crash when the sapling is grown with bonemeal, as the crash never happens when using bonemeal. It also seems to grow normally, both naturally and with bonemeal, when the neighbouring chunk has been interacted with recently.  The game only crashes when there's a jungle or spruce sapling on a border to a chunk that hasn't been "used" by OTG very recently, and that sapling tries to grow naturally.

Thanks. It would have been more useful to test without other mods and using the OTG release version.

Yeah, I only realised after I'd finished testing and written everything down. I redid all the testing steps quickly and confirmed it behaves the same with release version and no other mods installed. Did notice that I switched north and south in test 5, it's the south side that grows it normally.

Have included a fix for this in v8.1_r1, to be released on the OTG Discord's dev channel asap. Will be in the v8.1 release.

Tested and confirmed that the problem is indeed fixed for every case I found before. Thanks PG ^^

Sweet, thanks for reporting! :)


Editing S5 to increase uniformity across stages

Hey Megan, I took a first stab at adding the plotting keywords like you'd requested. I also made some changes to the way the S5 ecf was read while I was at it to make things a bit easier on you. If you're happy with my edits, you can approve this and merge it into your s5_megan branch. I'm happy to help with the remaining issues with your PR on Monday if you want (especially the integration with S4). I'd love to start running S5 to see how tweaks to S1-4 end up impacting the overall retrieved transit spectra and whatnot.

Hey Taylor, this looks great - thanks for helping with this! I'm unsure how much time I'll have to work on it Monday (I have a midday flight home to family for the holidays), but if you have time to help out that would be awesome!


Add non-blocking opsrecipe validation

Before adding a new alerting rule into this repository you should consider creating an SLO rules instead.
SLO helps you both increase the quality of your monitoring and reduce the alert noise.

How to create a SLO rule: https://github.com/giantswarm/sloth-rules#how-to-create-a-slo
Documentation: https://intranet.giantswarm.io/docs/monitoring/slo-alerting/

Towards: https://github.com/giantswarm/giantswarm/issues/23638
This PR adds a non-blocking opsrecipe validation test
Checklist

[x] Update CHANGELOG.md
[x] Add Unit tests
[x] Follow Alert structure
[x] Consider creating a dashboard (guidelines) (if it does not exist already) to help oncallers monitor the status of the issue.
[x] Request review from oncall area, as well as team (e.g: oncall-kaas-cloud GitHub group).

🤔
./test/hack/bin/check-opsrecipes.sh
<EMAIL_ADDRESS>Permission denied (publickey).
fatal: Could not read from remote repository.

@giantswarm/team-atlas and specifically our bash master, what do you think about this approach?

@giantswarm/team-atlas and specifically our bash master, what do you think about this approach?

Is there something specific you want to discuss?
This PR does not change much in the logic, I don't see much to say about it.

Are you fine with the ci and non ci make targets? Also, it changed a bit after some thinking over the weekend :D

But overall, are you fine with the current script as I will add it in sloth rules as well

Well, I first thought there should be a way to auto-detect CI, but having it manual like this really outlines what is different in the CI.
I'm fine with it.


Fix focus issues with ValidatingTextBox

The flyout used to display error messages steals focus when it appears. Any hacky workarounds involving quickly moving focus back to the TextBox end up backfiring pretty spectacularly.
The solution probably involves replacing the Flyout with a custom Popup, disabling the Light Dismiss behavior and just handling that sort of thing when the TextBox loses focus ourselves.

Partially resolved now. Just need to rework the portable version of the ValidatingTextBox, and then we'll be in business.


Load the url again

As shown in the figure, I can't load the page twice, is this writing not supported?

As shown in the figure, I can't load the page twice, is this writing not supported?

In my practice, I found that when Photino.NET version is greater than 3.1.16 and Photino.Native version is greater than 3.1.15, this method is not valid.

@Jaffoo This is fixed in the next version. Thanks for finding it. It's related to the string translation changes that were made.


Android mobile app

Is there any official/side project for porting WebTorrent Desktop to Android? @feross did you plan something?
Is someone interested? I actually am and I could work on it

i'm working  to make an app, using webtorrent.js and magnet links stored (json) in a database to stream films It is quite simple really :P

oh yes, sure it is simple! though just wondering if an official android app will ever exist

@gabrieldesouza Are you using cordova or react-native?

@rahulan I'm using cordova

webtorrent-desktop is based off electron, which does not support mobile operating systems currently.
If this were to happen it would probably need to be a separate effort.
I think @gabrieldesouza has the right idea though :)


Update azure-stack-update-1811.md

remove the VM overview metrics chart cannot show correctly from known issues list and add it to the fixed issue list.

#sign-off


Update graph_scene.py: Add an argument to setup the axes without displaying them on screen.

The aim / objective is to actually have a GraphScene and corresponding graphs, but not displaying the axes beforehand.

Current problem:
You cannot add a graph without self.setup_axes()
self.setup_axes() displays the axes by default.

For example, I want to first display some text, FadeOut the TextMobject and then FadeIn the axes, I cannot FadeIn(self.axes) unless first setting up the axes via self.setup_axes().
Hence this patch.

Attached is a GIF using my patch.

The solution to your problem depends on what your needs are and what you are trying to accomplish. It might be a good idea to implement your patch... but I dont't know, since you didn't write anything to justify your pull request.
Maybe, instead of patching GraphScene, I really think that this VGroup(x_axis, y_axis) should simply be a separate Mobject called Axis. Maybe, you should subclass Scene and create your own MyGraphMyStyleScene.
Talking about my own experience, it took me sometime to realize that I do not need a graph scene... but having an Axis mobject would be nice. So, my question to this thread is:

Should we have a super-customizable fully automatic GraphScene?
Or should it be considered just a "quick" solution for a quickly done animation?
Should we subclass GraphScene, ZoomedScene, PiCreatureScene all at the same time? Or shall we simply subclass Scene and add mobjects, cameras and animations to it?

Those are not rhetorical questions. I really wonder. :-)
I do think the patch is good and usefull... ;-)

The aim / objective is to actually have a GraphScene and corresponding graphs, but not displaying the axes beforehand.
Current problem:

You cannot add a graph without self.setup_axes()
self.setup_axes() displays the axes by default.

For example, I want to first display some text, FadeOut the TextMobject and then FadeIn the axes, I cannot FadeIn(self.axes) unless first setting up the axes via self.setup_axes().
Hence this patch.
Also, a separate Mobject for the axis sounds like a great idea. A temporary fix can be drawing a graph in draw.io, exporting it as an SVG and using that SVG in manim as an Mobject.
As for your question, to subclass Scene and add the features would be a more feasible idea than to subclass multiple Scene(s). It would still require quite some time for the subclass patch, but will definitely be useful!

Sorry, but now GraphScene is no longer supported, its function has been moved to CoordinateSystem. So closed this


CreateImageWizard: "Next""Create" buttons should be locked if required infomation is missing

I create an image for Azure and keep the "Tenant ID", "Subscription ID", "Resource group" fields empty, then click on the "Next" button and even go to the "Review" step and click on the "Create" button, none of these steps stopped me even if it shows the warning "Required infomation is missing". I think we should lock the button.

Fixed.


[Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive.

Do you want to request a feature or report a bug?
Touchmove event listeners need to add { passive: true } when listeners are added. Currently in Chrome 60, it throws warnings.
What is the expected behavior?
Stop Chrome from throwing warning messages
Which versions of SignaturePad, and which browser / device are affected by this issue? Did this work in previous versions of SignaturePad?
Chrome 60, signature_pad 2.2.0
More information here:
https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md

@liamm95 I'm on Chrome 62 (beta) and I don't get any warnings. According to the docs you linked to, the passive: true option should be added if event handler doesn't call event.preventDefaultto prevent scrolling. However, in this library touchmove does exactly that: https://github.com/szimek/signature_pad/blob/master/src/signature_pad.js#L63-L64.
There's no event.preventDefault call in touchstart event handler - maybe that's what your browser is complaining about? In this case I think I'll just add this call, rather than make this listener passive.


KafkaSource make consumergroup optional, set to uuid if not specified

This fixes knative/eventing-contrib#1056

thanks

Applying something like:
apiVersion: sources.knative.dev/v1alpha1
kind: KafkaSource
metadata:
  name: kafka-source
spec:
  bootstrapServers: my-cluster-kafka-bootstrap.kafka:9092
  topics: my-topic
  sink:
    apiVersion: serving.knative.dev/v1alpha1
    kind: Service
    name: event-display

I am getting:
k apply -f 020-kafka-source.yml
Error from server (BadRequest): error when creating "020-kafka-source.yml": admission webhook "defaulting.webhook.kafka.sources.knative.dev" denied the request: mutation failed: cannot decode incoming new object: json: unknown field "apiVersion"

related: https://github.com/knative/eventing-contrib/issues/1143

/lgtm
/hold
if you do not want to address the prefix, cancel the hold

when you check the actual consumer groups, on the cluster (via  k -n kafka  exec -it my-cluster-kafka-0 -- bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list), it currently lists the UUID (as expected).
perhaps some prefix might be nice :man_shrugging:

@matzew ok, updated with a prefix of knative-kafka-source and tests updated as well

/unhold

flake
/test pull-knative-eventing-contrib-integration-tests


C program to print prime numbers in a given range

I failed to do the nesting of if and for loops

But I didn't get the code
On Tue, Oct 9, 2018, 10:57 AM Mike McQuaid<EMAIL_ADDRESS>wrote:

Closed #726 https://github.com/github/opensource.guide/issues/726.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/github/opensource.guide/issues/726#event-1892074329,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AprGDnRsrpJyT5BmDuTSBQ0Ry0KFcHSMks5ujFbygaJpZM4XR8v7
.

@Candyman256 this repo is dedicated to making a website about contributing to Open Source.
Your question most likely belongs to StackOverflow, please try posting it there.


Extend the Resource class to be able to reference Resource Property Types

This depends on adding classes for every resource type; see https://github.com/OpenWhere/scenery_generator/issues/1 and https://github.com/OpenWhere/scenery_generator/issues/2

This will be complete after we merge #43

There is currently a bug that prevents us from referencing property fields on the template.  Reported by @aheifetz:
var t = new Scenery.Template();
t.strParam('CidrBlock', '<IP_ADDRESS>/16', 'The CIDR block you want the VPC to cover');
var myVpcId = 'TestVPC';
var vpc = t.vpc(myVpcId).CidrBlock( t.ref('CidrBlock') ).EnableDnsHostnames(true);

Results in:
/home/ubuntu/workspace/lib/AWSClass.js:42
        throw new InvalidPropertyException('Invalid value passed to ' + key +
              ^
InvalidPropertyException: Invalid value passed to CidrBlock. Expected type string but was object


The dialog doc page still has a reference to the "Pick ranges" deprecated feature

I believe "Pick ranges" has been deprecated/removed recently from Quasar. The documentation page for dialogs
 still has a reference to this feature :

Uh, oh, you're right. Please help me a little if you'll be so kind. There are two places on the doc website where you can make the appropriate changes in two clicks. Screenshots attached. It will create a pull request and I can accept it with one click only. I'm getting overloaded here by the issues :) Thank you so much for your help! You are awesome!!!

Pull request created and accepted for this issue. Can be closed ?

Yep. It will go "live" when I also update the doc for v0.7


nuxt-auth not working with r7/r8 and latest pinia

I spend some time checking why useCookie is not working on SSR with nuxtjs-alt/auth, because of that I upgraded nuxt to the latest with provided hotfix from the nuxt team. r8.
But now I'm getting this error:
Rollup error: Could not load node_modules/pinia/dist/pinia.mjs/dist/pinia.mjs (imported by .nuxt/dist/server/server.mjs): ENOTDIR: not a directory, open '/node_modules/pinia/dist/pinia.mjs/dist/pinia.mjs'
Could not load ..../node_modules/pinia/dist/pinia.mjs/dist/pinia.mjs (imported by .nuxt/dist/server/server.mjs): ENOTDIR: not a directory, open '/.../node_modules/pinia/dist/pinia.mjs/dist/pinia.mjs'
This error is gone when removing "@nuxtjs-alt/auth", "@nuxtjs-alt/axios" from modules in nuxt.config.ts
EDIT:
Now I had a deeper look, and it's looking like rollup is messing up /dist/pinia.mjs/dist/pinia.mjs duplicate dist/pinia.mjs, tried to fix it and provide a pr, but I'm not able to :D

add:
    build: {
        transpile: [
            'pinia'
        ]
    },

to your nuxt config.

thank you


Bulk workers kv endpoint bindings

Adds bindings for new bulk workers KV endpoint: https://api.cloudflare.com/#workers-kv-namespace-write-multiple-key-value-pairs
Check err return of rate limiting
Testing:

Manually tested against personal CF namespace
Added unit test to cover new method

can you add me as reviewer @Michael9127

@ags799 I am not sure how to do that, i dont know if i have the required permissions. No edit button near listed reviewers for me.

Should we add Workers KV to the list of supported features on the main README?

Alternative solution propose here: #310. Tried to decouple the expiry and bulk changes, but it ended up being easier to put them together.

Should we add Workers KV to the list of supported features on the main README?

Done

Since #310 is still in limbo, can this be merged in the meanwhile?

Anyway we can get this reviewed again and merged? It is a dependency for one of our projects and we would rather use the mainline library instead of a fork.

Thanks for the contribution and I appreciate patience.


npm start -- e2e is still failing

I'm submitting a bug report

Aurelia Skeleton Version

skeleton-esnext-webpack

Framework Version:
same as in the skeleton

Please tell us about your environment:

Operating System:
Ubuntu 16.04 LTS

Node Version:
7.9.0

NPM Version:

JSPM OR Webpack AND Version
webpack 2.4.1

Browser:
Chrome Version 58.0.3029.81 (64-bit)

Language:
ESNext

Current behavior:
running protractor test fails

Expected/desired behavior:
protractor test runs without error

What is the expected behavior?
protractor test runs without error

This was fixed by the latest aurelia-protractor-plugin release. Please update.


/opt/elasticbeanstalk/bin/get-config doesn't exist for Amazon Linux 2 Platforms

Issue:
In a lot of .ebextensions configurations for Amazon Linux 1.X.X platforms, you can get environment configurations using the following command within bash files:
SOME_VARIABLE=$(/opt/elasticbeanstalk/bin/get-config environment -k 'ENV_VARIABLE_KEY')

For Amazon Linux 2, this command has been removed (from what I can tell)

TL;DR
The file /opt/elasticbeanstalk/bin/get-config environment is missing from Amazon Linux 2. To reproduce some functionality like so, we can use the output from calling/opt/aws/bin/cfn-get-metadata.
Possible Solution:
After some inspection in the logs, I was able to deduce that you can still access environment variables, but from using a different command:

/opt/aws/bin/cfn-get-metadata

There was a specific log entry that tipped me off to this, which I'll omit from showing here but you can quickly find it by looking for the command in the log file /var/log/eb-engine.log.

I was able to get environment variables in the following way:

Gather the Environment Region and Stack ID
Pass those values to /opt/aws/bin/cfn-get-metadata to get environment variables

# --------------------------------------------------
# HOW TO GET ENVIRONMENT VARIABLES
# --------------------------------------------------

# Get the Region
ENV_REGION="$(</opt/elasticbeanstalk/config/ebenvinfo/region)"

# Get the Stack ID
ENV_STACK_ID="$(</opt/elasticbeanstalk/config/ebenvinfo/stackid)"

# Pass the variables to the CloudFormation Meta Data command.
# Pipe the data to JQ to reduce the environment variables array to an actual key value map
ENV_VARS_KWARGS="$(sudo /opt/aws/bin/cfn-get-metadata -s $ENV_STACK_ID -r AWSEBBeanstalkMetadata --region $ENV_REGION -k "AWS::ElasticBeanstalk::Ext.Parameters.EnvironmentVariables" | jq -c '. |= reduce (.[] | split("=")) as [$key, $value] ({}; .[$key] = $value)')"

# Access any environment variable like so
MY_VARIABLE_VALUE=$(jq -r '.MY_VARIABLE_KEY' <<< $ENV_VARS_KWARGS)

Conclusion
I feel like this isn't an optimal solution, but was able to give me what I needed relative to what I was able to find though my own inspection.
Closing Thoughts
I have some final thoughts for other people that may help to elaborate more on what the optimal solution for this could be:

I realized the file /opt/elasticbeanstalk/config/ebenvinfo/env is temporarily written during the build process. Exposing or extending the same script that builds this file may produce the missing functionality from Amazon Linux v1's /opt/elasticbeanstalk/bin/get-config.
Wrap my initial solution into a platform prebuild hook (.platform/hooks/prebuild) and take the output from ENV_VARS_KWARGS and write it to a file. You could access the file like so:# Using JQ
MY_VARIABLE_VALUE=$(jq -r '.MY_VARIABLE_KEY' <<< /path/to/env_kwargs_saved.json)

@curtismorte This is great stuff! Thanks for posting.
The Beanstalk team is aware of this gap, and bringing get-config back to AL2 is on their to-do list. This is just one of many cases where we need to adapt either the AL2 platforms or our code/config examples to include AL2. It's work in progress and will take some time.
It would be wonderful if you could post your solution on the AWS Beanstalk forum!

Eh? Why is this closed if AWS know a ton of their own scripts don't work on their own new platform.
Really not looking forward to migrating our Amazon Linux v1 to v2 now!
Maybe I can knock up a compatability script and ship that as a .ebextension file...

@tomchiverton Thanks for asking. As I wrote above, I closed the issue because we're aware of it and we're tracking it internally, so we didn't need to keep the GitHub issue open. In this specific case, the team indicated to me their intention of bringing back get-config (or a version of it) to the new AL2 platforms.
That said, an .ebextensions file that people can use for now would definitely be welcome. I apologize that we're behind on providing up-to-date examples for the AL2 platforms.

            # Pipe the data to JQ to reduce the environment variables array to an actual key value map
            echo "$(sudo /opt/aws/bin/cfn-get-metadata -s ${ENV_STACK_ID} -r AWSEBBeanstalkMetadata --region ${ENV_REGION} -k "AWS::ElasticBeanstalk::Ext.Parameters.EnvironmentVariables" | jq -c '. |= reduce (.[] | split("=")) as [$key, $value] ({}; .[$key] = $value)')"

    "/opt/elasticbeanstalk/bin/export-config":
        mode: "000755"
        content: |
            #!/usr/bin/env bash

            # Run: `export $(sudo ./export-config)`
            # https://stackoverflow.com/questions/48512914/exporting-json-to-environment-variables
            echo $(./get-config-json | jq -r "to_entries|map(\"\(.key)=\(.value|tostring)\")|.[]")

    "/opt/elasticbeanstalk/bin/get-config":
        mode: "000755"
        content: |
            #!/usr/bin/env bash

            # Run: `sudo ./get-config DATABASE_URL`
            echo $(./get-config-json | jq -r ".$1")

There are also scripts that use it with the container argument e.g.
get-config container -k app_user
Will this be added as well?

@DangerDawson Yes, we'll implement the complete set of get-config commands, to be consistent with the Amazon Linux AMI (AL1) version of the tool.

$ sudo ENV_REGION="$(</opt/elasticbeanstalk/config/ebenvinfo/region)"
-bash: /opt/elasticbeanstalk/config/ebenvinfo/region: Permission denied

I got the above error.

Later AL2 based Beanstalk's do have the official version, simply remove this script and upgrade.

Any update on this? None of the proposed solutions have worked for me.

@culov No workaround is necessary anymore. We brought back get-config to AL2 platforms early August. Here are the release notes:
https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2020-08-04-al2.html


feat: colors refresh

Description

Updated main colors
Reverted a few classNames to semantic

Additional Information

[x] I have read the contributing docs (if this is your first contribution)
[x] This is not a duplicate of any existing pull request

Thanks a lot man! Not a nitpick the readability was very bad, thanks for the suggestion :)


VecCopy allows for misaligned access

Hey there, I noticed that in VecCopy the backing storage for the Vec is a u8.
https://github.com/elrnv/dync/blob/c133056676582dd0e28c14526175d0c9ae01a905/src/vec_copy.rs#L64-L65
I believe this let's you trigger undefined behavior in the form of misaligned memory access through safe rust code by instantiating a VecCopy with a type that has different alignment requirements from u8. Running the following program under miri:
#![forbid(unsafe_code)]

use dync::{VecCopy, VTable};

#[repr(align(256))]
#[derive(Copy, Clone)]
struct LargeAlign(u8);

impl VTable<LargeAlign> for LargeAlign {
    fn build_vtable() -> Self {
        LargeAlign(0)
    }
}

fn main() {
    // The backing storage for a VecCopy is a u8, meaning that casting to a type
    // with different alginment requires triggers undefined behavior.
    // https://github.com/elrnv/dync/blob/c133056676582dd0e28c14526175d0c9ae01a905/src/vec_copy.rs#L64-L65
    let mut x = VecCopy::<LargeAlign>::with_type();
    x.push_as::<LargeAlign>(LargeAlign(0));

    let _ref_to_element = x.get_ref_as::<LargeAlign>(0).unwrap();
}

results in:
❯ cargo miri run
error: Undefined Behavior: accessing memory with alignment 8, but alignment 256 is required
   --> /home/ammar/.cargo/registry/src/github.com-1ecc6299db9ec823/dync-0.4.0/src/vec_copy.rs:523:23
    |
523 |         Some(unsafe { &*ptr.add(i) })
    |                       ^^^^^^^^^^^^ accessing memory with alignment 8, but alignment 256 is required
    |
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

    = note: inside `dync::VecCopy::<LargeAlign>::get_ref_as::<LargeAlign>` at /home/ammar/.cargo/registry/src/github.com-1ecc6299db9ec823/dync-0.4.0/src/vec_copy.rs:523:23
note: inside `main` at src/main.rs:41:27
   --> src/main.rs:41:27
    |
41  |     let _ref_to_element = x.get_ref_as::<LargeAlign>(0).unwrap();
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: inside `<fn() as std::ops::FnOnce<()>>::call_once - shim(fn())` at /home/ammar/.rustup/toolchains/nightly-2020-09-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
    = note: inside `std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>` at /home/ammar/.rustup/toolchains/nightly-2020-09-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:137:18
    = note: inside closure at /home/ammar/.rustup/toolchains/nightly-2020-09-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:66:18
    = note: inside `std::ops::function::impls::<impl std::ops::FnOnce<()> for &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>::call_once` at /home/ammar/.rustup/toolchains/nightly-2020-09-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:259:13
    = note: inside `std::panicking::r#try::do_call::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` at /home/ammar/.rustup/toolchains/nightly-2020-09-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:381:40
    = note: inside `std::panicking::r#try::<i32, &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>` at /home/ammar/.rustup/toolchains/nightly-2020-09-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:345:19
    = note: inside `std::panic::catch_unwind::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` at /home/ammar/.rustup/toolchains/nightly-2020-09-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:382:14
    = note: inside `std::rt::lang_start_internal` at /home/ammar/.rustup/toolchains/nightly-2020-09-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:51:25
    = note: inside `std::rt::lang_start::<()>` at /home/ammar/.rustup/toolchains/nightly-2020-09-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:65:5

error: aborting due to previous error

Thank you! I've been meaning to get rid of the unchecked Vec casts. This is a great motivator :)

Fixed in 6972f94 and published in version 0.5.
The presented example is included as is in a dedicated integration test in tests/soundness.rs.
Additionally CI is updated to include a miri run on all the tests to prevent further regressions.
However, for the record, implementing the VTable trait for the contained type is unnecessary --- the following example would have sufficed:
#![forbid(unsafe_code)]

use dync::{VecCopy};

#[repr(align(256))]
#[derive(Copy, Clone)]
struct LargeAlign(u8);

fn main() {
    let mut x: VecCopy = VecCopy::with_type::<LargeAlign>();
    x.push_as::<LargeAlign>(LargeAlign(0));

    let _ref_to_element = x.get_ref_as::<LargeAlign>(0).unwrap();
}


Issue with using ad4 ff with python

I am writing a python script and encountered with a following error:
...
v = vina.Vina(sf_name='ad4', verbosity=1, seed=selectedSeed)
...
v.set_receptor(rigid_pdbqt_filename=="xxx.pdbqt",flex_pdbqt_filename="yyy.pdbqt")
...
ERROR: Only flexible residues allowed with the AD4 scoring function. No (rigid) receptor.
From which file does this error arise, and what would be a troubleshooting process if exists?
Thanks,
KM

With AD4 scoring, vina expects autogrid maps to be loaded, but the PDBQT for the rigid part of the receptor should not be passed to v.set_receptor.

Thank you for your answer. Yes, it resolved the problem, and I got the error about the maps, as you mentioned.
I have a line that creates a gpf4 file by incorporating prepare_gpf4.py. Is there any way to create maps from this using python?
Thanks,
KM

Maps are generated by autogrid, no python bindings
https://autodock-vina.readthedocs.io/en/latest/docking_basic.html#optional-generating-affinity-maps-for-autodock-ff

I see. Thank you for your answers.
Thanks,
Keita

You're welcome!

Hi, I also want to use ad4 scoring_function to score a dataset, (not dock) so is it possible for v = Vina(sf_name='ad4')   just score?
I also wonder what other atom type can be written in 'generating-afinity-map-for-autodockff' because some complex have S or Mg.

Hi, I have figure out how to use pythonsh prepare_gpf.py to get gpf for 1a30_pocket.pdbqt and 1a30_ligand.pdbqt
But when I use autogrid4 to get the fld and maps, it raises error:
 autogrid4 -p 1a30_pocket.gpf -l 1a30_pocket.glg

autogrid4: ERROR:  unknown ligand atom type CN
add parameters for it to the parameter library first!

Hi @Dadiao-shuai,

not dock) so is it possible for v = Vina(sf_name='ad4') just score?

Yes, when you set v = Vina(sf_name='ad4'), you only initialize the Vina object but it still doesn't know what to do. You can tell it to perform different things including score, dock, optimize, and print or write outcomes.
List of these options and functions here: https://autodock-vina.readthedocs.io/en/latest/vina.html
Example of using score is included in the Python scripting tutorial: https://autodock-vina.readthedocs.io/en/latest/docking_python.html

I also wonder what other atom type can be written in 'generating-afinity-map-for-autodockff' because some complex have S or Mg.

This is beyond my knowledge. I am also a bit confused how S and SA are determined. I don't think my questions are relevant to the original post though.. Maybe we could open a new issue to discuss.

autogrid4: ERROR:  unknown ligand atom type CN
add parameters for it to the parameter library first!

Do you have CN in line ligand_types of your gpf file? Is it a typo (missing space between C and N)? CN is not currently a valid autodock atom type.

the ligands are prepared with the adfr scripts, so I do not think it is a typo error. Here is another example:
autogrid4: ERROR:  unknown ligand atom type AN
add parameters for it to the parameter library first!

@Dadiao-shuai @Kerro-junior
AN and CN are not standard atom types, are they in the GPF or in the PDBQT of either ligand or receptor?

I must say the CN atom is in the pocket,gpf file, it seems like not about the ligand? :
receptor 1a30_pocket.pdbqt           # macromolecule
gridfld 1a30_pocket.maps.fld         # grid_data_file
npts 40 40 40                        # num.grid points in xyz
spacing 0.375                        # spacing(A)
gridcenter 8.8395 25.2365 4.6875     # xyz-coordinates or auto
types CN                             # atom type names
smooth 0.5                           # store minimum energy w/in rad(A)
map 1a30_pocket.C.map                # atom-specific affinity map

I didn't find 'CN' in the ligand.pdbqt file.
@Kerro-junior I used meeko to prepare the ligand, but couldn't convert into pdbqt, even though I have tried obabel/rdkit to sanitize them(fail to sanitize):
[11:14:31] Explicit valence for atom # 25 C, 6, is greater than permitted
[11:14:31] ERROR: Could not sanitize molecule ending on line 133
[11:14:31] ERROR: Explicit valence for atom # 25 C, 6, is greater than permitted

So I used the adfr prepare_ligand4 and successfully gain the ligand.pdbqt

Oh? I don't understand why the error reports as ligand atom type CN, but the CN is actually in the gpf file...
 autogrid4 -p 1a30_pocket.gpf -l 1a30_pocket.glg

autogrid4: ERROR:  unknown ligand atom type CN
add parameters for it to the parameter library first!

receptor 1a30_pocket.pdbqt           # macromolecule
gridfld 1a30_pocket.maps.fld         # grid_data_file
npts 40 40 40                        # num.grid points in xyz
spacing 0.375                        # spacing(A)
gridcenter 8.8395 25.2365 4.6875     # xyz-coordinates or auto
types CN                             # atom type names
smooth 0.5                           # store minimum energy w/in rad(A)
map 1a30_pocket.C.map                # atom-specific affinity map

so is this a error about prepare_gpf.py?

Hi @Kerro-junior and @Dadiao-shuai,
I assume you two work together. Here's my suggestion:

Problem with the ligand SDF file
Whoever responsible for ligand preparation needs to take a closer look at the SDF file. The error message you got from meeko (RDKit actually) was cause by incorrect information in the atom blocks (charge) and the bond blocks. prepare_ligand4 could be one walkaround because it ignores these problems. To see how RDKit perceives the COO- groups in the ligand, read the molecule without sanitizing it and check the valence and charge, atom by atom:

from rdkit import Chem
from rdkit.Chem import rdmolfiles

input_sdf = "1a30_ligand.sdf"

m = rdmolfiles.MolFromMolFile(input_sdf, sanitize=False)
for at in m.GetAtoms():
    print(at.GetAtomicNum(), at.GetExplicitValence(), at.GetFormalCharge())

Problem with the contents of pocket.GPF

autogrid4: ERROR: unknown ligand atom type CN
This error message usually means you have this strange atom type in GPF file, which should be C and N. A space delimiter was missing, and other essential atom types (such as OA and HD, for that ligand you need those maps too) were also not present for some reason. Whoever of you responsible for the GPF file please check before using it for autogrid4.
To let others reproduce this issue, please kindly provide the input files and command you did with prepare_gpf.py.

There is nothing special about the usage of prepare_gpf.py to generate multiple gpf files:
(the following script is compatible and run with python2.5)
# Loop over the files in the pocket directory
for file in os.listdir(pocket_dir):
    if file.endswith('pocket.pdbqt'):
        pocket_pdbqt_file = os.path.join(pocket_dir, file)
        pdb_id = file[:4]
        ligand_pdbqt_file = os.path.join(lig_dir, '%s_ligand.pdbqt' % pdb_id)

        # Check if the ligand file exists
        if not os.path.exists(ligand_pdbqt_file):
            print "Ligand for %s not found, skipping." % pdb_id
            continue

        # Prepare the GPF command
        prepare_gpf_command = [
            'pythonsh',
            '/home/mgltools/programs/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/AutoDockTools/Utilities24/prepare_gpf.py',
            '-l', ligand_pdbqt_file,
            '-r', pocket_pdbqt_file,
        ]

        process = subprocess.Popen(prepare_gpf_command)
        process.wait()

@Kerro-junior Can you try AutoDockTools/Utilities24/prepare_gpf4.py instead?
prepare_gpf.py in this repository is AutoDockTools/Utilities24/prepare_gpf4.py

Thanks for your instruction, now I successfully generated all the gpf,
Then I used autogrid4 and I get the following files, BUT some of them don't have fld/xyz/map files

to add more information for our @Kerro-junior  job, whis is the pythonvina1.2.2script:
            v.load_maps('1a30/1a30_pocket')
            v.set_ligand_from_file(lig_file)
            v.compute_vina_maps(center=center, box_size=[34,34,34])
            energy = v.score()

Maybe we have not generated the dpg file (as autodock4 need this)?

Don't compute the maps , just load them in. AD4 maps are calculated by autogrid, not by vina. Also, consider updating to the latest version which is 1.2.5

When I use atogrid4 to calculate the maps file of PDBbind dataset, many of them works well, but for  1bcu_pocket.pdbqt , 1bcu_pocket_rigid.gpf , 1bcu_ligand.pdbqt, I get no .C.map so the autodock4 failed.
map_prefix: 1a30_mutate0_pocket
Reading AD4.2 maps ... done.
map_prefix: 1bcu_mutate0_pocket
Reading AD4.2 maps ... done.
ERROR: Affinity map for atom type C is not present.
The following is part of the 1bcu_rigid.glg:

GPF> gridfld 1bcu_pocket.maps.fld         # grid_data_file

Creating (AVS-readable) grid maps file : 1bcu_pocket.maps.fld

Creating (AVS-readable) grid-coordinates extrema file : 1bcu_pocket.maps.xyz

GPF> spacing 0.375                        # spacing(A)
Grid Spacing :			0.375 Angstrom

GPF> receptor_types A C HD N OA SA        # receptor atom types
GPF> ligand_types A HD N NA               # ligand atom types

Atom type names for ligand atom types 1-4 used for ligand-atom affinity grid maps:

			Atom type number 0 corresponds to atom type name "A".
			Atom type number 1 corresponds to atom type name "HD".
			Atom type number 2 corresponds to atom type name "N".
			Atom type number 3 corresponds to atom type name "NA".
...
...
Beginning grid calculations.

Calculating 6 grids over 68921 elements, around 360 receptor atoms.

How could I resolve it?

In addition, the 1bcu_pocket_rigid.gpf for 1bcu_pocket,pdbqt and 1bcu_ligand.pdbqt is :
npts 40 40 40                        # num.grid points in xyz
gridfld 1bcu_pocket.maps.fld         # grid_data_file
spacing 0.375                        # spacing(A)
receptor_types A C HD N OA SA        # receptor atom types
ligand_types A HD N NA               # ligand atom types
receptor 1bcu_pocket.pdbqt           # macromolecule
gridcenter auto                      # xyz-coordinates or auto
smooth 0.5                           # store minimum energy w/in rad(A)
map 1bcu_pocket.A.map                # atom-specific affinity map
map 1bcu_pocket.HD.map               # atom-specific affinity map
map 1bcu_pocket.N.map                # atom-specific affinity map
map 1bcu_pocket.NA.map               # atom-specific affinity map
elecmap 1bcu_pocket.e.map            # electrostatic potential map
dsolvmap 1bcu_pocket.d.map              # desolvation potential map
dielectric -0.1465                   # <0, AD4 distance-dep.diel;>0, constant

As the receptor has C atom, why autogrid4 could not produce C.map ?
(I don't know if it's problematic to name the gpf as 1bcu_pocket_rigid.gpf)

See the autodock4 manual for context:
https://autodock.scripps.edu/wp-content/uploads/sites/56/2021/10/AutoDock4.2.6_UserGuide.pdf

I think where the bug is!
I am using a loop to use Vina(sf_name='ad4') to score the dataset. So the load_map will remember the last loop's map type!
For example, in PDBbind2016,  1bzc has P and F atomtype, then during scoring the 1c5z the Vina will require P.map and F.map
The following is my code, and I guess I need to do some improvement for my code? :
    v = Vina(sf_name='ad4')
    for file in os.listdir(_dir):
        if file.endswith('pocket.pdbqt'):
            rec_file = os.path.join(_dir, file)
            pdbid = file[:4]
            lig_file = os.path.join(_dir, f'{pdbid}_ligand.pdbqt')

            map_prefix = file.split('.')[0]

            v.load_maps(f'{_dir}/{map_prefix}')
            v.set_ligand_from_file(lig_file)
            energy = v.score()
            ...

Such large energies typically occur when the ligand is outside the grid box. Vina v1.2.2 was not checking if the ligand is inside the search space when using v.score(). See https://github.com/ccsb-scripps/AutoDock-Vina/issues/112. I recommend upgrading to v1.2.5 because of this and other fixes.

@diogomart   Thanks for your answer BUT my vina was already 1.2.5
So I am wondering if vina1.2.5 automatically checking the ligand box when my code is:
            map_prefix = file.split('.')[0]
            v = Vina(sf_name='ad4')
            v.load_maps(f'{_dir}/{map_prefix}')
            v.set_ligand_from_file(lig_file)
            energy = v.score()
            energy = energy[0]

Meanwhile, I wanna know how the Vina set the box_size for the .map files, when using v.load_maps rather than compute_maps()

I think I know the reason, this is not about the Vina, but the gpf itself.  The map size is already defined by gpf, Vina could not do anything if gpf set the box smaller than needed.

That's correct, the grid size is set in the gpf.


Certain Song FC On Hard Achievement Problem - Source Code

Describe your problem here.
so basically i want to make it so when you FC/NoMiss a certain song like "shelter" on Hard Mode you get the achievement but i dont know how to do it because i just want it to be a Certain Song, not a week, and i dont know if i need to edit the Achievements.hx File or the Playstate.hx File to make it work, so some Help would be nice.

Are you modding a build from source or with Lua?
Source
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
No I Didnt Change Anything In The Build

_nomiss is for Week names, not song names


FEDORA PACKAGING: Dependencies on two different versions of the "ring" crate (the older one with limited architecture support):

: ring v0.16.20
: ring v0.17.8
This is a big problem in itself (I think "ring" uses symbol prefixes for C and Assembly implementations to avoid linker problems).
However, you might want to ensure that the package only pulls in one of these versions, and preferably the newer one (v0.17).
The v0.16 branch of "ring" does not support ppc64le and s390x, and so you will not be able to build bpfman for these architectures unless you avoid ring v0.16 in favor of ring v0.17.

This is now fixed, we only pull in the following v0.17.8
[astoycos@nfvsdn-03 bpfman]$ cargo tree | grep ring
│   │   │   │   │   ├── ring v0.17.8
│   │   │   │   │   │   ├── ring v0.17.8 (*)
│   │   │   │   │       ├── ring v0.17.8 (*)
│   │   │   ├── ring v0.17.8 (*)
│   │   │   ├── ring v0.17.8 (*)


Error in including plantuml files that has !include statements

Information
AsciidocFX Version: 1.7.3
OS: Windows 64 bit
Something.adoc
== Introduction

This is an asciidoc document.

[plantuml, Text, png]
----
include::file1.puml[]
----

file1.puml
@startuml Sequence
title Example
!include internal-header.iuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml

header.iuml
autonumber "<font color=teal><b> 00."
skinparam defaultFontName Segoe UI
skinparam roundcorner 10
skinparam sequenceLifeLineBackgroundColor pink
skinparam sequenceMessageAlign center

Expected Output
HTML file with correct sequence diagram.
Actual Output

Miscellaneous
Related issue in Asciidoctor-diagrams: https://github.com/asciidoctor/asciidoctor-diagram/issues/291
Here is a repo to reproduce https://github.com/carun/asciidoctor-diagram-issue-291.
I just validated the generated HTML and it seems to be fine with asciidoctor command line.
2020-09-21 09:53:01 /var/tmp/asciidoctor-diagram-issue-291 (master)
$ asciidoctor -b html5 Something.adoc -r asciidoctor-diagram
asciidoctor: FAILED: 'asciidoctor-diagram' could not be loaded
  Use --trace for backtrace
2020-09-21 09:54:49 /var/tmp/asciidoctor-diagram-issue-291 (master)
$ gem search asciidoctor-diagram

*** REMOTE GEMS ***

asciidoctor-diagram (2.0.3, 1.2.1 java)
asciidoctor-diagram-cacoo (0.2.2)
asciidoctor-diagram-eralchemy (0.1.0)
asciidoctor-diagram-office (0.1.2)
asciidoctor-diagram-stupid (0.1.0)
2020-09-21 09:55:17 /var/tmp/asciidoctor-diagram-issue-291 (master)
$ sudo gem install asciidoctor-diagram
Fetching asciidoctor-diagram-2.0.3.gem
Successfully installed asciidoctor-diagram-2.0.3
Parsing documentation for asciidoctor-diagram-2.0.3
Installing ri documentation for asciidoctor-diagram-2.0.3
Done installing documentation for asciidoctor-diagram after 0 seconds
1 gem installed
2020-09-21 09:55:28 /var/tmp/asciidoctor-diagram-issue-291 (master)
$ asciidoctor -b html5 Something.adoc -r asciidoctor-diagram
2020-09-21 09:55:41 /var/tmp/asciidoctor-diagram-issue-291 (master)
$

My Code is OK like this
file1.puml
@startuml
!include header.iuml
title Example
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml

@startuml Sequence , I remove  Sequence
!include internal-header.iuml , I change to !include header.iuml


⚠ ClamAV has degraded performance

In 1a60a8b, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 545 ms

Resolved: ClamAV performance has improved in 460538b.


[WIP] Improve how licence description wraps in the footer

Proposal for fixing the awkward orphan appearing in the licence description when the new typographic scale is enabled by using text-wrap: balance to let the browser balance the text of the description.
Screenshots

Before
After

Thoughts
This would only work in browsers that support the feature, but it feels an efficient way to enhance the footer. As a bonus, it also looks overal more visually more balanced with the crest on the right hand side.
An alternative would be to amend the content, which we could do anyway but:

there would be a viewport size where an awkward orphan will appear in any case and text-wrap: balance will help at that point
with people able to set custom content for that description, text-wrap: balance will add some safety that it will reflow OK

Questions

Are we happy with the solution only benefitting only newer browsers. Especially for Safari, supports starts only with 17.5 shipped in May 2024. For Firefox, we're looking at Dec 2023 and Chromium May 2023 (according to Can I Use)? It obviously feels OK to me, based on the scale of the issue it's meant to solve and the fact that we can't control viewport/zoom levels anyway, but would understand if we'd want to look deeper into it.
Does the design with text-wrap: balance look acceptable?
Does that kind of reflow bring any readability issue due to the whitespace on the right of the content?

Closes #5290.

Using text-balance for this is a very neat way of handling this!
It's less performant than normal text layout in terms of how much effort the browser has to put into rendering it, but this should be negligible for something as short as the licensing text.
The lack of extensive browser support is fine, I think, given it's entirely a cosmetic enhancement and there isn't any user detriment to not having it. (Though it does bring to mind the lack of documentation we have around CSS and intended browser support, though!)


Enhance: Ui of chapters page

I would like to enhance the ui of the chapters page to make it more attractive.

So, please assign this issue to me under GSOC'23.

Yes sure @Pragati-3003 , Open a PR with required screenshots. We wil review and would be happy to merge it!

Yes sure @Pragati-3003 , Open a PR with required screenshots. We wil review and would be happy to merge it!

Thanku you assigning this to me.

Please add level number to this issue.
Thanking you.


chore: update dependencies

Fixes #614. @olizilla, could you check if this branch works there without the startup problem?

👍 yep, that fixes #614 for me too!

Codecov Report

Merging #615 into master will decrease coverage by 0.16%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #615      +/-   ##
==========================================
- Coverage   15.11%   14.94%   -0.17%
==========================================
  Files          57       57
  Lines         880      890      +10
==========================================
  Hits          133      133
- Misses        747      757      +10

Impacted Files
Coverage Δ

src/controls/main/stats.js
0% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

Did you merge it with the master https://github.com/ipfs-shipyard/ipfs-desktop.git? I just clone the master and compiled it and when I run

npm start
It still gives the same error. It's OK if I clone the wrong branch. I will wait for a release. Otherwise I can confirm that it's not fixed for my case.
npm run test
passes all tests though.

Also it may be a good idea to upgrade versions of the deprecated packages listed below

npm WARN deprecated<EMAIL_ADDRESS>please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated<EMAIL_ADDRESS>CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated<EMAIL_ADDRESS>Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated<EMAIL_ADDRESS>wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.
npm WARN deprecated<EMAIL_ADDRESS>Deprecated, use jstransformer
npm WARN deprecated<EMAIL_ADDRESS>Please update to at least constantinople 3.1.1
npm WARN deprecated<EMAIL_ADDRESS>Package no longer supported. Contact<EMAIL_ADDRESS>for more info.
npm WARN deprecated<EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

Thank you in advance.

While reading the other issues I catch the reason of the error happening after the last pull request. I was running an ipfs daemon in the background and ipfs-desktop also tries to start another daemon and hence the error occurs in my case. I closed the ipfs daemon and now ipfs-desktop started normally and GUI placed itself as a taskbar icon in OpenSUSE. So now I can confirm that the pull request fix works.
Thank you again.


pull request for e2e test at 12/25/2016 08:45:12

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Feature delete node

create separate usage-chart.component.ts
reformat cluster.component.html
rearrange code of cluster.component.ts
delete unused components
minor popup styles fix
add styles for confirm-modal.component.html
add popup positioning right after the button
add nodes deletion request
confirmation popup draft
add delete node button

Coverage increased (+0.05%) to 44.159% when pulling 3e182cfbb103727891548e1679a0e6fa0fea29fd on nikage:feature_delete-node into 14e88c1b4ab65ecdbf6ec9d514eadb03ea3527d4 on supergiant:master.


Fix paul grahams order

The original paul grahams essay dataset concatenate implementation uses glob.glob to list all files, which is not order-preserving, could lead to different dataset files on different machine or even differen directories.
This fix uses sorted here to make sure the dataset file remains the same in different environments.

Thanks! I didn't notice this may affect the reproducibility.


Fix widgets disabled state

Related to: https://github.com/CartoDB/cartodb/issues/13342
Description
This PR brings back the logic added in https://github.com/CartoDB/cartodb/pull/13374 to disable/enable widgets in route changes.
Acceptance

[x] Clicking on a widget disables the rest of the widgets
[x] Clicking on a widget when it's out of view scrolls to it
[x] Leaving edit widget view cleans the disabled state

@rubenmoya LGTM!


Infinite loop with input mask and autosave on

Here's a meteorpad showing the problem.
I'm getting a infinite loop when applying a jquery.inputmask to an input with autosave on. The mask works fine autosave is not on. Goal is to apply a currency mask to an input field and then convert the value from dollars to cents to store in the database.
Chrome shows <error>. Firefox shows too much recursion.

Not really sure what the cause is at the moment.

I'm also getting infinite loop when autosave=true.

I put in a rather kludgy workaround for this issue, which seems to be more of a jquery.inputmask issue with firing 'change' even though the value is the same, but it's still good to try to guard against it in autoform.
As far as getting it to work properly otherwise, this seems to work best for me:
AutoForm.addInputType "price",
  template: "price"
  valueIn: (val) ->
    val / 100 # convert to dollars
  valueOut: ->
    @val() * 100 # convert to cents

Template.price.rendered = ->
  $input = @$("input")
  $input.inputmask inputMaskOptions

  @autorun ->
    data = Template.currentData()
    $input.val(data.value) if data

And then remove value={{value}} from the template.
Consider making an add-on package with this input in it so that others can use it more easily. If you do, I can add it to the list in the readme.

Done in AutoForm 5.0, now released.

Awesome, thanks @aldeed!


Property not found in X

Hello,
my suggestions is, if property not found and we're creating it, don't throw an error. For e.g.
const obj = { a: '1' };
obj.b = '2';

As you can see I'm adding b property in obj and I'm getting error. My suggestion is to create new config which will ignore these errors (talking about .flowconfig and/or CLI arg) or ignore it by default, because I don't care if it not found, I'm creating it :smile:
I know we have workaround to make it like this:
(obj: any).b = '2';

But seriously write this every time?
P.S. The autocomplete will be also very good, if Flow will be able to recognize new added property, because even if it's added autocomplete doesn't shows it.

When you do const obj = { a: '1' };, obj is implicitly defined as {| a: string |}. From a standpoint of soundness this is good and helps to prevent bugs in the future.
Though if you want to make it dynamic, you can either type an object like the try or use unsealed objects, though is generally considered unsafe and defeats the purpose of flow
https://flow.org/en/docs/types/objects/#toc-unsealed-objects


CC91861: Typo

Hello, @lisawong19,
This proposed file change comes from https://github.com/MicrosoftDocs/azure-docs-sdk-python.es-ES/pull/3 .
Could you review this contribution and help to merge if agreed?
Many thanks in advance.

OPS Build status updates of commit 8ecbc68:
:clock10: Preparing: average preparing time is 5 min(s) 56 sec(s)

OPS Build status updates of commit 8ecbc68:
:clock10: Incremental building: average incremental building time is 176 min(s) 58 sec(s)

OPS Build status updates of commit 8ecbc68:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs-ref-services/postgresql-mysql.md
:white_check_mark:Succeeded
View (azure-python)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

LGTM. #sign-off
@Taojunshen can you merge, please? Thanks. -MM


[5.2] Adding postgres specific operators for jsonb type

I was trying the features of Postgresql 9.5 and foundout that Eloquent does not support a couple of operators. Here I am adding the operators:

Operator
Right
Operand Type

@>
jsonb
Does the left JSON value contain the right JSON path/value entries at the top level?

<@
jsonb
Are the left JSON path/value entries contained at the top level within the right JSON value?

?
text
Does the string exist as a top-level key within the JSON value?

?

text[]

?&
text[]
Do all of these array strings exist as top-level keys?

||
jsonb
Concatenate two jsonb values into a new jsonb value

      | text	    | Delete key/value pair or string element from left operand. Key/value pairs are matched based on their key value.

      | integer	| Delete the array element with specified index (Negative integers count from the end). Throws an error if top level container is not an array.

#-          | text[]	| Delete the field or element with specified path (for JSON arrays, negative integers count from the end)
Reference -> http://www.postgresql.org/docs/9.5/static/functions-json.html

I've fixed so errors but I can't understand how to fix the mockery tests problems. It seems that the mocked class does not have the method. I am missing something serious here.

Please update the tests, and add new tests to cover what you've added.

I've fixed the possible issues. I am not so sure about the testing but i should cover the basic concept of using the operators for postgres. If you have any ideas about the testing that I can implement, please share them so I can make this pull request better.


Aether Portal sounds are much louder than nether portal sounds

Reported by SpaceWalker on discord
https://discord.com/channels/770691727568404521/770691728528769036/1047011372237586474

it's much louder than the nether portal sound

... it needs to be quite a lot quieter lol

I reduced the sound volume to be as close to the nether portal ambience in 2.1.0, they should be noticeably almost the same


Update tutorial-import-publish-settings-iis.md

#5664, Write-the-Docs-2020

@AlexB-SheldonMFG : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off


HTTPServer infinite loop on "too many open files"

On Linux, when using the examples/http server and testing it with a large number of simultaneous connections, I commonly see one thread get stuck in an infinite loop, and the server fails to accept more connections.
After stepping through the issue in lldb, I can see that the TCPListener actor gets stuck in an infinite loop when it tries to run pony_os_accept to accept a connection and that call fails with EMFILE ("too many open files") as the errno. The TCPListener is currently written to naively assume that any failure can be considered spurious, and it tries again to accept a connection. In this failure mode, trying again to accept a new connection will not help - it will always fail. Hence, it gets stuck in an infinite retry loop.

Interestingly, the naive code that causes this infinite loop was copied directly from Pony: https://github.com/ponylang/ponyc/blob/725fac75381c35da5803c83bd00fbd552261f099/packages/net/tcp_listener.pony#L209-L222
Our version of that same code is here: https://github.com/savi-lang/savi/blob/739b8abb2ab393218778066db775ed1124a74cfe/packages/src/TCP/Listener.savi#L78-L85
So I'd be surprised if the Pony server didn't have a similar bug/flaw in it. Unless there is some other way of addressing this case in the Pony server that I'm not noticing.


Add additional Topics

In Community Exchange, GitHub Topics will help the discoverability of your project.
I see that you already have great topics on your repository! If you happened to use any offers in the GitHub Student Developer Pack to build this project, I would recommend adding the name of the company who provided the offer to improve your discoverability.
If you did not use any additional offers and you are happy with the topics you have, feel free to close this issue.  👍

I think for now the topics are fine.


[Movements]: If a knight is checking the king, the other pieces won't try to stop the check.

The pawn should only try to take the knight.


Acceptable values for metrics paramater in ObjectDetector

❓ Questions and Help
What are some examples of acceptable values for the metrics parameter in ObjectDetector()
Code
model = ObjectDetector(model="retinanet", num_classes=datamodule.num_classes, metrics=?)

Can Torchmetrics be used here? https://torchmetrics.readthedocs.io/en/latest/

Hi @deepseek-eoghan yes, you can pass a Metric class to the metrics argument. See for example how the accuracy metric is added here: https://github.com/PyTorchLightning/lightning-flash/blob/447c28ee39139f5424f3726b00eb6a500394ea19/flash/core/classification.py#L43
I've openened an issue (#361) to improve the docs around metrics.
Hope that helps! :smiley:


Fix issues with OpenStack auth raised in LIBCLOUD-912 and LIBCLOUD-904

Noticed so far:
The existing test fixture returns the host as <IP_ADDRESS> which also happens to be the default host for a connection class.
The test I just added fails to demonstrate the issue with
requests_mock.exceptions.NoMockAddress: No mock address: GET https://<IP_ADDRESS>/v2/1337/servers/detail

So the issue was the connect() would always be called in <2.0, because it meant something in httplib. Now requests is a higher level API so connect is only called lazily if the connection instance hasn't been set. In the case of the openstack auth, it has. So the host property would be loaded at init but then when the catalog is fetched, the property doesn't trickle down to the instance of the requests session.
Adding connect() to each call for the internal method that unpacks the catalog would fix this issue but might add a small overhead to each call since it's in morph_action_hook. But that takes it back to the speed of <2.0 anyway.

Coverage increased (+0.004%) to 87.286% when pulling 9be9f9f22c8f7714afc62ba0cb02d13dd044e687 on tonybaloney:openstack_auth_passing into 55e5e82da6a398af50163976c00f63ab49b9c4f1 on apache:trunk.

I noticed abiquo tests are being skipped. seperate issue.

merging.


Mock provider for testing

Describe the feature request
I would like to request mock provider which can be used in unit tests for components relying on unleash-client.
Background
I'm testing components which are relying on useFlag hooks. I probably can hack it with mocking useFlag function but its a very hacky approach I feel.
Solution suggestions
As mentionedSomething like https://github.com/launchdarkly/jest-launchdarkly-mock would be ideal.
Alternatively, I would like to at least ask to export FlagContext from the library so that I can write my own mock provider which I did but not able to use FlagContext:
function MockFlagProvider(children: any) {
  const context = {
    client: {} as UnleashClient,
    flagsReady: true,
    setFlagsError: () => true,
    flagsError: [],
    isEnabled: () => true,
    setFlagsReady: () => true,
    on: () => ({} as UnleashClient),
    updateContext: () => {
      return Promise.resolve();
    },
    getVariant: (_toggleName: string) => ({ name: 'test', enabled: true }),
  };
  return (
    <FlagContext.Provider value={context}>{children}</FlagContext.Provider>
  );
}

We are already mocking the UnleashClient like this:
import {
    IConfig,
    IMutableContext,
    IToggle,
    IVariant,
    UnleashClient,
} from '@unleash/proxy-client-react';

export class MockUnleashClient extends UnleashClient {
    private activeToggles: IToggle[];

    private readonly getVariantMock = jest
        .fn<IVariant, [string]>()
        .mockReturnValue({ name: 'A', enabled: false });

    private readonly updateContextMock = jest.fn<
        Promise<void>,
        [IMutableContext]
    >();

    private readonly startClientMock = jest.fn<Promise<void>, []>();

    private readonly onMock = jest
        .fn<this, [string, Function, any?]>()
        .mockReturnValue(this);

    private readonly isEnabledMock = jest
        .fn<boolean, [string]>()
        .mockImplementation((name: string) => {
            const toggle = this.activeToggles.find((t) => t.name === name);
            return toggle ? toggle.enabled : false;
        });

    constructor(options: IConfig) {
        super(options);
        this.activeToggles = options.bootstrap ?? [];
    }

    getVariant(toggleName: string): IVariant {
        return this.getVariantMock(toggleName);
    }

    updateContext(context: IMutableContext): Promise<void> {
        return this.updateContextMock(context);
    }

    start(): Promise<void> {
        return this.startClientMock();
    }

    isEnabled(toggleName: string): boolean {
        return this.isEnabledMock(toggleName);
    }

    on(event: string, callback: Function, ctx?: any): this {
        return this.onMock(event, callback, ctx);
    }

    get mocks() {
        return Object.freeze({
            getVariant: this.getVariantMock,
            updateContext: this.updateContextMock,
            start: this.startClientMock,
            isEnabled: this.isEnabledMock,
            on: this.onMock,
        });
    }
}

// and
import FlagProvider from '@unleash/proxy-client-react';

<FlagProvider
            unleashClient={props.unleashClient ?? new MockUnleashClient()}>
    {props.children}
</FlagProvider>

We are essentially extending the default client class by adding some jest-mocking functionality. This is probably not the most elegant solution, but it works for our needs. Maybe it is helpful for you and others? This way we don't have to deal with mocking the hooks or the Context at all. If anyone has a better solution, or there is a "native" solution, I would be happy hear about it.

Hi @Maxim-Filimonov and @christian98 - Thank you for your input!
We addressed this in https://github.com/Unleash/proxy-client-react/pull/70 by exporting the FlagContext. Can you please confirm that this helps with this specific use-case?
Many thanks 🙂

Yes, it's working now. Thank you!
I created MockProvider like this:
import { UnleashClient, FlagContext } from '@unleash/proxy-client-react';

function MockFlagProvider({ children }: { children: ReactNode }) {
  const context = {
    client: {} as UnleashClient,
    flagsReady: true,
    setFlagsError: () => true,
    flagsError: [],
    isEnabled: () => true,
    setFlagsReady: () => true,
    on: () => ({} as UnleashClient),
    updateContext: () => {
      return Promise.resolve();
    },
    getVariant: (_toggleName: string) => ({ name: 'test', enabled: true }),
  };
  return (
    <FlagContext.Provider value={context}>{children}</FlagContext.Provider>
  );
}

I propose this be reopened, and request that an official mock provider be provided.

Thanks! Updated it.

FYI adjustment I had to make to #68 (comment) was
client: {
   on: jest.fn() as unknown,
} as UnleashClient,


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-k8s-29-main" workflow

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

Questions ?
Please refer to the Backport tool documentation


Weave may still count itself when computing the quorum from a list of peers

As noted in #2070:

The fix for #1881 is racy - if we decide to go for consensus before hearing back that the address refers to ourselves then we will still count ourself.

Now the router is running in the host address space it's easier to tell by looking at interfaces if an address refers to "me".  Not bulletproof, e.g. when a host has public and private IP addresses, but only knows its own private IP.

idea: wait for all outbound connections to establish or fail.


it: Update Lombardia field mapping

The shapefile fields have changed.
Unfortunately not all cities have the street field populated. I don't think this file will be updated anymore, as I can no longer find any public reference to these files

Thanks for improving the mappings!


Subscription can't be purchased again

Version of react-native-iap
3.3.7
Version of react-native
0.59.4
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
after purchase end i can purchase new subscription
Actual behavior
always said we are unable to change your subscription plan. manage subscriptions.
Tested environment (Emulator? Real Device?)
Real Devices
Steps to reproduce the behavior
1- init connection
2- set listeners
3- get subscriptions
4- request subscription
5- on success save receipt and use RNIap.consumePurchaseAndroid(purchase.purchaseToken);
6- continue in app lifecycle
7- when i go to google play and unsubscribe and wait for free trial time to end and try to buy new subscription the error occurred
if (Platform.OS === 'ios') {                                 RNIap.finishTransactionIOS(purchase.transactionId);                             } else if (Platform.OS === 'android') {                                 RNIap.consumePurchaseAndroid(purchase.purchaseToken);                             }

The subscription should be acknowledge not consume

That’s how it suppose to work. A subscription is a one time thing once its active

you mean that when i buy subscription and it end i can't purchase it again?

@abdallaemadeldin exactly, subscription can be purchased only once


Distinct aggregation in Streaming

e.g. create materialized view mv1 as select count(distinct c1) from t1

There is a common practice in handling distinct aggregation in MPP databases. For example, here is a blog talking about the implementation in Presto:
https://www.qubole.com/blog/presto-optimizes-aggregations-over-distinct-values

The basic idea is to treat the distinct column as another group-by column to dedup, and then, use a secondary aggregation to aggregate.
But how to deal with queries with multiple (distinct) aggregation functions?
Here is a general example, assume the user query is
select dept,
       count(distinct sal),
       count(distinct gender),
       max(age)
from emp
group by dept

First, we expand one row to multiple rows with an Expand operator.
                           ┌──────────┐        [dept, sal,  NULL,   $e=1, NULL]
[dept, sal, gender] ─────► │  EXPAND  │ ─────► [dept, NULL, gender, $e=2, NULL]
                           └──────────┘        [dept, NULL, NULL,   $e=3, age ]

And the full plan is:
                     GROUP BY (dept)
      ┌───────────┐  - COUNT(*) FILTER $e=1
      │ Aggregate │  - COUNT(*) FILTER $e=2
      └─────┬─────┘  - MAX(age) FILTER $e=3
            │
            │
  ┌─────────┴──────────┐
  │ Shuffle by Hash(d) │
  └─────────┬──────────┘
            │
            │
      ┌─────┴─────┐  GROUP BY (dept,salary,gender,$e)
      │ Aggregate │  - MAX(age)
      └─────┬─────┘
            │
            │
┌───────────┴───────────────┐  [dept, sal,  NULL,   $e=1, NULL]
│ Shuffle by Hash(d,s,g,$e) │  [dept, NULL, gender, $e=2, NULL]
└───────────┬───────────────┘  [dept, NULL, NULL,   $e=3, age ]
            │
      ┌─────┴─────┐
      │  Expand   │
      └─────┬─────┘
            │
            │
      ┌─────┴─────┐
      │ ..input.. │   [dept, sal, gender]
      └───────────┘

Just to clarify, agg(distinct) is not supported in streaming yet. It just moved to be tracked in #3589


Translation ignored in ts with  cast

Hello, I recently upgraded from 8.3.0 to 9.1.1 and some keys went missing with the new extraction, after some research it looks like this line of code makes the parser crash in a .ts file
if (<any>this.editor) (<any>this.editor)._editor.updateOptions({ readOnly: this._disabled });
In this context :

It seems related to #43
I saw that the 9.1.1 version was published 3month ago so just tried with 9.2.0-next.0 and the bug is still present
(I'd love a new preview release of 9.2.0 if you fix it so that I can swap to the newer version of the tool, we recently upgraded to angular 18 and started using the new control flow syntax :) Thanks ! )

Hello @DeepSnowNeeL,
I'll try to double check the fix on the parser.
In the meantime could you try to change the (<any>this.editor)  to (this.editor as any) and see if this workaround does the trick?

Thanks for the fast reply :) It indeed does the trick, great ! I'll try the new version against my whole codebase and fix the casts for now
I'll let you close the issue or not, depending on your research. don't hesitate to ping if you need tests from me
PS : thanks a lot to your team for maintaining this fork, couldn't live without an automated way to extract translations :p

The issue was that the initial fix was taking care only the use cases of the marker function. The service parser was still interpreting the input as TSX and treated the  castings as JSX template. I have now updated the parsers to ensure they all use the correct type.

This fix was just published in v9.2.0 👍


Generate Push App ID .NET

Hi everyone,
In the example PushReceiver .NET.
in the PushModel class, i can see  string AppId = "**Your Push App ID**";.
Can anybody tells me how to generate the Push App ID  for .NET?
i'm really new in xamarin, and i need the notification for my final studying project .
Thanks in advance.

You can get information from README file of this page: https://github.com/Samsung/Tizen-CSharp-Samples/tree/master/Mobile/PushReceiver