Support ES6/2015 class syntax

Version 0.5.1 doesn't appear to support class syntax yet. I've just converted a library of mine and discovered the issue.
Running the latest version on the following example produces a pretty much empty markdown file.
export default class Test {
    /**
     * Test
     *
     * @param {string} msg Something to say
     * @return {boolean} Test boolean.
     */
    say(msg) {
        return false;
    }
}

Generated markdown:
#

<!-- div class="toc-container" -->

<!-- /div -->

<!-- div class="doc-container" -->

<!-- /div -->

 [1]: # "Jump back to the TOC."

Thanks!

In the meantime you can specify the @type Function to signal to docdown the type.

My linter doesn't seem to accept @type Function, and while it does accept @type {function}, that doesn't seem to change docdown's output. I'll just wait for an updated build or tell npm to grab the latest master.


[Technical Debt]: missing graddle wrapper JAR

Please describe the technical debt item.
The repo contains a proper gradle-wrapper.properties file, but the corresponding JAR is missing
Why is this a problem?
Makes automated builds via ephemeral VMs hard (e.g. for testing Reproducible Builds as supported by IzzyOnDroid, see e.g. Reproducible Builds, special client support and more at IzzyOnDroid)
Do you have a suggested fix?
Just add the corresponding JAR :wink: Thanks in advance!

Closing as we're using our own gradlew now.


Add Laravel6 ruleset

This PR

[x] Add Laravel 6 ruleset ( based mostly on https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200 )

Thank you, @linuxjuggler!


Some more slow PX20 cases

Some more tiny files found via fuzzing that take about 20 seconds here until ancient gives up on decoding them. Maybe something can be improved about that?
ancient-slow.zip

I can confirm these files are indeed slow. Will investigate


[Q] how to multicast the output srt

@lelegard
How to multicast the srt streams
tsp -I srt --caller <IP_ADDRESS>:4900 -P analyze -i 10 -o output-analysis1.txt -O srt <IP_ADDRESS>:2000 --transtype live --messageapi
This script only unicast, how to multicast the srt, please solve my question
is it possible to multicast the srt output using tsduck tool.
Thank you in advance

is it possible to multicast the srt output using tsduck tool.

It depends on what you mean by "multicast the srt output".

Usually, IP TV multicast is achieved on raw UDP or RTP. So, you get an SRT input (-I srt) and you multicast it over raw UDP or RTP using -O ip. Please RTFM about the ip output plugin.
Maybe there is a way to multicast the SRT protocol, meaning using the srt output plugin over multicast datagrams, but I do not know anything about it. This is a question to be asked in the https://github.com/Haivision/srt project.

@lelegard
Thank you for your reply


Consolidate everything into flows (eliminate components)

We currently specifying components separately from flows. It is hard to know which components are available when defining the flow. This is a usability issue.
This is an artifact of how shnorky was developed:
components -> component builds -> component executions -> flows -> flow builds & executions

This approach made it easy to build the tool because we could test actual functionality (not just metadata registration) concretely at each step. However, from the point of view of a user, flows are the most important concept in shnorky.
The current approach calls for one JSON specification per component and one for the flow. The reason docker-compose was so easy to use was that there was a single specification describing how a suite of applications were spun up.
At the very least, it should be possible in shnorky to inline component specifications inside a flow specification. But that in itself seems like a half-hearted attempt at solving the problem of making shnorky usable.
It seems like the right thing to do is to eliminate this idea of a component altogether (as a first-class notion) and to make flows the only thing that users of shn interact with directly from the command line.

This doesn't mean that components won't exist, just that they will be treated somewhat differently, and will be second-class citizens to flows.

It is not clear that this should happen - components as first-class citizens allows people to share self-contained components. Relegating components to the back seat precludes the possibility of a component hub.
Maybe a more reasonable approach is to allow flows to define inline components. But having first-class components and components that can be defined inline in a flow specification gives too many places for component definition - it would make pipelines more difficult to inspect and reason about.
Closing this issue for now. Component hubs are something we want in this ecosystem.


Multi-extension agreement download

This change adds support for framework agreements potentially having different extensions introduced in https://github.com/alphagov/digitalmarketplace-supplier-frontend/pull/340
Because the full path is no longer known, instead the prefix is provided and the most recent matching file is returned. This works because the agreement file names do not overlap and the timestamp is added to the start of the archive file name. If the supplier first uploads a PDF and then uploads a JPEG the JPEG will be returned here because it is the most recent matching upload.

Minor pedantic comment that is not essential to fix; otherwise looks good :+1:


Girl to cut

Girl to cut
Summary

Changes

Closes:
Task list

[x] For workflow changes, I have verified the Actions workflows function as expected.
[x] For content changes, I have reviewed the style guide.

Girl to cut

IT's good


Horizonal Scroll Chart

When i change width of web(like width of mobile), chart.js show chart very small. I want my chart "horizonal scroll". Like this : link here.

@MrKen99 the best way to do this would be to put the canvas in a fixed size div. Then, have that div inside a container that allows scrolling.

Yep, I got it. Thank you , etimberg.

@etimberg  I'm also building a scrolling chart inside a div, but as soon as the user scroll, the yaxis isn't display anymore. How to keep this axis visible ?

Create a canvas beside the chart to redraw the axis. Then how to get the coordinate (y) of the ticks?
Add the labels value to the xGridlines. How to do it ?

Im using ChartJs v1.x with angular chartJS (wrapper for ChartJS)

@jibaxx Unfortunately version 1 is no longer supported, and this could be a problem with the angular wrapper. Please consider upgrading to version 2 and seeing if you can fix the problem then.

I use ChartJS 2 and fixed Y-axis is not supported there also. @jibaxx Did you find anything that worked for you? Only thing I can think of to display another Y-axis that is outside the chart and thus won't scroll with the chart, but you'll have to calculate the values yourself.

You might want to check out the zoom/pan plugin.

I would be also interested. The 'chartjs-plugin-zoom' mentioned as possible workaround does not work.
Does anyone successfully deployed chartjs with large datasets (those requiring horizontal scrolling) ?

Has anybody managed to resolve having a fixed Y-axis while the chart scrolls horizontally?
I have tried this approach with 2.7.2 - https://jsfiddle.net/EmmaLouise/vcbg0jdn/1/ - but unfortunately this breaks on higher DPI settings (still trying to figure out a good workaround for scaling it up with the DPI). I find it hard to believe that the only way to have a fixed axis involves having an animation workaround but that has been all I could find in my research online for 2.x.x versions.

@bimal1331 @vbspam @jwds  I found a solution by drawing the Y axis using the onComplete and onProgress animation options to draw the Y axis as it scrolls, and also to clear the previous one so there is no overlapping/blurring. I also needed to scale it to match the device's DPR (which Chart.js already handles, hence the problem I was having in my previous post).
See - https://jsfiddle.net/EmmaLouise/eb1aqpx8/3/

@EmmaLouS  Thanks for the solution, it works great! Although I tried to make it dynamic, but it's not working really well. The chart is updating, but stays in it's wrapper as it wouldn't be scrollable. But the scrollbar is there and I can scroll it, but there is white background. Do you guys have an idea what am I missing?

@izsoandras share your example! I am trying to get @EmmaLouS working with the y-axis on the right.

#6793 https://github.com/chartjs/Chart.js/issues/6793

But it still can't be scroll and reponsive together. When you change window size, the chart not fit screen.

0
Here is the Complete working example with 5000 data points and add as much data as you want. the scrollbar code is taken from the internet so you can modify it as you want. this Example also contains a scrollbar with multiple series. (code is commented)
Chart with Scrollbar


JVM crash when dictionary buffer approaches 5M

I am evaluating zstd to use for data compression inside Apache Ignite project.
Turns out, when I pass samples totalling 5,000,000 bytes to ZstdDictTrainer.addSample(), it works, but when I pass 5,100,000 bytes it will crash JVM with following trace:
# JRE version: Java(TM) SE Runtime Environment (8.0_181-b13) (build 1.8.0_181-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.181-b13 mixed mode linux-amd64 compressed oops)

siginfo: si_signo: 11 (SIGSEGV), si_code: 2 (SEGV_ACCERR), si_addr: 0x00007f5aa86f20a7

