text:
Unable to find WPF types even after Add-Type

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce
I am trying to write a simple WPF GUI in powershell. It seems that powershell is unable to find wpf types even when I put Add-Type -AssemblyName PresentationFramework, PresentationCore on the first line of the script. It only works if I first type that line inside the terminal.
What's more, it seems like the line is not even executed, because I ran it inside the vscode with powershell extension, and the break point on the Add-Type line is not hit.
Create a test.ps1,
Add-Type -AssemblyName PresentationFramework, PresentationCore

class Window
{
    [System.Windows.Window]$window
    [System.Windows.Controls.Button]$button
    [int]$count = 0

    Window()
    {
        [xml]$xaml = @"
        <Window
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            x:Name="Window"
            Title="C#Shell!">
            <Grid x:Name="Grid">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="100"/>
                </Grid.RowDefinitions>

                <ListView x:Name="List" />
                <Button x:Name="AddButton" Content="Add" Grid.Row="1"/>
            </Grid>
        </Window>
"@
        $reader = [System.Xml.XmlNodeReader]::new($xaml)
        $this.window = [System.Windows.Markup.XamlReader]::Load($reader)
        $this.button = $this.window.FindName("AddButton")
        $this.button.Add_Click({
            param($sender, $arg)
            [Window]$parentWindow = Get-Variable this -Scope 1 -ValueOnly -EA 0
            # How do I access this.window??
            $parentWindow.window.FindName("List").Items.Add("Item" + ($parentWindow.count++).ToString())
        })
        $this.window.ShowDialog()
    }
}

$window = [Window]::new()

Run it inside terminal
Expected behavior
Run successfully

Actual behavior
PS C:\Users\Test\Desktop\powershellTest> .\test.ps1
ParserError: C:\Users\Test\Desktop\powershellTest\test.ps1:5
Line |
   5 |      [System.Windows.Window]$window
     |       ~~~~~~~~~~~~~~~~~~~~~
     | Unable to find type [System.Windows.Window].

### Error details

_No response_

### Environment data

```powershell
Name                           Value
----                           -----
PSVersion                      7.4.5
PSEdition                      Core
GitCommitId                    7.4.5
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

### Visuals

_No response_

I suggest it is because the parsing of the class happens before the script is actually executed.
If you remove the Add-Type, but run it in the powershell sesssion before running your script then it works.
So, literally, the reason Add-Type is not executed is because the parsing of the script file fails before it gets to executing any statements.
A PowerShell script is not executed line by line, the entire script is loaded and parsed prior to execution.
So you could try splitting your program into two scripts, one which loads the dependant modules and the second which contains your gui app.
Alternatively remove replace the types System.Windows.Window and System.Windows.Controls.Button with Object, and use reflection to invoke the System.Windows.Markup.XamlReader.Load method.

This problem has come up several times before; for a summary of the state of affairs, see:

https://github.com/PowerShell/PowerShell/issues/21140#issuecomment-1910416737
Also: #18482

authors: HO-COOH mklement0 rhubarb-geek-nz


text:
SSH based remoting broken with recent Win32-OpenSSH change

SSH based remoting no longer works when connecting to a Windows machine with Win32-OpenSSH installed.  The reason is that PowerShell expects a console to be available when hosted in a process and Win32-OpenSSH now creates subsystem processes without a console.
This should be Ok for remoting because PowerShell in server mode has no need for a console.  So the fix should be in PowerShell where it can fail gracefully when a console is not available.

https://github.com/PowerShell/PowerShell/issues/2531
Looks like a dupe

source: gharchive/issue

authors: PaulHigin SteveL-MSFT

repo: PowerShell/PowerShell

license: MIT

license_type: permissive

license_source: github-api


text:
Code coverage skip some files

As we can see on https://coveralls.io/github/PowerShell/PowerShell some files reported with 0% coverage although the corresponding tests exist and should run successfully. Samples:
NewTimeSpanCommand.cs
NewGuidCommand.cs
NewWinEventCommand.cs

@adityapatwardhan Please comment on this

I am working on a change which will generate logs for the tests that are executed. This will let us know if some tests are not executed or erroring out.

Clear. Thanks!

@adityapatwardhan @lzybkr
I see the opposite that PSReadline files get into the coverage stats though should be removed because PSReadline live in a separate repo and we haven't PSReadline's tests in Powershell repo.

@adityapatwardhan
Please see link https://coveralls.io/builds/9893487/source?filename=C%2Fprojects%2Fpowershell-f975h%2Fsrc%2FMicrosoft.PowerShell.Commands.Utility%2Fgen%2FSelectObjectStrings.cs
I got the error:

Source Not Available
The file "C/projects/powershell-f975h/src/Microsoft.PowerShell.Commands.Utility/gen/SelectObjectStrings.cs" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

The same result is for all files with /gen/ in path.
Perhaps it makes sense to exclude them from statistics.

There are better tools to find unused strings.
PSReadline will naturally disappear when I finish integrating the work from this repo into it's own repo and produce a universal module that works with PowerShell Core and Windows PowerShell.

I see coverage data for the files listed originally

authors: SteveL-MSFT adityapatwardhan iSazonov lzybkr mirichmo


text:
Incorrect Windows Installer Check for VC++ Redistributable Dependency

The root cause of this issue is that the check is specific to a registry key that gets created when the VC++ redistributable package is directly installed via the suggested link. It overlooks scenarios where those files are installed via Windows Update.
A secondary issue is that the test should be tagged to only execute on Windows systems.
Steps to reproduce
Build the MSI for a Windows SKU using commit 54e892ab06fc0b705a329be8061df9f77cbd54f8 and run it on a system that does not have Visual Studio 2015 or the VC++ redistributable package installed via MSI. The dependency is required, but it can be installed via Windows Update.
Expected behavior
The MSI installs without error.
Actual behavior
The failure message is, "PowerShell requires the Visual Studio C++ 2015 x64 redistributables to be installed..." This occurs on a fully patched system that has the dependency installed via Windows Update.
Environment data
Beta.5 + commit 54e892ab06fc0b705a329be8061df9f77cbd54f8

@bergmeister Could you please look the Issue?

I guess we'll have to do a file based check rather than a registry based check then similar to the one I did for the C runtime. I'm on holiday for a week at the moment, so can't do a PR at the moment.

asking on msdn.microsoft.com

May be related to #4315

@mirichmo @w1748587889 Any news why the VC++ installation via Windows Update is missing the registry entry?
In general the problem is that each minor update of the VC15++ runtime gets a new registry Guid, so it is impractical to assert against a specific version, therefore one needs to look if 'some' version oft the VC15++ distributables is installed. Therefore it might be good as well to check on your side if any minor version (or at least the first released one) would work?
Alternatives for a generic check that VC++15 is installed:

Checking that the  Installed value is 1 for HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\VC\Runtimes\x86 (64bit) and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0\VC\Runtimes\x86 (32 bit)
Could you please check if this would pass on a system with the distributables installed via Windows Update?
Have a custom action (i.e. a C# compiled DLL) in the installer that is able to do more sophisticated check that is independent of the minor version of the VC++ runtime. See for an example here

A file based check may be simplest and sufficient.  If the registry entries aren't documented, you can't rely on them.  I think a custom action should be last resort.

It seem we can use MsiQueryProductState API https://blogs.msdn.microsoft.com/astebner/2010/05/05/mailbag-how-to-detect-the-presence-of-the-visual-c-2010-redistributable-package/

@iSazonov Your approach would still require a custom action (i.e. embedd our own custom .net dll with the code to call it) in order to call it from within WiX as far as I can see.
@SteveL-MSFT I'll look into the file based approach then but I can already tell you that it won't be trivial because the VC++ decided to make it super complex and deprecate merge modules since 2015, see their own blog post here for details.

We can still check registry https://stackoverflow.com/questions/851677/how-to-check-for-installed-package-in-wix-3-0

@bergmeister we should probably follow the VC++ team's advice then.  The redist is required since we compile with VC++

I see in the blog post:

The same forwarder DLLs will work on all supported operating systems. If you package all of the forwarder DLLs with your application (and ucrtbase.dll), then it will work on all supported operating systems.

Should we package this with PowerShell Core for all Windows (excluding Windows 10?)?

@iSazonov Because they deprecated merge modules for VC++2015 (see the comment woes in their blog post here), including the runtime has become super complicated. Yes, you could do it and you basically have the choice between having to include around 10 dlls (per bitness) that amount to around 20MB or 100 dlls (per bitness) that amount to 2MB. But I think @SteveL-MSFT just wanted a check as a minimum viable feature because those pre-requisites are already present in most cases due to Windows Update or other software that has already installed them.

@bergmeister if we expect most systems to have these binaries via Windows Update, I think we're ok with the minimal check until we get additional customer feedback

authors: SteveL-MSFT bergmeister daxian-dbw iSazonov mirichmo w1748587889


text:
Enable nullable: System.Management.Automation.Provider.IContentCmdletProvider

Tracking issue: #12631.

@rjmholt Please review.

source: gharchive/pull-request

authors: iSazonov powercode


text:
fix crash Copy-Item to remote session (#16542)

PR Summary

PR Context

PR Checklist

[ ] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[ ] Summarized changes
[ ] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[ ] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

Breaking changes

[ ] None
OR
[ ] Experimental feature(s) needed

[ ] Experimental feature name(s):

User-facing changes

[ ] Not Applicable
OR
[ ] Documentation needed

[ ] Issue filed:

Testing - New and feature

[ ] N/A or can only be tested interactively
OR
[ ] Make sure you've added a new test if existing tests do not effectively test the code changed

Tooling

[ ] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
OR
[ ] I have considered the user experience from a tooling perspective and opened an issue in the relevant tool repository. This may include:

[ ] Impact on PowerShell Editor Services which is used in the PowerShell extension for VSCode
(which runs in a different PS Host).

[ ] Issue filed:

[ ] Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.

[ ] Issue filed:

[ ] Impact on PSScriptAnalyzer (which provides linting & formatting in the editor extensions).

[ ] Issue filed:

[ ] Impact on EditorSyntax (which provides syntax highlighting with in VSCode, GitHub, and many other editors).

[ ] Issue filed:

@AlHakimYahya Please add  PR description based on our template, reference to issue/discussion and resolve merge conflicts.

authors: AlHakimYahya iSazonov


text:
Implement function to auto create hyperlink for ConvertTo-Html

PR Summary
Closes #11458.
Add a helper function that checks the property value(string) of objects passed into ConvertTo-Html. If the string is a valid absolute URI, then convert it to a hyperlink format in HTML
Add a switch "-hyperlink" to trigger the auto conversion feature.

PR Context
This Pull Request saves the user time when creating HTML documents by auto casting URI to hyperlinks

PR Checklist

[ ] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[ ] Summarized changes
[ ] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[ ] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

Breaking changes

[ ] None
OR
[ ] Experimental feature(s) needed

[ ] Experimental feature name(s):

User-facing changes

[ ] Not Applicable
OR
[ ] Documentation needed

[ ] Issue filed:

Testing - New and feature

[ ] N/A or can only be tested interactively
OR
[ ] Make sure you've added a new test if existing tests do not effectively test the code changed

Tooling

[ ] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
OR
[ ] I have considered the user experience from a tooling perspective and opened an issue in the relevant tool repository. This may include:

[ ] Impact on PowerShell Editor Services which is used in the PowerShell extension for VSCode
(which runs in a different PS Host).

[ ] Issue filed:

[ ] Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.

[ ] Issue filed:

[ ] Impact on PSScriptAnalyzer (which provides linting & formatting in the editor extensions).

[ ] Issue filed:

[ ] Impact on EditorSyntax (which provides syntax highlighting with in VSCode, GitHub, and many other editors).

[ ] Issue filed:

@microsoft-github-policy-service agree

From: microsoft-github-policy-service[bot] @.>
Sent: Thursday, November 3, 2022 3:09
To: PowerShell/PowerShell @.>
Cc: Jeff Cui @.>; Mention @.>
Subject: Re: [PowerShell/PowerShell] Implement function to auto create hyperlink for ConvertTo-Html (PR #18453)
  External Email - Use Caution

@JJJcfffhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJJJcfff&data=05|01|jcui19%40jhu.edu|5cfeec494ee14bcb997608dabd6a65f7|9fa4f438b1e6473b803f86f8aedf0dec|0|0|638030561945039127|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=V4Y4ywM1GigakKQp19ihDlStFlpQlrte5%2FufKQdRrfE%3D&reserved=0 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@microsoft-github-policy-service agree [company="{your company}"]
Options:

(default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
(when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.

Contributor License Agreement
Contribution License Agreement
This Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
and conveys certain license rights to Microsoft Corporation and its affiliates (“Microsoft”) for Your
contributions to Microsoft open source projects. This Agreement is effective as of the latest signature
date below.

Definitions.
“Code” means the computer software code, whether in human-readable or machine-executable form,
that is delivered by You to Microsoft under this Agreement.
“Project” means any of the projects owned or managed by Microsoft and offered under a license
approved by the Open Source Initiative (www.opensource.orghttps://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.opensource.org%2F&data=05|01|jcui19%40jhu.edu|5cfeec494ee14bcb997608dabd6a65f7|9fa4f438b1e6473b803f86f8aedf0dec|0|0|638030561945039127|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=fnJNGGQfuDGbD9Cp95i0rQ8bvAB1NWYYQlLEI5BDLuY%3D&reserved=0).
“Submit” is the act of uploading, submitting, transmitting, or distributing code or other content to any
Project, including but not limited to communication on electronic mailing lists, source code control
systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of
discussing and improving that Project, but excluding communication that is conspicuously marked or
otherwise designated in writing by You as “Not a Submission.”
“Submission” means the Code and any other copyrightable material Submitted by You, including any
associated comments and documentation.
Your Submission. You must agree to the terms of this Agreement before making a Submission to any
Project. This Agreement covers any and all Submissions that You, now or in the future (except as
described in Section 4 below), Submit to any Project.
Originality of Work. You represent that each of Your Submissions is entirely Your original work.
Should You wish to Submit materials that are not Your original work, You may Submit them separately
to the Project if You (a) retain all copyright and license information that was in the materials as You
received them, (b) in the description accompanying Your Submission, include the phrase “Submission
containing materials of a third party:” followed by the names of the third party and any licenses or other
restrictions of which You are aware, and (c) follow any other instructions in the Project’s written
guidelines concerning Submissions.
Your Employer. References to “employer” in this Agreement include Your employer or anyone else
for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your
Submission is made in the course of Your work for an employer or Your employer has intellectual
property rights in Your Submission by contract or applicable law, You must secure permission from Your
employer to make the Submission before signing this Agreement. In that case, the term “You” in this
Agreement will refer to You and the employer collectively. If You change employers in the future and
desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement
and secure permission from the new employer before Submitting those Submissions.
Licenses.

Copyright License. You grant Microsoft, and those who receive the Submission directly or
indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the
Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute
the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third
parties.
Patent License. You grant Microsoft, and those who receive the Submission directly or
indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under
Your patent claims that are necessarily infringed by the Submission or the combination of the
Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and
import or otherwise dispose of the Submission alone or with the Project.
Other Rights Reserved. Each party reserves all rights not expressly granted in this Agreement.
No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are
granted by implication, exhaustion, estoppel or otherwise.

Representations and Warranties. You represent that You are legally entitled to grant the above
licenses. You represent that each of Your Submissions is entirely Your original work (except as You may
have disclosed under Section 3). You represent that You have secured permission from Your employer to
make the Submission in cases where Your Submission is made in the course of Your work for Your
employer or Your employer has intellectual property rights in Your Submission by contract or applicable
law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You
have the necessary authority to bind the listed employer to the obligations contained in this Agreement.
You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS
REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES
EXPRESSLY STATED IN SECTIONS 3, 4, AND 6, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS
PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF
NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
Notice to Microsoft. You agree to notify Microsoft in writing of any facts or circumstances of which
You later become aware that would make Your representations in this Agreement inaccurate in any
respect.
Information about Submissions. You agree that contributions to Projects and information about
contributions may be maintained indefinitely and disclosed publicly, including Your name and other
information that You submit with Your Submission.
Governing Law/Jurisdiction. This Agreement is governed by the laws of the State of Washington, and
the parties consent to exclusive jurisdiction and venue in the federal courts sitting in King County,
Washington, unless no federal subject matter jurisdiction exists, in which case the parties consent to
exclusive jurisdiction and venue in the Superior Court of King County, Washington. The parties waive all
defenses of lack of personal jurisdiction and forum non-conveniens.
Entire Agreement/Assignment. This Agreement is the entire agreement between the parties, and
supersedes any and all prior agreements, understandings or communications, written or oral, between
the parties relating to the subject matter hereof. This Agreement may be assigned by Microsoft.

—
Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fpull%2F18453%23issuecomment-1301718422&data=05|01|jcui19%40jhu.edu|5cfeec494ee14bcb997608dabd6a65f7|9fa4f438b1e6473b803f86f8aedf0dec|0|0|638030561945039127|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=eAjmocxfA%2BdWu%2FYI6%2F8ppwRSy3Eu%2BZ3tOPmcrUYx2fs%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAVNE5UV3EI664OQZMWTR3HLWGNQLZANCNFSM6AAAAAARV2LY3A&data=05|01|jcui19%40jhu.edu|5cfeec494ee14bcb997608dabd6a65f7|9fa4f438b1e6473b803f86f8aedf0dec|0|0|638030561945039127|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=G2J2R9zW8Upb0XJb3KGjfZpGZ%2Fq4FI1GRE21G8%2FVIw8%3D&reserved=0.
You are receiving this because you were mentioned.Message ID: @.***>


text:
Fix spelling in releaseTools/README.md

PR Summary
Fix the spelling in releaseTools/README.md
PR Context
Fix spelling errors.
PR Checklist

[x] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[x] Summarized changes
[x] Change is not breaking
[ ] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[x] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

User-facing changes

[x] Not Applicable
OR
[ ] Documentation needed

[ ] Issue filed:

Testing - New and feature

[x] N/A or can only be tested interactively
OR
[ ] Make sure you've added a new test if existing tests do not effectively test the code changed

[ ] Add [feature] to your commit messages if the change is significant or affects feature tests

merged when static analysis finished as that was all that was applicable and this was blocking.


text:
Expose download uri in Find-Module output as additional property

When I need to publish a Module to Azure Automation for example, I need to give Azure Automation the url of the download. In the portal this is abstracted away but when you want to handle that via the api directly or via AZ PowerShell, you need to do additional steps next to Find-Module to get the url that you can use.
$moduleInfo = Invoke-RestMethod -Uri "https://www.powershellgallery.com/api/v2/Packages?`$filter=Id eq 'ComputerManagementDsc' and Version eq '6.1.0.0'"
$moduleInfo.content.src

