Memory leak in decoding

The following code causes the python process to use unbounded memory:
for i in range(10000):PIL.Image.open(BytesIO(img))
where img is a random JXL image.
I think the issue is that img._decoder.close() is never called.
for i in range(10000):
    img = PIL.Image.open(BytesIO(img))
    img._decoder.close()

works fine (barely any memory use)

Hi!
Thank you for reporting the issue and proposing the solution.
I've tested your code to cause expected leak, but in my case it won't appear. I wrote a simple script to test it, could you please run it in your environment?
Also could you tell me the version of your libjxl, Python, Pillow and what OS you're using?
from PIL import Image
from jxlpy import JXLImagePlugin
from io import BytesIO
import os, psutil
import sys

iters = int(sys.argv[1])

with open('img.jpg', 'rb') as f:
    img = f.read()

for i in range(iters):
    im = Image.open(BytesIO(img))
    #img._decoder.close()

process = psutil.Process(os.getpid())
print(process.memory_info().rss)

$ python3 test.py 1
21762048
$ python3 test.py 5
22163456
$ python3 test.py 50
22110208
$ python3 test.py 500
22163456
$ python3 test.py 5000
22061056

Did you use a jpg or a jxl file for your test?
Using this test image: https://w2w-images.sftcdn.net/image/upload/v1620662834/Ghacks/IMG_20200308_194050.jxl
With your test script:
❯ python x.py 1000
38481920

❯ python x.py 10000
156274688

❯ python x.py 100000
1334693888

❯ python x.py 500000
6572531712

After adding the im._decoder.close() call:
❯ python x.py 500000
25337856

System info:
$ python --version
Python 3.10.5
$ pacman -Qi libjxl
Name            : libjxl
Version         : 0.6.1-3
$ pip show pillow
Name: Pillow
Version: 9.1.1
$ lsb_release -a
LSB Version:    n/a
Distributor ID: Arch
Description:    Arch Linux
Release:        rolling
$ pip show jxlpy
Name: jxlpy
Version: 0.9.1

Oh, yes. Now I see your point.
The .close() function of decoder was meant to be called manually, but with __dealloc__ it seems to be working well.
I will do some more tests and probably release a new version :)


SSE and websockets support

Hey, first of all I want to say that this is a great project. HTMX is great but this feels so easier to use especially if one is already using alpinejs.
I was wondering if there is a recommended way to handle sse and websockets just like there are extensions in HTMX ?
Another nice thing would be something like hx-boost so that no extra library is needed to create an spa like feel when navigating to different urls.
for reference:

https://htmx.org/extensions/server-sent-events/
https://htmx.org/extensions/web-sockets/
https://htmx.org/attributes/hx-boost/

Hey, I am currently working on hx-boost style navigation, you can follow along in #65
I don’t have any immediate plans for SSE or websockets, but the refactoring I’m doing in the PR above should help generalize some of the internals of Alpine AJAX. I think that could open up the possibility of building your own Alpine plugins that can use Alpine AJAX features.

Thanks for the quick response. Routing feature does add more value than the sse/websockets support at this time, glad to know that you are already working on it.
Thanks for putting in the effort, looking forward to seeing how the project progresses :)

@imacrayon @devrav  I pulled the cache branch and added this snippet as a quick hack to get working SSE support in alpine-ajax, to see how well it would work:
Alpine.directive('sse', (el, { expression }, { cleanup }) => {
    const es = new EventSource(expression, { withCredentials: true });
    const handler = (event) => {
        const response = {
            ok: true,
            url: event.target.url,
            html: event.data,
        };

        let targets = findTargets(AjaxAttributes.get(el, 'targets', []))
        if (targets.length) {
            targets = addSyncTargets(targets)
        }
        render(response, el, targets, false, false)
    };
    es.addEventListener("html-fragment", handler);

    cleanup(() => {
        es.removeEventListener('html-fragment', handler);
        es.close();
    });
});

It works like a charm and I used it to enhance a few of my pages. It works great for my usecase for now, it increases the power-to-weight ratio of the library quite a bit since the server events pattern gets live events from a message bus, and it makes it possible write MPAs that progressively enhance to super-interactive collaborative applications where your changes show up immediately on other clients. I'm kind of tempted to implement some multiplayer games with it as well.
Feel free to use it for whatever usecase you have or to make it more robust. It does suffer from the many downsides of the browser standard EventSource implementation, including not being able to pass headers and having a wonky reconnect logic, but for progressive enhancement usecases it's not a huge issue.
Alpine-Ajax is an amazing library with a great well-thought out API and great docs and I don't mind waiting for a first party implementation, the way targets are handled makes it incredibly easy to refactor an application between different ways to fetch fragments.

Updated version of the above snippet for 0.7.1
Alpine.directive('sse', (el, { expression }, { cleanup }) => {
    const es = new EventSource(expression, { withCredentials: true });
    const handler = (event) => {
        const response = {
            ok: true,
            url: event.target.url,
            html: event.data,
        };
        let attributes = AjaxAttributes.get(el)
        let config = attributes.xxx || {}
        let targets = addSyncTargets(findTargets(config.ids))
        render(response, el, targets, false, false)
    };
    es.addEventListener("html-fragment", handler);

    cleanup(() => {
        es.removeEventListener('html-fragment', handler);
        es.close();
    });
});

(Disclaimer: This is only the result of tinkering with it until it worked rather than something carefully thought out)

Hi.
I love this libtary.
I a bit confused of this Issue. Finally is possible to connect websockets? I see SSE example in the documntation but I am not sure if it covert websockets . Can you add a example?

@devMls there isn't official support for SSE or websockets, but I'd be open to adding support if there is enough interest. I think I would want it to work similar to how HTMX supports them through a plugin. The Alpine AJAX internal API is settled enough that we might be able to explore plugin support now.


IntelliSense not work on mode: jit

Describe the bug
does not work if tailwind.config.js configuration is in mode:jit
To Reproduce
when first opening vim with mode:jit IntelliSense doesn't work, despite long wait.
but when first time open vim without mode:jit and wait a few seconds IntelliSense works.
Expected behavior
in mode:jit or not IntelliSense should work
Desktop (please complete the following information):

OS: MacOs Catalina 10.15.7

in vscode it works like what I expected

This is not working for me either.

This repo is not maintained apparently, check this one out instead:
https://github.com/rodrigore/coc-tailwind-intellisense

Thanks @yassinebridi, that plugin is working with jit mode! :)


Make the package installable and fix load_from_checkpoint on CPU

Did load_from_checkpoint on cpu not work? I thought using the to() method would move both the model and the weights to the correct device. Either way, better to be safe than sorry.
I see you also renamed the folder, great, I hope that projects which use it as a submodule will update then. Giving it an accurate name such as bark_hubert_quantizer instead of hubert is clearly the better name.
And adding an install with setuptools instead of requirements.txt might also be great for some users.

Did load_from_checkpoint on cpu not work? I thought using the to() method would move both the model and the weights to the correct device. Either way, better to be safe than sorry.
I see you also renamed the folder, great, I hope that projects which use it as a submodule will update then. Giving it an accurate name such as bark_hubert_quantizer instead of hubert is clearly the better name.
And adding an install with setuptools instead of requirements.txt might also be great for some users.

That's the weird thing, I had to do both, just doing torch.load(...map_location) was not enough.


Switch key at runtime

Do you want to request a feature or report a bug?
More of a question, but feature will do.
What is the current behavior?
I currently use the key property of vuex-persistedstate to differentiate between different deployments of my website (say A and B). A will use key 'a' and B will use key 'b'. That all works fine.
If this is a feature request, what is motivation or use case for changing the behavior?
Now I'm in the situation where the things stored in the store are user-specific. Even when I'm only using A, there will be multiple users. I would like to know if it's possible to change the key on the fly. Say from 'A-userId1' to 'A-userId2'.
There's no secret data in the store, it's just for convenience that if a user logs in on the machine and logs in as a different user, they stored properties don't get mixed up.
Now, I know I know I can make this work by having an object with the userId as the key and then all properties of that user underneath, but it would be neater if it could be done by switching keys.
Is this possible?

Any update on this? I would really like to be able to switch keys at runtime so that I don't mix up users' preferences.
If there's another way to do it, that'd be fine as well.

Ok, I ended up adding the generic parameters to the root of the state and then having a userStates object that contains the specific settings with the user's id as the key.
Just had to remember to add a new user by using Vue.set(...) to make it reactive. The getters then return the value based on the currently logged in user.
If there is no interest in supporting changing keys at runtime, then I guess this issue can be closed as I found a solution that works for me.

Sebastian, is there any chance you could share part of your vuex store file where you are creating/setting the keys? I am working on something very similar and need to create unique keys based on a few parameters. It sounds like the solution you came up with might work for me as well but I am having a hard time visualizing it. Thanks!

Sebastian, is there any chance you could share part of your vuex store file where you are creating/setting the keys? I am working on something very similar and need to create unique keys based on a few parameters. It sounds like the solution you came up with might work for me as well but I am having a hard time visualizing it. Thanks!

The code I use is available here: https://github.com/sebastian-raubach/germinate-vue/blob/master/src/store/store.js
The getters use the userId to get the correct item from the userStates object.
When a new one is added, the ON_TOKEN_CHANGED_MUTATION sets the default user state for this new user id. The custom methods of the persisted state (getItem etc) will likely not be necessary in your case, they're just for GDPR compliance.
Hope this helps.

If this is still relevant, please open a new issue.


Australian phone number validations

Describe the bug
Australian phone numbers do not pass validation.
To Reproduce
Steps to reproduce the behavior:

Visit - https://react-international-phone-docs.vercel.app/docs/Usage/PhoneValidation
Enter;

+61 491 570 159 (mobile)
+61 2 5550 4321 (landline)

Expected behavior

The above should pass validation and the submit button should be enabled.

Additional context

Valid Australian phone numbers Australian Government Style Guide

02 5550 4321 [A landline number in NSW or the ACT]
0491 570 159 [An Australian mobile number]
1300 975 707 [An Australia-wide local-rate number]
13 00 00 [An alternative Australia-wide local-rate number]
1800 160 401 [An Australia-wide freephone number]
+61 2 5550 4321 [An Australian landline number in international format]
+61 491 570 159 [An Australian mobile number in international format]

Hey @beardsleym
The formatting mask for Australia is '(..) .... ....' right now (one digit seems to be redundant).
Seems like it should be changed to ... ... ... so all phones will be formatted as +61 000 000 000.
What do you think?