Stack: [0x00007f5a904f2000,0x00007f5a905f3000],  sp=0x00007f5a905f0638,  free space=1017k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libzstd-jni5039855196334196807.so+0x9489d]  COVER_strict_cmp8+0x2d

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.github.luben.zstd.Zstd.trainFromBufferDirect(Ljava/nio/ByteBuffer;[ILjava/nio/ByteBuffer;Z)J+0
j  com.github.luben.zstd.ZstdDictTrainer.trainSamplesDirect(Z)Ljava/nio/ByteBuffer;+22
j  com.github.luben.zstd.ZstdDictTrainer.trainSamples(Z)[B+2
J 3966 C2 org.apache.ignite.internal.binary.compress.ZstdImpl.handle([B)[B (468 bytes) @ 0x00007f5c7d2d2694 [0x00007f5c7d2d1740+0xf54]
J 3976 C2 ru.sbrf.gg.load.CompressBatchTask$$anonfun$processBatchEx$1.apply(Ljava/lang/Object;)Ljava/lang/Object; (9 bytes) @ 0x00007f5c7d77d3bc [0x00007f5c7d77cf40+0x47c]
J 2787 C2 scala.collection.IndexedSeqOptimized$class.foreach(Lscala/collection/IndexedSeqOptimized;Lscala/Function1;)V (36 bytes) @ 0x00007f5c7d9fd4b0 [0x00007f5c7d9fd400+0xb0]
J 3045 C1 ru.sbrf.gg.load.CompressBatchTask.processBatchEx()J (104 bytes) @ 0x00007f5c7db27abc [0x00007f5c7db271a0+0x91c]
J 3044 C1 ru.sbrf.gg.load.CompressBatchTask.call()J (366 bytes) @ 0x00007f5c7db29d04 [0x00007f5c7db29c40+0xc4]
J 3043 C1 ru.sbrf.gg.load.CompressBatchTask.call()Ljava/lang/Object; (8 bytes) @ 0x00007f5c7db24eac [0x00007f5c7db24e20+0x8c]
J 3092 C1 java.util.concurrent.FutureTask.run()V (126 bytes) @ 0x00007f5c7db58ebc [0x00007f5c7db58c60+0x25c]
j  java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+95
j  java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub

This is using:
<dependency>
    <groupId>com.github.luben</groupId>
    <artifactId>zstd-jni</artifactId>
    <version>1.3.5-3</version>
</dependency>

Hi,
It looks serious. Do you have a minimal reproduction for it? I have tried with up to 51MB total samples of different sizes (max samples count 32*1024) without hitting the bug.
There are some minor optimization that can be done in the JNI code but they will not resolve the problem.

I am now trying to build a reproducer. I suspect that maybe I am training more than one dictionary at the same time.

@alamar it should not be a problem using separate instances concurently. Using the same instance from multiple threads without synchronization may be a problem.

I guess it was a concurrency issue with non-thread-safe usage if the dictionary builder. Closing it for now. Please reopen if it still  persist.


Fixes #3192. Improve correctness / clarity of existing View.AutoSize functionality/unit tests

Fixes

Fixes #3192

Proposed Changes/Todos

[x] Rename/Move AutoSize related unit tests to a) make more clear, b) help diagnose issues by having all tests that test AutoSize = true in one place.
[x] Enforce that it makes no sense to set Width/Height if AutoSize = true. Update Unit tests to match.
[x] Modernize AutoSize related unit tests to remove dependency on Application and Label
[x] Create a new set of AutoSize = true unit tests that ensure full understanding of existing capabilities
[x] View with AutoSize = true and Label defaults to dims of 0,0 if Text is empty. Button defaults to 5, 1 (⟦► ◄⟧).
[x] Change TextFormatter.Lines_get to NOT cause a format. Callers should call Format explicitly. Property getters should not cause side effects. In this case, it causes all sorts of mayhem when debugging TextFormatter because the debugger display does Lines_get all the time.
[x] Make View.TextFormatter be init only.

Pull Request checklist:

[x] I've named my PR in the form of "Fixes #issue. Terse description."
[x] My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
[x] My code follows the Terminal.Gui library design guidelines
[x] I ran dotnet test before commit
[x] I have made corresponding changes to the API documentation (using /// style comments)
[x] My changes generate no new warnings
[x] I have checked my code and corrected any poor grammar or misspellings
[x] I conducted basic QA to assure all features are working

This puppy is ready for review.
However, it impacts so many files that I will wait until

#3207

Is merged before progressing.

Yay: #3181 has been merged into this branch.
Boo: I overwrote some of my changes in the merge and now have to go back and re-fix them.
But progress!

I hope you fix them easily. I'll based this PR on the implementation of the #2489. Right?

I hope you fix them easily. I'll based this PR on the implementation of the #2489. Right?

I'd wait until this is merged if I were you. While this branch has partial "code cleanup" it's not done and it's likely that the formatting and syntax style will change causing more merge hell.

@BDisp, @tznind, @dodexahedron this is now ready to merge!
I tried applying the R# code clean up settings to the entire project but R# screwed some files up. it seems to mess up anything with simple array initalizers. E.g.
    [Theory]
    [CombinatorialData]
    public void Constructor_WithByteRGBValues_AllValuesCorrect ([CombinatorialValues (0, 1, 254)] byte r, [CombinatorialValues (0, 1, 253)] byte g, [CombinatorialValues (0, 1, 252)] byte b) {
        var color = new Color (r, g, b);

        ReadOnlySpan<byte> bytes = [b, g, r, 255];
        int expectedRgba = BitConverter.ToInt32 (bytes);
        uint expectedArgb = BitConverter.ToUInt32 (bytes);

        Assert.Multiple (
            () => Assert.Equal (r, color.R),
            () => Assert.Equal (g, color.G),
            () => Assert.Equal (b, color.B),
            () => Assert.Equal (byte.MaxValue, color.A),
            () => Assert.Equal (expectedRgba, color.Rgba),
            () => Assert.Equal (expectedArgb, color.Argb)
        );
    }

Becomes
    [Theory]
    [CombinatorialData]
    public void Constructor_WithByteRGBValues_AllValuesCorrect (
        [CombinatorialValues (0, 1, 254)] byte r,
        [CombinatorialValues (0, 1, 253)] byte g,
        [CombinatorialValues (0, 1, 252)] byte b
    ) {
        var color = new Color (r, g, b);

        ReadOnlySpan<byte> bytes =  [b]
        [g]
        [r]

        255];
        var expectedRgba = BitConverter.ToInt32 (bytes);
        var expectedArgb = BitConverter.ToUInt32 (bytes);

        Assert.Multiple (() => Assert.Equal (r, color.R),
                         () => Assert.Equal (g, color.G),
                         () => Assert.Equal (b, color.B),
                         () => Assert.Equal (byte.MaxValue, color.A),
                         () => Assert.Equal (expectedRgba, color.Rgba),
                         () => Assert.Equal (expectedArgb, color.Argb));
    }

We need to diangose this before proceeding.

This is good.
    [Theory]
    [CombinatorialData]
    public void Constructor_WithByteRGBValues_AllValuesCorrect (
        [CombinatorialValues (0, 1, 254)] byte r,
        [CombinatorialValues (0, 1, 253)] byte g,
        [CombinatorialValues (0, 1, 252)] byte b
    ) {
        var color = new Color (r, g, b);

This is ugly.
        ReadOnlySpan<byte> bytes =  [b]
        [g]
        [r]

        255];

This is good.
        Assert.Multiple (() => Assert.Equal (r, color.R),
                         () => Assert.Equal (g, color.G),
                         () => Assert.Equal (b, color.B),
                         () => Assert.Equal (byte.MaxValue, color.A),
                         () => Assert.Equal (expectedRgba, color.Rgba),
                         () => Assert.Equal (expectedArgb, color.Argb));

I had an old version of reshaper installed. New version doesn't have this bug. reformatting entire project now.

Done.
Look about all the files and see if there's any formatting or style that strikes you as egregiously bad. For the most part i like it, but I'm sure I missed something.
There are probably new bugs in this branch too. We touched a TON of stuff.  The changes for this PR especially. But I did spend a ton of time on new/improved unit tests so...

Good hard work, congrats. It's possible to do R# code cleanup for the solution at once, without have to do one by one?

This is weird. On my other machine, after pulling this branch down and ensuring I have the latest version of R# installed, doing a code clean up on a file (e.g. ViewLayout.cs) is applying different formatting than what my other machine provided.
I'm clearly missing something in how R# config works. Frustrating!

Probably is some local configuration in one machine that isn't included on the file settings but only in the options itself.

@BDisp will you please pull this PR down and see if Ctrl-E, Ctrl-C causes files to change after you do so?
If it does, delete any *.DotSettings.user files and try again.

@BDisp will you please pull this PR down and see if Ctrl-E, Ctrl-C causes files to change after you do so?

It took about 13 minutes and I got 11 files changed after it finished.

If it does, delete any *.DotSettings.user files and try again.

After delete all the *.DotSettings.user files which was two, Terminal.Gui.sln.DotSettings.user and Terminal.Gui.csproj.DotSettings.user it took the same time and with the same files changed.

But the changes are only a few differences about format and I think they make sense. I'll send a PR to your branch with the changes for you to compare.

But the changes are only a few differences about format and I think they make sense. I'll send a PR to your branch with the changes for you to compare.

Done @tig on the https://github.com/tig/Terminal.Gui/pull/21.

I had an old version of reshaper installed. New version doesn't have this bug. reformatting entire project now.

Yep. That'll do it. The latest version includes some important functionality for language version 12 that isn't fully understood by earlier versions.
Rules may still need minor tweaking after this is all finished, but it's great this is almost over!

This is weird. On my other machine, after pulling this branch down and ensuring I have the latest version of R# installed, doing a code clean up on a file (e.g. ViewLayout.cs) is applying different formatting than what my other machine provided.
I'm clearly missing something in how R# config works. Frustrating!

Typically that comes down to local configuration that perhaps could have gotten applied if you ever used the context menus to change a behavior or severity or whatever.
The settings and the way they are layered is extremely flexible, but it's so flexible that it's easy to end up with settings on one machine that differ subtly from another.
I wish they'd put some sort of indicator in the settings UI to indicate if a given setting is overridden by another layer or overrides another layer. It'd make it a lot easier to track down little conflicts without having to wipe or replace local settings (or reconciled them manually, one-by-one, but that's insane).
I also wish there were an option to exclude the default layers - like a checkbox by each, the way it does for additional custom layers you add. The way inheritance of the settings works, you have to explicitly override something that is set in a previously-applied layer to get it back to normal, but the XML by default will not contain anything with an explicitly default value, if you do it in the UI. Therefore, a setting at one layer that sets something non-default, but a later layer wants to return back to a value equal to default won't override, if done in the UI. You can put the XML in the file manually, but it'll get removed the next time the UI is used to modify that layer. 😤

Also, something to note, guys:
If your VS settings specify respecting the .editorconfig, or (and especially) if your resharper settings do so, you're going to get rules that are a combination of the two, with potentially unintuitive results. That gets even worse if you also have any formatting settings in Visual Studio still enabled, while ReSharper is otherwise responsible for formatting.
I'd suggest that, once this is fully completed and merged, we maintain a higher vigilance for a while regarding formatting changes when making commits, and try to determine their root causes, so we can refine the rulesets to prevent that kind of thing.
Also, as a general note:
The refactorings that sort code I highly suggest you run independently of others, in a separate commit, going forward, as those tend to result in confusing diffs in many merge tools, and can present as bizarre and nonsensical merge conflicts when combined with other actual code changes in the same file.

@BDisp will you please pull this PR down and see if Ctrl-E, Ctrl-C causes files to change after you do so?

It took about 13 minutes and I got 11 files changed after it finished.

If it does, delete any *.DotSettings.user files and try again.

After delete all the *.DotSettings.user files which was two, Terminal.Gui.sln.DotSettings.user and Terminal.Gui.csproj.DotSettings.user it took the same time and with the same files changed.

You can run it at any level you like. You can run it on the solution, a project, a folder, a file or group of files, a namespace, a class, a function, or even just a specifically highlighted section of code. :)
I do the highlighted section bit a lot, because I know exactly which code will be affected and that nothing else will change anywhere else, keeping it nicely contained. Plus, it's useful if you're trying to avoid automatic re-formatting of something you explicitly wanted to be written with specific formatting, for readability or something.

@tig isn't this actually #3212's work?
I kept looking around for this comment chain after I got back to a computer (replies earlier today were from my phone) and wasn't able to find it until I went to my comment history.

Ooops. That review isn't done yet...

Note:
As I'm going through the files, since github only lets you have one open review on a PR at a time, there will be a bunch of comments that are out of scope for the PR. I'm just opportunistically writing down thoughts as I look over the code, since this one is basically forcing me to look at everything.
Some might be generic commentary, some might warrant future issues/work, or whatever. If it's clearly out of scope for this PR and I didn't explicitly say so, just assume it is. Actually actionable items for this review should be pretty clear, or at least I'll try to make them so.

@tig isn't this actually #3212's work?
I kept looking around for this comment chain after I got back to a computer (replies earlier today were from my phone) and wasn't able to find it until I went to my comment history.

@dodexahedron Because both myself and @BDisp touched so many files, the only way I could find to merge his PR into this was to apply formatting solution wide. I probably could have not done that but i did, and once i did there was no going back.
So, yes, this is #3121's work, but it got done here.
I am not confident I have the R# and .editiorconfig settings right (enough) to merge. I was hoping you'd look through this PR at just the code cleanup/formatting stuff and help me get it good enough that we can merge this (forgoing #3212).

I got over wanting to have opening braces on line above (in the spirt of "don't be weird").
Reformatting again now and will push again asap.

I think I have the issues with two different machines figured out. R# seems to get confused and sometimes saves settings to the machine wide config here: C:\Users\charlie\AppData\Roaming\JetBrains\Shared\vAny
Also, the various code cleanup configs seemed to be confusing each other (or me). I've now deleted the non-built-in ones we created and am moving forward with just those. It seems to have simplified things.
For the first time I was able to do a new git clone of the repo, checkout this branch and hit CTRL-E-CTRL-C on a file I knew was complex and "just right" (e.g. UICatalog.cs or ViewLayout.cs) and have it cause no changes.
Running a full cleanup now. On my lappy so it's gonna take a looong time...

I got over wanting to have opening braces on line above (in the spirt of "don't be weird").
Reformatting again now and will push again asap.

😅
All good. It does seem like one has to fight with things less and there are fewer corner cases for formatting (especially with new language constructs) if it's on its own line. 🤷♂

I think I have the issues with two different machines figured out. R# seems to get confused and sometimes saves settings to the machine wide config here: C:\Users\charlie\AppData\Roaming\JetBrains\Shared\vAny
Also, the various code cleanup configs seemed to be confusing each other (or me). I've now deleted the non-built-in ones we created and am moving forward with just those. It seems to have simplified things.
For the first time I was able to do a new git clone of the repo, checkout this branch and hit CTRL-E-CTRL-C on a file I knew was complex and "just right" (e.g. UICatalog.cs or ViewLayout.cs) and have it cause no changes.
Running a full cleanup now. On my lappy so it's gonna take a looong time...

Yep that's usually what does it.  If I'm working on a project with significantly different settings that are too much of a pain for me to fight with the formatting engine, I just copy the team settings over the machine settings from the start, usually. Plus that nukes any local settings I may have tweaked during other work that I had originally intended to be temporary but then just forgot to clear.

@dodexahedron before I merge, can you please check that I have things like var and null assignment correct (or at least not stupidly wrong)?

Ha sure thing. Won't be at a PC til later, though.

@tig I submitted a half-finished review, but the small handful of rule changes to address the in-scope issues I have found so far will go a long way toward making it all good.

And, just to be clear, any I didn't mention ReSharper for aren't necessarily in scope for this and are just notes.
I'll check this branch out and make rule changes to address and push those so you can pull them in and keep the reformat activity consolidated here.

Hmmm...
Well, I made the rules for null check pattern, but the code cleanup isn't actually applying them in all places.
I suspect it just backs off for safety, if the control flow statement is more than JUST the null check by itself, but that's a guess based on what I'm observing.
We'll probably have to address those manually, unless we can find a way to make it do it automatically in more places.

There ya go.
Sent you a PR on your branch for a small set of rules

If you run that on your machine for a file that got the order if fields and stuff wrong, does it look like it at least resulted in improving that situation?
I'm not very optimistic about it fixing many or maybe even any of the remaining null checks automatically.
I'm actually filing a bug/suggestion regarding that, because they seem like such simple and obvious cases for it to handle and I'm surprised it's not doing it.

Oh and note the profile to use is the "All Rules" profile, because the default profiles ignore code that is excluded by current preprocessor evaluations. This profile applies the same logic to them, as well, regardless of how they evaluate.

I've got some more tweaks queued up for the settings, but they're mostly for inspections and thus aren't directly related to this work, since they won't result in a change in code cleanup behavior. They're just for providing additional analyzer tool tips and refactoring actions that can be used or ignored when working on something.
As we make things better and better, we should probably consider turning the severity of the more valuable ones higher. Maybe after we declare v2 solidly beta quality or at whatever point we call a feature freeze?

Saw the push.
I'll go back over again in a few minutes.
The light at the end of the tunnel is getting closer!

NOW. ;-)

Nice.
It looks like it took care of a lot of the field re-ordering, with one exception I'll have to fiddle with to get it to behave properly.
The layout rules do specify putting backing fields by their properties, and that rule has a high priority, so I'm not entirely sure without poking it some more why it isn't doing that specific bit.
Otherwise, this is looking a lot better so far. :)