It would be very useful if the download uri was part of the PSRepositoryItemInfo object.

Thanks for opening the issue so fast so we can track the request!

authors: SydneyhSmith bgelens

repo: PowerShell/PowerShellGet


text:
Update change log

Clean up the change log a bit so each entry are not shown with blank row after it.

This change is

Codecov Report

Merging #75 into dev will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev      #75   +/-   ##
=======================================
  Coverage   72.56%   72.56%
=======================================
  Files          10       10
  Lines         514      514
=======================================
  Hits          373      373
  Misses        141      141

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 0f163dd...7f0c72c. Read the comment docs.

authors: codecov-io johlju

repo: PowerShell/xDnsServer

license: mit

license_source: bigquery


text:
Feature/lm lookup

Added support for enabling / disabling LMHosts lookups using the MSFT_xNetBIOS resource.

This change is

Hi @raandree, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

Thanks for @raandree! It appears you're MSFT so I'm not sure why the msftclas bot is requiring a CLA. @TravisEz13 - do you know if the bot is working correctly here?
@raandree - once my PR #186 is through I'll review your PR (at the moment I'll spend all my time reviewing my own PR :grin: ).

Hi @raandree, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.
TTYL, MSBOT;

@PlagueHO you can get the bot to rerun if you close and re-open the PR.  I usually do that before I contact the CLA team.

@TravisEz13 - very handy to know! I'll remember to do that. Thanks Travis!

Hi @Randree - can you rebase your PR onto the latest commit to xNetworking so that your PR doesn't try to undo all the recent changes? Thank you!

@PlagueHO , actually I have no idea how to do this. Isn't it possible to do the rebase then merging the pull request? The other option is to create a new pull reuest and close this one.