Yeh, I looked in the mask and wasn't sure if you could conditionally do it?
Basically only a mobile number will be 04 area code andeverything else is a landline, so could you do something like...
// Check if the phone number starts with '4'
if (phoneNumber.startsWith('+614')) {
// Format the phone number as +61 4xx xxx xxx
return ... ... ...
} else {
// Format the phone number as +61 x xxxx xxxx
. .... ....
}

I prefer to keep a single mask per country for now.
Maybe it makes more sense to make a mask . .... .... (if ... ... ... is used only when the area code is 4)? 🤔

Yes, this . .... .... I think would be the better format

@beardsleym Format mask for Australia should be fixed in v2.2.1.
Thank you for your effort! ⭐ Consider leaving a star on this repo if you like the project.


Speeding up Array Consistency Check by using sorted int-int AVL Tree

Issue #, if available: N/A
Description of changes:
This a "I'm throwing this out for everyone else and see if it sticks" kind of PR.
While digging around for bottlenecks for https://github.com/aws/event-ruler/pull/54, I realized that we had a home-grown Int-Int map and its showing up as a bottleneck (for past context, we used to have a HashMap<Integer, Integer> there and moving to Int-Int map helped improved performance from 1735.6 events/sec to 2645.0 events/sec. The code has since improved but isn't at the same level as rest of the matchers.
Moving to using a AVL Tree for checking array membership leads to a significant boost from 2821.3 events/sec to 5275.7 events.sec. We have the option to gain some more performance if we stop the cloning behaviour in ArrayMembership(...) but I've left that as a future exercise (will create a issue for it if this gets merged).
The biggest downside is that its introducing a brand new dependency with lots of classes / structures that we aren't really using. There may be some use for bi-directional iterators or Int2Object Maps in future, but I'm unclear on the benefits for them. so for now, I'd like everyone to assume that we take this new dependency on fastutils-core, it'll be purely for the performance gains for array consistency.
We can also explore modifying our  own IntIntMap, but looking a how fastutils-core did it, lots of complex edge-cases to solve.
Note: Apologies for any typos, I sent this PR out between few meetings
Benchmark / Performance (for source code changes):
Before
Reading citylots2
Read 213068 events
EXACT events/sec: 193346.6
WILDCARD events/sec: 123374.6
PREFIX events/sec: 189225.6
SUFFIX events/sec: 213068.0
EQUALS_IGNORE_CASE events/sec: 160322.0
NUMERIC events/sec: 111670.9
ANYTHING-BUT events/sec: 123517.7
**COMPLEX_ARRAYS events/sec: 2821.3
PARTIAL_COMBO events/sec: 74028.2
COMBO events/sec: 2517.7**
Reading citylots2
Read 213068 events
Finding Rules...
Lots: 10000
Lots: 20000
Lots: 30000
Lots: 40000
Lots: 50000
Lots: 60000
Lots: 70000
Lots: 80000
Lots: 90000
Lots: 100000
Lots: 110000
Lots: 120000
Lots: 130000
Lots: 140000
Lots: 150000
Lots: 160000
Lots: 170000
Lots: 180000
Lots: 190000
Lots: 200000
Lots: 210000
Lines: 213068, Msec: 13478
Events/sec: 15808.6
 Rules/sec: 110660.0
Before: 1767.1
After: 1434.2
Per rule: 832
Turning JSON into field-lists...
Finding Rules...
Lines: 213068, Msec: 2693
Events/sec: 79119.2
Before: 1919.4
After: 1362.7
Per rule: 1391
Reading lines...
Finding Rules...
Lots: 10000
Lots: 20000
Lots: 30000
Lots: 40000
Lots: 50000
Lots: 60000
Lots: 70000
Lots: 80000
Lots: 90000
Lots: 100000
Lots: 110000
Lots: 120000
Lots: 130000
Lots: 140000
Lots: 150000
Lots: 160000
Lots: 170000
Lots: 180000
Lots: 190000
Lots: 200000
Lots: 210000
Lines: 213068, Msec: 1632
Events/sec: 130556.4
 Rules/sec: 475486308.8
Reading citylots2
Read 213068 events
Lots: 10000
Lots: 20000
Lots: 30000
Lots: 40000
Lots: 50000
Lots: 60000
Lots: 70000
Lots: 80000
Lots: 90000
Lots: 100000
Lots: 110000
Lots: 120000
Lots: 130000
Lots: 140000
Lots: 150000
Lots: 160000
Lots: 170000
Lots: 180000
Lots: 190000
Lots: 200000
Lots: 210000
Matched: 52527
Lines: 213068, Msec: 12118
Events/sec: 17582.8
Reading lines...
Finding Rules...
Lots: 10000
Lots: 20000
Lots: 30000
Lots: 40000
Lots: 50000
Lots: 60000
Lots: 70000
Lots: 80000
Lots: 90000
Lots: 100000
Lots: 110000
Lots: 120000
Lots: 130000
Lots: 140000
Lots: 150000
Lots: 160000
Lots: 170000
Lots: 180000
Lots: 190000
Lots: 200000
Lots: 210000
Lines: 213068, Msec: 11923
Events/sec: 17870.3
 Rules/sec: 125092.3
DEEP EXACT events/sec: 11111.1

After
Reading citylots2
Read 213068 events
EXACT events/sec: 182109.4
WILDCARD events/sec: 140084.2
PREFIX events/sec: 198572.2
SUFFIX events/sec: 212430.7
EQUALS_IGNORE_CASE events/sec: 171414.3
NUMERIC events/sec: 102584.5
ANYTHING-BUT events/sec: 127053.1
**COMPLEX_ARRAYS events/sec: 5275.7
PARTIAL_COMBO events/sec: 89675.1
COMBO events/sec: 2727.0**
Reading citylots2
Read 213068 events
Finding Rules...
Lots: 10000
Lots: 20000
Lots: 30000
Lots: 40000
Lots: 50000
Lots: 60000
Lots: 70000
Lots: 80000
Lots: 90000
Lots: 100000
Lots: 110000
Lots: 120000
Lots: 130000
Lots: 140000
Lots: 150000
Lots: 160000
Lots: 170000
Lots: 180000
Lots: 190000
Lots: 200000
Lots: 210000
Lines: 213068, Msec: 13338
Events/sec: 15974.5
 Rules/sec: 111821.6
Before: 1648.6
After: 1468.3
Per rule: 450
Turning JSON into field-lists...
Finding Rules...
Lines: 213068, Msec: 3110
Events/sec: 68510.6
Before: 2158.4
After: 1350.1
Per rule: 2020
Reading lines...
Finding Rules...

Finding Rules...
Lots: 10000
Lots: 20000
Lots: 30000
Lots: 40000
Lots: 50000
Lots: 60000
Lots: 70000
Lots: 80000
Lots: 90000
Lots: 100000
Lots: 110000
Lots: 120000
Lots: 130000
Lots: 140000
Lots: 150000
Lots: 160000
Lots: 170000
Lots: 180000
Lots: 190000
Lots: 200000
Lots: 210000
Lines: 213068, Msec: 10936
Events/sec: 19483.2
 Rules/sec: 136382.2
DEEP EXACT events/sec: 8333.3

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

I love this direction, that IntInt map is a code smell.  Note that Quamina has a really different simplest-thing-that-could-possibly-work approach, and that code never shows up in any profile output that I've seen.  Hmm, I could try jamming a map[int]int in there and see if it makes a difference…
Quamina: https://github.com/timbray/quamina/blob/main/core_matcher.go#L243

I was wondering if something like https://github.com/timbray/quamina/blob/main/core_matcher.go#L243 would work instead of IntIntMap but wasn't sure if there's some gremlins that I haven't considered yet. I'll try to give it a shot and if it works, update this PR