That one is so minor, though, that I'm kinda inclined to say, unless we can figure it out in short order, we can leave that for later. The diffs caused by that when code with that issue is touched are just single-line moves, and so are easy to eyeball.

I'm done with this. Merging!! :-)

For sake of completeness and consistency, I just sent you another PR for your branch with .editorconfig synced to dotsettings

We can do that in another PR.
I'm shutting down for the superbowl. Cheers!

Haha good plan all around.
Have fun!

And also, thanks for tackling this monster!
 Greatly appreciated. 😊
I'll make a new issue/PR for the editorconfig stuff and take a quick pass over the docs to be sure they match what we actually did, in the end.


Parse HTML instead of using regex

As many issues on Usemin show, parsing HTML with regex is prone to failure.
Would you accept PRs to switch Usemin to an HTML5 parser, or is there a reason that the project prefers regexes?

thanks for the info. Will look onto it.

@stephanebachelier What's your progress in this?

@arthurvr still working on it, will come back soon.

Just to let you know that I'm working on this as a top priority.

oh thats so great to hear thanks @stephanebachelier

To all the dev branch is a migration from regexps to an HTML Parser thanks to work from @marcelaraujo.
If anyone wants to try the dev branch and create an issue. I will review all the linked issues and add some tests cases to be sure.

@stephanebachelier Will the dev branch be merged soon? I'm using v3.1.1 and still having the exact same issue.

@lvarayut Not sure about the time. But I will migrate an existing customer project on the dev branch in the next two weeks so expect something to happen soon.


fix gtool's bug for reading contract

Codecov Report

Merging #44 into develop will increase coverage by 0.22%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop      #44      +/-   ##
===========================================
+ Coverage    38.12%   38.34%   +0.22%
===========================================
  Files          120      120
  Lines        10311    10311
===========================================
+ Hits          3931     3954      +23
+ Misses        5980     5957      -23
  Partials       400      400

Impacted Files
Coverage Δ

gemmill/modules/go-events/events.go
90% <0%> (-2%)
:arrow_down:

gemmill/blockchain/pool.go
68.79% <0%> (+9.39%)
:arrow_up:


Dependency issue in cloud storage API

Thanks for stopping by to let us know something could be better!
Please include as much information as possible:
Environment details

OS: Linux
Java version: 8
google-cloud-java version(s): 1.54 (and previous)

Steps to reproduce

untar the archive
Issue_Example.tar.gz

mvn install

see the output :
The compilation failed cause of many "Dependency convergence error"

Stacktrace
Issue_mvn_output.txt
Code snippet

4.0.0
com.total
Example
0.0.1-SNAPSHOT
<build>
	<plugins>
		<plugin>
			<artifactId>maven-compiler-plugin</artifactId>
			<version>3.7.0</version>
			<configuration>
				<source>1.8</source>
				<target>1.8</target>
			</configuration>
		</plugin>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-enforcer-plugin</artifactId>
			<version>3.0.0-M2</version>
			<executions>
				<execution>
					<id>enforce</id>
					<phase>compile</phase>
					<goals>
						<goal>enforce</goal>
					</goals>
					<configuration>
						<rules>
							<dependencyConvergence />
						</rules>
					</configuration>
				</execution>
			</executions>
		</plugin>
	</plugins>
</build>

<dependencies>
	<dependency>
		<groupId>com.google.cloud</groupId>
		<artifactId>google-cloud-storage</artifactId>
		<version>1.54.0</version>
	</dependency>
</dependencies>

External references such as API reference guides used

?

Any additional information below
Following these steps will guarantee the quickest resolution possible.
Thanks!

@elharo, FYI

Hello,
Thank you for your answer.
First, why do I need to use the google-cloud-bom ? because I just need the
storage library.
I'm working, in my company, on a huge java software with many library.
To avoid any issues, we have activated the plugin maven to check
convergence.
So today, I'm no able to passed the integration test because the library is
not ok regarding dependency convergence.
What is the solution is that case ?
Thank you for your help
Jonathan
Le mar. 4 déc. 2018 à 12:28, Jeff Ching<EMAIL_ADDRESS>a écrit :

First, you should use the import the google-cloud-bom into the
dependencies.
It looks like we still have a few dependencies that do need converging
that we can control within this repo:

api-common
proto-google-common-protos

We need to sync versions with gax for:

google-http-client
google-auth-library-credentials
google-auth-library-oauth2-http

I'm not sure if can resolve guava's dependency convergence.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/googleapis/google-cloud-java/issues/4175#issuecomment-444245994,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AlHhABwm9voAvHWy1zct_-5Gbi3pdPVMks5u1trTgaJpZM4ZBX-e
.

I'm going to see if I can exclude some of the troublesome dependencies.

@ZeJ0hn, There's internal debate about this issue.  The synopsis is that we generally recommend the use of </requireUpperBoundDeps>.  I'm happy to chat about this offline (see my GitHub profile for more details).

We decided that we can't have complete dependency convergence in this repo.  We suggest using </requireUpperBoundDeps> or that users manually exclude dependencies.

The following added to  eliminated dependency convergence issues for version 1.101.0:
      <dependency>         <groupId>com.google.api.grpc</groupId>         <artifactId>proto-google-common-protos</artifactId>         <version>1.17.0</version>         <exclusions>           <exclusion>             <groupId>com.google.protobuf</groupId>             <artifactId>protobuf-java</artifactId>           </exclusion>         </exclusions>       </dependency>       <dependency>         <groupId>com.google.api.grpc</groupId>         <artifactId>proto-google-iam-v1</artifactId>         <version>0.13.0</version>         <exclusions>           <exclusion>             <groupId>com.google.protobuf</groupId>             <artifactId>protobuf-java</artifactId>           </exclusion>           <exclusion>             <groupId>com.google.api.grpc</groupId>             <artifactId>proto-google-common-protos</artifactId>           </exclusion>         </exclusions>       </dependency>       <dependency>         <groupId>com.google.apis</groupId>         <artifactId>google-api-services-storage</artifactId>         <version>v1-rev20190910-1.30.3</version>         <exclusions>           <exclusion>             <groupId>com.google.api-client</groupId>             <artifactId>google-api-client</artifactId>           </exclusion>         </exclusions>       </dependency>       <dependency>         <groupId>com.google.api</groupId>         <artifactId>gax-httpjson</artifactId>         <version>0.66.1</version>         <exclusions>           <exclusion>             <groupId>com.google.http-client</groupId>             <artifactId>google-http-client</artifactId>           </exclusion>         </exclusions>       </dependency>