Hi @raandree - sorry for spelling your handle wrong earlier. To be honest I'm not much good at rebasing myself - sometimes it works, sometimes I mess it up and have to start over, other times I give up and just do a '''Git Pull Upstream Dev``` to pull all the latest changes to my branch. Actually, with Rebasing most of the time it doesn't work (probably my own fault) and I give up and just recreate all my changes in a new fork. A bit of bad behaviour really :cry:
Have you taken a look at this guide: https://github.com/PowerShell/DscResources/blob/master/GettingStartedWithGitHub.md#resolve-merge-conflicts
It does help but it's a bit long winded. If you're still running into trouble, recommend trying the method of making a copy of your changed files then reforking and cloning the latest copy and then applying your changes again.

@PlagueHO, I will close this one and start again with a new pull request. This seems to be the easiest way.
Thanks for you help so far.

authors: PlagueHO TravisEz13 msftclas raandree

repo: PowerShell/xNetworking


text:
MSFT_xGroupResource: Fix PSSA Issues

The PowerShell Script Analyzer issues in MSFT_xGroupResource need to be fixed.
This is the current result of running Invoke-ScriptAnalyzer:

This is part of #160

repo: PowerShell/xPSDesiredStateConfiguration


text:
Using PSGallery to Install Pester in AppVeyor File

This is for PowerShell/DscResources#147.

This change is

Hi @kwirkykat, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Katie Keim). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

PSSA errors failing the tests have been submitted under #14.

authors: kwirkykat msftclas

repo: PowerShell/xRemoteDesktopAdmin


text:
[Feature] Rewrite CleverBot

Options

[ ] Related to an issue: (Mention the issue)
[X] Breaking change(s).
[X] Related to a cog. CleverBot

Contents
CleverBot is a very bad made cog, in fact, it seem to work but need a full rewrite and a better way to handle message.
Code was originally taken from Laggron-Dumb-Cogs's say cog.
After some time, I decided to rewrite this cog for something better. It would work differently, when user run [p]conversation, he get added to self.conversation when he ran the command (Or maybe also removed) and the command stop, then the relay is took by a on_message listener.
Another thing I think is maybe creating less sessions for only one instead. Adding session to self.session and re-use the same session for every questions asked.

Creating one session for everyone is not acceptable.
References here.
Every users must own there own session.

repo: Predeactor/Predeactor-Cogs


text:
Null exception with angular

Hello!
Expected behavior and actual behavior:
For some reason, I'm getting null inside of _itemsChanged  while trying to initialize the component in an angular application. I got this error while migrating from 2.x to 4.x.
This is the exception I get:
Uncaught TypeError: Cannot read property '0' of null
    at HTMLElement._itemsChanged (px-dropdown.html:446)
    at HTMLElement._observerEffect (polymer.html:1613)
    at HTMLElement._effectEffects (polymer.html:1458)
    at HTMLElement._propertySetter (polymer.html:1442)
    at HTMLElement.__setProperty (polymer.html:1451)
    at HTMLElement._applyConfig (polymer.html:2064)
    at HTMLElement._afterClientsReady (polymer.html:2058)
    at HTMLElement._ready (polymer-mini.html:144)
    at HTMLElement._tryReady (polymer-mini.html:130)
    at HTMLElement._initFeatures (polymer.html:4121)

And this is how I initialize the component:
<px-dropdown  id="add-shift-locations-dropdown-data" items='{{vm.locationsToShow}}' multi display-value="Select one or more locations" search-mode></px-dropdown>
And this is what I have in my controller:
vm.locationsToShow = [];
If I replace that line with:
if(items != null && items[0] && typeof items[0] === 'string') {
everything works correctly.
I get as many exceptions as dropdowns I have on the page. It doesn't matter if I have the items initialized to [] or not.
Is there any way to add that null check to the code?
Environment (component version number, Browser (including version), operating system, hardware, etc):
Angular 1.6.6
Bower 1.8.2
px-dropdown 4.0.7 (tried with 4.0.13 too and still not worked)

Added in v4.0.14.

authors: laxika randyaskin

repo: PredixDev/px-dropdown


text:
Simplify the quickstart and make it more imperative

Preview: https://controlflow-make_the_quickstart_more_linear_and_imperative.mintlify.app/quickstart

Simplify the explanations of key concepts in the quickstart, and cross-link to the full concept pages for people who want the more detailed explanation.
Move the explanation of code before the code block it describes to more clearly set expectations.
Rename section titles to be action-focused ("do the thing") instead of purely descriptive ("the thing").
Convert paragraphs to ventilated prose so that future edits are easier to review.
Remove explicit --- line separators since the headings introduce enough negative space on their own.
Code styling suggestion: shorten code examples by merging back-to-back empty lines.

Thanks!

authors: djsauble jlowin

repo: PrefectHQ/ControlFlow


text:
Feat: Add BitBucketRepository block

Closes #2
Also fixes a test in test_credentials.py that was misleading (ln 21).
Added pydocstyle.

Example

Screenshots

Checklist

[x] References any related issue by including "Closes #" or "Closes ".

If no issue exists and your change is not a small fix, please create an issue first.

[x] Includes tests or only affects documentation.
[x] Passes pre-commit checks.

Run pre-commit install && pre-commit run --all locally for formatting and linting.

[x] Includes screenshots of documentation updates.

Run mkdocs serve view documentation locally.

[x] Summarizes PR's changes in CHANGELOG.md

Thanks for adding all the examples and piloting pydocstyle!
I am wondering whether setup.cfg is ignoring too many codes, especially the D1s D2s and D3s http://www.pydocstyle.org/en/2.1.1/error_codes.html
ignore = D100,D101,D104,D107,D212,D200,D202,D213,D203,D205,D300,D400,D401,D405,D406,D407,D415

Hi Andrew, I pretty much ignored the ones that interfered with black or were completely opposite to how the other repos' style is.

Thanks for adding all the examples and piloting pydocstyle!
I am wondering whether setup.cfg is ignoring too many codes, especially the D1s D2s and D3s http://www.pydocstyle.org/en/2.1.1/error_codes.html
ignore = D100,D101,D104,D107,D212,D200,D202,D213,D203,D205,D300,D400,D401,D405,D406,D407,D415

Hi Andrew, I pretty much ignored the ones that interfered with black or were completely opposite to how the other repos' style is.

Thanks for testing it. I am wondering if you include D100 and D101, which ones will it complain about?

D100,D101

tests/test_repository.py:16 in public class TestBitBucketRepository: D101: Missing docstring in public class
setup.py:1 at module level: D100: Missing docstring in public module
tests/test_repository.py:1 at module level: D100: Missing docstring in public module
tests/conftest.py:1 at module level: D100: Missing docstring in public module
tests/test_credentials.py:1 at module level: D100: Missing docstring in public module

Thanks! Perhaps we can just ignore setup.py and tests/ rather than the codes themselves: https://github.com/PyCQA/pydocstyle/issues/186#issuecomment-631760965

Can we also drop the other D1s and D2s and D3s codes from being ignored as well? D4s, maybe some of them can be useful.

repo: PrefectHQ/prefect-bitbucket


text:
[Feat] Java solutions Sprint-1

This PR contributes Java solutions for the following programming challenges:

Determining Even/Odd Numbers
Checking for Prime Numbers
Validating Leap Years
Calculating Armstrong Numbers
Generating the Fibonacci Series
Identifying Palindromes
Crafting Star Patterns

Notes:

Solutions are written in Java, following best practices.
More solutions will be added in future commits.

Future Contributions:

Additional Java solutions and improvements are planned.
Feedback is welcome to ensure alignment with repository standards.

@PrinceSinghhub
I forgot to create a separate branch. I will do it next time, for sure.


text:
Mockup: archive search page

testing notes
this is just an aggregator issue for the below issues - it will be marked complete when they are completed
dev notes

[x] #63 (search form)
[x] #59 (search result)
[x] #64 (sort controls)

All of the aggregated issues are now closed.

authors: rlskoeser thatbudakguy

repo: Princeton-CDH/ppa-django


text:
navbar improved and looks enlightened

Related Issue
[Cite any related issue(s) this pull request addresses. If none, simply state “None”]
Fixes:  #702
Description
[Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.]
The overlapping and sizing problem of navbar is fixed. issue no. #702

Type of PR

[ ] Bug fix
[✔] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / videos (if applicable)
[Attach any relevant screenshots or videos demonstrating the changes. Make sure to attach before & after screenshots in your PR.]
After:

Before:

Checklist:

[ ✔] I have made this change from my own.
[ ✔] I have taken help from some online resources.
[✔ ] My code follows the style guidelines of this project.
[✔ ] I have performed a self-review of my own code.
[✔ ] I have commented my code, particularly in hard-to-understand areas.
[✔ ] I have made corresponding changes to the documentation.
[✔ ] My changes generate no new warnings.
[ ✔] I have tested the changes thoroughly before submitting this pull request.
[✔ ] I have provided relevant issue numbers and screenshots after making the changes.

@harshgupta2125  make it responsive

repo: PriyaGhosal/BuddyTrail


text:
Update overlap for vista3d [skip ci]

Fixes # .
Description
A few sentences describing the changes proposed in this pull request.
Status
Ready/Work in progress/Hold
Please ensure all the checkboxes:

[x] Codeformat tests passed locally by running ./runtests.sh --codeformat.
[ ] In-line docstrings updated.
[ ] Update version and changelog in metadata.json if changing an existing bundle.
[ ] Please ensure the naming rules in config files meet our requirements (please refer to: CONTRIBUTING.md).
[ ] Ensure versions of packages such as monai, pytorch and numpy are correct in metadata.json.
[ ] Descriptions should be consistent with the content, such as eval_metrics of the provided weights and TorchScript modules.
[ ] Files larger than 25MB are excluded and replaced by providing download links in large_file.yml.
[ ] Avoid using path that contains personal information within config files (such as use /home/your_name/ for "bundle_root").

/build

/build

/build

repo: Project-MONAI/model-zoo


text:
test.py model_dict = torch.load(pretrained_pth)["state_dict"] gives error

Describe the bug
When running test.py I am getting the error:

Traceback (most recent call last):
File "test.py", line 115, in
main()
File "test.py", line 76, in main
model_dict = torch.load(pretrained_pth)["state_dict"]
KeyError: 'state_dict

To Reproduce
Steps to reproduce the behavior:

Go to:
.../swin-unetr/research-contributions/SwinUNETR/BTCV
I installed monai from swin-unetr repo following the repo readme.
Run commands

conda activate <my MONAI swin-unetr environment>
export CUDA_VISIBLE_DEVICES=<my_device_number>
python test.py

Expected behavior
Test script to run and predict validation cases in my json file without errors. My json file was set up according to your guidlines and works fine for training.
Environment (please complete the following information):

OS:

Operating System: Ubuntu 20.04.4 LTS
Kernel: Linux 5.13.0-51-generic
Architecture: x86-64

Python version

python                    3.7.13

MONAI version [e.g. git commit hash]

monai                     0.9.0rc1+31.g38b7943a          pypi_0    pypi

CUDA/cuDNN version

pytorch                   1.11.0          py3.7_cuda11.3_cudnn8.2.0_0    pytorch
cudatoolkit               11.3.1               h2bc3f7f_2

GPU models and configuration
NVIDIA A40
NVIDIA-SMI 510.73.05    Driver Version: 510.73.05    CUDA Version: 11.6
or
NVIDIA A6000
NVIDIA-SMI 470.57.02    Driver Version: 470.57.02    CUDA Version: 11.4

In doubt exactly what you need for GPU configuration. Not an expert in this. Let me know if you need additional info.
Additional context
During debugging I found out that if I simply change line 76 from
model_dict = torch.load(pretrained_pth)["state_dict"]
to
model_dict = torch.load(pretrained_pth)
The code and prediction seems to run as expected.
Let me know if you need further information.

Hi @davidkvcs , Thanks for reporting this issue. The pre-trained model checkpoints should contain three keys {'epochs': , 'best_acc', 'state_dict': }
Key "state_dict" should be the model weights, could you direct me to the model checkpoints you've tried, I will double check whether the saved model has consistent key-value items.
Thank you.

Hi @tangy5
I trained the model my self, using this repo.
Do you have some way I can share this .pth file with you?
Since the next line, model.load_state_dict(model_dict) works fine and the prediction look pretty good I assume, the weights are loaded correctly with the changes I made?
It seems my trained model does not have the three keys {'epochs': , 'best_acc', 'state_dict': }, but holds the state_dict only. When I run model_dict = torch.load(pretrained_pth), model_dict is a OrderedDict of length 159, holding what could look like the trained model weights. Examples of field names:
...
swinViT.patch_embed.proj.weight
swinViT.patch_embed.proj.bias
swinViT.layers1.0.blocka.0.norm1.weight
and so on...
Does that make sense?

@davidkvcs  Hi, could you figure it out. I have the same issue, too.

@tangy5 Could you please help with finetune issue. When I use the pretrained weights you prepared it works. But when I do the pretraining by myself, and try finetune my model in BTCV, use_pretrained_ssl, I get the error below:
KeyError: 'module.patch_embed.proj.weight'

HiI think simply uncommenting the the part [“state_dict”] from the end of line 76 fixed this problem for me. Best David Sent from my iPhoneOn 13 Dec 2022, at 01.11, Jamshidhsp @.***> wrote:
@davidkvcs  Hi, could you figure it out. I have the same issue, too.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

authors: Jamshidhsp davidkvcs tangy5

repo: Project-MONAI/research-contributions


text:
update command version

Signed-off-by: Wenqi Li wenqil@nvidia.com

/black


text:
Validates that given tile coordinates are within valid bounds.

Addresses #183

:+1: looks good to me.

Why do we only throw an error for the tile parameters here?
Every other service (and the tile function itself) simply asserts on isValid, e.g. see:
https://github.com/Project-OSRM/node-osrm/blob/fix/183/src/node_osrm.cpp#L938
Can we make the behavior consistent? That is removing the assertion (which currently will crash Node in debug builds or quietly work / crash libosrm in release builds --- neither is an option) and throwing Javascript errors instead?

I think this is fine as we usually don't use IsValid because it doesn't give us diagnostics of what made it invalid. In this case there is only one source of errors once you established its integers.

authors: TheMarex daniel-j-h danpat

repo: Project-OSRM/node-osrm


text:
Improve wording of content to be more formal

[x] English

[ ] French

[ ] Norwegian

[ ] Greek?

Norwegian is about as formal as I could get, I think.

I could probably improve it a lil

repo: ProjectSegfault/website


text:
Começo

[x]  Procurar por sites semelhantes

[x] Pode escolher um tema(evento) ou Copa do Mundo Feminina

[x] Principais funcionalidades

[x] Principais serviços a serem apresentados (Restaurante, hospital, etc)

[x] Criar um arquivo pesquisa.md na pasta /dos/base

Atualizando a ISSUE com as 5 tarefas feitas no arquivo pesquisa.md
https://github.com/Projetos-de-Extensao/PFE_24.2_8001_III_BJJ/blob/main/docs/base/pesquisa.md


text:
I am using md2-tabs in my Angular 2 Application. Tabs are responsive in Chrome but not in Firefox.

Bug, feature request, or proposal: BUG
What is the expected behavior?
Responsive behaviour in as in Chrome
What is the current behavior?
Not responsive in Firefox
Firefox not responsive
  Chrome One responsive
What are the steps to reproduce?
Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/rQmUz8WYRh5Vz4gwY8E4?p=info
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, MD2, OS, browsers are affected?
Is there anything else we should know?

@sunpasup it is working fine in FF

authors: dharmeshpipariya sunpasup


text:
Remove code for ignoring ambiguous spectra from MSFReader.cpp

A user had a problem that spectra which matched more than one peptide in a .pdresult file were not being put into the .blib even if "Keep ambiguous spectra" was checked.
https://skyline.ms/announcements/home/support/thread.view?rowId=64796
MSFReader has its own code for preventing ambiguous spectra from being included in the .blib which does not pay attention to the "-K" command-line parameter.
As far as I can tell, there is no reason for that code to exist, so I figured that we should probably just remove it.

Could this be a performance issue with large pdResult files? Perhaps this internal way of eliminating ambiguous spectra is faster than relying on BiblioSpec's generic method?

I am, however, thinking that the correct fix for this behavior is not to actually remove this code like in this pull request. Instead, maybe the code should keep all PSMs that score as well as the best PSM and discard all PSMs that score worse. In this way, the scores that are tied for best place will be kept if "-K" was specified and discarded if "-K" was not specified.
I think the way I have things in this pull request might make the behavior worse in the cases where there are some PSMs that clearly scored worse compared to the best PSMs. I will investigate that.

Actually, I think that the code changes that I have in this pull request are what we should go with.
This other idea that I was proposing here where we only keep the best scoring PSM among multiple PSMs that scored better than the cutoff would be very different behavior from what we do for other types of search results.

Yes. That sounds like the entire point of BlibFilter and the redundancy is
expected before it is run. We even name the file .redundant.blib
On Sun, Sep 8, 2024 at 7:45 PM nickshulman @.***> wrote:

I am, however, thinking that the correct fix for this behavior is not to
actually remove this code like in this pull request. Instead, maybe the
code should keep all PSMs that score as well as the best PSM and discard
all PSMs that score worse. In this way, the scores that are tied for best
place will be kept if "-K" was specified and discarded if "-K" was not
specified.
I think the way I have things in this pull request might make the behavior
worse in the cases where there are some PSMs that clearly scored worse
compared to the best PSMs. I will investigate that.
Actually, I think that the code changes that I have in this pull request
are what we should go with.
This other idea that I was proposing here where we only keep the best
scoring PSM among multiple PSMs that scored better than the cutoff would be
very different behavior from what we do for other types of search results.
—
Reply to this email directly, view it on GitHub
https://github.com/ProteoWizard/pwiz/pull/3111#issuecomment-2337003485,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACYBWUAPATC4OPXFACGH5RDZVUDVHAVCNFSM6AAAAABMHKJWZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZXGAYDGNBYGU
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

authors: brendanx67 chambm nickshulman

repo: ProteoWizard/pwiz


text:
Error code 5503 when contributing new Post API SYNO.Core.Certificate.Service

Hi there, first of all, congratulations for this project!
I am preparing a PR to contribute back several APIs for viewing and managing Certificates on DSM!
The viewing (HTTP GET) APIs work well. But now I am trying to use POST to assign certificates to services
This is the POST info:
DEBUG: POST data: {'api': 'SYNO.Core.Certificate.Service', 'version': 1, 'method': 'set', '_sid': 'XXX', 'settings': [{'service': {'display_name': 'Log Receiving', 'display_name_i18n': 'helptoc:logcenter_server', 'isPkg': True, 'owner': 'root', 'service': 'pkg-LogCenter', 'subscriber': 'LogCenter'}, 'old_id': '3JGfJe', 'id': '0YzrgB'}], 'mimeType': 'application/json'}

It looks identical to a network capture I have done on my browser. My guess is maybe how the 'settings' dict was formed
This is part of the log:
DEBUG: Request Method: POST
DEBUG: Successful returned data
DEBUG: API: SYNO.Core.Certificate.Service
DEBUG: RESPONSE: {'error': {'code': 5503}, 'success': False}
DEBUG: Session error: 5503
I have never seen error 5503, including https://blog.jbowen.dev/synology/photostation/references/errors/
Any idea on how to debug further? I plan to contribute this back as soon as it works

Some of the code that does the POST
settings = {'settings': [{'service': {'display_name': 'Log Receiving', 'display_name_i18n': 'helptoc:logcenter_server', 'isPkg': True, 'owner': 'root', 'service': 'pkg-LogCenter', 'subscriber': 'LogCenter'}, 'old_id': '3JGfJe', 'id': '0YzrgB'}]}
raw_data = self._dsm.post(api='SYNO.Core.Certificate.Service',
                                              method="set",
                                              data=settings)

I figured it out
Originally I was either not calling json.dumps() for the settings dictionary or calling at with json.dumps({settings: service_list})
To get it working, I just called {'settings': json.dumps(service_list)}.
That converted bool from True to true

@thiagocrepaldi I know this issue is closed but may I ask, do you have a test jig for uploading certificates?  I am looking to do this but am not a Python expert; more C++/C# than anything else.
I am doing a POC, to build a Docker container that uses ACME to create, and download Let's Encrypt certificates.  It's going to be an open-source Docker container, with a DNS-01 plugin system making it extensible with regard to various DNS providers, i.e. Google domains, Azure DNS and many others.
Right now, I am trying to prototype the calls to DSM using Postman.  Login in, out, list and certificate list are all pretty straightforward.  However, I can't find much information for the "set" verb.  Any whitewashed code you might provide would help me shortcut the process of building this POC.
As far as I can tell you are one of a very few people who have actually made this work.  Any help you might offer will be greatly appreciated.

@bigtfromaz Are you publishing this to Gothub? I’d like to see if I can help as I really want to do this. Also, do you (or anyone) know where I can get the full documentation on the SYNO API? Happy to mock up the API requests.

@jmcombs I am not going to pursue this further. Synology doesn't publish the API.  They should, but they don't. I began reverse engineering but without the error code descriptions it was too arduous.  I'm 90% sure they are rejecting all cert API traffic that doesn't come from localhost.
As a result, I decided to take the Synology out of my solution. I no longer use Synology for any network configuration activity; security, routing or management. I still use it for RAID and to keep my family's pictures private.
It goes like this. I wrote my own dynamic DNS service and installed it on an Ubuntu VM. The Synology now uses that service (with a custom DDNS configuration) to maintain its A record in our public DNS server. I added Nginx as a reverse proxy (docker container) and Certbot to the VM.  Certbot gets certificates from Let's Encrypt and makes them available to Nginx.
Nginx is configured to relay incoming traffic and offload SSL. No certificates are needed on the local hosts and multiple services can be exposed to the internet on a single public port, e.g. 443. All NAT port forwards point to Nginx.
The Synology's suboptimal firewall is turned off and all my public ports are only exposed by the reverse proxy, which is safely sequestered in its very own VLAN; something you can't do with Synology's router. Our local router allows Nginx to reach the internet, and only allows it to reach specific ports on specific backend servers.
Before you ask, yes, I could use a script to update the public DNS. However, I have bigger plans for the DDNS service. I was looking to make Synology a centerpiece in my plans, but their closed nature made them less attractive.  This VM configuration will eventually replace my internet router.

authors: bigtfromaz jmcombs thiagocrepaldi

repo: ProtoThis/python-synology


text:
Stardust/LED-star combo oddities.

I recently got a couple DIYino Stardust boards, and have been putting together a couple sparring sabers using a tri-cree RGB LED star as the light source and a main/aux switch combo on D12/D11. I've loaded 3 of the stock soundfonts on the flash storage.
I've been working with FX-SaberOS 1.1 along with the most recent repository version. The 1.1 release when loaded doesn't seem to actually run - there's a lot of noise/static - the "DIYino Lightsaber" boot-up wav half-plays then goes back to noise/static.
The most recent repository version when set to two-button compile, when the board boots it switches automatically to config mode, then sets to sound fonts - only one button works - and it won't actually switch back to action mode out of config mode.
Enabling Single Button mode allows FXOS to boot normally (and play the "DIYino Lightsaber" boot-up wav), and start out in action mode - but when switching to config mode it only allows adjusting the soundfont - I'm not sure if it has to do with the fact that it's not recognizing double clicks - but the end result is that the functionality of the whole thing is rather limited.
Does anyone have any experience with debugging this and where I might want to look to find the culprit?

I'm having a very similar issue with the Stardust -- same behavior with the initial boot sequence with default test sound, and similar behavior with two-buttons.  I also have an issue where the sound starts playing whenever I apply power, and when I do get the blade to light, the sound goes off.

Hi guys, are you sure you tell the code to use a Stardust instead of a Prime? You can do it in the Config_HW.h file
//#define DIYINO_PRIME
#define DIYINO_STARDUST

The topic is, on the Prime the D11 is a PWM pin and the D4 is the aux pin signal. If you wire up D11 as a button but use the Prime branch, it will force D11 to 0V (switching off LEDs) and this in turn will be interpreted as a long press on the aux pin, getting the saber to Config Mode right away.
To be honest all my 2-button sabers have a Prime, so I cannot try 2-buttons with a Stardust, but the only difference is the D11 pin (LED driver for Prime and aux pin for Stardust).
One-button mode should work fine, the problem you see there comes from not being able to make a proper double click. It needs some excercise. Actually one of the thing I will work on next year will be to eliminate the double click as much as possible.

Hey Andras.
I definitely have it on the Stardust branch - so I'm trying to figure out why it's doing the behavior it's stuck on.
Do you know why it might be acting strangely on Version 1.1, but doing okay on the current version?

Also is there a parameter for adjusting the period required for a double click to register?

I confirm that I also have it set as stardust.  I’ll start again in the morning and review the code to see if a prime vs stardust check is not working as expected.

I can confirm that one button mode works fine - the double-clicks DO have to be really really fast, but it seems part of the problem was that sleep mode's right after soundfonts, so if you're too slow it puts the board to sleep right after.

The parameters governing the button sensitivity required by the OneButton library are located in the Config_SW.h file:
/*

BUTTONS PARAMETERS
/
#define CLICK        200 //5    // ms you need to press a button to be a click
#define PRESS_ACTION    600 //200  // ms you need to press a button to be a long press, in action mode
#define PRESS_CONFIG    600 //400  // ms you need to press a button to be a long press, in config mode
//
Try playing around with the CLICK parameter to adjust the sensitivity of the double clicks.

Also there is an undocumented feature I dubbed hit-and-run or escape sequence, a hit (clash) detected in Config Mode will have you exit config mode (well, mostly, in volume mode it will set the volume to max).
As to why the 2-buttons mode will start in Config: I'm pretty sure it's because somewhere in the code the D11 is forced to 0V. I just need to find out where. Reason is that D11 is a PWM pin and on the Prime it controls a MOSFET gate.
I also do not really know why the 1.1 behaves differently to the master branch. Of course I alwways improve the code but I do not really remember changing anything other than support for the Pixies and implementing the sleep mode timer.
Can say more if I will have the time to look at the code myself.

I do not feel it's a wiring issue. I have both prime and stardust, and i could never get the two button to work on the stardust. I just put one button on my saber and called it good. I never mentioned it because I just settled for one button. I checked the manual a million times trying to wire 2 button on. It was definitely wired correctly. Anyways thought I'd share that similarity with you.

Bug found, fix is in work.
Quick fix for those who cannot wait ;o)
comment out all lines which start with:
digitalWrite(11

There are 2 such lines in Light.cpp

Thank you for finding it so quickly!  I haven’t even had enough coffee to open the code up yet.

I made a new release, check out the master branch, it works fine on my side.

I guess it works now as I had feedback to deny it :)

It works great, sorry for the lack of reply.

authors: Argathena NobAkimoto Protonerd jabrooke

repo: Protonerd/FX-SaberOS


text:
🛑 Service - Help Center is down

In 0d4e37b, Service - Help Center (https://help.proxeuse.com) was down:

HTTP code: 500
Response time: 10571 ms

Resolved: Service - Help Center is back up in 6a560e4.

repo: Proxeuse/status


text:
🛑 Service - Documentation is down

In 3827d1c, Service - Documentation (https://docs.proxeuse.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Service - Documentation is back up in ab4d815 after 18 minutes.


text:
Various improvements

Update langversion to 8
Enable #nullable annotations
Use HashCode.Combine
Simplify a switch statement with a switch expression
Simplify equality
Use shared HeaderNames
Prefer is null to == null
Remove unused using statement
Seal classes

@damianh Ready for review

Thanks for PR. Will get to look at this in next week or so. IRL so busy atm.

authors: damianh iamcarbon

repo: ProxyKit/ProxyKit


text:
[Breakpoint] #4 Request / Response Editor & Breakpoint View

Description

⚠ Ping @NghiaTranUIT to get the BreakpointData class from macOS. It's responsible to handle all data changes from the Request/Response Editor.
Waiting Breakpoint List View

Implement the DataGrid as the Flow Main Table View, which basic columns (See the screenshot)
No need to support the Customize Columns.
Show all waiting breakpoints in the Grid
Select a breakpoint -> Update the Request / Response Editor
Can select multiple breakpoints, but render the first item in the selected array.

Bottom Bar

Execute button with dropdown menu
Cancel button with dropdown menu
Continue button with dropdown menu
Work with single or multiple breakpoints
Disable buttons and menu if there is no selection

Request & Response Editor

⚠ Important: Write a Request Editor in a way that we can reuse it later (For the Compose View)

⚠ Important: Each Tab: Header, Query, Body, ... can be reused in the Request & Response.

Select a breakpoint -> If it's a Request Breakpoint -> Show the Request Editor (Hide the Response Editor)
Select a breakpoint -> If it's a Response Response -> Show the Request View (Read-only), and show the Response Editor

Header Tab

Query Tab on the Request

Must Subclass the Header Tab so we can reuse all Header tab logic and behavior.
When the URL is updated -> It also updates the Query Table
When the Query is updated (The text field is ended editing) -> Update the URL

https://user-images.githubusercontent.com/5878421/230846518-284cca6d-16da-4197-88cf-209314a9608f.mp4

Make sure the Query is updated with the BreakpointData model

Method and URL

If it's a Request Breakpoint -> The Method dropdown and URL are editable.
If it's a Response Breakpoint -> The method and URL are read-only

Update the URL will update the Query Tab (When the text field is end editing, don't change every time the user is typing)
Able to select the HTTP Method
Validate the URL -> Disable the Execute button and show the error icon

Body tab

The body tab can be reused in the Request Editor and Response Editor
Show the correct syntax highlighting, maybe JSON, Text, or HTML, ... We can reuse the same logic from the Main Table View
If it's a Request Breakpoint -> Body tab is read-only
If it's a Response Breakpoint -> Body Tab is Editable
Make sure we update the Body to the BreakpointData model

Form Tab

Reuse the Header Tab -> Have all logic + behavior from the Header Tab

If the Body of the Request is a form format (ContentType = application/x-www-form-urlencoded), show the Form tab

Update the Form entry will update the Body Tab

Update the Body will update the form entry if need

https://user-images.githubusercontent.com/5878421/230848697-4ce2af9e-5f04-4e2a-8f6c-19f2f89adfb5.mp4

Other Tab

If it's a Response Breakpoint -> Show the Other Tab
Allow the user to change the Status Code
Show the Reason-Phrase when end editing

https://user-images.githubusercontent.com/5878421/230849154-20171b3f-8b04-4df4-a49e-82e939f5cca4.mp4

We can use this lib: https://www.npmjs.com/package/http-status to get the Status code Reason Phrase
Make sure it updates the Breakpoint model

repo: ProxymanApp/proxyman-windows-linux


text:
16.结束四月

今天终于了解到她和你都说过什么了，想到她说的这些道德感，确实我怎么解释都是徒劳的了，我还是很尊重她的看法的，每个人都是有自己主观感受的，我也同样可以体会你的感受，尊重你的选择。至于我，我能做的只有少想多做，慢慢改变了。
多多思考之后，确实心境上有了一些变化，反思了以前的一些事情，还是有成长的。其实当我发现你是 the one 的时候，刚刚开始发展关系的时候，我已经下定决心改变了，我已经在专心致志想和你在一起了，有些事情已经绝对不会去做了，当然，经过这些日子的反思与复盘，那些事情就更不可能去做了。不知道之前你也想思考思考，最后得到什么样的结果。
现在的我，做好自己，积极变好。至于你，我想除了我自身努力，还需要一丝丝的运气了，只能祈祷这世界坏人多一些了。
还记得你当时给我推荐了防晒，我那个时候已经开始改变了，我原来是一个很不在乎皮肤护理的人，我就已经开始买了水乳防晒准备用起来了，因为我想皮肤更好一点，更配得上你一些。到现在瓶瓶罐罐越来越多了，不过我觉得皮肤确实更好了一些。接下来还会优化方案。
护肤
原来的方案是 水杨酸 水 乳 眼霜，早上增加抹防晒。接下来稳定住皮肤，祛痘效果好一些以后，换成早C晚A，眼霜，面霜的方案，白天继续抹防晒，同时买了 coolibar 的帽子，加上原来已经有的手套，白天出门把物理级别的防晒也做一下。
牙齿
已经预约了11号上午的牙医，预计在五月两个周末分别进行局麻拔出智齿。月底到六月初，返回威海做隐适美矫正牙齿。
痘印痘疤
已经预约3号下午的皮肤科了，准备看一下激光治疗一下，终于把多年前没什么行动力去做的事情准备给做了。
眼袋
这两天观察下来，早上可能会有点肿，晚上就很平整，准备在皮肤科的时候问问情况，如果真是眼袋且不太好保养解决的话，应该也会手术治疗一下，我经过一番研究发现眼袋消除的手术相对来说还算简单。
健身
这些日子每天的锻炼还是很有效果的，基础代谢应该确实有提高，在 Apple Watch 上体现出来变化了，相比以前每天消耗的卡路里更多了。
皮肤牙齿眼袋这些问题，今年都会一点一点解决，一点一点改变，感觉可以住在九院了。我现在很困，倒逼睡眠法还是很有效果的，但是依然想写完这些把四月结束掉，准备开始五月的生活。
最后我这几年从来没有期望过什么，也没有特别想要得到什么。我从一个普通本科的地理专业，干到现在，我也付出过努力。在现在我努力改变的情况下，我想获得一点点运气，让我再有一次机会。

不要活在过去， 不要惆怅未来。即把握现在。 成为更好的自己，一切都会变得更好

authors: PseudoCowboy zhaoxilingcheng

repo: PseudoCowboy/lose-love-algorithm


text:
1.19.4?

Describe the feature you have in mind.
Support for the latest MC version :)
Does this solve a particular problem?
No response

1.19.4 pls ?

I have not tried  it myself yet, but it should probably just work with 1.19.4 out of the box

Haven't tested it on 1.19.4. However, on 1.19.3, it loads/doesn't crash but doesn't actually tell players the block's name.

I have uploaded a new version (1.2.0) which should work again for both 1.19.3 and 1.19.4

Thank you!!

authors: GhostIsBeHere Julienraptor01 PssbleTrngle RaptaG

repo: PssbleTrngle/KnowMyName


text:
Can't enable Two-factor Authentication for Administrator account

Product
Please check the corresponding boxes below for which products this is about.

[x] Panel
[ ] Daemon
[ ] Dockerfile(s) [Please list if so: __ ]

Type

[x] Bug or Issue
[ ] Feature Request
[ ] Enhancement
[ ] Other

What Happens
Clicking Enable Two-factor Authentication gives an error "An error occured while attempting to perform this action. Please try again."
How to Reproduce

Login
Click Account Security
Click Enable Two-Factor Authentication

Error Logs

[2016-10-15 01:50:18] production.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException in /srv/pterodactyl/bootstrap/cache/compiled.php:8831
Stack trace:
#0 /srv/pterodactyl/bootstrap/cache/compiled.php(8155): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request))
#1 /srv/pterodactyl/bootstrap/cache/compiled.php(8083): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request))
#2 /srv/pterodactyl/bootstrap/cache/compiled.php(8079): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#3 /srv/pterodactyl/bootstrap/cache/compiled.php(2446): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#4 /srv/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#5 /srv/pterodactyl/app/Http/Middleware/LanguageMiddleware.php(58): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#6 /srv/pterodactyl/bootstrap/cache/compiled.php(9819): Pterodactyl\Http\Middleware\LanguageMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#7 /srv/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#8 /srv/pterodactyl/bootstrap/cache/compiled.php(13401): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#9 /srv/pterodactyl/bootstrap/cache/compiled.php(9819): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#10 /srv/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#11 /srv/pterodactyl/bootstrap/cache/compiled.php(11853): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#12 /srv/pterodactyl/bootstrap/cache/compiled.php(9819): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#13 /srv/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#14 /srv/pterodactyl/bootstrap/cache/compiled.php(13147): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#15 /srv/pterodactyl/bootstrap/cache/compiled.php(9819): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#16 /srv/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#17 /srv/pterodactyl/bootstrap/cache/compiled.php(13084): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#18 /srv/pterodactyl/bootstrap/cache/compiled.php(9819): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#19 /srv/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#20 /srv/pterodactyl/bootstrap/cache/compiled.php(3171): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#21 /srv/pterodactyl/bootstrap/cache/compiled.php(9819): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#22 /srv/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#23 /srv/pterodactyl/vendor/dingo/api/src/Http/Middleware/Request.php(108): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#24 /srv/pterodactyl/bootstrap/cache/compiled.php(9819): Dingo\Api\Http\Middleware\Request->handle(Object(Illuminate\Http\Request), Object(Closure))
#25 /srv/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#26 /srv/pterodactyl/bootstrap/cache/compiled.php(9804): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#27 /srv/pterodactyl/bootstrap/cache/compiled.php(2390): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#28 /srv/pterodactyl/bootstrap/cache/compiled.php(2374): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#29 /srv/pterodactyl/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#30 {main}

System Information
Output of uname -a:
Linux dev2 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Output of php -v (if Panel):
PHP 7.0.11-2+deb.sury.org~trusty+2 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.11-2+deb.sury.org~trusty+2, Copyright (c) 1999-2016, by Zend Technologies

Output of node -v (if Daemon):
v6.8.0

Pretty sure I ran into this yesterday while testing some other things and pushed a fix unintentionally.
Regardless, 2FA is working correctly in 0.5.0-pre.3 so I'm going to leave this open for a bit, but it should be fixed already.

Thanks for taking a look. Just for notice, i did try v0.4.1 originally then also tried the 'develop' branch to see if it was fixed. I'm not sure if .5.0-pre3 is pushed into develop or not.
thanks

It would be on the feature/better-api branch is is pretty unstable right now.

authors: DaneEveritt feardevilz

repo: Pterodactyl/Panel


text:
Use 0-tuples for much better ratio precision

This was attempted with Commit de9afa1978449920d4145e6dc2c9358ce0268c64, but sadly has a data race for the 0-tuples counter with Intel CPUs. For some reason, it worked fine in a 2700X. This data race may already happen with longer tuple counts, but if so the effects are negligible.
Since the 0- to 1-tuples ratio convergence is much faster than the 1t/2t one, it is an interesting thing to implement. It might even be used to calculate accurately earnings for pooled mining.

Now fixed with Commit b6cc1f5b95f799accd31270e4a45b649c7c8a446
It finally had nothing to do with a data race, but was due to the different way to test the first prime number when using Avx2, which needed a simple adaptation to make the improvement work in this case too.

repo: Pttn/rieMiner


text:
best model data pkl access

I am trying to download deepsea_bestmodel.pkl from pan.baidu.com
However, I failed to download the file because I don't have a Baidu account and Baidu requires Chinese mainland phone number to create an account.
Could you share the file using other cloud services? (ex. google drive, amazon)
Best regards

Closed. Thank you for helping me.

repo: PuYuQian/PyDeepSEA


text:
Add gzip (or similar) to data_latest.json

The server serving data_latest.json is not sending out a compressed file, which would reduce the current data file request (as I write) from 575K to something more like 54K.

@dracos That's going through the CDN directly from the storage. I need to check the configs to see what can be done.

I have now investigated this issue. Almost all of the files are compressed, except for this one. It appears as though the storage determines its content-type as octet-stream (binary) for some reason, and as such bypasses the compression protocol.
I have no idea why that's happening as all other JSON files appear to have the correct content-type associated with them.
It is possible to override it in the CDN rules, but that's a fix which does not address the issue. I'm going to find out why this is happening in the first place.

 Add gzip (or similar) to data_latest.json

Another way to make the JSON file smaller would be to remove unnecessary whitespace, e.g.:
$ cat data_latest.json | jq --compact-output > data_latest_compact.json
$ ls -lh data_latest.json data_latest_compact.json
-rw-r--r--  1 acme  acme   1.6M 28 Apr 19:14 data_latest.json
-rw-r--r--  1 acme  acme   1.4M 29 Apr 14:47 data_latest_compact.json
$ gzip -9 data_latest.json; gzip -9 data_latest_compact.json
$ ls -lh data_latest.json.gz data_latest_compact.json.gz
-rw-r--r--@ 1 acme  acme   127K 28 Apr 19:14 data_latest.json.gz
-rw-r--r--  1 acme  acme   122K 29 Apr 14:47 data_latest_compact.json.gz

@acme I'm working on it. Re white spaces, I'm not sure which ones you're referring to. The files should be minified. So I'm assuming you're referring to the space after commas and stuff. Are we sure that doesn't end up causing any encoding issues on some old browser?

For example, https://c19downloads.azureedge.net/downloads/data/data_latest.json includes many
{"date": "2020-04-02", "value": 652}
... which could instead be:
{"date":"2020-04-02","value":652}
ECMA-404 The JSON Data Interchange Standard says:

Insignificant whitespace is allowed before or after any token

Parsing JSON is a Minefield, but all parsers should be able to handle parsing without that insignificant whitespace.
Compressing the response with gzip will save more bandwidth.

@acme There is more to this than most people see from the outside. Some people think that because this is a frontend service, there's no backend associated with it either. That's not true at all. We have multiple severs and serverless functions dealing with different parts of the service.
The issue is, all our CDNs (and we have several) and our servers are set to compress any file with the content type of application/json or text/csv. Now, they do that most of the times, but there are two issues:

The main data file is deployed through a data pipeline directly to our Azure storage. For some bizarre reason, the content type is then determined as application/octet-stream (i.e. binary file), whose type is not compressed by the CDN. I can't just make a rule there for this content type, it'd confused some platforms. Another hassle is that when the content type is incorrect, the data won't bypass CDN caching, so we sometimes need to purge the CDN cache manually too.

Even when manually set to application/json, the CDN sometimes bypasses the compression rule. I'm trying to find out why, but I don't have much time to investigate these things in as much depth as I would like to - not right now.

Additionally, our end to end latency is very low (5-20ms on average). It'd be kinder to the overall network if the load was reduced, and believe you me, we do care. The main Dev and DevOps is currently a little... shall we say stretched and this is not a high priority issue. That doesn't, however, mean that I am not actively pocking around looking for a solution. But it's a maze, and I don't want to bring the whole thing down by experimenting on stuff.
The initial design and structuring was not done by us - we inherited it after the initial deployment. Bear in mind that this is a crisis response service. It is a bit different to your average service which undergoes months of planning, service design, user research, etc. This had to be done fast, not necessarily pretty. We are reading 100s of emails (not to mention twitter threads) everyday, and evaluate every single feedback to enhance the service; but some features have higher priorities. Some of us have been working on this for 70-90 hours a week to get it here.
Finally, I'm going to split the data down to multiple files for the main service (not the downloads) via a separate ETL that I have written and deployed. That would not necessarily solve the issue in its entirety, but it'll download parts of the data (mainly the heavier ones) on demand. It'll also not be a an entirely blocking process that prevents the service from loading altogether. The ETL is already splitting the data, and the structure will be incorporated into the frontend in the next few days.
At some point, I'll incorporate manually storage into the ETL. That'll give me the ability to change the metadata and correct the content type.
As for the spaces, I'm a bit weary because we need to support IE. I'll change it and deploy it to our dev service so that our testers can test it on different platforms and browsers and if it is properly parsed everywhere, I'll add it to the ETL. Not sure if there's a Python library for it, but if not, I'll write some RegEx to do the work.

dumps(separators=(',',':'))

@dracos Thanks. I'd never really look at that argument.

@dracos @acme I have now implemented the removal of excess space chars from JSON outputs. It'll take effect from the next deployment of the data (some time this afternoon).

authors: Ha-san-ali acme dracos xenatisch


text:
Jenkins builds intermittently failing

Our Jenkins builds will sometimes fail when running scripts/cibuild with the following error:
$ tsc
error TS2688: Cannot find type definition file for 'papaparse'.
error Command failed with exit code 1.

Rerunning the build seems to have fixed the issue each time this has happened.

This seems to have happened in conjunction with a failing PR build, and seems to have stopped once that PR was merged, so perhaps the issue here is more accurately described as: "Failing PR builds cause the next develop build to fail"

repo: PublicMapping/districtbuilder


text:
How to parse empty tags

How would we remove empty tags recursively, any example?
like my HTML

\n
\n\t

How would I remove tags in some cases I have \n or \t I need to strip that as well.

Stripping all \n so that tag would become empty.
If it is empty its parent would also be empty, that also needs to be strip recursively.

This is very inefficient, but this would work:
var data = `