Looks like sorted tree performs better by small margin. Around 5.1K events/sec vs 5.4K events/sec (ran tests 4 times alternatively to make sure it wasn't just the laptop). The difference is large if I ignore the bottleneck because of  the ArrayMembership(...) constructor (6.4K events/sec vs 10.2K events/sec)

Around 5.1K events/sec vs 5.4K events/sec (ran tests 4 times alternatively to make sure it wasn't just the laptop).

Those numbers, 5.1K and 5.4K etc, which benchmark is that?

Around 5.1K events/sec vs 5.4K events/sec (ran tests 4 times alternatively to make sure it wasn't just the laptop).

Those numbers, 5.1K and 5.4K etc, which benchmark is that?

https://github.com/aws/event-ruler/blob/main/src/test/software/amazon/event/ruler/Benchmarks.java#L524
Rules are at https://github.com/aws/event-ruler/blob/main/src/test/software/amazon/event/ruler/Benchmarks.java#L189

Here's my feeling: Adding a dependency to a super-low-level library like Ruler is pretty expensive, both in terms of the obvious stuff like code size, but in terms of governance, defending yourself against vulnerabilities in the dependency tree, and so on. Also, the case where you have lots and lots of arrays and this gets expensive is not that common.
So, my prejudice is would probably be against adopting this library, even though I admit that I haven't looked at it in depth. What the array-consistency check is trying to do is really pretty simple.
But I'm not going to lie down in the road over this one, if you guys think this is a worthwhile trade-off I can live with that.

FWIW, I was on the fence with taking the dependency as well, so don't mind parking this change until we can find an alternate implementation. Replacing the current map based check altogether is more complex, so needs more bandwidth. That PR will take sometime.
FastUtil does seem to be a popular library https://github.com/vigna/fastutil but it's been challenging to discover how useful it is outside of Amazon. https://github.com/FasterXML/jackson-datatypes-collections/issues/38 was one interesting discussion that implied eventually we might get it through our jackson dependency. Internally, I can see it be used across some performance sensitive places but none that I can easily elaborate on here. Still feels a lot of structures / classes to pull in for just one Int2IntAVLTreeMap.


Filter out self from user list

The user channel list includes the user that is logged in.  I think we should probably filter that one out. :)

@aisamanra @dagit although this change does what I wanted, it highlights a more general problem: there are potentially many situations where we want to filter out the logged in user from the master user list.  (For example, completion.)  I didn't go ahead and do that, though, because I don't know if there would be any negative consequences from, say, a server update event-handling perspective.  Thoughts?

I don't have strong feelings either way, but it sounds like it might be the easiest to filter it out in ChatState. If we do that, we should do it soon-ish so we can fix any broken lookups.

I tried taking this approach (just never even store the user profile for self) but this causes a hashmap lookup exception when setting up the application state.  At this point I think it's more important that we keep that data around and just filter out in the relevant spots (e.g. at rendering time).


Update developer list in pom

Add Tim, remove Jorge Luis Betancourt who has not contributed in recent years and is not on the PMC

not sure how fancy is the approach to keep on maintaining the pom.xml with developer names, I have seen usually the names being maintained on the website of the project.

not sure how fancy is the approach to keep on maintaining the pom.xml with developer names, I have seen usually the names being maintained on the website of the project.

We just removed it in Storm recently; imho we can omit this section here too because it is cumbersome to maintain and the information will be accessible by looking into the project's roaster.

I agree. Really the project (PMC) as a whole is always the responsible developer. The committee members and committers are trusted by the PMC as a whole. Putting the developers names in poms and such that will be part of a release may expose these individuals when as a whole the PMC is within the "Legal Shield" of the ASF.
Having a list on the website (or the PMC keeping one) can be helpful in order to sort out names, emails, apache ids, and GitHub ids. It can get confusing who is saying what. If the list is public then it's fair to make it be opt-in.

Thanks everyone for your comments. This section made sense when the project was outside ASF but not anymore.
I have removed it in #1181


Right-click menu with multiple transactions selected

With the Right-Click Menu option enabled, when I select multiple transactions and right-click one of them, I expect to get the same menu that would appear if I click the Edit option at the top of the screen with those selections highlighted. However, what actually happens is that the transaction I click becomes the only transaction selected, and then the menu appears as if only one transaction had been selected in the 1st place.
A common YNAB4 workflow is to import, select multiple matching transactions, then right-click and accept them all. This feature seems like it should enable that flow, but because of this behavior doesn't actually. Can we fix it?

Yup, we should be able to! I'm going to go ahead and label this as an enhancement though as it's currently doing technically what it's designed to do, but I completely agree that this would be a great thing to have and would help.

I've added an adjustment to this feature that should allow you to select multiple items and get the usual right click menu when you click on them. Hope that helps!


Out of order model indices for bridging

The bridging for the tuning parameters was out of order, thus the legend colors do not match correctly. I have modified all.r to properly index the models. It seems to work fine for the plot in my presentation. This error can be seen when comparing Figure 14 to Figure 15. The green symbols in Fig 14 should match the blue symbols in Figure 15.
I'm not sure if this error occurs in sensitivities or retros, but it happens when the model names are not in the order listed in models.list.  It should be checked or just changed to the new method throughout.

Helps if I actually make the commit. Committed now to my account (change bridge model indices in all.r)

Nice catch, Allan!
On Saturday, February 20, 2016, allanhicks<EMAIL_ADDRESS>wrote:

Helps if I actually make the commit. Committed now to my account (change
bridge model indices in all.r)
—
Reply to this email directly or view it on GitHub
https://github.com/cgrandin/hake-assessment/issues/134#issuecomment-186725613
.

--
Aaron M. Berger, Ph.D. Research Mathematical Statistician
Fishery Resource Analysis and Monitoring Division
Northwest Fisheries Science Center
2032 SE OSU Dr. Bldg. 955
Newport, OR 97365-5275
<EMAIL_ADDRESS><EMAIL_ADDRESS>

Great thanks, I thought that grep code was pretty foolproof but alas no.


Prevent/clean up spam

Find a good way to prevent or clean up repetitive / spammy comments like below. There are a few other examples I can dig up also.

@Anne
1 hour ago

I’m making over $7k a month working part time. I kept hearing other people tell me how much money they can make online so I decided to look into it. Well, it was all true and has totally changed my life.

This is where i started..,.,.,.,.,., ```

Maybe to add an option. A way for a channel owner to view those kinds of auto-detected comments and approve them. Because who knows what kind of commenting game a channel can come up with. Maybe even disable the whole spam system all together on his channel.


Make baseValue copy domain

As highlighted in #573 it is really confusing that baseValue takes over an inserts itself into different series behaviour. This PR modifies baseValue so that if the user specifies a domain, the base value is equal to the bottom of that domain.
There is some mess, in that this PR also has #580 in it, though as soon as that lands this can be clean up too.

Oh btw is there something special with the sankey docs? I have a d3 interpolate issue

Oh btw is there something special with the sankey docs? I have a d3 interpolate issue

not that I know of? what are you seeing?


[Suggestion] Streams compatibility (custom running water sound in river biomes?)

Hi! Sorry for deleting your template - since this isn't a bug report I hope that's acceptable.
I've been thinking about adding the mod Streams to my modpack, but my current issue with it is that the default running-water sound make it seem like every river is a raging rapids instead of a peacefully flowing brook. I was wondering if it would be possible to play a custom sound for rivers only?
Not a modder, but my guess is that the limitation would be that, if you were standing in a Forest biome next to the river you'd still hear the rushing sound? But Streams says they use non-decaying flowing water blocks, so perhaps that would allow you to attach a custom sound to them? I don't know, I'm probably overthinking this. Anyway, thank you for the excellent mod, and for your time!

I think it is because of the size of the rivers.  I do have block definitions for their water sources, and one of them is the "splash" effect.  It's the one that generates the sound.    I have been thinking of a different way of handling.  I have ideas, but I am not sure how to make it work as of yet.

Ahh, okay, that does make sense. I didn't do a ton of experiments, just happened to notice it as I was walking by a river during some other tests. I'll check out the River vs Flowing Water noise shortly.
In the meantime, I'm glad to hear it's on your radar. :) If there's any way I can help, let me know!


Atom freezes randomly when opening a folder

Prerequisites

[x] Put an X between the brackets on this line if you have done all of the following:

Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages

Description
Sometimes, Atom freezes completely when I click a folder in the project tree. Force closing Atom and restarting it is the only solution.
Steps to Reproduce

Work on a large project
Start opening folders in the project tree
Sometimes this will cause Atom to freeze completely

Reproduces how often:
Happens fairly often.
I believe this happens more often if there are already a lot of folders unfolded (opened).
Versions
Atom    : 1.36.1
Electron: 2.0.18
Chrome  : 61.0.3163.100
Node    : 8.9.3
Windows 10 Home
Version 1803
OS Build 17134.706

Thanks for the report!   Can you confirm if the behavior was exactly the same in safe mode where you would randomly see Atom freeze when opening a folder?  And have you seen this on multiple projects or just a particular project?
Also, if you've used previous versions of Atom, is this behavior new for you as of 1.36.1?
Lastly, some clarifying questions:

Work on a large project

How large?

I believe this happens more often if there are already a lot of folders unfolded (opened).

About how many folders are in the project and about how many need to be unfolded before you see this behavior?

I am on macOS 10.14. Atom v 1.36.1
I leave the same Atom window open for long stretches of time, and in this single window I do a lot of "Add project folder".... do some work.... "Remove project folder".... on to the next one.
I find that if I have added and removed a lot of project folders without closing the window, eventually Atom starts to slow down, and trying to open a file from the tree will eventually freeze the app. A quit+reopen fixes the problem.
I will have to investigate if it happens more often when I am deleting the underlying folders that were/are in the project folder list.
I wish I could tell you what "a lot of adds/removals" meant. It's probably greater than 10, but definitely less than 100.


Add Slack Bot #4 project to readme.md

Slack Bot #4 ( Serverless AWS Lambda )

@transitive-bullshit Thanks a lot for the great library 🔥

Looks great @MarkusGalant && love the screenshots :)


[SPARK-8638] [SQL] Window Function Performance Improvements

Description
Performance improvements for Spark Window functions. This PR will also serve as the basis for moving away from Hive UDAFs to Spark UDAFs. See JIRA tickets SPARK-8638 and SPARK-7712 for more information.
The original work including some benchmarking code for the running case can be here: https://github.com/hvanhovell/spark-window
Improvements

Much better performance (10x) in running cases (e.g. BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) and UNBOUDED FOLLOWING cases. The current implementation in spark uses a sliding window approach in these cases. This means that an aggregate is maintained for every row, so space usage is N (N being the number of rows). This also means that all these aggregates all need to be updated separately, this takes N*(N-1)/2 updates. The running case differs from the Sliding case because we are only adding data to an aggregate function (no reset is required), we only need to maintain one aggregate (like in the UNBOUNDED PRECEDING AND UNBOUNDED case), update the aggregate for each row, and get the aggregate value after each update. This is what the new implementation does. This approach only uses 1 buffer, and only requires N updates; I am currently working on data with window sizes of 500-1000 doing running sums and this saves a lot of time. The CURRENT ROW AND UNBOUNDED FOLLOWING case also uses this approach and the fact that aggregate operations are communitative, there is one twist though it will process the input buffer in reverse.
Fewer comparisons in the sliding case. The current implementation determines frame boundaries for every input row. The new implementation makes more use of the fact that the window is sorted, maintains the boundaries, and only moves them when the current row order changes. This is a minor improvement.
A single Window node is able to process all types of Frames for the same Partitioning/Ordering. This saves a little time/memory spent buffering and managing partitions. This will be enabled in a follow-up PR.
A lot of the staging code is moved from the execution phase to the initialization phase. Minor performance improvement, and improves readability of the execution code.

Can one of the admins verify this patch?

Jenkins, this is ok to test.

Merged build triggered.

Merged build started.

Test build #35897 has started for   PR 7057 at commit ad7820c.

Test build #35897 has finished for   PR 7057 at commit ad7820c.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

@hvanhovell Thank you for breaking the original PR to multiple ones. I am reviewing this one. Will add a comment once I finish my first round.

Merged build triggered.

Merged build started.

Test build #36225 has started for   PR 7057 at commit 27b0329.

Test build #36225 timed out     for PR 7057 at commit 27b0329     after a configured wait of 175m.

Merged build finished. Test FAILed.

Merged build triggered.

Merged build started.

Test build #36267 has started for   PR 7057 at commit 34f63f8.

Test build #36267 has finished for   PR 7057 at commit 34f63f8.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

@hvanhovell I have finished my first round. Sorry for taking a long time. I think I understand the new workflow of the operator and it looks pretty good. I think it will be great if we can have more comments to explain how it works (specially for some important methods like createBoundOrdering). I will focus more on readability of the code in my next round.

Merged build triggered.

Merged build started.

Test build #36850 has started for   PR 7057 at commit 480bb05.

@yhuai I have updated the PR.
As for the documentation. I will add another section to the general class documentation, which explains the inner workings of the operator. Let me know what else needs some more documentation.

Test build #36850 has finished for   PR 7057 at commit 480bb05.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Can one of the admins verify this patch?

ok to test

Merged build triggered.

Merged build started.

Test build #37244 has started for   PR 7057 at commit 480bb05.

Test build #37244 has finished for   PR 7057 at commit 480bb05.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Merged build triggered.

Merged build started.

Test build #37545 has started for   PR 7057 at commit c3e4287.

@hvanhovell I remember you have some benchmarking results. Can you add results to the description? Also, does your benchmark include tests for all of four kinds of frames (entire partition, growing frame, shrinking frame, and moving frame)? It will be good if we can have results for all these kinds of frames and we make sure there is no performance regression (I think it is unlikely that we introduce regression. But, it still good to have benchmarking results for different kinds of cases).

Test build #37545 has finished for   PR 7057 at commit c3e4287.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Merged build triggered.

Merged build started.

Test build #37567 has started for   PR 7057 at commit 7207ef5.

@yhuai the benchmarking results are attached. It might be interesting to see how the operator performs on different datasets.

Test build #37567 has finished for   PR 7057 at commit 7207ef5.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Merged build triggered.

Merged build started.

Test build #37743 has started for   PR 7057 at commit 3bfdc49.

Test build #37743 has finished for   PR 7057 at commit 3bfdc49.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

@hvanhovell Overall looks good. I am merging it to master. I will leave a few comments for minor changes. Can you submit a follow-up PR to address them?


Shape rendering appears to be off-by-one

Hi, I've been using SDL_gpu as a backend library for a while now and I just noticed how specifically shape rendering appears to be off-by-one depending on the calls used. This issue appears on both a Linux-based laptop with an Intel HD Graphics 4000 integrated GPU and a Windows-based desktop computer with an AMD Radeon RX5700 XT - none of my systems use DPI scaling. The coordinate mode used is the default one, inverted, although changing the coordinate mode to mathematical does not seem to make any difference on shape rendering in general. Both viewport and camera have been left default. Changing the renderer versions does not change anything. The issue also affects rendering to a GPU_Image via GPU_Target.
The full, reproducible example source code is located at the end of this entry. Now, onto the issue...
For example the following will result in pixel at (0, 0) not being rendered at the expected location on Y-axis, later on you'll see X-axis is aligned properly.
GPU_Clear(screen);
GPU_Pixel(screen, 0, 0, c);
GPU_Flip(screen);

The window flags were set to SDL_WINDOW_BORDERLESS, although the system window decorations state appears to be irrelevant to the issue.

Now, after nudging the Y coordinate 1 pixel to the bottom, this appears:

You can easily see that the call to draw a pixel at (0, 1) is exactly at the previously expected (0, 0).
When drawing to the bottom-right corner it appears to be exactly 1 row above the expected one, too.
Here's what happens when drawing a rectangle outline using GPU_Rectangle:

This does not need any magnification to see that there's an issue.
An interesting thing to notice is that this doesn't seem to affect shapes that are filled and drawn to top-left corner. Here's what happens when drawing a filled rectangle using GPU_RectangleFilled to (x1, y1) being at (0, 0):

And the following happens when drawing a filled rectangle using GPU_RectangleFilled to (x1, y1) being at (screen_width - 8, screen_height - 8) - rectangle dimensions here were changed to 8x8 to help include the most relevant information:

I've tried to walk through the code on my own, but I have failed to find the place at which the failure occurs. Do any of the maintainers have an idea what might be going on here?
If you have no time to fix it - completely fine - hints on where the issue might occur are more than enough. I can fix it myself and submit a PR, but I simply have no idea where to look at this point.
As promised, the full example:
#include "SDL.h"
#include "SDL_gpu.h"

const uint16_t screen_width = 320;
const uint16_t screen_height = 240;

static SDL_Color c = {
	.r = 255,
	.g = 0,
	.b = 0,
	.a = 255
};

void draw_pixel_topleft(GPU_Target* screen) {
	GPU_Pixel(screen, 0, 0, c);
}

void draw_pixel_bottomright(GPU_Target* screen) {
	GPU_Pixel(screen, screen_width - 1, screen_height - 1, c);
}

void draw_line_topleft(GPU_Target* screen) {
	GPU_Line(screen, 0, 0, 32, 0, c);
}

void draw_rect_topleft(GPU_Target* screen) {
	GPU_Rectangle(screen, 0, 0, 16, 16, c);
}

void draw_rect_filled_topleft(GPU_Target* screen) {
	GPU_RectangleFilled(screen, 0, 0, 16, 16, c);
}

void draw_rect_filled_bottomright(GPU_Target* screen) {
	GPU_RectangleFilled(screen, screen_width - 8, screen_height - 8, screen_width - 1, screen_height - 1, c);
}

int main(int argc, char** argv)
{
	SDL_Event event;
	Uint8 done;

	printRenderers();

	GPU_Target* screen = GPU_InitRenderer(
		GPU_RENDERER_OPENGL_4,
		320,
		240,
		SDL_WINDOW_BORDERLESS
	);

	if (screen == NULL)
		return -1;

	printCurrentRenderer();

	GPU_Clear(screen);
	draw_rect_filled_bottomright(screen);
	GPU_Flip(screen);

	done = 0;
	while (!done)
	{
		while (SDL_PollEvent(&event))
		{
			if (event.type == SDL_QUIT)
				done = 1;
		}
	}

	GPU_Quit();

	return 0;
}

Very good and detailed issue report - I'm facing the same problems. It's especially noticeable when drawing very small textures into a much larger destination rectangle - the image is not offset by one pixel, but by one pixel magnified by the same scale, devided in half.
I'm drawing a QR code that's a 25pix image into a 250px box, and it is being offset by 5px down and right of where it should be

Very good and detailed issue report - I'm facing the same problems. It's especially noticeable when drawing very small textures into a much larger destination rectangle - the image is not offset by one pixel, but by one pixel magnified by the same scale, devided in half. I'm drawing a QR code that's a 25pix image into a 250px box, and it is being offset by 5px down and right of where it should be

I have found that the issue that causes this problem is having position or dimension snapping enabled on the texture. For some reason, position & dimension snapping is resolved on the source rectangle, causing large offsets on the scaled-up image position. This is probably a bug and should be fixed. Maybe something similar is also true for shapes?

I've found the issue, I believe.
static void Line(GPU_Renderer* renderer, GPU_Target* target, float x1, float y1, float x2, float y2, SDL_Color color)
{
	float thickness = GetLineThickness(renderer);

  float t = thickness/2;
  float line_angle = atan2f(y2 - y1, x2 - x1);
  float tc = t*cosf(line_angle); // 0.5
  float ts = t*sinf(line_angle); // 0.0

  BEGIN_UNTEXTURED("GPU_Line", GL_TRIANGLES, 4, 6);

  SET_UNTEXTURED_VERTEX(x1 + ts, y1 - tc, r, g, b, a);
  SET_UNTEXTURED_VERTEX(x1 - ts, y1 + tc, r, g, b, a);
  SET_UNTEXTURED_VERTEX(x2 + ts, y2 - tc, r, g, b, a);

  SET_INDEXED_VERTEX(1);
  SET_INDEXED_VERTEX(2);
  SET_UNTEXTURED_VERTEX(x2 - ts, y2 + tc, r, g, b, a);
}

As you may notice, t is half of the line thickness. This value is broken down into tc and ts, which are 0.5 and 0.0 respectively, when thickness == 1.
Tc is then subtracted from y1 and y2, which results in the line rendering one pixel higher.
Personally, I expected the line to simple be rendered exactly only the pixel (at least when it has a thickness of 1). I changed float t = thickness/2; to float t = thickness; and it worked as expected.

This isn't a complete fix however, but at least pinpoints the underlying issues of these functions, and why we are seeing some off-by-one errors.
@grimfang4 If you have any thoughts on this, I'd like to get this issue resolved, as it's causing some odd rendering in a project of mine. I'd be fine with fixing this myself and submitting a PR if we can come to a consensus on the matter

I'm pretty sure some of the shape rendering being off-by-one is due to issues I was having reconciling OpenGL's pixel centers (0.5,0.5) for both shapes and textures.  I'm sure there's a good fix, I just haven't found it yet and haven't had the time to dig in again.
@avahe-kellenberger For rendering lines as implemented, this seems to mean that lines should be offset by 0.5 so that the starting pixel is "covered", but floating point precision may make it miss just slightly.  That's why you might see 0.5 or 0.325 in code or discussions about this as an offset.  I might have had that adjustment in SDL_gpu but maybe took it out?
This is all what the pixel-perfect-test is supposed to highlight (if you can improve it, please do!).  I think the thing to do would be to add this offset to one shape at a time and see how it renders at a variety of line angles.

@avahe-kellenberger To clarify the line math, that function would draw a quad centered on the point you give it.  For example, given the points (0,0) and (20,0) with a thickness of 1, the line angle is 0 so tc = 0.5 and ts = 0.  The quad is then drawn using the points (0,-0.5), (0, 0.5), (20,-0.5), (20, 0.5).  This is why I'd suggest that it's the floating point precision/rounding that is making it hit a row of pixels one pixel higher than it should.

I've done some (minimal) testing to verify, and I believe you're correct. With the line example given (rendering at (0, 0) to (32, 0)), adding an offset of 0.000125 to each value seems to just nudge it over to the right location. 0.000124 and lower would not.
That's why you might see 0.5 or 0.375 or something in code or discussions about this as an offset
I'll likely go this route for now.

I believe GPU_RectangleFilled's x2 and y2 are exclusive @vddCore which is why you'd see the last pixel not filled in (shouldn't be using screen_width - 1, screen_height - 1 but rather screen_width, screen_height)
The underlying code uses the top-level corner of pixels for rendering, which would naturally make the x2 and y2 coords exclusive, since the end of the rendering stops at the top left of (x2, y2).

@grimfang4 I'd like some eyes on this PR when you have time - it's solved the issues I was having with rendering shapes.
I'd much prefer to get some form of my PR merged instead of maintaining my own fork of this repo. Thanks!


Update concept-workload-identity-risk.md

added CA and moved things around

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

#label:"aq-pr-triaged"

#sign-off

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


Gh 2201 upgrade accumulo version to 2.x.x

What's the significance of the ClosableIterable changes? I had thought this was already removed before, but it seems it's still in use in various places.
In relation to the renamed/duplicated modules, are we sure the Accumulo 2 version of the code isn't also compatible with Accumulo 1? Also, I assume modules other than the Accumulo store were duplicated because they also need different incompatible code, not just dependencies? It's a little hard to tell from the diff.

Superseded by #2679


Return Time as AM or PM Instead of 24:59?

Is it possible to say if we select 8:00pm that it displays 8:00pm as seen in the screenshot rather than 20:00?

format="h:mm a"

have you solved this problem?


Impose Code Linter & Run it on the repo

#155 is all about introducing a code formatter to the repo and using it throughout development. Black was the tool chosen for this and has been implemented into the repo. Discussions have been had regarding having an additional tool in the repo to manage code linting. It seems quite common that flake8 is used with Black as the code linter of choice. This would be part of a wider piece of work to understand which tools should become standard to manage Python repos within SEG. Multiple tools should be investigated and tested to see which is the best, with the chosen one implemented into this repo, with associated documentation.

PR reviewed, approved and merged into another branch but not yet merged into master. Work complete so I'm closing the issue.

PR reviewed, approved and merged into another branch but not yet merged into master. Work complete so I'm closing the issue.


add foreign key cascade for sqlite

Fixes #108
When using sqlite, you need this statement in order to enable foreign key relations and cascade deletes.

https://www.sqlite.org/foreignkeys.html


Proofread OTTR website

I read through each Rmd on the OTTR website and fixed any spelling or grammatical errors. Then, I knitted all the Rmds to HTML so the changes are reflected in the HTML.
In a second iteration of my feedback, I'll actually follow the steps outlined in this website and see if they all work as intended. Though it seems that we don't have a Coursera/Leanpub account at fhdasl yet.

@cansavvy @carriewright11
I incorporated your feedback into the Rmd files and then clicked on "Build Website" from RStudio's Build Pane. This rendered a bunch of HTML files, which I committed here https://github.com/jhudsl/ottr-website/pull/39/commits/fc4aa410171c39231e4151fef45f4c9ad6b699ac
If everything looks correct, do you mind approving this PR so I can merge it?

Thanks @cansavvy!


Endpoint to calculate Mortgage

The Mortgage Calculator helps estimate the monthly payment due along with other financial costs associated with mortgages..
Perform all the calculations in the function.py file present in helpers folder
Create the endpoint morgage in the main.py file and return the required result in a proper format
Update the ENPOINTS.md properly

hi there , I believe that my skills can be a good match for the issue ,  as a GSSOC 23 member I ask you to assign me the issue.

I think I can do this. Please assign me this issue.

Hi @ighoshsubho , I would like to work on this issue, please assign it to me

Hey @mridul45, go ahead! :) And @Codeansh and @filza2112, you can raise more issues like this and I will assign you with the same!

Thx for the opportunity

Sure no probs! 👍

Hi I am mid way in my work

Sure but try to make it within this week, already 2 weeks...

sure

Hi I have completed the mortrage endpoint , once  I complete the other one I will make a pr by tomorrow afternoon.


Update sys-dm-db-log-space-usage-transact-sql.md

Fixing an error in the example code

#sign-off

Thank you @kfarlee for the content help.


Upgrade dependencies

There are a bunch of security vulnerabilities that had accumulated in the development dependencies causing github to post warnings about the package. While this isn't a huge problem since convergence does not actually have any runtime dependencies, it still is a bad look, and hey might as well keep fresh and clean, right?
This updates the yarn.lock.

A preview package of this pull request has been released to NPM with the tag upgrade-dependencies.
You can try it out by running the following command:
$ npm install @bigtest/interactor@upgrade-dependencies

or by updating your package.json to:
{
  "@bigtest/interactor": "upgrade-dependencies"
}

Once the branch associated with this tag is deleted (usually once the PR is merged or closed), it will no longer be available. However, it currently references<EMAIL_ADDRESS>which will be available to install forever.

  Generated by :no_entry_sign: dangerJS against 0ae39d38017c86d6ee9fd20d9c68bca2cd1ae7a2


Revert "Remove servers not in salt"

Reverts rivet-gg/rivet#6

@MasterPtato The null resource causes errors when running bolt tf apply pools


Add exports to package.json

Feature Proposal
Add exports to package.json
Feature Use Case
Chart.js doesn't work out-of-the box with SvelteKit / Vite (https://github.com/chartjs/Chart.js/issues/9436). Adding exports to package.json is likely to solve that
Possible Implementation
Someone started on this in https://github.com/chartjs/Chart.js/pull/9597

I would like to work on it. Can I @benmccann?

No objection from me

Added in #10525


Make new_version work with scm rockspecs

I'd like to have a single scm rockspec in my repo and make rockspecs for releases by adding source.tag field. luarocks new_version, given an scm rockspec and a version, currently prints
Warning: invalid URL - Error fetching file: Unsupported protocol git+https
Warning: URL is the same, but MD5 has changed. Old rockspec is broken.

and produces a rockspec without source.tag.
This PR fixes some behaviour issues in MD5 checking (it is currently checked even if the old rockspec doesn't have source.md5 field or if source archive fetching failed). For the scm rockspec usecase, it adds --tag flag that sets source.tag field in the new rockspec. It's also used to infer new version if it's not given. Common convention tag == 'v' .. version is supported. So, now I can run luarocks new-rockspec myrock-scm-1.rockspec --tag 0.2.0 to create a rockspec for 0.2.0 release.

This sounds really useful! Thanks!


Update aditi_hw5_eval.md

Signed-off-by: aditi-v79<EMAIL_ADDRESS>

Codecov Report
Base: 74.53% // Head: 74.53% // No change to project coverage :thumbsup:

Coverage data is based on head (e044824) compared to base (b43febc).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #73   +/-   ##
=======================================
  Coverage   74.53%   74.53%
=======================================
  Files          15       15
  Lines         326      326
=======================================
  Hits          243      243
  Misses         83       83

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

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


Properties["ParentSpanId"] being set but not showing up in Seq

I have a Web API project that receives input via POST and creates queue messages to be processed by a worker service. I am creating a LoggerActivity and passing it's Id with the queue message data. When my worker service picks up the queue message, it creates it's own LoggerActivity and calls AddProperty("ParentSpanId", parentSpanIdFromApi) but the ParentSpanId is not being seen by Seq, it's not even showing up in the Properties. Is there something I'm missing?

Hi @bmontalvoDD,
The ParentSpanId property is only recognized if the value is an ActivitySpanId, not a string, so you may need to do this conversion before setting it.
For "plumbing" scenarios like this, you might alternatively just use the ActivitySource.StartActivity(..., ActivityContex) API directly, to create that outermost span. Trace propagation is an important scenario for SerilogTracing, but the APIs to support it are a little rough right now (as you've found :-)). Let me know if you need any info on what this approach would look like.

Hi @nblumhardt your suggestion worked! Thank you


Accepting contributions for spark upstream

If we were to accept more contributions into this branch (and I can see more people do want to), what is the minimum that we need to ensure that we can use committer's contributions?
This is just to ensure that we don't have issues later on as we try to upstream our changes.
The Apache ICLA/CCLA (as relevant) ought to be signed I think. We could do a manual check if this is the case.
Do we know if there are other requirements?
@tnachen @erikerlandson

Beyond that I'm not aware of any requirements.   I vaguely remember signing it at some point.
As this starts to pick up steam, it's probably a good time to start a JIRA.  This project seems like it warrants an umbrella JIRA:
https://issues.apache.org/jira/browse/SPARK-18278
There was a thread regarding a re-vamp of design documentation, possibly adopting the "SIP" model, but not sure how that concluded.   A design doc should live somewhere.

Working on getting the appropriate documents signed before making any PRs to this fork.

@iyanuobidele Are we all set with the signed Apache CLA at your end?

@foxish I'm all set with the CLA

@iyanuobidele Perfect. Thanks!

@foxish Hi, small issue, it turns out the cla that was signed was for k8s (cncf-cla) not Apache. However, the Apache cla should be set in the next few days.
Very sorry about the mix up. I'll update you once it's done.

FYI
All good now with the Apache CCLA.
/cc @foxish


Execution Context and Hoisting in Vanilla JavaScript

Proposed title of article
Execution Context and Hoisting in Vanilla JavaScript
Introduction paragraph (2-3 paragraphs):
In comparison to many of its competitors, JavaScript is a simple to learn programming language. However, if you want to understand, debug, and write better code, you'll need to pay a little more attention to a few basic ideas.
We will learn about two of these principles in this essay.

Hoisting
Context of Execution

Key takeaways:
The following are the main things a learner will understand from this article:

Execution Context in JavaScript
Global Execution Context (GEC) in JavaScript
Function Execution Context (FEC) in JavaScript
Hoisting in JavaScript

References:
N/A

Good afternoon and thank you for submitting your topic suggestion.
Your topic form has been entered into our queue and should be reviewed (for approval) as soon as a content moderator is finished reviewing the ones in the queue before it.

@Vanessa-Karimi
We're really looking for unique/original content, and based on the content provided, it seems that information that you intend to cover is already readily available through the documentation or via many other blog sites.
Could you please expand upon how your content will differ from what is already available through other websites and documentation? We lean towards content that offers an original viewpoint/approach around programming-centric topics.

I'm going to close this PR to clear the queue. @Vanessa-Karimi
It can be reopened.


/api/v1/sbom/{id}/advisory contains packages without id.

Steps to reproduce:

Star the backend with the latest version
Upload all data from D1 https://github.com/trustification/trustify/tree/main/etc/datasets/ds1
get the quarkus-sbom advisories using /api/v1/sbom/urn%3Auuid%3A01935352-6dc7-7582-9241-b2577f404d3f/advisory
The response will be similar to

[
    {
        "uuid": "urn:uuid:e635c662-fc76-4c07-87b3-908226d95fd1",
        "identifier": "https://www.redhat.com/#CVE-2023-2798",
        "issuer": {
            "id": "a80a05f2-7a3c-48a3-9a17-5252f9f1c17e",
            "name": "Red Hat Product Security",
            "cpe_key": null,
            "website": null
        },
        "published": "2023-05-25T00:00:00Z",
        "modified": "2023-08-10T12:02:50Z",
        "withdrawn": null,
        "title": "Stack overflow crash causes Denial of Service (DoS)",
        "labels": {
            "type": "csaf"
        },
        "status": [
            {
                "normative": true,
                "identifier": "CVE-2023-2798",
                "title": null,
                "description": null,
                "reserved": null,
                "published": null,
                "modified": null,
                "withdrawn": null,
                "discovered": null,
                "released": null,
                "cwes": [],
                "average_severity": "high",
                "status": "not_affected",
                "context": {
                    "cpe": "cpe:/a:redhat:quarkus:2:*:*:*"
                },
                "packages": [
                    {
                        "id": "",
                        "name": "htmlUnit",
                        "version": null,
                        "purl": [],
                        "cpe": []
                    }
                ]
            }
        ]
    },

I cut the response for better understanding

If you see the field status.packages then we have a package without id and only name.
The problem is that I am using this current data for the image below:

If you see the affected dependencies column you will see a count of packages affected by the Vulnerability.
After clicking on a row|number at the affected dependencies column then there is supposed to be a table with all packages. Each package is link-able to the Page Package Details, which means that for each package it should be possible to go to the Package Details page. For navigating to the UI Package Details page we need an ID for each package.

I wondered about this TODO in the code. Is this issue the result of that TODO, @dejanb?

get the quarkus-sbom advisories using /api/v1/sbom/urn%3Auuid%3A01935352-6dc7-7582-9241-b2577f404d3f/advisory

At the risk of telling you something you already know, those ID's are universally unique so will never match any other SBOM ingested in anyone else's environment.
If you wanted to be pedantic in your already-excellently-detailed steps to reproduce you could do something like:
ID=$(http get "http://localhost:8080/api/v1/sbom?q=quarkus" | jq -r '.items[0].id')
http get "http://localhost:8080/api/v1/sbom/$ID/advisory" | jq . | head -n 100

But it's not necessary.
And it's totally fine to refer to your own ID's in your issues, I just wanted to make sure you knew they were meaningless in any db other than your own. Apologies if you already did. :smile:

yeah, sorry. I was in a hurry and copied and pasted the URLs from my browser. So I used my unique ID from my DB.
And thanks for sharing the http command. That's a better way of reproducing and navigating JSONs. I'll keep it in mind so I can use it in future issues

I wondered about this TODO in the code. Is this issue the result of that TODO, @dejanb?

Yes. There's some work started to solve this with #994. The idea is to try to use in-mem graph for this search (an alternative is db query).

@carlosthe19916 can you try #1048 and see if it works for you

@JimFuller-RedHat #1041 didn't do the trick, as we need actual component based on name, not the roots. I implemented db version of the functionality for now (#1048) and we can revisit this later if needed.


(wav2vec2) Why is a finetuned model not independent of the model it was pretrained from?

❓ Questions and Help
What is your question?
Say I pretrain a model. Then I finetune it which creates a new model. When doing inference with the finetuned model I can get an error because the pretrained model does not exist anymore (because the checkpoint was deleted as training was not finished).
Similarly, I have noticed that if I scp a finetuned model to another host and want to use it, I'll get an error because the pretrained model used for finetuning is not on the host.
Can I change this behaviour? If yes how?
Thank you in advance.

In the finetuned model, if you load and check the keys, there are two parts:
w2v_path & w2v_args
w2v_path contains the model path of pretrained model.
If you don't want to load pretained model, then try setting w2v_path to None, the code will pick up args from w2v_args.

Thank you for the response, let me try that

@harveenchadha I tried loading the finetuned model (as dct), setting dct['cfg']['model']['w2v_path'] = None, saving it and then using that model for inference. But I got an error
omegaconf.errors.ValidationError: Non optional field cannot be assigned None
        full_key: w2v_path
        reference_type=Optional[Wav2Vec2CtcConfig]
        object_type=Wav2Vec2CtcConfig

@RuABraun I am facing a similar issue like you. Have you found a solution in the meantime?

Unfortunately not really. I keep a copy of the pretrained model around with the same path as on the host where I trained.
If I find a real solution I will update.

I maybe found a solution for the issue. There exists the option to give a dictionary via --model-overrides to change an argument of the model at generation time. You can use this to reset the checkpoint path, what is also explained in this example in the last code line before the citation: https://github.com/pytorch/fairseq/blob/7818f6148da4ea04f0b4b3a2df780004c3580dad/examples/stories/README.md
I personally work with a modified XLMR-model for translation and change the argument pretrained_xlm_checkpoint to "interactive" when generating. It then skips the loading of the pre-trained checkpoint at model setup and only loads the fine-tuned checkpoint. It is a hacky workaround, but it does the job for me.
I don't know whether you tried --model-overrides already and if it works with the wav2vec2 model, but maybe it helps! Also putting it here for other people having the same problem to find it more easily.


etcd should be started after the trap func set

etcd should be started after the trap func set, otherwise the etcd will not be cleaned  if the script stop before trap cleanup EXIT

LGTM, Thanks!


Fix flaky Secure Comparator test

Make sure that secret_length is in [2, MAX_SECRET_SIZE) range, disallowing it to be just 1 byte.
(rand_int() generates non-zero integers.)
If secret_length is exactly 1 byte then the following call below:
https://github.com/cossacklabs/themis/blob/e323abb2470cc759ea4dd90f9f2985ffce9449f1/tests/themis/themis_secure_comparator.c#L220-L222
will fail as the appended secret cannot have zero length.
Naturally, this happens rarely. But often enough to pop up in nightly tests running on my branch which got me curious.
[14:11]  secure_comparator_api_test:#11  "secure_comparator_destroy: destroy alice"  pass
[14:12]  secure_comparator_api_test:#12  "secure_comparator_append_secret failed"  FAIL
!    Type:      fail-if
!    Condition: condition
!    File:      tests/themis/themis_secure_comparator.c
!    Line:      222

--> 12 check(s), 11 ok, 1 failed (8.33%)

== Entering suite #15, "secure comparator: security test" ==

[15:1]  secure_comparator_security_test:#1  "compare result no match"  pass

--> 1 check(s), 1 ok, 0 failed (0.00%)

==> 291 check(s) in 15 suite(s) finished after 2.00 second(s),
    290 succeeded, 1 failed (0.34%)

[FAILURE]

Checklist

[X] Change is covered by automated tests
[X] The coding guidelines are followed

Tricky thingy


Change mentions of "master" to "main" in Contributing.rst

currently, the contributors guide still mentions the origin/master branch.
If you're submitting a feature addition or change, branch off of the
    "main" branch.

    .. code-block:: text

        $ git fetch origin
        $ git checkout -b your-branch-name origin/main

I am submitting a PR to fix this, and the contributor's guide indicates I should
have an open issue to reference. This is my first time contributing to open-source
software, so if I've made any mistakes, I would appreciate the feedback!

I am submitting a PR to fix this, and the contributor's guide indicates I should have an open issue to reference.

This only applies to more significant changes where we don't want people to start development just to find out it's not something we'd like to have. For simple typo-like fixes there's no need to open an issue.
You're not the first one who's doing this though, so maybe we should make it clearer...

Fixed in #1087


Execute remaining tasks when one fails

Signed-off-by: Raul Sevilla<EMAIL_ADDRESS>Description
When one of the benchmarks fails we should continue the execution of the remaining

a quick question @rsevilla87 , like kube-burner will resources created from a previous workload(eg client,sever pods) be deleted before running the next workload?

a quick question @rsevilla87 , like kube-burner will resources created from a previous workload(eg client,sever pods) be deleted before running the next workload?


#18751 Respect URL-based configuration

SSH isn't used in case of using url based db.
in my case local db version - pg 14.6, pg on db1 - v.10
https://user-images.githubusercontent.com/31996417/217210871-5f54a6c3-0e25-45c8-8a83-d31c8e9ac171.mp4

It is unrelated. We can't use automatic port forwaring in SSH for any URL-based connections (the only workaround is to configure local port mapping in advanced settings)

verified


⚠ Nebulance has degraded performance

In 8610512, Nebulance ($NBL) experienced degraded performance:

HTTP code: 200
Response time: 1640 ms

Resolved: Nebulance performance has improved in 2fa8a6c after 7 minutes.


re-enable rke provisioning tests for PRs

RKE provisioning tests are currently only running on drone-publish and not on drone-pr. This re-enables them to run on all PRs, same as the k3s provisioning tests.
Drone PR showing the k3s provisioning tests running but the RKE tests not running
https://drone-pr.rancher.io/rancher/rancher/19234/2/1
Looks like the rke tests were specifically moved to drone-publish about 5 months ago: https://github.com/rancher/rancher/commit/e7045cac6dde4d0fe7fa31219217fa7b207e14e7

The RKE provisioning tests take about twice as long as the k3s provisioning tests.
k3s
ok  	github.com/rancher/rancher/tests/integration/pkg/tests/custom	526.095s
ok  	github.com/rancher/rancher/tests/integration/pkg/tests/machineprovisioning	556.879s

rke
ok  	github.com/rancher/rancher/tests/integration/pkg/tests/custom	1017.801s
ok  	github.com/rancher/rancher/tests/integration/pkg/tests/machineprovisioning	1117.750s

It takes an additional 9-10 minutes to run the rke provisioning tests for a PR compared to k3s.


[BUG] Pulling out Money when i hold a Block without any Coins

You can pull out Money from the Purse.
When you dont have any coins inside your inventory and you hold a Block in your hand you dont get any out of the purse!

I am assuming this also is related to a Forge version of Numismatic Overhaul. Please report this to the correct tracker.


preview hangs

Hangs indefinitely. Is there a way to debug this?
Fetching from the remote
Traceback (most recent call last):
  ...
    CommandLine(sys.argv).run()
  File "C:\Python27\lib\site-packages\gitsweep\cli.py", line 89, in run
    self._sweep()
  File "C:\Python27\lib\site-packages\gitsweep\cli.py", line 126, in _sweep
    ok_to_delete = inspector.merged_refs(skip=skips)
  File "C:\Python27\lib\site-packages\gitsweep\inspector.py", line 37, in merged_refs
    with_extended_output=True, with_exceptions=False)
  File "C:\Python27\lib\site-packages\git\cmd.py", line 346, in execute
    stdout_value, stderr_value = proc.communicate()
  File "C:\Python27\lib\subprocess.py", line 799, in communicate
    return self._communicate(input)
  File "C:\Python27\lib\subprocess.py", line 1043, in _communicate
    stdout_thread.join()
  File "C:\Python27\lib\threading.py", line 949, in join
    self.__block.wait()
  File "C:\Python27\lib\threading.py", line 339, in wait
    waiter.acquire()
  File "C:\Python27\lib\site-packages\async\__init__.py", line 21, in thread_interrupt_handler
    prev_handler(signum, frame)
KeyboardInterrupt

git-sweep executes git cherry origin/master origin/1.0 on https://github.com/wesnoth/wesnoth/ repository, which is 2.1Gb.

https://stackoverflow.com/questions/18201293/why-is-git-cherry-so-astonishingly-slow
I thought that git-sweep will just execute git branches and attempt to do git branch -d <branchname> on them.

I have this problem too. Running a preview just sits there forever. Is there a workaround/fix?


AttributeError: 'NoneType' object has no attribute 'group'

My script like this:
#-- coding:utf-8 --
from googletrans import Translator
import sys
import io
translator = Translator()
tanstext = u'我们'
tran_ch = translator.translate(tanstext ).text
print tran_ch
###############
yesterday this is ok and no problem，but today I run my script without internet, show some problem.And I run the script in the internet environment, but it's show same problem,can't run.
The cmd show the Traceback like this:
Traceback (most recent call last):
File "D:\JDstory\workstory\translation-project\filetocut\trans-test.py", line
10, in
tran_ch = translator.translate(tanstext).text
File "D:\software\Python27\lib\site-packages\googletrans\client.py", line 132,
in translate
data = self._translate(text, dest, src)
File "D:\software\Python27\lib\site-packages\googletrans\client.py", line 57,
in _translate
token = self.token_acquirer.do(text)
File "D:\software\Python27\lib\site-packages\googletrans\gtoken.py", line 180,
in do
self._update()
File "D:\software\Python27\lib\site-packages\googletrans\gtoken.py", line 59,
in _update
code = unicode(self.RE_TKK.search(r.text).group(1)).replace('var ', '')
AttributeError: 'NoneType' object has no attribute 'group'
#########################
That's why?  Thank you so much!

Have you found a solution?

This means google banned your IP.

Wrong, this happens when Google directly sends you the raw token. They do this for a short time after maintenance, not sure why.

Hi,
from yesterday I have this "error". How do you think that I could fix it. I just created other server to execute my code and the result it's the same :(
Thanks

See here for the fix: #78

how to use it in translation code above?

go to browser with Google Translate page, try to translate Hello World =)
if you see Error translated - your IP are banned

I have tried to translate from Google Translate page and it works. But when I try code above it failed with same error as shown above.

See here for the fix: #78

Can I use the code with the translation code by @halleyshx ?

After applying #78 I got below error. Please help
/home/hrishikesh/anaconda3/envs/MTP_IITM/lib/python2.7/json/decoder.pyc in raw_decode(self, s, idx)
380             obj, end = self.scan_once(s, idx)
381         except StopIteration:
--> 382             raise ValueError("No JSON object could be decoded")
383         return obj, end
ValueError: No JSON object could be decoded

Looking other places, probably the issue is around a Regex from Google Translate than they use to working on.
Take a look in: https://github.com/pndurette/gTTS/issues/138

See here for the fix: #78

Apologies, I just installed this library via pip and encountered this error. How should I proceed to apply said fix?

hello, I try today to use the gtts on python but is not working
can somebody help me please ?
the error is:
Exception has occurred: OSError
[Errno 22] Invalid argument: 'C:\test.mp3'
File "C:\Users\Administrator\Desktop\Speech-Recognition.py", line 39, in
speech.save("C:\test.mp3")
My code:
import speech_recognition as sr
from gtts import gTTS
import os
import playsound
while True:
command = 0
speech = 0
mic = sr.Microphone()
r = sr.Recognizer()
with mic as source:
print("Calibrate Microphone")
print("Please wait...")
r.adjust_for_ambient_noise(source, duration=1)
print("listening...")
audio = r.listen(source)
try:
command = (r.recognize_google(audio))
print("you said:"+command)
except sr.UnknownValueError:
print("")
except sr.RequestError:
print("")
if "hello" in command:
print("hello")
speech = gTTS("hello", lang="en")
if os.path.exists("C:\test.mp3"):
print("file exist")
playsound.playsound("C:\test.mp3", True)
else:
print("saving new mp3 sound")
speech.save("C:\test.mp3")
playsound.playsound("C:\test.mp3", True)

@Darkblader24 My IP is also getting blocked after using the pull request [(https://github.com/ssut/py-googletrans/pull/78)], although it resolved the "None Type" issue. It happens after 250 requests or something, I have even tried on a different server, the IP is continuously getting blocked after few requests. Earlier I could make thousands of requests and my IP never got blocked. The new pull request has messed up something, any idea?

Quick question: What is the error you get when your IP is blocked?
Is it ValueError("No JSON object could be decoded") ?

The error when the IP is blocked is Expecting value: line 1 column 1 (char 0)
Any idea how to unblock my IP address ?

@ramya-ramanathan  I am getting ValueError: No JSON object could be decoded
what is this for???

Hello
I get 'NoneType' object has no attribute 'group'
I have tried this
$ pip uninstall googletrans
$ git clone https://github.com/BoseCorp/py-googletrans.git
$ cd ./py-googletrans
$ python setup.py install
But get same issue
Please help me

I've been getting this as well on a recent install of googletrans in a fresh venv:
  File "<truncated_for_privacy>/lib/python3.6/site-packages/googletrans/client.py", line 182, in translate
    data = self._translate(text, dest, src, kwargs)
  File "<truncated_for_privacy>/lib/python3.6/site-packages/googletrans/client.py", line 78, in _translate
    token = self.token_acquirer.do(text)
  File "<truncated_for_privacy>/lib/python3.6/site-packages/googletrans/gtoken.py", line 194, in do
    self._update()
  File "<truncated_for_privacy>/lib/python3.6/site-packages/googletrans/gtoken.py", line 62, in _update
    code = self.RE_TKK.search(r.text).group(1).replace('var ', '')
AttributeError: 'NoneType' object has no attribute 'group'

Hello
I get 'NoneType' object has no attribute 'group'
I have tried this
$ pip uninstall googletrans
$ git clone https://github.com/BoseCorp/py-googletrans.git
$ cd ./py-googletrans
$ python setup.py install
But get same issue
Please help me

me, too.

still problem exist :'(

Still having this issue too frequently. Impacting our production.
For days we thought we've been doing something wrong...

I am seeing this issue as well.  I see it on dev and staging environment but not in production.

Getting the same "Attribute Error" after GoogleTrans had been working great for months...
  File "C:\Anaconda3\lib\site-packages\googletrans\gtoken.py", line 65, in _update
    code = unicode(self.RE_TKK.search(r.text).group(1)).replace('var ', '')
AttributeError: 'NoneType' object has no attribute 'group'

I've been using this library to do research work, where I have to translate several images, at first I thought it was an error in the images because they have different edges and colors, but then I used a time delay for some images that did not work and suddenly they started translating. The problem is that it does not work for all the images, below I show how I use the delay
def translateImg(src):     img = cv2.imread(src)     text = pytesseract.image_to_string(img, lang='ara')     print(text)     time.sleep(10) # sleep the aplication 10 seconds     translator = Translator()     result = translator.translate(text)     print(result.text) for x in range(1,28):     translateImg('../resources/photos/annunciAmaq1/img ('+str(x)+').jpg')

I'm also getting the same issue, any fix for this?
File "/home/anaconda3/lib/python3.7/site-packages/googletrans/gtoken.py", line 62, in _update
    code = self.RE_TKK.search(r.text).group(1).replace('var ', '')
AttributeError: 'NoneType' object has no attribute 'group'

I'm using Python 3.7.3 on Ubuntu 20.04 machine

Hey there,
In another 2 years old thread talking about this issue (which sadly, I cannot find again) it was mentioned that upgrading GoogleTrans helps. It has helped for me too, but only for a short while. In other old threads I have found, it was mentioned, that an older version of the issue was related to a problem with an API key, token or similar. So my theory is that I get another key if I update. Even when there isn't a new version, Anaconda will re-download and install the package. At least you can give it a shot. It is quite easy - run this in Anaconda:
pip install git+https://github.com/BoseCorp/py-googletrans.git --upgrade

Hi, I get the same error.
Python version 3.8.3

Hey there,
In another 2 years old thread talking about this issue (which sadly, I cannot find again) it was mentioned that upgrading GoogleTrans helps. It has helped for me too, but only for a short while. In other old threads I have found, it was mentioned, that an older version of the issue was related to a problem with an API key, token or similar. So my theory is that I get another key if I update. Even when there isn't a new version, Anaconda will re-download and install the package. At least you can give it a shot. It is quite easy - run this in Anaconda:
pip install git+https://github.com/BoseCorp/py-googletrans.git --upgrade

It´s not work. Still the error:
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-f71bcb40be3a> in <module>
----> 1 translator.translate('Hola Mundo')

~\Anaconda3\lib\site-packages\googletrans\client.py in translate(self, text, dest, src)
    170
    171         origin = text
--> 172         data = self._translate(text, dest, src)
    173
    174         # this code will be updated when the format is changed.

~\Anaconda3\lib\site-packages\googletrans\client.py in _translate(self, text, dest, src)
     73             text = text.decode('utf-8')
     74
---> 75         token = self.token_acquirer.do(text)
     76         params = utils.build_params(query=text, src=src, dest=dest,
     77                                     token=token)

~\Anaconda3\lib\site-packages\googletrans\gtoken.py in do(self, text)
    184
    185     def do(self, text):
--> 186         self._update()
    187         tk = self.acquire(text)
    188         return tk

~\Anaconda3\lib\site-packages\googletrans\gtoken.py in _update(self)
     63
     64         # this will be the same as python code after stripping out a reserved word 'var'
---> 65         code = unicode(self.RE_TKK.search(r.text).group(1)).replace('var ', '')
     66         # unescape special ascii characters such like a \x3d(=)
     67         if PY3:  # pragma: no cover

AttributeError: 'NoneType' object has no attribute 'group'

You can simply overcome this issue by using error handling like so:
while True:
    try:
       # you translation code here
    except:
        print(Exception)
        continue
    break

You can simply overcome this issue by using error handling like so:
while True:
    try:
       # you translation code here
    except:
        print(Exception)
        continue
    break

Won't this go in infinite loop?

You can simply overcome this issue by using error handling like so:
while True:
    try:
       # you translation code here
    except:
        print(Exception)
        continue
    break

Won't this go in infinite loop?

For some reason, at a certain point, the translation succeed, at least, from my experience

You can simply overcome this issue by using error handling like so:
while True:
    try:
       # you translation code here
    except:
        print(Exception)
        continue
    break

Won't this go in infinite loop?

Yes, issue is not solved, the program goes to infinite loop.

I don't think we can rely on this library for production use. Any other free alternative?

I don't think we can rely on this library for production use. Any other free alternative?

It works like a charm for me https://github.com/lushan88a/google_trans_new

I don't think we can rely on this library for production use. Any other free alternative?

It works like a charm for me https://github.com/lushan88a/google_trans_new

Thank you for sharing this resource, I confirm it works without problems so far.

I don't think we can rely on this library for production use. Any other free alternative?

It works like a charm for me https://github.com/lushan88a/google_trans_new

Be careful this is not Google Translate the output is much lower quality to what you get at https://translate.google.com/
There is a working solution for AHK (https://www.autohotkey.com/boards/viewtopic.php?t=63835). Why can't we make it work in Python?

Hello
I  tried to make language translator app using the latest version and it worked but whenever i tried to run it any system it is showing a none type error and to resolve it i unistall the version and tried to run it 3.1.0a0 version and same it is working on my side but the error is the same while running it in other system . what is the solution to it ?

Hi !! the same problem.
line 62, in _update
code = self.RE_TKK.search(r.text).group(1).replace('var ', '')
AttributeError: 'NoneType' object has no attribute 'group'


Configure wifi zones UX

Hey @aaronpk, already enjoying this new update! Im testing it on TestFlight. Is this the best place for feedback?

The new time and distance filters are great, and the dark mode support. I have a question about the Configure Wifi Zone thing. The first time I clicked it, it said it registered my home wifi as the zone and set the long/lat. However, Im at work now and wanted to set another wifi zone. I clicked configure again but there wasnt much of a UI response and the old wifi name was automatically populated in the form. So its unclear so far if I can set multiple wifi zones, or where my current zone is configured. Anything Im missing here to make it more clear? Thanks!

Originally posted by @momonala in https://github.com/aaronpk/Overland-iOS/issues/41#issuecomment-1809851236

Yeah the wifi zone thing is a bit of a hack, and I'm definitely not good at UI stuff on iOS.
Right now there can be only one wifi zone configured.
The way it works is the first time you click it, it will prefill the location and wifi name and you'll see "Save" and "Cancel". If you already have a wifi zone configured, the buttons will say "Save" and "Clear".
This definitely needs some improvement, and I'd also like to be able to set more than one. That is all going to take a significant amount of coding though, and in particular the kind of iOS coding that I am not good at!

Got it, this makes sense now and I can replicate that reset behavior. Thanks for the clarification.
Im a data engineer by day, and I only just started to get tinkering in iOS development. But now that I can build the project in XCode and deploy it to my phone, maybe Ill try playing around with it one of these weekends and see if I can contribute anything valuable. Thanks!

That would be amazing!
This guide is probably what we should use for this, creating a collection that has a bunch of list items in it. If you skim through this you'll quickly see why I am a bit overwhelmed 😅
https://developer.apple.com/tutorials/app-dev-training/creating-a-list-view


Fix and enable format linter

We disabled the format check (#9424) due to a goimports bug of wrong placement of import comments.
However, putting the comment inline with referenced import won't separate the comment. I moved the comments to be in the same lines of the imports.
Re-enabling the format check and adding all formatting fixes.

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers: diemtvu, geeknoid, mandarjog, nmittler
If they are not already assigned, you can assign the PR to them by writing /assign @diemtvu @geeknoid @mandarjog @nmittler in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

bin/OWNERS
galley/OWNERS
istioctl/OWNERS
mixer/OWNERS
pilot/OWNERS
pkg/OWNERS
security/OWNERS
tests/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/assign @hklai

@ymesika: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-pilot-multicluster-e2e.sh
361d2f0ebfa9c288ba7c951c08b910a7bf28f9c4
link
/test istio-pilot-multicluster-e2e

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


C# Godot project with MSTest - Error: Generator 'ScriptPathAttributeGenerator' failed to generate source.

Tested versions

reproducible in v4.2.1.stable.mono.official [b09f793f5]

VStudio version:
Microsoft Visual Studio Community 2022
Version 17.8.5
VisualStudio.17.Release/17.8.5+34511.84
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Community

ASP.NET and Web Tools   17.8.358.6298
ASP.NET and Web Tools

Azure App Service Tools v3.0.0   17.8.358.6298
Azure App Service Tools v3.0.0

C# Tools   4.8.0-7.23572.1+7b75981cf3bd520b86ec4ed00ec156c8bc48e4eb
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet Package Manager   6.8.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

TypeScript Tools   17.0.20920.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.8.0-7.23572.1+7b75981cf3bd520b86ec4ed00ec156c8bc48e4eb
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.8.0-beta.23475.2+10f956e631a1efc0f7f5e49c626c494cd32b1f50
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

System information
Godot v4.2.1.stable.mono - Windows 10.0.22631 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; <IP_ADDRESS>17) - AMD Ryzen 7 3800XT 8-Core Processor (16 Threads)
Issue description
When adding an MSTest project to a C# solution/project created by Godot, the following error message is written to the output window when compiling the test project:
Generator 'ScriptPathAttributeGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'InvalidOperationException' with message 'Property 'GodotProjectDir' is null or empty.'
I've seen this in projects with actual content but not seen any actual issues coming from it.
Full output:
Build started at 21:10...
1>------ Build started: Project: PubSub, Configuration: Debug Any CPU ------
1>PubSub -> D:\code\godot-pub-sub\PubSub\.godot\mono\temp\bin\Debug\PubSub.dll
2>------ Build started: Project: Test, Configuration: Debug Any CPU ------
2>CSC : warning CS8785: Generator 'ScriptPathAttributeGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'InvalidOperationException' with message 'Property 'GodotProjectDir' is null or empty.'.
2>Test -> D:\code\godot-pub-sub\Test\bin\Debug\net8.0\Test.dll
2>Done building project "Test.csproj".
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 21:10 and took 02,718 seconds ==========

Steps to reproduce
Simply compile the attached solution.
Minimal reproduction project (MRP)
repro.zip

I don't think Godot API works with the C# test frameworks. But this warning can be resolved by adding
<PropertyGroup>
  <IsGodotToolsProject>true</IsGodotToolsProject>
</PropertyGroup>

To the Testing Csproj file, this disables the ScriptPathAttributeGenerator and GodotPluginsInitializerGenerator which can be useful when you are creating a separate library.
I'm using GDUnit4 for unit testing.

No, it might not and probably isn't intended to. As such the generator should not run in the Test-project.
Thanks for a possible workaround to use until a proper fix is in place, @Delsin-Yu

I checked the .csproj files and noticed something, might not be as important but maybe it's a clue. There's a bunch of mismatching .NET versions:
PubSub.csproj
<Project Sdk="Godot.NET.Sdk/4.2.1">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>
    <TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
    <EnableDynamicLoading>true</EnableDynamicLoading>
  </PropertyGroup>
</Project>

Test.csproj
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>

    <IsPackable>false</IsPackable>
    <IsTestProject>true</IsTestProject>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
    <PackageReference Include="MSTest.TestAdapter" Version="3.2.0" />
    <PackageReference Include="MSTest.TestFramework" Version="3.2.0" />
    <PackageReference Include="coverlet.collector" Version="6.0.0" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\PubSub\PubSub.csproj" />
  </ItemGroup>

</Project>

Also, I've had this experience with testing suites (and with experience gathered from @chickensoft-games testing rigs), so I added this line to the files:
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> and...

at the second build it compiled.

So... try doing it twice. Here's the folder with the compiled builds. Took the precaution of doing a dotnet clean in between. Same behaviour. Here's the project files with the compiled .dll files so you can check for yourself. I did compile on Linux, so your mileage may vary a lot.
.NET 8.0
repro_8.0.zip
.NET 9.0
repro_9.0.zip


refactor: remove unused code comment in Proxy.sol

Description

removes unused TODO code comments in Proxy.sol, which were probably added by mistake in this PR: https://github.com/celo-org/celo-monorepo/pull/10875)

Other changes

manually updates Proxy.sol artifacts in packages/protocol/artifacts/Proxy/ so the test_verifyArtifacts() in test in ProxyFactory08.t.sol passes before and after the PR (left a note below)
simplifes getCode argument in ProxyFactory08.t.sol for better readability. The change is semantically equivalent see Foundry docs.

Other
Leaving a note for future reference:

The proxyInitCode... file seems to require the bytecode for Proxy.sol. I'm not sure if this is the correct way to do it, but I simply copy/pasted the JSON value at packages/protocol/out/Proxy.sol/Proxy.json > bytecode.object. which is from the Foundry build artifacts.
The proxyBytecode... file seems to require the deployed bytecode for Proxy.sol. I'm not sure if this is the correct way to do it, but I simply copy/pasted the JSON value at packages/protocol/out/Proxy.sol/Proxy.json > deployedBytecode.object. which is from the Foundry build artifacts.

Unless the bytecodes in these manual artifacts matches the actual Foundry artifacts, the test_verifyArtifacts() test in ProxyFactory08.t.sol will fail.
I didn't have time to investigate this further or question why manual artifacts are needed in the first place. But, I'm leaving a note here for future reference.
Tested
Yes, locally and on CI ✅
The specific test that should pass before and after this PR is:
forge test \
-vvvv \
--match-path "*test-sol/unit/common/ProxyFactory08.t.sol"

Related issues
None, just a small housekeeping PR.
Backwards compatibility
Yes.
Documentation
Yes, in artifacts/Proxy/README.

Comment from @martinvol for future reference:

This import is somewhat important and not trivial to implement: This implementation of a proxy has a methods that should be external as public, this make us consume interfaces that are not fully consistent with the implementation. This will make the contract change bytecode, which is not something we can redeploy on mainnet for existing contracts.

Source: https://github.com/celo-org/celo-monorepo/pull/11174#discussion_r1698868045


Label is not supported on data-sly-element

Label is not supported on data-sly-element even though it is valid html tag.
example code:

    foo

I can understand why they didn't add label, since it typically needs a for attribute, which is not valid on a
 or, if you are using the form Some Field: <input name="field"/>, you (most likely) already know that the surrounding element needs to be a label.
Do you have a use case for why data-sly-element with a value of label is needed?

I currently have a an element which can have 1 or more inputs. If it is one input I'd like to use data-sly-element to change my div to a label so when a user click it, the focus goes to the input. I however do not want to show this label when there are multiple inputs as a label should only have one input inside it.

(Belated) follow-up, the best approach I see would be to use data-sly-test with an actual . If you need the text in a div in the opposite case (multiple inputs), use the opposite expression in a data-sly-test with the same text in a

In general, it is best practice to have a label for every form field.

This is documented in the Display Context section, for the elementName context, where there's a list of accepted elements.


Response Context builder

Implement suggestion from https://github.com/CosmWasm/cosmwasm/issues/476#issuecomment-658768297
Add a Context type with the following
impl<T> Context<T>
{
    pub fn new() -> Self { }

    pub fn emit<K: ToString, V: ToString>(&mut self, key: K, value: V) { }

    pub fn send_action<U: Into<CosmosMsg<T>>>(&mut self, msg: U) { }

    pub fn set_data<U: Into<Binary>>(&mut self, data: U) { }
}

It can easily be built up in steps, handling type conversion transparently, and then try_into any of the Response types.
This is a second, optional API to build the response types. I'd like to get some real-world feedback on the usage

This is done and ready for final review