"My" button (stop) in non admin mode

To start thank you for this beautiful plugin.
I was already using "rpi-rts" but your plugin displays a real rolling shutter on the home application. 👍
Is it possible to have an opening percentage according to the time the shutter takes to open ? To configure in the config file of course.
Secondly, is it possible to have a "my" button to stop the shutter without activate the admin mode and lost the beautiful rolling shutter in the home app ?
Greetings,

Hi @Louison-B
Thank you for you kind comments, it's nice to know that others are finding it useful too.
I have just published 0.4.0 which was previously a Beta version that I had been testing for a while. One change in this version is that you can now set the amount of time it shows the blind as opening/closing in the config time to make it more realistic. And if you tap the blind while it is moving then instead of sending the opposite Up/Down signal, it rather presses the "my" button and stops the blind at current position. This therefore allows you to still just have the one accessory appear in HomeKit, but still make use of partial opening positions. Additionally there is a new parameter that was added that can entirely replace the Up signal with the My signal when fully opening although this is only really helpful if you never open the blind fully (as with Venetian Blinds).
In terms of being able to send an exact percentage I did think about this. This challenge is the blinds give no feedback about their current position, so you are just relying on the timings being exactly accurate. It feels like it would be quite fiddly to setup and probably a bit prone to error over time. That said, I wouldn't rule it out as an experimental option as some point and so I will leave it open as an enhancement request.
All the best
Mark

Hi Louison
Cool, let me know how it goes. And it sounds like something else is using the same port (8888) as pigpio. There was another issue raised related to ebusd taking the same port with a very similar error. Maybe try to switch the port to something else (pigpiod -p 8887) ?
Mark

I will try to change the port of pigpiod thank you again !


ud860 - L4 - JavaScript - Web Workers Quiz: Linked Repo Contains Reference Error in worker.js File

Updated by Susan Smith July 1, 2015.
This is in regard to this web worker repo:
https://github.com/udacity/web-workers-demo/tree/solution/scripts
Which is referenced in the BRO Web Workers Quiz Here:
https://www.udacity.com/course/viewer#!/c-ud860/l-4138168623/e-4184098558/m-4150829139
In worker.js on MASTER branch, the error catching code defines a ManipulatorException but then attempts to throw an "InverterException" - this causes a ReferenceError.
Code:
catch (e) {
function ManipulatorException(message) {
this.name = "ManipulationException";
this.message = message;
};
throw new InverterException('Image manipulation error');
postMessage(undefined);
}
The  worker-improved.js in the SOLUTION branch does not have this mismatch:
Code:
catch (e) {
function InverterException(message) {
this.name = "InverterException";
this.message = message;
};
throw new InverterException("Image manipulation error");
postMessage(undefined);
}
Should the error code in worker.js in the MASTER branch be updated to match the inverterException name?

Honestly, I'm not sure which one is right. What do you think @susansmith? (also, sorry it's taken me so long to get to this :( )

I just stumbled over this same piece of code. I would suggest:
try {
[...]
} catch (e) {
    function ManipulatorException(message) {
      this.name = "ManipulationException";
      this.message = message;
    };
    throw new ManipulatorException('Image manipulation error');
    postMessage(undefined);
  }

The exception thrown must exist, but not all exceptions possibly thrown here happen during an invert image manipulation, it could just as well be one of the other types (chroma, greyscale, vibrant).

Thanks Sonja. That looks about right. And my apologies Cameron for not
getting back to you sooner!
On Sat, Sep 12, 2015 at 2:15 AM, Sonja Krause-Harder <
<EMAIL_ADDRESS>wrote:

I just stumbled over this same piece of code. I would suggest:
try {
[...]
} catch (e) {
function ManipulatorException(message) {
this.name = "ManipulationException";
this.message = message;
};
throw new ManipulatorException('Image manipulation error');
postMessage(undefined);
}
The exception thrown must exist, but not all exceptions possibly thrown
here happen during an invert image manipulation, it could just as well be
one of the other types (chroma, greyscale, vibrant).
—
Reply to this email directly or view it on GitHub
https://github.com/udacity/web-workers-demo/issues/3#issuecomment-139727838
.

Thanks everyone! Finally took a look at this. In both master and solution the try-catch now shows:
function ManipulationException(message) {
  this.name = "ManipulationException";
  this.message = message;
};
throw new ManipulationException('Image manipulation error');
postMessage(undefined);


Add location to errors when parsing headers

Just moving https://github.com/elm-lang/elm-compiler/issues/853 to the relevant repo. Reproduce the error message with this to see that the file name is not reported:
module Foo (bar baz) where
bar = "bar"
baz = "baz"

Seems to be resolved in master!
-- SYNTAX PROBLEM ----------------------------------------------------- cats.elm

I ran into something unexpected when parsing your code!

1| module Foo (bar baz) where
                   ^
I am looking for one of the following things:

    ")"
    whitespace

There is probably a problem with the syntax of your imports. For example,
import syntax was changed a bit from 0.14 to 0.15:

    0.14: import Html (..)
    0.15: import Html exposing (..)

See <http://elm-lang.org/learn/Syntax.elm> for more info.


Enum to int conversion

In C++, static_cast can convert any enums to int and back. Such conversions are used in many APIs, so we need to implement such conversion for all imported enums. Using From trait and transmuting to c_int should be enough.

Fixed in develop branch.


Wait for the man himself to review this

Let Madu see the draft before applying the changes

16:22 - MaduRUDE: I approve


Encountering difficulties in reproducing the results of the paper.

I have run this code using the single-chain CG polymer dataset and encountered some issues.

It seems that the default hyperparameters in graphwm/conf/model/chain.yaml do not use PnR for the single-chain CG polymer dataset. I have found that if I want to use PnR for this dataset, I should add score_gn_hparams: {'latent_dim': 128, 'units': 128, 'layers': 2, 'mp_steps': 7}, sigma_begin, sigma_end, sigma_level, and anneal_power in graphwm/conf/model/chain.yaml, but what should I set these parameters to? Does PnR perform better than GNS in the single-chain CG polymer dataset?
I have run this code using the GNS model and the single-chain CG polymer dataset with the default hyperparameters in train.yaml and eval.yaml. I then got a .pt file with the keys: ['cg_u_pos', 'cg_weights', 'rollout_u_pos', 'rollout_prop', 'bonds', 'n_bond', 'position', 'rgs', 'target', 'target_rgs', 'particle_types', 'n_particle', 'keypoint', 'n_keypoint', 'cluster', 'cg_bonds', 'n_cg_bond', 'time_elapsed', 'model_params', 'eval_cfg']. 'rollout_prop' is what I need; it stores the rgs of each step. I saved this data in a .txt file. The true rgs is stored in a .h5 file in polymer_test_5M. I can calculate the MAE with the predicted results and true results, but I find it difficult to achieve the MAE result of 1.4 mentioned in the paper. I think I might have made a mistake somewhere; how should I calculate the MAE?

Any suggestions would be very helpful to me; thank you very much.

Hi,

As described in the paper, GNS was used for the single-chain CG polymer dataset. PnR would be too slow for the timestep setting.
Have you tried the pretrained checkpoint available in this repo? Note that the MAE of 1.4 is from running the simulation for 5M tau then compute the mean radius of gyration over these trajectories.

I'm sorry, but how do I use the pretrained checkpoint? When I try to use it to train the model, I encounter an error: FileNotFoundError: [Errno 2] No such file or directory: '/data/tml/code/xiangfu/mlcgmd_models/chain_gns_smalllr/epoch=1-step=48040.ckpt'. Should I modify a certain part of the code?


Display vote command

To make it easier for proposal creators to vote on their own proposal, once a submit has been confirmed we should display the command the user can use to vote for their own proposal. Depends on Issue #3

 proposal-creator: Display vote command


Projects plot date order

Date order is broken for Projects plot, check the screenshot

@rbobin Hi Roman, yep we have problems with the plot, we will disable it for now.
related to #19 #16


nag about bug affecting upcoming release uses older version number in reminder even if it is a new development cycle