content

`

func main() {
	doc, err := goquery.NewDocumentFromReader(strings.NewReader(data))
	if err != nil {
		log.Fatal(err)
	}

	els := doc.Find("*")
	els.Each(func(i int, s *goquery.Selection) {
		if txt := s.Text(); strings.TrimSpace(txt) == "" {
			s.Remove()
		}
	})

	h, _ := goquery.OuterHtml(doc.Selection)
	fmt.Println(h)
}

It selects all elements and removes each one that has only whitespace text in it. I wouldn't use this for anything serious, though, it would be much more efficient (but a bit more complex) to use the net/html parser directly and walk the tree of nodes.
Hope this helps,
Martin

I consider as an enhancement, the option should be there to find empty tags.

authors: bohrasankalp mna

repo: PuerkitoBio/goquery


text:
Indexing out-of-bounds not throwing

nn = SimpleChain(
  static(10),
  TurboDense(identity, 1),
)

nn(randn(10), SimpleChains.init_params(nn))[2]

This seems like a bit of a footgun. Indeed, my foot is not unscathed.

julia> StrideArraysCore.boundscheck() = true

julia> nn(randn(10), SimpleChains.init_params(nn))[2]
ERROR: BoundsError: attempt to access 1-element PtrArray{Tuple{StaticInt{1}}, (true,), Float64, 1, 1, 0, (1,), Tuple{StaticInt{8}}, Tuple{StaticInt{1}}} with indices 1:1:1 at index [2]
Stacktrace:
 [1] throw_boundserror(A::PtrArray{Tuple{StaticInt{1}}, (true,), Float64, 1, 1, 0, (1,), Tuple{StaticInt{8}}, Tuple{StaticInt{1}}}, I::Tuple{Int64})
   @ Base ./abstractarray.jl:703
 [2] checkbounds
   @ ./abstractarray.jl:668 [inlined]
 [3] getindex(A::PtrArray{Tuple{StaticInt{1}}, (true,), Float64, 1, 1, 0, (1,), Tuple{StaticInt{8}}, Tuple{StaticInt{1}}}, i::Int64)
   @ StrideArraysCore ~/.julia/packages/StrideArraysCore/pjIfM/src/ptr_array.jl:569
 [4] top-level scope
   @ REPL[8]:1

There are a ton of functions in the Julia ecosystem that don't have @inbounds because, even though they iterate based on the size of the arrays, "there's no guarantee that the array types actually implemented those functions correctly".
Forcing me to either reimplement the world, or be much more dangerous.

Note that if you start Julia with --check-bounds=yes...
julia> using SimpleChains

julia> nn = SimpleChain(
         static(10),
         TurboDense(identity, 1),
       )
SimpleChain with the following layers:
TurboDense static(1) with bias.

julia> nn(randn(10), SimpleChains.init_params(nn))[2]
ERROR: BoundsError: attempt to access 1-element StrideArraysCore.PtrArray{Tuple{Static.StaticInt{1}}, (true,), Float64, 1, 1, 0, (1,), Tuple{Static.StaticInt{8}}, Tuple{Static.StaticInt{1}}} with indices 1:1:1 at index [2]
Stacktrace:
 [1] throw_boundserror(A::StrideArraysCore.PtrArray{Tuple{Static.StaticInt{1}}, (true,), Float64, 1, 1, 0, (1,), Tuple{Static.StaticInt{8}}, Tuple{Static.StaticInt{1}}}, I::Tuple{Int64})
   @ Base ./abstractarray.jl:703
 [2] checkbounds
   @ ./abstractarray.jl:668 [inlined]
 [3] getindex(A::StrideArraysCore.PtrArray{Tuple{Static.StaticInt{1}}, (true,), Float64, 1, 1, 0, (1,), Tuple{Static.StaticInt{8}}, Tuple{Static.StaticInt{1}}}, i::Int64)
   @ StrideArraysCore ~/.julia/packages/StrideArraysCore/pjIfM/src/ptr_array.jl:569
 [4] top-level scope
   @ REPL[3]:1

Ok, so a general fix for this would impact performance too much - leaving it up to the documentation to be explicit about the danger?

Ok, so a general fix for this would impact performance too much - leaving it up to the documentation to be explicit about the danger?

I guess it isn't obvious to anyone where to look https://github.com/JuliaSIMD/StrideArraysCore.jl#caution

authors: chriselrod korsbo


text:
MQTT Integration

MQTT Integration
Overview of Changes
--

Removed GCM dependecy and references.
Installed Mqtt Client dependency
Configured MQTT client to point to server

Notes
--
The API team will specify the actual topic I need to subscribe to. Currently, I am subscribing to the topic myTopic as a placeholder. Addresses issue https://github.com/PushFish/pushfish-android/issues/1.
Sample Log
10-23 19:04:10.147 27591-27635/io.Pushjet.api I/io.Pushjet.api.PushListActivity: MQTT Connection successful!

You should subscribe to the topic with the name of your uuid

@VoliKoN the "name" of the uuid? The uuid is usually a GUID, no?

The correct UUID shows up in the settings page of the app, i think you can use the code that is used there for showing the UUID

This is the UUID the app uses: https://github.com/PushFish/pushfish-android/blob/master/app/src/main/java/io/Pushjet/api/SettingsActivity.java#L182

repo: PushFish/pushfish-android


text:
A drawing and minor cleanup

Added drawing: table_discovery.md
Cleanup:
Removed unused ISearchBackend from NavigationApiController constructor
Moved interface IItemSelectionResolverFactory to Px.Abstractions.Interfaces

I have some difficulties following the drawing. Maybe you should add some descriptive text explaining the flow and the intent.

authors: JohannesFinsveen likp

repo: PxTools/PxWebApi


text:
🛑 ArchiveBox is down

In edfabf7, ArchiveBox (https://archivebox.pxlbuzzard.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: ArchiveBox is back up in aadc921.

repo: PxlBuzzard/upptime


text:
pyav gpu utilization

Hello, pyav development team. I've noticed that when using the GPU for encoding and decoding, pyav's utilization seems to be relatively low. In comparison, when I use the ffmpeg command, its GPU encoding utilization can reach 100%, and decoding is at 50%. However, with pyav, the encoding and decoding rates are only 30% and 20%, respectively. I truly appreciate pyav as an excellent open-source project and hope it can be further optimized. Attached is the relevant data chart.

This has been debated to death in previous issues, and the docs explicitly state it's a non-goal.

repo: PyAV-Org/PyAV


text:
Offline HTML

Offline PDF documentation is now available (#343), but while working on that I was also considering how to build offline HTML documentation properly. I've got rid of most dependences on external images (hosted inside our GitHub issues), but two “online” images  still remain: the “cover” image (3D Object ⇄ 2D Projection), used in README and in “Comparison”, and the output of “Example of use” from README.
The cover image is, frankly, not essential and takes >2 MB (~1/4 of the whole PDF file, by the way!), although it looks appealing. So I've made an attempt to redraw it in SVG (~10 kB and also convertible to ~30 kB PDF for LaTeX):

(This is also a test that GitHub now supports SVG images!)
I guess, due to its small size, it can now be included in the repository. I don't know, however, what is the proper way to use it simultaneously in

README at GitHub
README in the built documentation
README at PyPI

Searching the internet shows that this is not straightforward. Does anybody know how to do so?
And the image in README example perhaps needs to be updated (it has an old Matplotlib appearance). I guess, we can easily include a script to generate it for offline documentation. But should we then just refresh the online image for GitHub/PyPI or maybe we can instead link to the generated image at RTD?

Nice! What software did you use to generate the figure?
Sorry, no idea(s) on the "proper way", any LaTeX processing appears to require .svg conversion.

Oy vey! According to “Images” and “Relative links” here, GitHub can use images from the repository, and this works indeed. However, PyPI doesn't understand this (see a recent report ~6 months ago) and apparently is not going to in any foreseeable future. I guess, the only viable solution would be to do it in two steps: first, merge the image into master, and then change its path to the corresponding github...raw URL. This has obvious drawbacks, but hopefully after that we'll not need to modify this image often or at all...

And for the example figure: what about changing the colormap to 'ocean_r'?

This is plotted even without clim and still makes more structure visible.
Another variant with even better contrast is 'jet_r':

but isn't it too harsh?

ocean_r looks the best IMO, but I believe the default viridis should be illustrated, as otherwise there may be user confusion  as to why their example does not reproduce the same output.

Oh, that works!

OK, see the results on GitHub and RTD!

This all looks awesome. Regarding the "example of use" figure, I suppose we could modify the example so that the intensity of the outer rings is better matched to the inner rings. Obviously the Abel transform changes this ratio, but we could start with an image that has a ratio of intensities that looks better with whatever colormap we choose.

I think, we can add the artificial image from the Lin-BASEX article (Fig. 3 / Table I) to our SampleImage and use it as an example. It seems to have a more uniform intensity distribution (and would also provide some test data with 4th-order anisotropy, which is useful by itself). A problem is, however, that the article doesn't list exact intensities, only mentioning that “The number of counts ... in each sphere varies between 160 000 and 320 000.” Maybe Thomas Gerber could help us again — if he can recall the details. :–) Or I can try to fit them trying to match the plotted projection...
(For the colormap, this “ocean” has a nice property that it kind of resembles the bluish color of the “overview” image.)

After some pondering, I've realized that “each sphere varies between 160 000 and 320 000” corresponds to total intensity 4πr2 I(r) = 160 000 × β0, with β0 (varying between 1 and 2) from the table. Here is the recreated image (with Poissonian noise and the same colormap terrain_r as in the article):

Looks very similar to Fig. 3, and the projection matches well. So I'm planning to add it to SampleImage in a separate PR later.
It still doesn't look great with the default colormap:

but is quite reasonable with ocean_r:

OK, closing as done (in #348, #349, #352).

authors: DanHickstein MikhailRyazanov stggh

repo: PyAbel/PyAbel


text:
Redactar documento CONTRIBUTING.md

Establecer el estándar de buenas prácticas para contribuir al proyecto

Creo que podríamos utilizar https://commitizen.github.io/cz-cli/ para apoyarnos también.

https://github.com/PyBAQ/temii-backend/blob/master/CONTRIBUTING.md

guia de estilos
https://vuejs.org/v2/style-guide/

authors: CalaoJuanPablo Jdash99 javierdaza

repo: PyBAQ/temii-frontend


text:
master_controller not initialized.

During the work of #174 I found another bug in dashboard.py:
https://github.com/PyMoDAQ/PyMoDAQ/blob/b870fef0f612a703d44abb797cba2f18c4282fa2/src/pymodaq/dashboard.py#L744-L818
How to reproduce:

open the dashboard
Change the beam_steering_mock to not initialize the camera (but the actuators)
Load the preset
Find the following error in the log:

pymodaq.dashboard - ERROR - cannot access local variable 'master_controller' where it is not associated with a value
Traceback (most recent call last):
  File "C:\Users\moneke.NLOQO\Repositories\PyMoDAQ\src\pymodaq\dashboard.py", line 772, in set_file_preset
    actuators_modules[-1].controller = master_controller
                                       ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'master_controller' where it is not associated with a value

I guess the problem is, that the first plugin is the camera. Without initializiation, there is no master_controller yet.
I don't know, what you expect to happen instead.

I find it confusing, that there is a difference, whether I check "init" in the preset or doing it afterwards.
As a user I expect the preset to load independent of the init state of hardware.

Hi,
In this preset there is master/slave behavior (camera is the master) to be
able to simulate the beam moving on the camera, when the actuators are used.
So I think what you see is normal behavior and not a bug, it makes sense
that the slave cannot be initialized if the master isn't yet. You will have
the same error if you launch the preset without initializing anything, and
try to initialize the motors before the camera.
Le ven. 27 oct. 2023, 09:31, Benedikt Burger @.***> a
écrit :

I find it confusing, that there is a difference, whether I check "init" in
the preset or doing it afterwards.
As a user I expect the preset to load independent of the init state of
hardware.
—
Reply to this email directly, view it on GitHub
https://github.com/PyMoDAQ/PyMoDAQ/issues/175#issuecomment-1782438003,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACIEUJTPOYS6RJ3KBLCTF3YBNPOVAVCNFSM6AAAAAA6MFW47SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGQZTQMBQGM
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

This is a really particular case for these master/slave controllers.
The control modules should b initialized in the right order: first master, then slave with slave receiving an instance of the master controller. Therefore the slave doesn't have to reopen a communication already opened by the master. They will share the same communication resource.
If the master module is not initialized there is no way for the slave to know how to init. But you are right, it is important for the user to at least be notified that there was an issue related to master/slave configuration. In this case, a message popup should be raised to let know the user.
In PR #174 a possibility was discussed:

add a try statement in each module initialization
log the error, and raise an other error (ActuatorError/DetectorError) that will trigger a message and the closing of the application (as the user should modify their preset)

Other ideas?

Now I understand it better. The example preset has the camera as a master.
Ok, that makes sense, that you cannot load it, if the camera is not initialized.
I'm fine with a message stating, that you try to initialize slaves without an initialized master. That should hint at the right issue.
In the current code base, though, the preset loading hangs (because of an uncaught exception) and you do not know, why.

A few notes trying to implement a stop-gap measure in #173 and looking at the code

if a DetectorError (or ActuatorError) is raised (I tried catching the NameError and raising such an error), the message box (for example of line 815) is not shown, because the return a few lines later is different from the expected return value, as I get the following error in the log:pymodaq.dashboard - ERROR - cannot unpack non-iterable NoneType object
Traceback (most recent call last):
  File "...PyMoDAQ\src\pymodaq\dashboard.py", line 1104, in set_preset_mode
    actuators_modules, detector_modules = self.set_file_preset(filename)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object

what happens if I have two masters and each has at least one slave. Let's assume, that the first master is initialized, then "master_controller" is defined. The second master, however, is not initialized. In this case, the slave of the second master will point to the first master!
The code for both plugin types seems quite similar, could it not be made a single method?

as for your first question, master/slave that should work together must have the same controller ID, see:
http://pymodaq.cnrs.fr/en/latest/modules/DashBoard.html#multiple-hardware-from-one-controller for a better understanding.
So basically the dashboard knows which module is slave of which master.
For the second question, I think the solution should be to actually catch the error in the parent method (set_preset_mode):

and in there quitting the application. Because as it is now, it doesn't return the right tuple (just a bare return) and even if it returned a tuple of empty lists it would try to close the modules while processing the rest of the parent method (set_preset_mode).
is that clear ;-) ?

PR #199 fixe this issue

authors: bmoneke rgeneaux seb5g

repo: PyMoDAQ/PyMoDAQ


text:
Generic lists

❓ Support request
Apologies if this is not the correct forum to post support requests - I couldn't find a more appropriate channel.
ℹ Setup
I have the following struct defined.
#[derive(Clone)]
pub struct Array<T: ToPyObject + IntoPy<PyObject>> {
  item_size: Option<u32>,
  items: Vec<T>,
}

Now, #[pyclass] does not allow for using generics, which is too bad, but I'm sure there's a technical reason behind it. That's quite alright, I suppose - I thought I could simply define another struct that's the Python representation like so.
#[pyclass(name = Array)]
#[derive(Clone)]
pub struct PyArray {
  #[pyo3(get)]
  item_size: Option<u32>,
  #[pyo3(get)]
  items: ?,
}

Here is my conversion code as of now.
impl<T: ToPyObject + IntoPy<PyObject>> IntoPy<PyObject> for Array<T> {
  fn into_py(self, py: Python) -> PyObject {
    PyArray {
      item_size: self.item_size,
      items: ?,
    }.to_object(py)
  }
}

⚠ Problem
What I cannot figure out, however, is how can I actually have pyo3 convert to and from this representation.

What should be the type of PyArray::items?
What can I do to convert the generic Vec<T> in my impl block?

I think items has to be Vec<PyObject>, and you convert by creating a new Vec with something like self.items.map(|v| v.into()).collect().

Thank you for getting back to me. Unfortunately, Vec<PyObject> does not impl Clone, so neither #[derive(Clone)], nor #[pyclass(name = Array)] deem the struct acceptable.
Py<PyList> is acceptable by #[pyclass(name = Array)] as of the latest commit (I believe), but it still isn't Cloneable. Now, I think I might be able to live without it being so, but I'm still curious if there's a way to work around this issue.
If this is what's currently possible, then all I need is to convert from a Vec<T> to Py<PyList>, which I might or might not be able to achieve with my limited knowledge on the subject, but it should be the least of my worries.

I don't believe Clone is required for #[pyclass]. At least, I have no problem compiling this:
#[pyclass]
struct Test {
    items: Vec<PyObject>
}

I don't believe Clone is required for #[pyclass]. At least, I have no problem compiling this:

I think it's required (for the blanket impl) for how #[pyo3(get)] works - so I think this won't compile:
#[pyclass]
struct Test {
    #[pyo3(get)]
    items: Vec<PyObject>
}

I have an idea how to fix this, will raise a PR later...

Indeed, I didn't think of the getter attribute.  For the fix, are you thinking of a ClonePy trait (analogous to FromPy and IntoPy)?

For the fix, are you thinking of a ClonePy trait (analogous to FromPy and IntoPy)?

I think ClonePy is a bit janky - I think I might be able to go one better and add Clone to PyObject - but it's an experimental idea 😄

We cannot clone(=refcnt += 1) PyObject without py token so ClonePy might be realistic.
But I think what is really useful is zero-copy get, which can be possible using array/buffer protocol.

For clone - see #908 😄

Currently, only rust-numpy has zero-copy conversion implementation. I want to migrate this feature into PyO3 itself with a reasonable trait design.

Would be very happy to see this! In my experience in C++ this used template specialization, so hopefully we can find a way without specialization here.

authors: birkenfeld davidhewitt kngwyu skreborn


text:
map io::ErrorKind::IsADirectory/NotADirectory to Python on 1.83+

This maps io::ErrorKind::IsADirectory/NotADirectory  to the corresponding Python exception when compiling on Rust 1.83+.
Closes #4740

Thanks for pointing that out, not sure why I stopped with only half the work done 🙃

Thank you for this MR!

authors: Icxolu Tpt