See bug 1846962 comment 3:
This is a reminder regarding [comment #1](https://bugzilla.mozilla.org/show_bug.cgi?id=1846962#c1)!

The bug is marked as tracked for firefox116 (release). We have limited time to fix this, the soft freeze is in 13 days. However, the bug still isn't assigned.

Comment 1 is:
The bug is marked as tracked for firefox116 (release). However, the bug still isn't assigned.

:gcp, could you please find an assignee for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.

For more information, please visit [BugBot documentation](https://wiki.mozilla.org/BugBot#tracked_attention.py).

Firefox 116 got released last week (2023-08-01).
Either the bot should not nag anymore because the tracked version (116) got its major release, or - if tracking one version implies tracking it also for higher versions - the next upcoming release (117) should be used in the text.

The bot post reminders if the bug is tracked for the current esr, release, beta, or nightly:
[{'channel': 'esr',
  'status_field': 'cf_status_firefox_esr115',
  'tracking_field': 'cf_tracking_firefox_esr115',
  'version': '115'},
 {'channel': 'release',
  'status_field': 'cf_status_firefox116',
  'tracking_field': 'cf_tracking_firefox116',
  'version': '116'},
 {'channel': 'beta',
  'status_field': 'cf_status_firefox117',
  'tracking_field': 'cf_tracking_firefox117',
  'version': '117'},
 {'channel': 'nightly',
  'status_field': 'cf_status_firefox118',
  'tracking_field': 'cf_tracking_firefox118',
  'version': '118'}]

Wouldn't the reminder still be relevant since the bug could be fixed and uplifted to 116?

There is a dot release date mid cycle which can be interesting. The soft freeze date is irrelevant for this version branch.


Party Mode

Set-builder mode is working, custom scripts are in progress UI-wise but functionally working/proven. What's next is a new conceptual script-building function/UI for parties.
In party mode, you do not run a job and build X tracks. Instead, you start playing music (random, first-track-function driven, drag-and-drop driven, whatever) and each subsequent track is built out from there one at a time. However, you can do things like skip, retry (pick another track using the same params), increase tempo, play something completely different (find a point across the evocativeness "grid" entirely) or really anything anyone can script.
This means that it will be set-it-and-forget-it for when no one wants to manage it and easy for people to mix it up with little interruption when a vibe change is needed.
This means conceptually coming up with how such an API would look in the custom scripting realm (especially if we want to have the ability for one-offs versus long-running scripts making decisions and should these decisions stack or not, etc). Plus, the UI needs to be thought out, probably something that resembles a sampler pad.

Collaborative party mode also would be cool


Selecting a theme and CMS for the website

Hi, I had a look to CMS solutions for Jekyll-based Github-hosted websites. You have several good solutions including Netlify CMS, Forestry, Siteleaf or Cannon CMS. See the list here https://jekyllthemes.io/resources/jekyll-hosting-and-cms-solutions
I would incline to keep using Forestry.io. Here is why:

When looking for a way to rebuild the website into a fully responsive version, I found uBuild jekyll theme https://forestryio.github.io/ubuild-jekyll/.

uBuild works with the concept of layout as blocks. Each block is defined by an html file. When you configure the layout of a page, you just add the blocks in the order you want. And if you want to add or edit a block, you edit its html file and related css.

Then, you can add or edit the content of your pages through Forestry.io CMS or directly in the files. Each file is written in YAML and most of other Jekyll CMS support YAML.

So in summary, uBuild theme as the advantage of being fully responsive, very easy to modify and can be used through Forestry.io CMS right away or through other jekyll CMS subject to some configuration with YAML files.

The last argument is that we already have the layout converted to uBuild here http://dev.riskdatalibrary.org/ and modifying it would be quite easy for any web dev with basic experience in Jekyll.

So if ok, I will proceed with https://github.com/GFDRR/rdl-website/issues/103

Hi @pzwsk
My only concern with forestry is that they are free only for personal use. Given this a GFDRR project, it would incur a $29/month charge, at least (https://forestry.io/pricing/).
Do note that this plan level does not allow for subdomains (the next plan level does, but costs $749/month).
This is only an issue if we plan to move all sites across to Forestry (away from being hosted by GitHub Pages)
If this is acceptable, then I too would prefer we continue with the initial implementation.

Hi @ConnectedSystems
My understanding is that we can use the free plan even for GFDRR projects, see below:

In that case, please disregard my comments above.


Cleanup unnecessary code

This PR:

Removes unused code
Removes unnecessary assignments
Remove commented-out code

Part of #1279

@chingucoding Is there ready for review?


Adding runs impossible

The screen is always loading. After selecting the team, field, etc. and clicking the add run button, nothing happens. When clicking the add button, a request is sent, but that's it.

Are the map finished for run?
See checkbox "Finished for using in runs: " in line map editor :)

Ooops you are right :)
But there is still this error after loading in the Chrome JS console:

This can be closed if that is okay

This error message actually appears on every site

Make a new issue report of the missing tether.min.js file :)

I think there should pop up a message in the run overview that the selected map is not marked as done yet. Otherwise that is quiet confusing.


Audit needlessly stateful components

Make them stateless if they do no use internal state and move to createClass syntax if can't be made stateless.

Latest best practice recommendation is for all top level components to be stateful and all sub-components to be stateless.


ImportError: No module named 'graphene

Issue Description
tldr -
import graphene.relay
ImportError: No module named 'graphene
Reproduction Steps

Start King Phisher
Do something to trigger the crash

Environment Details
Host OS: Debian 9 x86_64 CLI
King Phisher Version: Latest
Error Details / Stack Trace
root@host:/opt/king-phisher# ls
CODE_OF_CONDUCT.md  king_phisher       Pipfile        server_config.yml
data            KingPhisher        Pipfile.lock    tests
docs            KingPhisherServer  README.md    tools
INSTALL.md        LICENSE           readthedocs.yml
root@host:/opt/king-phisher# ./KingPhisherServer config_file
Loading .env environment variables…
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/king-phisher/king_phisher/server/__main__.py", line 50, in <module>
    from king_phisher.server import build
  File "/opt/king-phisher/king_phisher/server/build.py", line 39, in <module>
    from king_phisher.server.server import KingPhisherRequestHandler, KingPhisherServer
  File "/opt/king-phisher/king_phisher/server/server.py", line 55, in <module>
    from king_phisher.server import server_rpc
  File "/opt/king-phisher/king_phisher/server/server_rpc.py", line 48, in <module>
    from king_phisher.server.graphql import schema
  File "/opt/king-phisher/king_phisher/server/graphql/schema.py", line 39, in <module>
    import king_phisher.server.graphql.types as gql_types
  File "/opt/king-phisher/king_phisher/server/graphql/types/__init__.py", line 35, in <module>
    from .database import *
  File "/opt/king-phisher/king_phisher/server/graphql/types/database.py", line 38, in <module>
    from . import misc as gql_misctypes
  File "/opt/king-phisher/king_phisher/server/graphql/types/misc.py", line 42, in <module>
    import graphene.relay
ImportError: No module named 'graphene'
root@host:/opt/king-phisher#

root@host:/opt/king-phisher# pip freeze | grep -e graph -e Django
cryptography==1.7.1
Django==2.2
graphene==2.1.3
graphene-django==2.2.0
graphql-core==2.1
graphql-relay==0.4.5
root@host:/opt/king-phisher#

Run # ./KingPhisherServer --env-install. This could take a while to run, up to 15 minutes if your internet connection is slow and it won't print any output IIRC. This should have been handled when you ran the installer but if you aborted that or something failed it could have skipped this step.
Your last command showing that graphene is installed isn't valid, King Phisher uses pipenv to install it's requirements within a virtual environment to ensure that the dependencies are predictable. Additionally on most systems, pip is for Python 2.7 and King Phisher is Python 3.4+ only at this point. To check correctly you'd need to run pipenv run pip freeze.

Ok. No longer having that issue but now I am seeing this:
root@host:/opt/king-phisher# ls -la
total 156
drwxr-xr-x 11 root king-phisher 4096 Apr 10 09:42 .
drwxr-xr-x 3 root root 4096 Apr 9 23:16 ..
-rw-r--r-- 1 root king-phisher 3225 Apr 9 23:16 CODE_OF_CONDUCT.md
drwxr-xr-x 7 root king-phisher 4096 Apr 9 23:16 data
drwxr-xr-x 3 root king-phisher 4096 Apr 9 23:16 docs
-rw-r--r-- 1 root king-phisher 29 Apr 9 23:16 .env
drwxr-xr-x 8 root king-phisher 4096 Apr 9 23:16 .git
drwxr-xr-x 3 root king-phisher 4096 Apr 9 23:16 .github
-rw-r--r-- 1 root king-phisher 788 Apr 9 23:16 .gitignore
drwxr-xr-x 3 root root 4096 Apr 10 09:42 $HOME
-rw-r--r-- 1 root king-phisher 1329 Apr 9 23:16 INSTALL.md
drwxr-xr-x 6 root king-phisher 4096 Apr 9 23:21 king_phisher
-rwxr-xr-x 1 root king-phisher 1889 Apr 9 23:16 KingPhisher
-rwxr-xr-x 1 root king-phisher 1895 Apr 9 23:16 KingPhisherServer
-rw-r--r-- 1 root king-phisher 1497 Apr 9 23:16 LICENSE
-rw-r--r-- 1 root king-phisher 1554 Apr 9 23:16 Pipfile
-rw-r--r-- 1 root root 57987 Apr 10 09:38 Pipfile.lock
-rw-r--r-- 1 root king-phisher 5789 Apr 9 23:16 README.md
-rw-r--r-- 1 root king-phisher 157 Apr 9 23:16 readthedocs.yml
-rw-r--r-- 1 root root 4756 Apr 9 23:40 server_config.yml
drwxr-xr-x 4 root king-phisher 4096 Apr 9 23:16 tests
drwxr-xr-x 4 root king-phisher 4096 Apr 9 23:16 tools
drwxr-xr-x 6 root king-phisher 4096 Apr 9 23:18 .venv
root@host:/opt/king-phisher# ./KingPhisherServer server_config.yml
Loading .env environment variables…
ERROR failed to bind server to address (socket error #98)
ERROR socket error #98 (Address already in use)
Traceback (most recent call last):
File "/opt/king-phisher/king_phisher/server/build.py", line 145, in server_from_config
server = KingPhisherServer(config, plugin_manager, handler_klass, addresses=addresses, ssl_certfile=ssl_certfile, ssl_keyfile=ssl_keyfile)
File "/opt/king-phisher/king_phisher/server/server.py", line 870, in init
super(KingPhisherServer, self).init(handler_klass, *args, **kwargs)
File "/opt/king-phisher/.venv/lib/python3.5/site-packages/advancedhttpserver.py", line 1791, in init
server = server_klass((address[0], address[1]), handler_klass, config=self.__config)
File "/opt/king-phisher/.venv/lib/python3.5/site-packages/advancedhttpserver.py", line 713, in init
super(ServerNonThreaded, self).init(*args, **kwargs)
File "/usr/lib/python3.5/socketserver.py", line 441, in init
self.server_activate()
File "/usr/lib/python3.5/socketserver.py", line 463, in server_activate
self.socket.listen(self.request_queue_size)
OSError: [Errno 98] Address already in use
CRITICAL server failed to build with error: socket error #98 (Address already in use)
root@host:/opt/king-phisher#

What's probably more important is the port. It looks like you have something else already running on the port (most likely 80). Do you either a second instance of King Phisher already running or another web server like Apache or Nginx?

Yes I had apache running but I ran 'service apache2 stop'.
Should I remove it completely? If so, how?

You don't need to uninstall it, just stop it and probably disable it so it doesn't automatically start the next time you reboot.

Ok. So I didn't get any error messages but it's not telling me that the daemon is running. Unable to connect to the server from the client box either.
Client error message is reading:
"Failed To Connect To The King Phisher RPC Service
Can not contact the RPC HTTP service, ensure that the King Phisher Server is currently running on port 80"
'''
root@host:/opt/king-phisher# ./KingPhisherServer server_config.yml
Loading .env environment variables…
ERROR    failed to bind server to address (socket error #98)
ERROR    socket error #98 (Address already in use)
Traceback (most recent call last):
File "/opt/king-phisher/king_phisher/server/build.py", line 145, in server_from_config
server = KingPhisherServer(config, plugin_manager, handler_klass, addresses=addresses, ssl_certfile=ssl_certfile, ssl_keyfile=ssl_keyfile)
File "/opt/king-phisher/king_phisher/server/server.py", line 870, in init
super(KingPhisherServer, self).init(handler_klass, *args, **kwargs)
File "/opt/king-phisher/.venv/lib/python3.5/site-packages/advancedhttpserver.py", line 1791, in init
server = server_klass((address[0], address[1]), handler_klass, config=self.__config)
File "/opt/king-phisher/.venv/lib/python3.5/site-packages/advancedhttpserver.py", line 713, in init
super(ServerNonThreaded, self).init(*args, **kwargs)
File "/usr/lib/python3.5/socketserver.py", line 441, in init
self.server_activate()
File "/usr/lib/python3.5/socketserver.py", line 463, in server_activate
self.socket.listen(self.request_queue_size)
OSError: [Errno 98] Address already in use
CRITICAL server failed to build with error: socket error #98 (Address already in use)
root@host:/opt/king-phisher# service apache2 stop
root@host:/opt/king-phisher# ./KingPhisherServer server_config.yml
Loading .env environment variables…
root@host:/opt/king-phisher#
'''

Well is the server running on port 80?

Sorry if this is wrong..  but is this what you were looking for?
root@host:/opt/king-phisher# netstat --listen --tcp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 <IP_ADDRESS>:http     <IP_ADDRESS>:*               LISTEN
tcp        0      0 <IP_ADDRESS>:ssh             <IP_ADDRESS>:*               LISTEN
tcp        0      0 localhost:postgresql    <IP_ADDRESS>:*               LISTEN
tcp        0      0 localhost:mysql         <IP_ADDRESS>:*               LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
tcp6       0      0 localhost:postgresql    [::]:*                  LISTEN
root@host:/opt/king-phisher# netstat --listen --tcp -n
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 <IP_ADDRESS>:80       <IP_ADDRESS>:*               LISTEN
tcp        0      0 <IP_ADDRESS>:22              <IP_ADDRESS>:*               LISTEN
tcp        0      0 <IP_ADDRESS>:5432          <IP_ADDRESS>:*               LISTEN
tcp        0      0 <IP_ADDRESS>:3306          <IP_ADDRESS>:*               LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
tcp6       0      0 ::1:5432                :::*                    LISTEN
root@host:/opt/king-phisher#

Oh yeah, that's probably your issue. If you changed <IP_ADDRESS> to your external IP address then the client won't be able to connect to the lookback interface when it SSHes in. I'd suggest changing that back to it's default value. If you can't bind to all interfaces, it'd be more complicated to setup. The easiest thing to do would be to set the interface back.

Awesome, I am able to connect to the server now from the client.
My last question/issue (I promise) is that I don't know what to enter in the "Web Server URL" field. I have a domain pointed to my server but I don't think this program recognizes that. I haven't created any email accounts or installed postfix etc. Could you just give me a quick list of what I would need to do? There was nothing that installed automatically to the web root "/var/www/" so I'm not sure what it's looking for.

Okay, so we have a wiki section on configuring the web root which should help you out. TLDR, it's your webroot unless you enabled vhosts, in which you need to make subdirectories which are your webroot.
The "Web Server URL" field is just the URL to the landing page in your webroot. Take a look at the public templates repository under Website Templates to find some content to put there. Keep in mind, if you try to navigate there yourself without having phished yourself first you'll most likely see the 404 page.

What if I already have a template setup on another server/domain? What would I input in to the Web Server URL field?
Would I just simply add the /kp.js to the index?

Well for the King Phisher server to collect the data the template needs to be hosted by it. If you don't care and just want to know if a user visited the link you could create a simple landing page that just redirected them to your other server.

Checking the target URL... success, done.
Skipped checking the SPF policy because the SMTP server address could not be detected.
Sending messages started at: Wednesday April 10, 2019 12:19:47
Message mode is: Email
Connecting to SMTP server... failed

Should I install postfix and create an email on the kingphisher server and then input that email in to the Source Email (SMTP) field?

Yes


Website collaboration API

~Temporarily blocked by #73, this PR includes the changes from that one.~
Pre-Flight checklist

[x] Testing

[x] Code is tested
[x] Changes have been manually tested

What are the relevant tickets?
Partially addresses #60
What's this PR do?

Adds an API for collaborator CRUD

How should this be manually tested?
Create a Website and some users with various permissions in a shell:
from websites.models import Website
from users.models import User
from django.contrib.auth.models import Group

for i in range(1,7):
     User.objects.update_or_create(username=f"fakeuser{i}"<EMAIL_ADDRESS>is_active=True)
owner = User.objects.get(username="fakeuser3")
website = Website.objects.create(name="9999_fake_course", title="Fake Course", owner=owner)

User.objects.get(username="fakeuser1").groups.add(website.admin_group)
User.objects.get(username="fakeuser2").groups.add(website.editor_group)
User.objects.get(username="fakeuser4").groups.add(Group.objects.get(name="global_admin"))
User.objects.get(username="fakeuser5").groups.add(Group.objects.get(name="global_author"))

If you log in as a superuser or admin for that website (fakuser1, fakeuser4, owner), you should be able to view the URL http://localhost:8043/api/websites/<website_name>/collaborators/.  Other users should get a 403.  The page should display a list of users who have permission to view/edit the website, and show the user's username, email, name, plus the group and role they are a member of ('owner' if they are the website owner).
From that api page you should be able to add a new collaborator by sending an email and a role, for example:
{
    "role": "admin",
    "email": "fakeuser1.mit.edu"
}

If you try adding a user that already has permission for that website, or use an email that doesn't exist for a user, or try to assign a non-existent group or group for another website, you should get a validation error.
Go to the detail URL for a specific collaborator:  http://localhost:8043/api/websites/<website_name>/collaborators/<user_username>/
From here, try POSTing a change from an admin_group to an editor_group or vice versa:
{
    "role": "editor"
}

As long as the user is not a global admin or website owner, it should work, otherwise you should get a permission denied error.  You should also get a validation error if you enter an invalid role name.
Click the DELETE button on one of these detail pages.  You should get a 403 if you try it on the site owner or a global admin.  Otherwise, the user should be removed from all permission groups associated with the website.  The user should not be deleted.

Codecov Report

Merging #72 (b5c4724) into master (f1485b0) will decrease coverage by 11.00%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master      #72       +/-   ##
===========================================
- Coverage   80.23%   69.23%   -11.01%
===========================================
  Files          48        8       -40
  Lines        1118      117     -1001
  Branches      127       19      -108
===========================================
- Hits          897       81      -816
+ Misses        204       36      -168
+ Partials       17        0       -17

Impacted Files
Coverage Δ

repl.py

websites/apps.py

websites/__init__.py

fixtures/common.py

main/s3_utils.py

news/views.py

news/urls.py

websites/conftest.py

main/utils.py

main/apps.py

... and 25 more

Continue to review full report at Codecov.

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

What should happen if you add a collaborator without any role? I'm seeing a KeyError in that case:
web_1     | [2021-02-19 20:20:40] ERROR 12 [django.request] log.py:224 - [810a490615db] - Internal Server Error: /api/websites/site-24/collaborators/
web_1     | Traceback (most recent call last):
web_1     |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
web_1     |     response = get_response(request)
web_1     |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response
web_1     |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
web_1     |   File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/django/views.py", line 52, in callback
web_1     |     return old_callback(*args, **kwargs)
web_1     |   File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/django/views.py", line 52, in callback
web_1     |     return old_callback(*args, **kwargs)
web_1     |   File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/django/views.py", line 52, in callback
web_1     |     return old_callback(*args, **kwargs)
web_1     |   File "/usr/local/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
web_1     |     return view_func(*args, **kwargs)
web_1     |   File "/usr/local/lib/python3.8/site-packages/rest_framework/viewsets.py", line 125, in view
web_1     |     return self.dispatch(request, *args, **kwargs)
web_1     |   File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
web_1     |     response = self.handle_exception(exc)
web_1     |   File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
web_1     |     self.raise_uncaught_exception(exc)
web_1     |   File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
web_1     |     raise exc
web_1     |   File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
web_1     |     response = handler(request, *args, **kwargs)
web_1     |   File "./websites/views.py", line 184, in create
web_1     |     group_name = f"{ROLE_GROUP_MAPPING[serializer.validated_data.get('role')]}{website.uuid.hex}"
web_1     | KeyError: None

I'm seeing a different error when POST-ing to the collaborators API because the Group is missing. Do you know where the Groups are meant to be created?

Groups should be created automatically on website creation via signals.  You might need to create groups for any old websites predating the signal with manage.py backpopulate_groups

@mbertrand Do you know where we assign the PERMISSION_COLLABORATE permission?

PERMISSION_COLLABORATE and other administrator permissions are assigned to the admin_group for the website in this function.


TryTakeAsync and TryAddAsync

Looking at the code, when supplying a cancellation token to TakeAsync and it is cancelled and the collection is empty it will throw an exception. Wouldn't it be better to have a TryTakeAsync/TryAddAsync for this purpose to avoid the exception?

Closing this for now as out of scope. If there is a reasonable API design (not using "Try"), then I'll reconsider this.


Add a way to backdate test results

Describe your feature request in this format: As a (persona)_ I want to _(action or feature) so that _(expected outcome)
A clear and concise description of what the problem, user persona, and expected outcome.
Describe the solution you'd like and the specific acceptance criteria to be completed
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Similar to how to add PCR test results #137

Duplicate of #157


Unfinished hook action(s) on exit: (vite-plugin-sveltekit-compile) writeBundle while using npm and introducing classes in project

Describe the bug
This happened while debugging a commit that introduced JS classes to the project. The error only happened in build/production (vite build) and worked completely fine in local dev (vite dev). Some other issues like #3563 had the same-ish outputs and conditions but didn't help very much.
I have tried upgrading versions but the error remains unchanged.
Reproduction URL
https://github.com/developer-ramen/just-games
Reproduction
I couldn't figure out how to reproduce this issue on a barebones SvelteKit project.
Just cloning and then running npm i and npm run build should be fine.
Logs
transforming (12) node_modules/esm-env/prod-browser.jsUnexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(commonjs--resolver) resolveId<EMAIL_ADDRESS>undefined
(vite:build-import-analysis) transform<EMAIL_ADDRESS>(vite:build-import-analysis) transform "/home/ramendev/projects/just-games/src/routes/+error.svelte"
(commonjs--resolver) resolveId "svelte/internal" "/home/ramendev/projects/just-games/src/routes/+error.svelte"
(vite:optimized-deps-build) load "/home/ramendev/projects/just-games/node_modules/.vite/deps_build-e2ef5bc8/svelte_internal.js"
(vite:build-import-analysis) transform "/home/ramendev/projects/just-games/.svelte-kit/generated/root.svelte"
(commonjs--resolver) resolveId "svelte/internal" "/home/ramendev/projects/just-games/.svelte-kit/generated/root.svelte"
(vite:build-import-analysis) transform "/home/ramendev/projects/just-games/src/routes/+page.svelte"
(commonjs--resolver) resolveId "svelte/internal" "/home/ramendev/projects/just-games/src/routes/+page.svelte"
(vite:build-import-analysis) transform "/home/ramendev/projects/just-games/src/routes/about/+page.svelte"
(commonjs--resolver) resolveId "svelte/internal" "/home/ramendev/projects/just-games/src/routes/about/+page.svelte"
(vite:build-import-analysis) transform "/home/ramendev/projects/just-games/src/routes/+layout.svelte"
(commonjs--resolver) resolveId "svelte/internal" "/home/ramendev/projects/just-games/src/routes/+layout.svelte"
(vite:build-import-analysis) transform "/home/ramendev/projects/just-games/src/routes/login/+page.svelte"
(commonjs--resolver) resolveId "svelte/internal" "/home/ramendev/projects/just-games/src/routes/login/+page.svelte"
(vite:build-import-analysis) transform "/home/ramendev/projects/just-games/src/routes/games/+page.svelte"
(commonjs--resolver) resolveId "svelte/internal" "/home/ramendev/projects/just-games/src/routes/games/+page.svelte"
(vite:build-import-analysis) transform "/home/ramendev/projects/just-games/src/routes/resources/+page.svelte"
(commonjs--resolver) resolveId "svelte/internal" "/home/ramendev/projects/just-games/src/routes/resources/+page.svelte"
(vite:build-import-analysis) transform "/home/ramendev/projects/just-games/src/routes/signup/+page.svelte"
(commonjs--resolver) resolveId "svelte/internal" "/home/ramendev/projects/just-games/src/routes/signup/+page.svelte"
(commonjs--resolver) resolveId "./client.js"<EMAIL_ADDRESS>(vite:build-import-analysis) transform<EMAIL_ADDRESS>(commonjs--resolver) resolveId "svelte"<EMAIL_ADDRESS>(vite:optimized-deps-build) load "/home/ramendev/projects/just-games/node_modules/.vite/deps_build-e2ef5bc8/svelte.js"
Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(vite-plugin-sveltekit-compile) writeBundle
✓ built in 2.58s
error during build:
Error: Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(vite-plugin-sveltekit-compile) writeBundle
    at process.handleBeforeExit (file:///home/ramendev/projects/just-games/node_modules/rollup/dist/es/shared/node-entry.js:25777:28)
    at Object.onceWrapper (node:events:629:26)
    at process.emit (node:events:514:28)

System Info
System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
    Memory: 7.06 GB / 7.67 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.17.0 - /usr/local/bin/node
    npm: 9.6.7 - /usr/local/bin/npm
  npmPackages:
    @sveltejs/adapter-auto: ^2.0.0 => 2.1.0
    @sveltejs/adapter-netlify: ^2.0.8 => 2.0.8
    @sveltejs/kit: ^1.20.4 => 1.22.4
    svelte: ^4.0.5 => 4.1.2
    vite: ^4.4.2 => 4.4.9

did you want to file this in the sveltekit repo? either way a minimal reproduction and complete instructions is required.

Sorry for bothering you guys. The issue has been fixed by removing the optimizeDeps configuration option.


isCommonInterval(x) must ignore declaration part

Section 11.7.2 says that the boolean operation acts on decorated intervals by discarding the decoration and applying the corresponding bare interval
operation.
So I expect that
is_common([-5.7,8.3]_dac) = true.
Library returns
is_common([-5.7,8.3]_dac) = false.

That is true.
But it is probably a misleading definition or naming of the function if
is_common returns true for an interval with a decoration != com

The name of the function in the draft is "isCommonInterval(x)".
It might be intuitive if read it as "interval part is a common interval".
Will be this reference implementation more clear, if you names of back-end functions match the
names in the draft ? For example,
representation interval_part(representation_dec const& x);
instead of
representation constructor(representation_dec const& x);

Good point.
I think I will refactor my backend

Dipl.-Inform. Marco Nehmeier
Chair of Software Engineering
Department of Computer Science
University of Würzburg
Am Hubland, Informatikgebäude, Room A111
97074 Würzburg, Germany
Phone: +49 931 31 88684, Fax +49 931 31 86603
<EMAIL_ADDRESS>http://go.uni-wuerzburg.de/nehmeier
Am 06.02.2015 um 13:24 schrieb nadezhin:

The name of the function in the draft is "isCommonInterval(x)".
It might be intuitive if read it as "interval part is a common interval".
Will be this reference implementation more clear, if you names of
back-end functions match the
names in the draft ? For example,
representation interval_part(representation_dec const& x);
instead of
representation constructor(representation_dec const& x);
—
Reply to this email directly or view it on GitHub
https://github.com/nehmeier/libieeep1788/issues/10#issuecomment-73229072.


Upgrade to Framework7, v3

Since Framework7 version 3 is out and recommended for new projects, can this template be updated to use version 3?  It looks like it's mostly a matter of restructuring the directories and getting rid of /dist, and of course updating the dependencies to the latest libraries.

It is done.


Improve Toggle / Status update error handling

Should probably make the update_state and set_power function return a Result.  Currently is very rare to fail, and its mostly harmless (the next UI update will probably show the real state).
Also adding a with_context({psu_name}) would be nice
TODO: Should we retry the update? Push some information back up to the user?

Added here 54dbbafeed4962eb243fae14296d78a053555058
Results or options for all routes. Gives a basic error message for each.
Feel like the ResponseBuilder stuff could be shorter.

Added here 54dbbafeed4962eb243fae14296d78a053555058
Results or options for all routes. Gives a basic error message for each.
Feel like the ResponseBuilder stuff could be shorter.


FileNotFound error

Hi, I downloaded captchas and converted them to png, then use captcha22 client label --input='captchasFolder' as in the readme.
I found out that I had to rename the data.zip into admin_somename_someid.zip and then launch the server otherwise I have issue #4.
But it still crashes, first there is this message:
INFO:Captcha22 Engine:Generate aocr
Illegal instruction
Illegal instruction
and a bit further (I think after I has finished training):
INFO:Captcha22 Engine:Testing training level
Traceback (most recent call last):
File "/home/owein/.local/bin/captcha22", line 8, in
sys.exit(main())
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/main.py", line 278, in main
args.func(args)
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/lib/core/server.py", line 22, in server
server.main()
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/lib/server/captcha22.py", line 519, in main
self.run_server()
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/lib/server/captcha22.py", line 495, in run_server
self.continue_training()
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/lib/server/captcha22.py", line 437, in continue_training
model.test_training_level()
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/lib/server/captcha22.py", line 130, in test_training_level
f = open(self.path + "aocr.log")
FileNotFoundError: [Errno 2] No such file or directory: './Busy/admin/name/1/aocr.log'
I tried to touch the missing log file but then:
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/lib/server/captcha22.py", line 138, in test_training_level
step = ast.literal_eval(values[1].split('Step ')[1].split(':')[0])
IndexError: list index out of range
Is it possible to use captcha22 from then without starting the engine but only the api server to ignore this error ?

Hi there,
This message tells me that there is something wrong with your AOCR engine:
INFO:Captcha22 Engine:Generate aocr
Illegal instruction
Illegal instruction

AOCR generates that log file during training, which is then reviewed to determine the accuracy of the model. If the training never happened, that file would not be generated. So it won't be possible just to touch an empty file there.
Furthermore, the API is only a wrapper for the engine, if your training engine is not working, the API would not really be of any use.
You will need to figure out why AOCR is failing. The best approach would be to execute it directly.
In the directory where the captcha material is stored (in your case this should be: ./Busy/admin/name/1/), can you please execute the following command:
aocr train --max-height <captcha height> --max-width <captcha width> labels/training.tfrecords
This will start a manual training process that you can control. Please post the output of that command here so I can better understand the training issue.
If you get a core dump or seg fault, you might be facing the same issue as I did on one of my rigs where aocr fails to limit the memory usage of the GPU. We should be able to fix that, but the Illegal Instruction is haven't seen before, hence I'm thinking it might not be the same issue.

I did so and it bails with illegal instruction, using strace:
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2603\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=39912, ...}) = 0
mmap(NULL, 44000, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f26b4e59000
mprotect(0x7f26b4e5c000, 24576, PROT_NONE) = 0
mmap(0x7f26b4e5c000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f26b4e5c000
mmap(0x7f26b4e60000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f26b4e60000
mmap(0x7f26b4e62000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7f26b4e62000
close(3)                                = 0
mprotect(0x7f26b4e62000, 4096, PROT_READ) = 0
mprotect(0x7f26b6dfb000, 618496, PROT_READ) = 0
brk(0x11c0000)                          = 0x11c0000
brk(0x1220000)                          = 0x1220000
mprotect(0x7f26e136a000, 5808128, PROT_READ) = 0
--- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPN, si_addr=0x7f26c69a5cd0} ---
+++ killed by SIGILL +++
illegal instruction

Hi there,
That looks like a tensorflow issue, not an AOCR issue. What version of tensorflow are you currently using? AOCR currently only supports tensorflow up to version 2.

Ok I remember now that when installing tensorflow from pip I couln't find version < 2 or just don't now how to specify the version. I will report after changing that

Hi there,
With tensorflow, you have two options. You can either use tensorflow-cpu, which then runs tensorflow on your cpu. However this is fairly slow and training times will roughly be about 40 minutes per model.
Another option is to install tensorflow-gpu, which allows tensorflow to execute on your gpu. However, this process is a bit more involved for setup, since you will probably have to build the correct tensorflow version for your system from scratch.
My suggestion would be to start with the CPU version just to test, then move to the GPU version once you get more comfortable with it.

Ok, thanks.
I think tensorflow < 2 was removed from python3's packages, need to build it anyway,


crash running map_reduce_url.py

@JosepSampe I am getting a crash on my Macbook running map_reduce_url.py in a virtual environment in localhost mode. Snippet of Crash Log is below.  Have others seen a similar issue?
Process:               Python [30005]
Path:                  /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python
Identifier:            Python
Version:               3.8.2 (3.8.2)
Build Info:            python3-72000000000000~117
Code Type:             X86-64 (Native)
Parent Process:        Python [29998]
Responsible:           Terminal [23712]
User ID:               501

Date/Time:             2021-01-14 19:15:48.561 -0500
OS Version:            macOS 11.1 (20C69)
Report Version:        12
Bridge OS Version:     3.0 (14Y908)
Anonymous UUID:        C744B702-90CB-4171-C2CB-31B57C89A643

Sleep/Wake UUID:       DD8FDA6A-40CC-4002-9774-9005447BD730

Time Awake Since Boot: 170000 seconds
Time Since Wake:       170000 seconds

System Integrity Protection: enabled

Crashed Thread:        1

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace OBJC, Code 0x1

Application Specific Information:
objc[30005]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
+[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
crashed on child side of fork pre-exec

Thanks for the information @davetropeano.
Just curious, If you run in the terminal: export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES before executing the python script, do you still get the same issue?

Thanks for the information @davetropeano.
Just curious, If you run in the terminal: export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES before executing the python script, do you still get the same issue?

That did it! The export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES worked

That did it! The export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES worked

Great! This happens because in MAC OS > 10.13 they added some restrictions in the multiprocessing library (fork method).
I will investigate how to avoid having to export this variable.
@davetropeano Thanks for the feedback

Great! This happens because in MAC OS > 10.13 they added some restrictions in the multiprocessing library (fork method).
I will investigate how to avoid having to export this variable.
@davetropeano Thanks for the feedback


Pendulum 3.0.0 breaks package

Hey there, first of all thank you so much for an amazing package. I've spent so long looking for something that handles recurring events well.
When installing via pip install iCal-library v3.0.0 of Pendulum gets installed. When attempting to use the package the following error is thrown:
ImportError: cannot import name 'Period' from 'pendulum' (/Users/dsalib/Developer/oasis/venv/lib/python3.9/site-packages/pendulum/__init__.py)

I resolved this by pinning to v2.1.1 of Pendulum. You may want to do the same, or upgrade to support Pendulum v3.
Cheers!

 Thanks for the compliments and I am happy to hear I helped you out!
I will draft a new release with a pendulum<3.0.0 restriction for now, and once I have the time I will upgrade it to pendulum 3.0.0.
Cheers!

I created a new release; 0.2.3. This should correctly pin the dependencies :).
I also proceeded to check what is needed to support Pendulum 3.0.0. Unfortunately, they dropped some functionality which allowed us to create custom timezones. This functionality is available in the CPython test suite, but simply copy-pasting doesn't feel write. Therefore I opened the following topic; https://discuss.python.org/t/making-custom-timezones-possible-using-the-standard-library/45008.
Let's see what that brings.

This looks like a really useful package. I desperately want support for rrule
Unfortunately, now it seems like there is a need for pendulum version 3.0.0 since the older version depends on distutils that has been deprecated since python 3.10, so I am unable to install it. I am however able to install pendulum 3.0.0 separately
See https://stackoverflow.com/questions/77247893/modulenotfounderror-no-module-named-distutils-in-python-3-12 for reference


Calling tabris.ui.get('textColor') generates a warning

In version 1.8.0, calling tabris.ui.get('textColor') works but generates a warning which states:

Could not get property "foreground" (reason: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference)

This can be verified by console.log(tabris.ui.get('textColor'));

The problems originates from the fact the colors has never been set. We will return the theme colors in that scenario. Same goes for the background colors property.

We have fixed the issue for the 1.9 release.


Kong 1.0.0rc3 target list endpoint returns offset as a number

Summary
The request GET /upstreams/foo/targets?size=1 returns offset as an integer and not string, as is the case with other endpoints.
Steps To Reproduce

Start Kong 1.0.0rc3, I'm using the docker image
http :8001/upstreams name=foo
http :8001/upstreams/foo/targets target=<IP_ADDRESS>
http :8001/upstreams/foo/targets target=<IP_ADDRESS>
http :8001/upstreams/foo/targets?size=1

http ":8001/upstreams/foo/targets?size=1"
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 261
Content-Type: application/json; charset=utf-8
Date: Mon, 03 Dec 2018 00:24:01 GMT
Server: kong/1.0.0rc3

{
    "data": [
        {
            "created_at":<PHONE_NUMBER>.211,
            "id": "55f94788-930f-45f6-8f43-da6eb033f479",
            "target": "<IP_ADDRESS>:8000",
            "upstream": {
                "id": "bab45234-1421-4684-acf2-90000dd3e982"
            },
            "weight": 100
        }
    ],
    "next": "/upstreams/bab45234-1421-4684-acf2-90000dd3e982/targets?offset=1",
    "offset": 1
}

offset should be a string and not an integer.
Another oddity with the endpoint is that the response contains data as {}  and not [] when there are no targets.
Steps to reproduce:

http :8001/upstreams name=bar
http :8001/upstreams/bar/targets

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 24
Content-Type: application/json; charset=utf-8
Date: Mon, 03 Dec 2018 00:31:00 GMT
Server: kong/1.0.0rc3

{
    "data": {},
    "next": null
}

This is fixed with #4058 and #4044 merged in and will be available in 1.0.0rc4.


docs should include reference to GPLVM methods

Hi @alexisboukouvalas ,
You noted that the docs don't include a reference to the GPLVM yet, even though there is a notebook.
The way to add the notebook to the docs is to modify doc/source/index.rst. It will be obvious how to add the notebook when you open the file :)
You could also modify doc/source/intro.rst, thich contains some description of the project, and what's included. Suggest you update this also.
To build the docs, install the dependencies
pip install sphinx nbsphinx numpydoc

Then from the doc directory, type make html and the open doc/build/index.html
Once the edits are pushed to master, they will appear automatically within a few minutes on readthedocs.org. If you'd like access to GPflow on readthedocs.org, which will let you automatically build docs on branches, make an account there and I will give you access.
James.

I think this is a bug as intro.rst points to the GPLVM notebook.


fix/solana injected connectors not detected

Description
Wallet Standard's on listener is not getting triggered when MM is disabled but other extensions like Trust or Phantom is enabled. This causing an issue that the none of the injected wallets are getting visible in connector list if MM is not installed or disabled.
This PR introduces a slight changes to the watchStandard method to make sure it's passing the available options to it's callback parameter.
Also adding a tests that checks the MM option in the injected connectors list.
Type of change

[ ] Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues
For Linear issues: Closes APKT-845
For GH issues: closes #...
Showcase (Optional)
If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.
Checklist

[x] Code in this PR is covered by automated tests (Unit tests, E2E tests)
[x] My changes generate no new warnings
[x] I have reviewed my own code
[x] I have filled out all required sections

@glitch-txs I'd like to get your thoughts on this. I'm still not quite clear if it's an issue on the Wallet Standard. I'll double check their source code and might open an issue on their repo to ask to WS team.


Need support for Sign Widget

so basically we need a sign widget, like it will be a blank screen and user can draw signature using his finger, also there should be a option to access this sign outside the sign widget, like if user draws the sign and clicks on the save button then we want to save sign in local storage and then we should be able to access it to display it on screen after closing the bottom sheet.
here is a sample of how it will look like

we already have a Signature widget but it is incomplete and therefore not exposed in the schema. See EnsembleSignature.
We need to get the latest one in pubspec.
probably make the controller extend EnsembleBoxController?
add the ability to get the signature bytes in a way that could be used to send to the server
ability to clear the signature
styles

ticket: https://github.com/EnsembleUI/ensemble/pull/1668
Example EDL of usecase defined in ticket:
    Column:
      styles:
        padding: 24
        gap: 8
      children:
        - Signature:
            styles:
              penColor: green
              value: ${ensemble.storage.signature}
              penStrokeWidth: 10
              disabled: true
              borderColor: red
              borderWidth: 5
        - Button:
            label: Enter sign
            onTap:
              showBottomSheet:
                body:
                  Column:
                    styles:
                      height: 500
                      padding: 20
                    children:
                      - Signature:
                          id: hello
                          styles:
                            penColor: green
                            penStrokeWidth: 10
                            height: 300
                            disabled: false
                            strokeCap: round
                            borderColor: red
                            borderWidth: 5
                            borderRadius: 20
                      - Row:
                          styles:
                            mainAxis: spaceBetween
                            padding: 20 10
                          children:
                            - Button:
                                label: Clear
                                onTap: |
                                  hello.clear();
                            - Button:
                                label: Save
                                onTap: |
                                  ensemble.storage.signature = hello.value;

@TheNoumanDev were you able to solve the async/await issue?

@kmahmood74 Yes, I did it in a way

Used private variables like Uint8List? _cachedSignatureBytes; and then made getSignatureBytes this as a getter instead of method and returned this variable _cachedSignatureBytes
And updated it inside signatureController when user stops Drawing using then operator like

onDrawEnd: () {
            signatureController.toPngBytes().then((bytes) {
            _cachedSignatureBytes = bytes;
          });
       },


allow optional juicecrowd image upload

allow optional juicecrowd image upload
messages

Current dependencies on/for this PR:

main

PR #4134   👈

This stack of pull requests is managed by Graphite.


See more elevated button

turned See More button into an elevated button to make it easier to see that it can be clicked

Agree with the change - textbutton was not as apparent
This does bring up the fact however that the table view may not be as intuitive? Feels like clicking See More would expand the list rather than open a new window so we may want to change the wording on it? Can keep See More for now and maybe change this later on - not super important

I agree, we could maybe change the see more to "further info"

Shouldn't say button links to blast, changed wording to "Further Info"


using the -tv argument does not work from WSL

Hi,
I've been trying to use the soft from WSL, the mask creation with -mk argument seems fine, but everytime I try to remove background with the -tv argument, the output file weighs 0kB.
I don't have error in the console, or anything like that, how do you think I can fix this?

Not sure what WSL is? Windows? Also, what version of FFMPEG do you have, this needs 4.4+

Yes, it's Windows Subsystem for Linux.
I did in fact not have the 4.4 version of ffmpeg (forgot I could add a PPA myself, it's been a while since I used GNU/Linux), but I do now have ffmpeg-4.4 and the problem stays the same.

I think it has to do something with the temporary files created in windows.  Seems the temporary directory does this in ubuntu vs windows
On Windows, the directories C:\TEMP, C:\TMP, \TEMP, and \TMP, in that order.
On all other platforms, the directories /tmp, /var/tmp, and /usr/tmp, in that order.

So it might be something with where I'm saving the directory that works fine on ubuntu but windows is changing location

also, did you install the python3-x-dev (x being what ever version you are using)?

Hello,
Yes I have the ffmpeg4.4, python3.9-dev packages, but I don't have a C:\TMP or TEMP folder, but the console outputs "Output #0, mp4, to '/tmp/tmpdexkumo3/matte.mp4':"
I tried copying the file in a folder I have access to, and the file keeps a size of 44bytes.
How can I investigate some more ?

the problem does not lie in the file i'm trying to remove the background from, because it works if I use your website by the way.

try apt-get install -y build-essential

@edouard-mangel I think I found this, if you can edit it locally and try? Seem it is a issue with temp file and windows, https://stackoverflow.com/a/8577226/4180276

Let me know if this fixes it
pip install git+https://github.com/nadermx/backgroundremover.git@09c142c8ebcaee035dbd867248957bfbc87e8e3f


Why don't you use ProtocolLib

i think it is better to use ProtocolLib instead of doing that awful reflection

Because not everyone want to have ProtocolLib running on their server. Not to mention sometimes it completely crashes unrelated plugins.