Update Community Workflow.md

Necessary change because of uncertainty.

👍 .. during the week we can better settle how this will go forward.

Hopefully, that is the case.


Cypress/E2E: Test fixes/updates for v6

Summary
Test report - https://automation-dashboard.vercel.app/cycles/c5bc4fee-ac2b-4678-b0bb-e5bd995cf76b
Submitted on top of https://github.com/mattermost/mattermost-webapp/pull/8850. See https://github.com/mattermost/mattermost-webapp/commit/262b4ff235ac51f854173d1a9f654d02974fd70e for specific changes of this PR. PR updated.
Fix tests to use test channel other than town-square when posting a message or anything related to not read-only functionalities. Read-only channel for non-admin was recently deprecated by https://github.com/mattermost/mattermost-webapp/pull/8541
Release Note
NONE

Sorry Elisabeth. Hope it's fine with you that Im merging this now so we can merge the other PR as well. Feel free to make comment so I can include on the next batch of PRs as well.


luis region change

Hi,
we have a luis application created in westus region now we wanted to move that application to west europe region
is there any option to move the luis application from one region to another ?

@Krishna-chinthireddy Thank you for your question. Can you please share with us the URL of the doc that you are having issues with?
Please note that we scope issues on this repro to feedback related to the docs. If you have a product question, please post it on Microsoft Q&A or Stack Overflow. Thank you for your understanding.

@Krishna-chinthireddy Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly reopen the issue and continue the discussion.


Convert shapefiles to geojson

Not recommended to use shapefiles

Step by step, taken from blog.exploratory.io:

Read shapefile

map <- rgdal::readOGR(dsn = ...)

Convert to geojson

geojson_map <- geojsonio::geojson_json(map)

Reduce size

geojson_map_reduced <- rmapshaper::ms_simplify(geojson_map, keep = 0.1) # "keep" is optional

4. Write to geojson file

```R
geojsonio::geojson_write(geojson_map_reduced , file = "<path>/map.geojson")

Fixed in #25


GLES3: Skip batches with zero instance count while rendering canvas

Fixes #74115
Replaces #85533
This PR fixes unintended batch rendering by skipping batches with zero instance count (instance_count == 0).
Actually this is the 3rd attempt of fixing a bug, and I believe this is the best approach. Maybe I should have been more careful...

Cherry-picked for 4.2.1.

Cherry-picked for 4.1.4.


[META/Proposal] OpenSearch project should Adopt Apache Foundation's stance on the use of genAI

Tl;DR: GenAI use is already common across many opensource projects and websites. We (OpenSearch) should acknowledge the value of these tools but also enforce responsible use. I propose the adoption of the Apache Foundation's Generative AI Guidance (https://www.apache.org/legal/generative-tooling.html) or something similar.
Describe the solution you'd like
We should add a new line to the sign-off that says you attest you reported any use of generative AI tooling. To report the use we can just add a new checkbox alongside the several we already have on pull requests.
I think this solution gives the project leeway in addressing generative AI use on a case by case basis while also getting in front of some of the more problematic practices genAI has led to. There has been discussion around examples of PRs from various projects where documentation and/or code has been run through gen AI tooling and then PRs opened to make these changes.
These contributions have been referred to as "low effort" or "low value" in context of those changes and demonstrated the need for some guidelines.
OpenSearch is millions of lines of code and changes to improve our readability of efficiency are often useful. However, there should be expectations about how and when genAI use is appropriate. I think having this evident on PRs will make it easier for maintainers to be judicious in reviewing pull requests.
Describe alternatives you've considered
Leaving things as is; banning genAI use; no restrictions whatsoever.
Additional context
I can share example PRs of what I am referring to, but please reach out to me directly on the public slack as I would prefer not to publicly use anyone's work as a "bad" example.

@scrawfor99 Thank you for opening this issue.  This is definitely a subject worth discussing.
As for the specific recommendation... like everything with GenAI these days, it's complicated.
With respect to the ASF-specific language, I want to exercise a bit of caution.  I respect the ASF immensely, and trust their analysis of issues like this.  However, their policies tend to err very strictly, and unless we intend to become an ASF project, incur many restrictions borne out of caution more than necessity.
As most SDEs these days, I recognize the benefit that GenAI has brought to us.  I've learned new things and improved my own code based on those learnings.  But it's really hard to put in writing exactly what that means.  I've asked an GenAI site to write a test case for some code and reviewed its response, excerpted relevant parts of it, and implemented it myself.  It's certainly not perfect, but it does better in many cases than I would do, and I think a very detailed human review of the AI result is a (very) happy medium.  But it's a compromise that defies codification in any written rules.
On the other side of the argument, I have contributed hundreds of answers on Stack Overflow under CC-BY-SA license which (among other requirements) requires attribution.  Such contributions are forbidden from ASF code for good reason.  And yet, the same GenAI that has helped me write better test cases also will answer questions in the narrow domain that I've contributed to with word-for-word responses that I wrote, without attributing me.   GenAI is a legal landmine.
All this is to say I agree that we need a policy, but I am not sure I want to adopt ASF-specific language, but I do want to make it clear that authors need to write their own code themselves, even if they learned something by getting an answer from AI.
That's hard to do.  I understand why the most strict restrictions are in force when legal requirements are at stake.  I just want to hold back from the "MUST" and keep the "SHOULD" here, as this is an impossible-to-really-enforce requirement.


Map view adds a wrong extra curly bracket

If I run this query and click "Map view" it takes me to this URL which works fine
If I run this other query and click "Map view" it takes me to this URL which doesn't work. The query seems to be encoded correctly in the URL, however apparently the map view is appending for some reason an extra curly bracket at the end of the query, making it invalid and causing an errorv during fetch. In fact if I remove the last curly bracket (%7D) from the URL (obtaining this URL) the map view works fine.
I suspect that this bug might be a wrong handling of the extra pair of curly brackets introduced by SERVICE <...> { ... }

@Danysan1 The Map view does not work properly with SELECT *. If I replace * with the variable names, it works fine: https://qlever.cs.uni-freiburg.de/osm-planet/BHGwom . If you write SELECT * in your first query, it also doesn't work.
I am surprised that it almost works. I thought that SELECT * did not work at all. Removing the last %7D does not look right because that closing curly brace is an integral part of the query. That this works as a workaround is probably a side effect of the regular expression used by https://github.com/ad-freiburg/qlever-petrimaps to parse the SPARQL query (to find out which column contains the geometry variable).
@patrickbr Can you have a look?

This should now be fixed with https://github.com/ad-freiburg/qlever-petrimaps/commit/8238c1029a31e53a9942b453a8e5e992d92f52a6.
The way this works is as follows: if a SELECT * ... is received, the query is rewritten as SELECT * WHERE { SELECT * ... } LIMIT 0. This query is executed against the SPARQL backend to get a list of variables. Let $a be the last variable in this list. Then the original query is rewritten as SELECT $a WHERE { SELECT * ... }, and this query is used to get the geometries.

Thanks a lot @patrickbr, I just deployed it and it works fine now, for example: https://qlever.cs.uni-freiburg.de/osm-planet/EEbBq1

Side note: with https://github.com/ad-freiburg/qlever-petrimaps/commit/4fa9368ee6e8276eba340b19b910943094a09674,    the Map UI now also supports type 2 variables (starting with a $).
SELECT (a as ?b) ... was already supported previously. With the latest commit, support for SelectClause should now be complete.

Oh wow, I had no idea that variable names in SPARQL could also start with $. But indeed: https://qlever.cs.uni-freiburg.de/osm-planet/J91n9L

I tried to test the map to check if I could close this issue as fixed but I can't see the "Map view" button anymore:

@Danysan1 So far, the geometry of an OSM object could be obtained directly via the geo:hasGeometry predicate. However, as pointed out in https://github.com/ad-freiburg/osm2rdf/issues/24, the GeoSPARQL standard demands that geo:hasGeometry points to an abstract geometry object, which then points to one or more serializations. Like before, we support the WKT serialization and since https://github.com/ad-freiburg/osm2rdf/pull/48, the geometries in the datasets produced by osm2rdf can be obtained via geo:hasGeometry/geo:asWKT.
I have already fixed some of the example queries and just now also fixed  https://qlever.cs.uni-freiburg.de/osm-planet/J91n9L . I also fixed the links on https://wiki.openstreetmap.org/wiki/QLever . It would be good to also fix the example queries on https://wiki.openstreetmap.org/wiki/SPARQL_vs_Overpass_QL_examples .
The Map view button is currently only shown when there are WKT literals in the last column.

Oh ok, makes sense!
I also updated the example queries in https://wiki.openstreetmap.org/w/index.php?title=SPARQL_vs_Overpass_QL_examples&diff=2648972&oldid=2636345


Is the implemenation of charge_mem right?

charge_mem and charge_cpu are charging the same budget. @graydon is this right?

No, it's not. Good catch, I'll fix.


Add a 'focusedRoute' config to scully.config so that I can just have the build focus on ONE route

🧩 Feature request
Description
 Similar to how I can do testing and tell the testing framework to only focus on a single test by using `it.only` or `fit`, I want to be able to have Scully only rebuild a single route so that I can focus on rapid-iteration development around a certain route/feature.
This would allow the users to run ng build --watch as well as npm run scully:serve -- --watch. If they had a focusedRoute defined, it would only build that one route instead of the entire list of handled routes. This would allow a developer to build/debug Scully plugins easier. Additionally, it allows developers to experience the pre-rendered app, which is what the users are seeing.
Describe the solution you'd like
 If you have a solution in mind, please describe it.
Describe alternatives you've considered
 Have you considered any alternative solutions or workarounds?

This feature is already implemented by using the --routeFilter option where you can give one or more (comma separated) routes you want to restrict building to


kube2consul updates

Updated includes, references to renamed PortalIP (ClusterIP) and bumped the API version

:+1: to this


Fix typo on the 'XMonad.Hooks.Rescreen' doc

Description
Just a trivial typo fix.
Checklist

[x] I've read CONTRIBUTING.md

[ ] I've considered how to best test these changes (property, unit,
manually, ...) and concluded: XXX

[ ] I updated the CHANGES.md file

Thank you!


⚠ Samsung has degraded performance

In 78f14ff, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 3142 ms

Resolved: Samsung performance has improved in 0847850.


[DO NOT MERGE] - TECH-542 Migrate content to github Action

Btw, do not merge until we get some follow-up on this comment: https://github.com/cypress-io/cypress/issues/17627#issuecomment-1160787439


0.1.8

Improved pub/sub flow, added common event handler.

Codecov Report
Attention: Patch coverage is 70.17544% with 17 lines in your changes missing coverage. Please review.

Project coverage is 78.06%. Comparing base (e9d33b4) to head (e95404f).
Report is 8 commits behind head on master.

Files with missing lines
Patch %
Lines

...Main/kotlin/eu/vendeli/rethis/utils/CommonUtils.kt
42.10%
5 Missing and 6 partials :warning:

...otlin/eu/vendeli/rethis/commands/PubSubCommands.kt
72.72%
3 Missing and 3 partials :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
- Coverage   78.12%   78.06%   -0.07%
==========================================
  Files          71       72       +1
  Lines        2213     2238      +25
  Branches      248      262      +14
==========================================
+ Hits         1729     1747      +18
- Misses        301      303       +2
- Partials      183      188       +5

Files with missing lines
Coverage Δ

src/commonMain/kotlin/eu/vendeli/rethis/ReThis.kt
79.31% <100.00%> (-0.24%)
:arrow_down:

...vendeli/rethis/types/common/ChannelSubscription.kt
0.00% <ø> (ø)

...u/vendeli/rethis/types/core/ActiveSubscriptions.kt
100.00% <100.00%> (ø)

...lin/eu/vendeli/rethis/types/core/ConnectionPool.kt
74.50% <100.00%> (-0.50%)
:arrow_down:

...otlin/eu/vendeli/rethis/commands/PubSubCommands.kt
84.33% <72.72%> (-3.17%)
:arrow_down:

...Main/kotlin/eu/vendeli/rethis/utils/CommonUtils.kt
59.45% <42.10%> (-3.51%)
:arrow_down:

... and 1 file with indirect coverage changes


make the 4.24 platform LinuxAArch64 configurable

UE4 4.24 has a new platform, LinuxAArch64 that's activated by default. This adds the ability to switch it off.

Thank you so much for this PR @wchristian. Before I merge, please add your name in the AboutMessageLabel 🙂.

Cheers, just pushed that commit, hope it's fine like that.

Yup that's good 🙂


Control characters are not shown

Halp ticket:

support/b6556d18b6f511e396195226a240cace

Control characters aren't showing up. For example, create a file in vim and type ctl+v,ctl+h to insert a backspace character in a shell script and notice that it is invisible in Atom. Maybe not all invisibles should be hidden. Then again, I just started using this today, so maybe I haven't discovered the proper setting.

Screenshot time! Here's Vim:

And here's Sublime:

And Atom:

This has bitten me once already. (I had a control character in an html file which threw off Firefox)

FYI - The Info format uses a few control characters to separate nodes and provide navigational information for menus, cross references, indices, and so on.

This bug has wasted half a day of my time in two separate occasions.
$this->getT

If one were so inclined to address this issue, where would they begin to look?

This is more of a problem with the chromium based renderer. The easiest solution would be to add all control characters to the Show Invisibles feature. I can't figure out what control character this is
Here-><-Here

Do we have a plan to fix this? This bug really drives me crazy, I have to switch back to sublime every time to double check...

Does anybody know atom team plans to fix this problem?

Unifying all invisibles-related enhancements and fixes under #12157. You may want to subscribe there for updates.


Full screen on Firefox

Full screen videos on Firefox don't take up the entire screen, a workaround is to inspect the video player and then uncheck "max-height: calc(100vh - 16rem)" for ".channel-page__video-player".

confirmed, but works when using "incrustation mode"

Hi, this is now fixed in 0.6


Cannot read property 'name' of undefined

When I tried to login I got 2 errors like this: Cannot read property 'name' of undefined and [vue] async stack trace. And when I click home button I got a redirect loop.

@phuclh Thanks for the update. I will review this shortly.

The issue is now resolved.


Moved pipeline to new gitlab CI runners

It looks like the reason for the fails is the code and not the infrastructure anymore :slightly_smiling_face::+1:

No :-)
We need the privileged runner to test the kernel with KVM. We have currently a problem with the release version, which is reason that "user-space" isn't able to run.

The gitlab runner should actually have KVM access. I have to check again...

Unfortunately I have closed the PR by mistake. However, your changes are already integrated in the latest version.


Supported way to prompt for actual port

http-server is being used in https://github.com/krausest/js-framework-benchmark/.
When portfinder picks a port different from 8080, we need to pass that port to selenium https://github.com/krausest/js-framework-benchmark/issues/333.
At the moment I'm getting by with
grep "<IP_ADDRESS>" server.out | sed -e 's/.*<IP_ADDRESS>://'
Is there currently a better way ?
If not, how about outputting a .json file with address/port/etc ?
I could open a PR, if this is desired.

What you're doing now seems like the best solution. I'm not keen on use outputing JSON-files for data that can (and is) already logged to stdout.
I would be fine with you adding that grep + sed command to the README though. 😃


Changes to the repo, update the database

This will probably have to wait until after the  repos are transferred. But it would nice to have some CD for DB changes. I'll most likely use BK to set it up. I'll also put in a test that just verifies all the files are valid JSON before we try to upload.

I need to update Heroku to run the script.

Working as of #135


[WIP] Reduce config in container

Description
Reduces extra config in our container.
Reviewer Notes

Does this dockerfile work across testing and deployment contexts?

Setup
None
Code Review Verification Steps

[ ] Code follows the guidelines for Logging
[ ] The requirements listed in
Querying the Database Safely
have been satisfied.
Any new migrations/schema changes:

[ ] Follow our guidelines for zero-downtime deploys (see Zero-Downtime Deploys)
[ ] Have been communicated to #dp3-engineering
[ ] Secure migrations have been tested using scripts/run-prod-migrations

[ ] There are no aXe warnings for UI.
[ ] This works in Supported Browsers and their phone views (Chrome, Firefox, IE, Edge).
Any new client dependencies (Google Analytics, hosted libraries, CDNs, etc) have been:

[ ] Communicated to @ntwyman
[ ] Added to the list of network dependencies

[ ] Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
[ ] User facing changes have been reviewed by design.
[ ] Request review from a member of a different team.
[ ] Have the Pivotal acceptance criteria been met for this change?

References
None
Screenshots
None

I think this change is probably worth getting in. Let's rebase on master and then run it through our testing again.

I think this is ready to go if you've tested it. Let's merge!


Thinking how this could be usefull

Thinking how this could be usefull
playing with ace editor
because i found that years ago in the esp ESP FSBrowser example
but i see no way how your ESP chat can be usefull yet
greet luberth
treid your html, looks nice
did not try it on a ESP32 Yet

Sorry for the late reply, been swamped with work.
This library is really meant as a demonstrator to show how to connect to the OpenAI API endpoint and format an API call to send a prompt to the model and get the response back. The response obtained from the API will then be displayed.


Failure to build when Microsoft.WindowsAppSDK 1.6 referenced through secondary nuget package

Describe the bug
With the latest WindowsAppSDK 1.6.240923002 it is impossible for a class library to consume a nuget package that references the WindowsAppSDK 1.6.240923002 nuget package.
Reproduction example code
The example consists of three projects:

WebView2LoaderBug.Lib -
A class library that uses the WindowsAppSDK 1.6.240923002 as a nuget reference and in itself builds a nuget package named WebView2LoaderBugLibrary.
WebView2LoaderBug.LibWrapper -
A class library that references the WebView2LoaderBugLibrary nuget package built by the WebView2LoaderBug.Lib project.
WebView2LoaderBug.App -
A WinUI 3 desktop application that references the WebView2LoaderBug.LibWrapper project.

The project fails to build the WebView2LoaderBug.Lib project with the following compiler error output:
1>------ Rebuild All started: Project: WebView2LoaderBug.Lib, Configuration: Debug Any CPU ------
Restored C:\Users\my-user\Documents\Develop\lab\WebView2LoaderBug\WebView2LoaderBug.LibWrapper\WebView2LoaderBug.LibWrapper.csproj (in 51 ms).
Restored C:\Users\my-user\Documents\Develop\lab\WebView2LoaderBug\WebView2LoaderBug.App\WebView2LoaderBug.App.csproj (in 70 ms).
Restored C:\Users\my-user\Documents\Develop\lab\WebView2LoaderBug\WebView2LoaderBug.Lib\WebView2LoaderBug.Lib.csproj (in 88 ms).
1>WebView2LoaderBug.Lib -> C:\Users\my-user\Documents\Develop\lab\WebView2LoaderBug\WebView2LoaderBug.Lib\bin\Debug\net8.0-windows10.0.22621\WebView2LoaderBug.Lib.dll
1>The package WebView2LoaderBugLibrary.1.0.0 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why package readmes are important.
1>Successfully created package 'C:\Users\my-user\Documents\Develop\lab\WebView2LoaderBug\WebView2LoaderBug.Lib\bin\WebView2LoaderBugLibrary.1.0.0.nupkg'.
2>------ Rebuild All started: Project: WebView2LoaderBug.LibWrapper, Configuration: Debug Any CPU ------
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "C:\Users\my-user\.nuget\packages\webview2loaderbuglibrary\1.0.0\lib\net8.0-windows10.0.22621\WebView2LoaderBug.Lib\runtimes\win-arm64\native\WebView2Loader.dll" because it was not found.
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "C:\Users\my-user\.nuget\packages\webview2loaderbuglibrary\1.0.0\lib\net8.0-windows10.0.22621\WebView2LoaderBug.Lib\runtimes\win-x64\native\WebView2Loader.dll" because it was not found.
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "C:\Users\my-user\.nuget\packages\webview2loaderbuglibrary\1.0.0\lib\net8.0-windows10.0.22621\WebView2LoaderBug.Lib\runtimes\win-x86\native\WebView2Loader.dll" because it was not found.
2>Done building project "WebView2LoaderBug.LibWrapper.csproj" -- FAILED.
3>------ Rebuild All started: Project: WebView2LoaderBug.App, Configuration: Debug x86 ------
3>C:\Users\my-user\Documents\Develop\lab\WebView2LoaderBug\WebView2LoaderBug.App\WebView2LoaderBug.App.csproj : XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'C:\Users\my-user\Documents\Develop\lab\WebView2LoaderBug\WebView2LoaderBug.LibWrapper\bin\Debug\net8.0-windows10.0.22621\WebView2LoaderBug.LibWrapper.dll'
3>CSC : error CS0006: Metadata file 'C:\Users\my-user\Documents\Develop\lab\WebView2LoaderBug\WebView2LoaderBug.LibWrapper\bin\Debug\net8.0-windows10.0.22621\WebView2LoaderBug.LibWrapper.dll' could not be found
3>Done building project "WebView2LoaderBug.App.csproj" -- FAILED.
========== Rebuild All: 1 succeeded, 2 failed, 0 skipped ==========

The reason for using a class library wrapper to consume the nuget package is because of bug https://github.com/microsoft/microsoft-ui-xaml/issues/6429.
Steps to reproduce the bug
Try to compile the given reproduction example code.
Expected behavior
The solution shall compile without any errors.
Screenshots
No response
NuGet package version
Windows App SDK 1.6.1: 1.6.240923002
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
This is a regression since Microsoft.WindowsAppSDK 1.5.241001000, using .NET 7.
Reproduction example project uses .NET 8.

Hi @kjean667 ! It may be a WebView2 issue. The new WebView2 packages has been just published today. Can you try with these new versions?
https://www.nuget.org/packages/Microsoft.Web.WebView2/1.0.2849.39
https://www.nuget.org/packages/Microsoft.Web.WebView2/1.0.2895-prerelease

@oggy22 I tried all five permutations of adding WebView2 10.0.2849.39 and 1.0.2895-prerelease to WebView2LoaderBug.Lib and WebView2LoaderBug.LibWrapper but it did not change anything. Still same problem.

@kjean667 I just had the same issue as well, this workaround worked for me.

@DCorrBECare Do you mean a workaround to distribute as unpackaged, without building an MSIX? That defeats the whole idea of the new and streamlined depolyment provided by MSIX.

Still not working in Microsoft.WindowsAppSDK 1.6.241114003.

I have chance to take a look at this issue today. I have not figured out root cause yet, but one thing seems wired to me:
In the project WebView2LoaderBug.Lib, the generated nuget package contains file WebView2LoaderBug.Lib.pri. After I dumped this file, the WebView2Loader.dll is treated as resource of the nuget package. I suspect this is incorrect.


test images meet many problems

is anyone meet some problem about training your model with your own data?
when i train the model, nothing goes wrong, but when i use my model to detect objects, i got an answer with all zeros,can and nothing goes wrong but i cant test my model on cuda()

@lixiandea maybe somewhere is wrong, you can check your code. If you use the demo.py, that might be wrong because the demo.py is origin version of ssd.pytorch. You should change it yourself, it's very easy.


Chinese UI Translation Update

Update since v1.2

Can you upload this to translate.rancher.com too (for 2.0)?

Done. There are some difference and I translated that one separately.


Adding log(ive) Modified Bessel Function of the first kind

As a follow up to #12244 I had fun adding a function to calculate log(ive).
@ev-br mentioned this is already done in _hyp0f1.pxd#L51
This points to DLMF 10.41.10, I extended _hyp0f1 to k=5 using A144617, which reduces max error.
I'd love some advice from @WarrenWeckesser about

where this code belongs
if it needs to support complex
how to make sure we can call it from stats.ncx2

using timeit in colab, special.ive takes ~1.5 µs, new cython code takes ~500 ns, pure python takes 18 µs
Error is still large when v and z are small. It probably makes sense to call np.log(special.ive(v, z)) when v and z are small and only use this when v and z are large.

Click to toggle implementation
import scipy.special
import numpy as np

def test_ive_asym(v, z):
    r"""Asymptotic expansion for I_{v}(z)
    for real $z > 0$ and $v\to +\infty$.
    Based off DLMF 10.41
    """
    # DLMF 10.41.3 calculates I_v(v*z)
    x = z / v

    # DLMF 10.41.8
    p = np.sqrt(1.0 + x*x)

    # DLMF 10.41.7
    eta = p + np.log(x) - scipy.special.log1p(p)

    # e^(vn) / ((2piv)^(1/2)*p^(1/2))
    log_res = v*eta - (np.log(2.0*np.pi*v)/2 + np.log(p)/2)

    # large-v asymptotic correction, DLMF 10.41.10
    pp = 1.0/p
    p2 = pp*pp
    p4 = p2*p2
    p6 = p4*p2
    p8 = p4*p4
    p10 = p6*p4

    v2 = v*v
    v3 = v2*v
    v4 = v2*v2
    v5 = v3*v2

    # u1,u2,u3 from DLMF, higher terms from oeis.org/A144617 and oeis.org/A144618
    u1 = (3.0 - 5.0*p2) * pp / 24.0
    u2 = (81.0 - 462.0*p2 + 385.0*p4) * p2 / 1152.0
    u3 = (30375 - 369603*p2 + 765765*p4 - 425425*p6) * pp * p2 / 414720.0
    u4 = (4465125 - 94121676*p2 + 349922430*p4 - 446185740*p6 + 185910725*p8) * p4 / 39813120.0
    u5 =<PHONE_NUMBER>.0 -<PHONE_NUMBER>7.0*p2 +<PHONE_NUMBER>54.0*p4   -<PHONE_NUMBER>50.0*p6 +<PHONE_NUMBER>25.0*p8 -<PHONE_NUMBER>75.0*p10) * pp * p4 /<PHONE_NUMBER>.0
    u_corr_i = 1.0 + u1/v + u2/v2 + u3/v3 + u4/v4 + u5/v5

    # -z for ive
    result = log_res + np.log(u_corr_i) - abs(z)
    return result

for i, (v, z) in enumerate([
    (3, 1), (3, 5), (3, 10),
    (3, 50), (3, 100), (3, 200),
    (10, 1), (10, 5), (10, 10),
    (50, 1), (50, 5), (50, 10),
    (150, 1), (150, 5), (150, 10),
]):
    with np.errstate(all='ignore'):
        ive = scipy.special.ive(v, z)
        log_ive = np.log(ive)
        log_ive2 = test_ive_asym(v, z)
        err = (log_ive2 - log_ive) / log_ive
        print(f"  ive({v:3}, {z:2}) = {ive:9.2e}, log = {log_ive:.2f} vs {log_ive2:.2f} err: {err:.1e}")
        if i % 3 == 2: print()

Click to toggle results
  ive(  3,  1) =  8.16e-03, log = -4.81 vs -4.81 err: 4.5e-06
  ive(  3,  5) =  6.96e-02, log = -2.66 vs -2.66 err: 3.5e-06
  ive(  3, 10) =  7.98e-02, log = -2.53 vs -2.53 err: -2.0e-07

  ive(  3, 50) =  5.16e-02, log = -2.96 vs -2.96 err: 1.1e-11
  ive(  3, 100) =  3.82e-02, log = -3.27 vs -3.27 err: 1.7e-13
  ive(  3, 200) =  2.76e-02, log = -3.59 vs -3.59 err: 7.1e-15

  ive( 10,  1) =  1.01e-10, log = -23.01 vs -23.01 err: -4.9e-11
  ive( 10,  5) =  3.09e-05, log = -10.39 vs -10.39 err: -6.6e-10
  ive( 10, 10) =  9.94e-04, log = -6.91 vs -6.91 err: 8.2e-10

  ive( 50,  1) =  1.08e-80, log = -184.13 vs -184.13 err: -0.0e+00
  ive( 50,  5) =  1.98e-47, log = -107.54 vs -107.54 err: -5.3e-16
  ive( 50, 10) =  2.16e-34, log = -77.52 vs -77.52 err: 3.8e-15

  ive(150,  1) =  0.00e+00, log = -inf vs -709.99 err: nan
  ive(150,  5) = 6.03e-206, log = -472.54 vs -472.54 err: -0.0e+00
  ive(150, 10) = 6.57e-163, log = -373.44 vs -373.44 err: 1.5e-16

In colab format

This could help with the underflow in the log term of #11777

log(ive) would also be very useful for the von Mises distribution (for example #17624).
If anyone wants to work on this, it might be worth looking into tensorflow which has an implementation: https://github.com/tensorflow/probability/blob/0759c57eb0306a5bb0fcc3d105bbcab9943092a5/tensorflow_probability/python/math/bessel.py#L879 .


Added initial file in front of materialize to check for jQuery

Pulled #2302 into a separate file we will use for initializing things like Require configurations in the future.

Hello!
New message, please read http://nle.l50sw.com/salad.php?y
<EMAIL_ADDRESS>


404 nbviewer before binder starts

Hi!
I tried looking for someone else with the same problem and looked at the docs, but I did not find someone with the same problem.
The Problem (Ref HBCLab/NiBetaSeries#166)
For the current binder link the nbviewer shows a 404 before the binder service is launched. I do not know what to troubleshoot (or if I should open an issue in nbviewer instead).
Thank you for making/maintaining binder, this is an excellent service that I use often for teaching/helping others get a start without having to install anything.
Edit: duplicate of jupyterhub/binderhub#616?
I tried changing: https://mybinder.org/v2/gh/HBClab/NiBetaSeries.git/binder?filepath=%2Fbinder%2Fplot_run_nibetaseries.ipynb
to
https://mybinder.org/v2/gh/HBClab/NiBetaSeries.git/binder?filepath=binder%2Fplot_run_nibetaseries.ipynb
but this does not appear to fix the issue.

If you remove the .git from the repository part it works: https://mybinder.org/v2/gh/HBClab/NiBetaSeries/binder?filepath=binder%2Fplot_run_nibetaseries.ipynb
Happy Sunday!

Thank you!
Should I close this issue and consider this user error only, or would there be any interest in handling this case (i.e., the case when a user clicks on the clone/download button to copy the repo url instead of using the address bar)

hmmm - good question, we could strip the .git in the address bar when it generates the link for people to share, I could see that being fairly common


non-locking plans

Hello,
There are scenarios where we want to run the same state plan from multiple k8s clusters, for example:

All dev->prod clusters create/manage the same Sentry project with the same config
Multi-cluster scenario where there are two or more prod clusters manage the same infra with the same config

However we sometimes run into state-lock errors, where timings of plans clash, and plan that started second cannot run due to the first plan locking the state.
What do you think about adding an option to set -lock=false on the plan stage?

Hi @emalihin
Thank you for bringing this up.
It would add a good use case to the controller. Let's think of a field to specify this.

Hi @chanwit, what do you think of lockPlan variable, that's defaulted to true?

Maybe we better reverse the logic like what we did for drift detection as we have
.spec.disableDriftDetection
which is false by default.
Say we would implement
.spec.disableLock / .spec.disableLocking
for this purpose.
Wdyt @emalihin ?
Would love to hear your feedback too @Nalum

Agree we should use something like .spec.disableLock, I'm not totally sure on the use cases. What's the reasoning behind having multiple clusters manage the same infrastructure?
I would assume we do not want to disable locking when an apply is actually going to be run?

What's the reasoning behind having multiple clusters manage the same infrastructure?
In a world where all clusters are created from the a "blueprint" - they are all identical and have the same components deployed.

as the flag must be passed during Terraform initialization.
Is it a case that's specific to this project? Usually one can do terraform init; terraform plan -lock=false ..; terraform apply ..

Is the state lock issue a short lived issue or once it's hit is that clusters instance is locked out and needs manual intervention?
It seems to me that you would hit the same issue with locking applies. Is there another way around this?

Is the state lock issue a short lived
it is short lived, plans are eventually green (until they clash again)

same issue with locking applies
good point, applies would clash in a situation where there's actually something to apply.

An alternative approach could be adding -lock-timeout=Ns option?
-lock-timeout=0s       Duration to retry a state lock.
This way a second parallel plan will wait for N minutes for lock to be released before failing the job.

This seems like a good approach to me. What do you think @chanwit ?

SGTM

let me know what you think @chanwit @Nalum  https://github.com/weaveworks/tf-controller/pull/489/files


Fix check for belongsTo relationship and use null data.

typeof can produce inconsistent behavior here since typeof [] and
null is 'object'.
We still want to pass null as the id since that is valid when for
example removing the link to the other object.

:+1: thank you sir


Using Delete Partition operation with KEEP_LATEST_FILE_VERSIONS  = 1 cleaner policy option evicts parquet files from S3 storage

Tips before filing an issue

Have you gone through our FAQs?

Join the mailing list to engage in conversations and get faster support at<EMAIL_ADDRESS>

If you have triaged this as a bug, then file an issue directly.

Describe the problem you faced
I'm having a Copy-On-Write (COW) table in AWS S3 bucket with some date based partitions. When I perform a delete_partitions operation on the Hudi table with cleaner policy configuration of KEEP_LATEST_FILE_VERSIONS = 1, hudi not only removes the partitions from the metadata (expected) but also actually deletes the partitions and the base parquet files from the S3 storage (unexpected).
I'm unable to understand why this is happening. As per Hudi's latest documentation, KEEP_LATEST_FILE_VERSIONS cleaner configurations deletes all but the latest file version from the storage. So when I perform the delete_partitions operation, are all the file groups in those partitions marked with a special to_be_deleted kind of version or the cleaning action first interacts with the table metadata, finds that the partitions and their files groups have been dropped and thus performs the actual cleaner action over those partitions. I'm more curious on why this is happening rather than how is this happening, as this is the favorable outcome in my use case.
NOTE: The actual file eviction from storage was not happening when the cleaner configuration was KEEP_LATEST_COMMITS = 1. In this is case, I had to perform an additional commit to trigger the cleaner action.
Write configurations used:

val FILE_VERSIONS_TO_RETAIN = 1

val options =  Map[String, String](
      DataSourceWriteOptions.OPERATION.key -> DataSourceWriteOptions.DELETE_PARTITION_OPERATION_OPT_VAL,
      DataSourceWriteOptions.PARTITIONS_TO_DELETE.key -> listOfPartitions,
      HoodieCleanConfig.CLEANER_POLICY.key -> HoodieCleaningPolicy.KEEP_LATEST_FILE_VERSIONS.name,
      HoodieCleanConfig.CLEANER_FILE_VERSIONS_RETAINED.key -> FILE_VERSIONS_TO_RETAIN
    )

// empty df is an empty dataframe

emptyDf.write
      .format("hudi")
      .options(cleanerOptions)
      .mode("append")
      .save(tablePath)

A clear and concise description of the problem.
To Reproduce
Steps to reproduce the behavior:

Create a Copy-On-Write (COW) hudi table in AWS S3.
Write some data into the table partitioned using hoodie.datasource.write.partitionpath.field
Drop some partitions using the write configurations provided above.

Expected behavior
A clear and concise description of what you expected to happen.
Environment Description

Hudi version : hudi-spark3.3-bundle_2.12

Spark version : 3.3.1

Hive version : 3.1.3

Hadoop version : 3.3.3

Storage (HDFS/S3/GCS..) : S3

Running on Docker? (yes/no) : no (AWS EMR 6.10.0)

Additional context
Add any other context about the problem here.
Stacktrace
Add the stacktrace of the error.

@007vedant I was trying and noticed that as soon as we switch the cleaner policy to KEEP_LATEST_FILE_VERSIONS, it deletes the partition irrespective of CLEANER_FILE_VERSIONS_RETAINED, its deleting the partition.
I will look into this more.


Numeric literals are always converted to decimal and lose visual separators

The Python statement
a = 0xFFEF

is converted to
a = 65519;

Users will likely prefer that to be
a = 0xFFEF;

Similarly, the visual separator characters '_' are lost, so the clarity of
one_billion = 1_000_000_000

is lost:
one_billion =<PHONE_NUMBER>;

C# now has separator characters too -- in fact the same symbol _ is used -- so pytocs should respect that as well.
The lexer needs to be modified so that, it still recognizes the literals as "literal number", "literal floating point number" but doesn't perform conversion to a number the way it does today.

Numeric literals are now preserved as they appear in the Python source.


Fetch user only if an entity with UserBlameInterface is detected within UserBlameSubscriber

Information

Q
A

Fixed tickets
Fixes #1509

BC breaks
None

Documentation PR
N/A

@kriswillis if you would add a test, and branch from master, I would release that as a hotfix release :-)

@kriswillis still relevant? We are currently planing the 1.1 release. If you could finish this PR we can include it. THX

@chirimoya Yes, still relevant - added tests, awaiting review :)

Looks fine, but the tests didn't run for a reason... Maybe you can rebase, and push again? Maybe the tests will run this time :-)


Always assume the file to be pushed contains binary data

Improve the way files are pushed and pulled to/from the device

Published in<EMAIL_ADDRESS>


vimPlugins.Coqtail : init at 2020-08-27

Motivation for this change
Add the vim plugin Coqtail
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

@jonringer looks like there's some kind of problem with pandoc. any idea why?

@jonringer looks like there's some kind of problem with pandoc. any idea why?

fixed


Relation picker issue

hello, i have 2 collections that are related to each other (one to many). when i try to insert a record in the second section and click the relation picker button the app crashes with this error in the console:
e.substring is not a function
after i added the item from a postman call the list of the second collection also fails to load and the app crashes due to the same error.
both collections have a field of type JSON, and the second collection also has 1 more string field and the relation field with the first collection
issue present on the latest version of pocketbase 0.16.4

Could you export your collections configuration as JSON (Admin UI > Settings > Export collections)?

I think I found how to reproduce it. The label json field is causing the error because it is used as "Display field" but it is not a string.
I'll submit a fix sometime later today, but as a temp workaround you can try to explicitly set another "Display field" from the relation field options (eg. the id).

Could you export your collections configuration as JSON (Admin UI > Settings > Export collections)?

[
    {
        "id": "np1wu6sn67l2olq",
        "name": "sections",
        "type": "base",
        "system": false,
        "schema": [
            {
                "id": "qhbhmyiq",
                "name": "title",
                "type": "json",
                "system": false,
                "required": true,
                "options": {}
            }
        ],
        "indexes": [
            "CREATE INDEX `_np1wu6sn67l2olq_created_idx` ON `sections` (`created`)"
        ],
        "listRule": "",
        "viewRule": null,
        "createRule": "",
        "updateRule": "",
        "deleteRule": null,
        "options": {}
    },
    {
        "id": "fzxe3t8zwemxnng",
        "name": "links",
        "type": "base",
        "system": false,
        "schema": [
            {
                "id": "zsiitzt3",
                "name": "label",
                "type": "json",
                "system": false,
                "required": true,
                "options": {}
            },
            {
                "id": "rmvm4t2f",
                "name": "link",
                "type": "text",
                "system": false,
                "required": true,
                "options": {
                    "min": null,
                    "max": null,
                    "pattern": ""
                }
            },
            {
                "id": "jhpafc3m",
                "name": "section",
                "type": "relation",
                "system": false,
                "required": true,
                "options": {
                    "collectionId": "np1wu6sn67l2olq",
                    "cascadeDelete": true,
                    "minSelect": null,
                    "maxSelect": 1,
                    "displayFields": []
                }
            }
        ],
        "indexes": [
            "CREATE INDEX `_fzxe3t8zwemxnng_created_idx` ON `links` (`created`)"
        ],
        "listRule": "",
        "viewRule": null,
        "createRule": "",
        "updateRule": "",
        "deleteRule": null,
        "options": {}
    }
]

I think I found how to reproduce it. The label json field is causing the error because it is used as "Display field" but it is not a string. I'll submit a fix sometime later today, but as a temp workaround you can try to explicitly set another "Display field" from the relation field options (eg. the id).

can't seem to find this option, in the edit collection panel i can only change the nonempty toggle of my field

It should be fixed in the latest v0.16.5 release.


tyro.conf.arg aliases not working in Pydantic>=2

# tyrotest.py
from typing import Annotated

import tyro
from pydantic import BaseModel
from tyro.conf import arg

class AliasCfg(BaseModel):
    alias: Annotated[str, arg(aliases=["-a"])]

cfg = tyro.cli(AliasCfg)
print(f"Alias: {cfg.alias}")

With Pydantic < 2:
$ python tyrotest.py
usage: tyrotest.py [-h] --alias STR

╭─ arguments ─────────────────────────────────────────────╮
│ -h, --help              show this help message and exit │
│ --alias STR, -a STR     (required)                      │
╰─────────────────────────────────────────────────────────╯

With Pydantic >=2:
$ python tyrotest.py
usage: tyrotest.py [-h] --alias STR

╭─ arguments ────────────────────────────────────────╮
│ -h, --help         show this help message and exit │
│ --alias STR        (required)                      │
╰────────────────────────────────────────────────────╯

and of course the alias is not recognized on invocation.
With functions and dataclasses the alias works perfectly.

Hi Marcelo, thanks for filing this + the detailed reproduction instruction!
This is actually fixed in the branch for #106, which I'll try to merge + release today. I can add your example to the tests to prevent regressions.

Should be fixed in 0.6.1!

Should be fixed in 0.6.1!

Can confirm. Thanks!

Is there some reason we shouldn't be able to alter the annotations after the initial class definition?
# tyrotest.py
from typing import Annotated

import tyro
from pydantic import BaseModel
from tyro.conf import arg

class AliasCfg(BaseModel):
    alias: str

AliasCfg.__annotations__["alias"] = Annotated[str, arg(aliases=["-a"])]
cfg = tyro.cli(AliasCfg)
print(f"Alias: {cfg.alias}")

This does not print the -a (but replacing pydantic with @dataclass does show this alias)

Mechanically, the reason is that we use pydantic's model_fields dictionary to extract types + metadata. This dictionary will be generated before your annotations update here (I believe during BaseModel's __init_subclass__).
I have mixed feelings about this pattern , but here's an alternative that should work in pydantic v2:
from typing import Annotated

import tyro
from pydantic import BaseModel
from tyro.conf import arg

class AliasCfg(BaseModel):
    alias: str

AliasCfg.model_fields["alias"].metadata.append(arg(aliases=["-a"]))

cfg = tyro.cli(AliasCfg)
print(f"Alias: {cfg.alias}")

thank you! I'll try that out.
I agree that it feels a little fragile to the inner workings of Pydantic... but I'm not sure of a better way to do this- the configuration class is defined elsewhere, and doesn't know anything about tyro.conf.arg. I'm open to ideas about that if you have any.

Ok!
I guess another option is to subclass and override just the fields you want to add aliases for:
# tyrotest.py
from typing import Annotated

import tyro
from pydantic import BaseModel
from tyro.conf import arg

class ExternalCfg(BaseModel):
    alias: str

class AliasedCfg(ExternalCfg):
    alias: Annotated[str, arg(aliases=["-a"])]

cfg = tyro.cli(AliasedCfg)
print(f"Alias: {cfg.alias}")

Although maybe this doesn't work if it's deeply nested.


[Feature] code format and translate comments to EN.

Problem Summary: code format and translate comments to EN.
What is changed and how it works?
Feel free to ping committers for the review!
Contribution Checklist

Make sure that the pull request corresponds to a GITHUB issue.

Name the pull request in the form "[Feature] [component] Title of the pull request", where Feature can be replaced by Hotfix, Bug, etc.

Minor fixes should be named following this pattern: [hotfix] [docs] Fix typo in README.md doc.

Purpose of this pull request

LGTM


Numerous incorrect regex results

In Firefox and Chrome:
'abc'.split(/./)
Array(4) [ "", "", "", "" ]

In mujs (current version as of about an hour ago):
'abc'.split(/./)
["a", "c"]

Possibly related:
Chrome/FF:
'abc'.split(/^a/)
Array [ "", "bc" ]

mujs:
'abc'.split(/^a/)
["abc"]

Here's another:
Chrome/FF:
' ; a;  b ; c'.split(/ *; */);
Array(4) [ "", "a", "b", "c" ]

mujs:
' ; a;  b ; c'.split(/ *; */)
[" ", "a", "b", "c"]

Note that space in the first array entry.

Another one:
Chrome/FF:
"aaaa bbb caaa".split(/a(a+)/)
Array(5) [ "", "aaa", " bbb c", "aa", "" ]

mujs:
"aaaa bbb caaa".split(/a(a+)/)
["a", "aa", " bbb c", "aa", ""]

Another couple:
Browsers:
"äbä".split(/ä/)
Array [ "ä", "ä" ]
"bäb".split(/b/)
Array(3) [ "", "ä", "" ]

mujs:
"äbä".split(/ä/)
["\u00E4b", ""]
"bäb".split(/b/)
["b\u00E4", ""]

But "äbä".split(/b/) works.
(FWIW, i'm not actively searching for these, just stumbling across them while testing my own code, which uses regexp.c from this project.)

It's still an issue with the latest commit, even simplest split regexp doesn't work:
% node -e 'console.log("test".split(/./))'
[ '', '', '', '', '' ]
% mujs
> "test".split(/./)
["t", "s", ""]

Fixed in https://github.com/ccxvii/mujs/commit/40556b31c6920491474a4e24784ed3b1c1c832de
Thanks @ccxvii.


Add dynamic-css.php

dynamic-css.php is a file where all inline styles set in the theme options should go. These can be added using ACF theme options or via Theme Customize API.
This would look something like this:
<?php
/**
 * Dynamic css based on options in the Theme Customize API and Theme Options
 *
 * @package theme-name
 * @version 1.0.0
 * @author Infinum
 * @license http://www.gnu.org/licenses/gpl-2.0.txt
 * @since 1.0.0
 */

/********* Custom Header ***********/
if ( has_header_image() ) {
  $custom_css .= '#expire_title_bar{background:url(' . get_header_image() . '); min-height:' . esc_attr( get_custom_header()->height ) . '; background-size:cover; background-position:center center;}';
}

/********* Main Color ***********/
$main_color = get_theme_mod( 'main_color' );

$custom_css .= '::selection{ background:' . esc_attr( $main_color ) . ';}
  ::-moz-selection{ background:' . esc_attr( $main_color ) . ';}
  a{color:' . esc_attr( $main_color ) . ';}
  nav > ul > li > a:hover:after,
  nav > ul > li > a:hover:after, nav > ul > li.current_page_item > a:after, nav > ul > li.current_page_parent > a:after{ background:' . esc_attr( $main_color ) . ';}
  nav > ul ul li:hover > a{ color:' . esc_attr( $main_color ) . ';}';

/********* Footer Logo ***********/
$footer_retina_logo        = get_theme_mod( 'footer_retina_logo', '' );

if ( '' !== $footer_retina_logo ) {
  $footer_logo               = get_theme_mod( 'footer_logo', '' );
  $footer_retina_logo_size   = wp_get_attachment_image_src( $footer_logo );
  $footer_retina_logo_width  = intval( $footer_retina_logo_size[1] );
  $footer_retina_logo_height = intval( $footer_retina_logo_size[2] );

  $custom_css .= '
    #footer_main_logo {display: block ;}
    #footer_retina_logo {display: none; width: ' . $footer_retina_logo_width . 'px; max-height: ' . $footer_retina_logo_height . 'px; height: auto;}
    @media only screen and (-webkit-min-device-pixel-ratio: 1.3),
    only screen and (-o-min-device-pixel-ratio: 13/10 ),
    only screen and (min-resolution: 120dpi) {
      #footer_main_logo {display: none ;}
      #footer_retina_logo {display: block ;}
    }';
}

I used my personal theme as an example. After setting them in, you would enqueue them inside enqueue hook like this
// Styles from options - appends styles to $custom_css variable.
$custom_css = '';
include_once( get_stylesheet_directory() . '/inc/dynamic-css.php' );
wp_add_inline_style( 'main-css', $custom_css );

Where main-css is the handle of the main style.
With this, we are avoiding hard coding styles on the elements (for instance when selecting background image).

I would be happier if we could explore how to use webpack for this.

I think this is mostly aimed if you are using Customizer API (which we currently don't really use). It's a suggestion, and I'm fine having some of the guys on the team (@gabriel-glo, @tihomirselak or @IvanGrginovInf) explore this option a bit more, and maybe create a wiki entry on how you can use this.
I know I was trying to make webpack work with customizer-preview.js which is used when you want to live change settings in the customizer screen, but I was having some difficulties with it (exposing the global wp object in my customizer-preview.js).
I'll close this for now, as it's not that important atm :)


DOM errors when playing Car on Safari

When playing the Car asset on Safari, it stops after ~15 seconds and throws a 3016 error, a 3015 error, and several "InvalidStateError (DOM Exception 11): The object is in an invalid state." errors. The video then enters a buffering state, but the time continues advancing forward until it reaches the end. It still plays the audio according to the little audio playing icon in the URL bar, but no sound is produced.
I've tried all of our test assets and haven't seen this with any other asset. I was testing with Safari 10.1.2.

The first error that occurs is a decoder error.  This only happens with adaptation; when switching to an affected track manually (when we clear the buffer first), the error doesn't occur.  Since this is a decoder error, this is likely a platform issue, but it may have to do with how we adapt.

I am fairly sure this is a limitation of the Safari decoder.  This may be caused by bad content, or just that Safari doesn't support this kind of content.  Safari plays other similar content fine, and it looks like we are doing all the correct things for this content.
I have reduced the problem to only when adapting (or switching without clearing the buffer).  When we clear the buffer (and implicitly reset the decoder), the content plays fine.  It also plays fine on the stream by itself.  I think the streams are somehow incompatible with each other.  I also think this only applies to the 426x240 video stream.  One difference I notice between that and the other streams is that in the SPS the pic_order_cnt_type is different.  The Safari decoder may not support changing this field since it changes the way frame parsing happens.
We could remove that video stream from the manifest, but we don't control the original asset (it's a YouTube test asset).  We could either drop the asset completely or make a copy that doesn't have that representation.

It's not representative of YouTube-encoded content, it's old, and it's unmaintained.  I move we drop it.

The fix has been cherry-picked to v2.2.x and will be released in v2.2.2.


Visual Studio Code has crashed

I can't use code when i update it to 0.10.5 .To no avail I have uninstalled and reinstalled the application. OSX 10.11.2.

OS X 10.11.2, VSCode 0.10.5, crashed

You might be running into this one:
https://github.com/Microsoft/vscode/issues/1463
If that is the case, instructions on how to go back to 0.10.3 are near the top of the discussion, and a possible workaround is near the bottom.

start up VS Code with a English-US keyboard layout，it works good!
Thanks all.

Closing as duplicate.


[Feature Request] Resolution of namespaces

The current implementation supports document structure based on MMA cell structures (like (* ::Title:: *)). To my knowledge the official version is a pure front-end feature, and it is of much convenience to have it handled for code editors.
However, the kernel features - namespaces (contexts and packages) and scoping constructs like Module Block - are not resolved. Therefore, developers will have to go through the scripts manually to tell which context a symbol is in.
As most authors use namespaces concurrently along with cell structures, the current features are actually sufficient, and this issue may not be a necessity; if this is the case, this thread could be used to discuss the best practice for concurrent use of namespaces and cell structures.

Cell structures are static while namespace and scoping functions are not. Begin["foo"<>ToString[Unique[]]] will give you a dynamic result. Resolving those will end up giving you wrong results. Thus, only if the file is evaluated once, will we know the actual context that a symbol is in. I am open to any effective, though not universally applicable, method to handle this.

Since the traditional dynamic namespace is difficult to resolve, would it be easier to resolve the static new style package derivatives? Does CodeParser handle this already?

The new-style package is somehow not officially documented and CodeParser recognizes it but doesn't support the full features. I doubt I can run the following code directly from Wolfram Kernel:
Package["MyPackage`"]
PackageImport["CodeParser`"]

mySym := 1

Can you try it out? Thanks. I wish there will be more examples/resources of this package usage, if you'd like to provide them. Thanks

This feature has been added since 10.x or so, and seems to be still in common use even though remaining undocumented.
I found some related resources in the following links:

tutorial by b3m2a1
Leonid's description of the new package format
Szabolcs' FAQ-style guide-line

I doubt I can run the following code directly from Wolfram Kernel: (code)

As mentioned above and explained in Leonid's answer, Package["MyPackage"]andPackageImport["CodeParser"] are only special static primitives, and are not really dynamically interpreted commands;. basically they are like PRAGMA macros in C/C++.

Thanks for the information. I just tested the new-style and it seems working correctly (on Linux. No luck on my Windows' SimplifiedChinese version). Still gonna experiment with it for a while. I am starting to think about how we can leverage the namespace info now. Gonna leave this issue open for longer time.


[Don't merge] Design PR for renaming configurable backend options

This is a design PR for renaming configurable backend options to address issue #72.
Issue Description
Currently configurable options do not follow any naming pattern. E.g. there is rep_delay and use_measure_esp, that are not unified in their naming.
There should be a unified naming convention used for configurable options, e.g. use_* or the like. These settings should then be returned in the job object as suggested in #71
Solutions
1. Use Prefix
As suggested in the issue, use a prefix like use_*.
Pros:

Easy to see which options are configurable.

Cons:

Verbose, needs more typing
Doesn't read well when use-* is used with non boolean properties.
Breaking change for Circuit Jobs users

2. Use Options Class
We already have an Options class which represents the mutable backend options. We could consider renaming it to BackendOptions or BackendConfig or BackendContext or similar.
And then instead of passing bazillion parameters to backend.run, we could just pass the BackendOptions class.
backend_options = BackendOptions(shots=1024, memory=False,
                       qubit_lo_freq=None, meas_lo_freq=None,
                       schedule_los=None,
                       meas_level=MeasLevel.CLASSIFIED,
                       meas_return=MeasReturnType.AVERAGE,
                       memory_slots=None, memory_slot_size=100,
                       rep_time=None, rep_delay=None,
                       init_qubits=True, use_measure_esp=None)

backend.run(circuits, options)

Pros:

Easier to see which options are configurable.
Not verbose

Cons:

Breaking change for Circuit Jobs users

3. Leave Circuit Jobs as is, update only for Program Jobs
Waste no time changing this for Circuit Jobs (backend.run). Focus on getting this right for Program jobs (qiskit runtime). runtime.run already accepts an options Dict, which we could consider changing to a BackendOptions or RuntimeOptions class as suggested in Solution 2, or leave as Dict.
Pros:

Time saved not breaking Circuit Jobs users, and make it better for Program Jobs.
Easier to see which options are configurable.
Not verbose

Cons:
None that I could think of
My preference right now is Solution #3 - change options Dict to BackendOptions class only for Program Jobs (runtime.run).
@nonhermitian @jyu00 @ajavadia @mtreinish Thoughts?

One Idea is to use set_* rather that use.

My take on the 3 options

I still don't understand why we need a use_* or set_*. Like if we change meas_level to use_meas_level - sure you're specifying the measurement level you want to use, but isn't that already implied since you're passing it as a parameter to a function call? use_measure_esp has the use_ because measure_esp is not a verb, making the type nonintuitive. We can change it to something like measure_with_esp.

I don't see how that's any easier to use than the existing way, since all the parameter names stay the same, and now you need to import/initialize another instance. The only positive I see is to separate execution options (like shots) from non-execution options (like job tags).

This option has a couple of issues:
(a). a user calling say the vqe program shouldn't need to know/configure the options
(b). user specified options could conflict with program specified options

My take on the 3 options

I still don't understand why we need a use_* or set_*. Like if we change meas_level to use_meas_level - sure you're specifying the measurement level you want to use, but isn't that already implied since you're passing it as a parameter to a function call? use_measure_esp has the use_ because measure_esp is not a verb, making the type nonintuitive. We can change it to something like measure_with_esp.

I agree that use_* and set_* or any other prefix is just more typing as well as unnecessary, since passing as function params implies we are setting the values.

I don't see how that's any easier to use than the existing way, since all the parameter names stay the same, and now you need to import/initialize another instance. The only positive I see is to separate execution options (like shots) from non-execution options (like job tags).

Not easier to use, I should have said easier to understand what the configurable backend options are.

This option has a couple of issues:
(a). a user calling say the vqe program shouldn't need to know/configure the options
(b). user specified options could conflict with program specified options

My bad, so right now the run_circuits method in IBMProvider class passes these configurable backend options as inputs (not options) to runtime.run. So I guess we should focus on implementing Solution #2 for provider.run_circuits method instead of backend.run. And then in provider.run_circuits method combine the BackendOptions and the run_config (user specified options) and pass as inputs to runtime.run.

use_measure_esp has the use_ because measure_esp is not a verb

Neither is rep_delay.
I mean the point of the whole exercise it to have uniformity in the naming conventions.  Saying use_* in one place doesn't make any sense because you are also using the others, as you said.  If all the optionals have a uniform beginning, then it is very easy to determine what is what when the number of possibilities is large.  However, If people want to maintain the current system where each option is just its name then I am fine.  Most users do not set these options anyway, and their usage should decrease over time as things get abstracted away.

Can't we just write clear docstrings that categorizes and says "these are the configurable backend options" and "these are job tags". Things like shots are extremely common to use and making another level of indirection with importing BackendOptions hurts user experience I think.
Although I completely agree that users need to easily understand what are runtime options (like shots or memory), what are compile time options (not sure if we expose any of this but execute() has a bunch), and what are metadata (like job tags).

If all the optionals have a uniform beginning, then it is very easy to determine what is what when the number of possibilities is large.

If the goal is to make it clear which are backend options vs job "metadata", we can use option 2 but for metadata since backend options are far more commonly used. So something like
jm = JobMetadata(name="foo", header={"foo": "bar"})
backend.run(circuits, metadata=jm, shots=1234)

Although I like @ajavadia's idea of just documenting it better, since it's the least amount of work for users who are already familiar with most of the options.

I also agree that improving the documentation is a good solution. I will go ahead with it if I hear no objections. Thanks everyone!

related to https://github.com/Qiskit-Partners/qiskit-ibm/issues/70

So for backend.run can I classify the parameters like below in the docstring?
circuits
Metadata:
job_name
job_tags
header
Job Options:
max_circuits_per_job
Backend Options:
shots
memory
qubit_lo_freq
meas_lo_freq
schedule_los
meas_level
schedule_los
meas_level
meas_return
memory_slots
memory_slot_size
rep_time
rep_delay
init_qubits
parameter_binds
measure_with_esp
**run_config
Do we further need to sub-categorize Backend Options? (I do not understand them enough to sub categorize).


No sound recorded

Hey,
This component is exactly what I'm looking for so, thanks!
But, I can't make it work.
I tried the following on my Mac:
audio = audiorecorder("Click to record", "Recording...")
if len(audio) > 0:
st.audio(audio, sample_rate = 16000)
I am required to specify the sample_rate.
The app does require access to my microphone - good.
And whatever rate I try, I get only some white noise when trying to play the record.
Anything I'm not doing right? Thanks in advance!

Hello,
Thank you for using it, and thank you for reporting the issue :)
Ok, I took some time to check this out, and it seems to be only appearing on the latest streamlit release.
Specifically, it is linked to this pull request.
They are doing some fancy things with the numpy array and apparently messing things up for us.
A working workaround I found is to convert the numpy array to bytes before feeding it to st.audio.
For now, just do:
st.audio(audio.tobytes())

And everything should just work as expected :)
I'll try to investigate more to see if I can preprocess the array to make is st.audio friendly, otherwise I'll just update the doc.

Thanks - it does the trick!

No easy fix, and no time to open a bug issue on streamlit about this.
Closing for now.


Undefined offset: 0 in spatie/image/src/Image.php:170

I'm not sure what causing this issue. But in one project of me, every time my Medialibrary conversions has to trigger, i've got this error:
ErrorException: Undefined offset: 0 in /path/to/vendor/spatie/image/src/Image.php:170
Stack trace:
#0 /path/to/vendor/spatie/image/src/Image.php(170):

Other projects with the same code are working. Maybe something with my settings? Localhost is also working.
I tried to dump the $optimizer when $optimizer[0] is empty and got an array with no [0], but only a [1].
Maybe a bug which is happening in specific environments?

I just updated from version 1.8.0 to 1.10.1 and it looks like this fixed my issue. Not sure what happened. But it's working again :)


Cursor moves position after deleting a character and changing line

Issue Report Checklist

[x] Searched the issues page for similar reports
[x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[x] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[ ] Could not reproduce inside jupyter qtconsole (if console-related)
[ ] Tried basic troubleshooting (if a bug/error)

[x] Restarted Spyder
[ ] Reset preferences with spyder --reset
[ ] Reinstalled the latest version of Anaconda
[x] Tried the other applicable steps from the Troubleshooting Guide

[x] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
When replacing a simple string in selected text with Replace selection, Spyder takes a long time to replace it and to return control to the user.
What steps reproduce the problem?

Open a new Python file (or use temp.py or any existing Python file)
Write three lines with # Spyder is great (each in its own line)
Move the cursor in the first line in front of great
Press Del to delete the character g from the word great
Press the key Cursor down once

What is the expected output? What do you see instead?
I would expect that the cursor stays in the position before the character g in the next line, but it moves between g and r.
If I delete the character g with BACKSPACE, and move down one line, the cursor stays in the position between g and r, as expected.

Thanks @sphh for reporting this and thanks @bcolsen for verifying it. I will take a look.

I can confirm this issue as well. For Mac devs you can use https://karabiner-elements.pqrs.org/
and map the keys like

To switch the backspace for a delete

@goanpeca I think fn+delete one the Mac does delete.

Indeed :-p did not know that one! Thanks :-)

This has been brought up before and we found that it's an (annoying) Qt behavior.
However @juanis2112 has a very good idea on how to make this work as expected.

Must have missed it.
At the moment I have a .tex file open in TeXstudio, which is qt based (I have 5.9.5 installed), but that is not written in Python. I don't know, if this information can be helpful in narrowing down the cause …

Indeed, this is due to how the QPlainTextEdit widget behaves. Here's a small PyQt5 application where the behaviour can be reproduced:
from PyQt5.QtWidgets import QApplication, QPlainTextEdit
app = QApplication([])
widget = QPlainTextEdit()
widget.show()
app.exec_()

However, the Spyder CodeEditor widget already overrides keyboard input in
https://github.com/spyder-ide/spyder/blob/9c84cd89625d9ad07f54810588ae6464fa4efef1/spyder/plugins/editor/widgets/codeeditor.py#L4254
so fixing this is easy. It suffices to replace the lines
https://github.com/spyder-ide/spyder/blob/9c84cd89625d9ad07f54810588ae6464fa4efef1/spyder/plugins/editor/widgets/codeeditor.py#L4365
and
https://github.com/spyder-ide/spyder/blob/9c84cd89625d9ad07f54810588ae6464fa4efef1/spyder/plugins/editor/widgets/codeeditor.py#L4386
by self.stdkey_backspace():
https://github.com/spyder-ide/spyder/blob/9c84cd89625d9ad07f54810588ae6464fa4efef1/spyder/plugins/editor/widgets/base.py#L933-L937
However, Spyder also has a similarly annoying behaviour with the "Delete" key that is not reproduced by the PyQt snippet above. I'll try to track down the reason for that before making a PR. But a similar workaround should be possible.

Indeed, this is due to how the QPlainTextEdit widget behaves. Here's a small PyQt5 application where the behaviour can be reproduced:
from PyQt5.QtWidgets import QApplication, QPlainTextEdit
app = QApplication([])
widget = QPlainTextEdit()
widget.show()
app.exec_()

However, the Spyder CodeEditor widget already overrides keyboard input in
https://github.com/spyder-ide/spyder/blob/9c84cd89625d9ad07f54810588ae6464fa4efef1/spyder/plugins/editor/widgets/codeeditor.py#L4254
so fixing this is easy. It suffices to replace the lines
https://github.com/spyder-ide/spyder/blob/9c84cd89625d9ad07f54810588ae6464fa4efef1/spyder/plugins/editor/widgets/codeeditor.py#L4365
and
https://github.com/spyder-ide/spyder/blob/9c84cd89625d9ad07f54810588ae6464fa4efef1/spyder/plugins/editor/widgets/codeeditor.py#L4386
by self.stdkey_backspace():
https://github.com/spyder-ide/spyder/blob/9c84cd89625d9ad07f54810588ae6464fa4efef1/spyder/plugins/editor/widgets/base.py#L933-L937
However, Spyder also has a similarly annoying behaviour with the "Delete" key that is not reproduced by the PyQt snippet above. I'll try to track down the reason for that before making a PR. But a similar workaround should be possible.

Thanks @hengin for the help!

Thanks @hengin for the help!

However, Spyder also has a similarly annoying behaviour with the "Delete" key that is not reproduced by the PyQt snippet above. I'll try to track down the reason for that before making a PR. But a similar workaround should be possible.

Thanks for your help with that @hengin! @juanis2112 was on the right track to solve this one, but unfortunately got busy with our docs and the community survey.

However, Spyder also has a similarly annoying behaviour with the "Delete" key that is not reproduced by the PyQt snippet above. I'll try to track down the reason for that before making a PR. But a similar workaround should be possible.

Thanks for your help with that @hengin! @juanis2112 was on the right track to solve this one, but unfortunately got busy with our docs and the community survey.

For some reason (platform compatibility?), the Delete-key is handled as a shortcut. The problem disappears if I disable the "delete" shortcut in Tools > Preferences > Keyboard shortcuts.
The responsible piece of code is:
https://github.com/spyder-ide/spyder/blob/9c84cd89625d9ad07f54810588ae6464fa4efef1/spyder/plugins/editor/widgets/codeeditor.py#L2218-L2227
Apparently QPlainTextEdit handles Delete events differently than the above. Indeed, if I manually perform the steps above in a QPlainTextEdit I can reproduce the behaviour. The recording below shows the behaviour of three different methods of character deletion in a QPlainTextEdit (same snippet as I posted above). In each case I press up/down immediately after pressing backspace/delete.

Actually, much larger jumps can be produced:

The reason is most likely that the QPlainTextEdit remembers the rightmost position the cursor was at just before the text is deleted and wants to place the cursor there again. So we just need to clear this memory. The simplest method I've found so far is
cursor = self.textCursor()
cursor.setPosition(cursor.position())
self.setTextCursor(cursor)

I'll go ahead and make a PR now.

For some reason (platform compatibility?), the Delete-key is handled as a shortcut. The problem disappears if I disable the "delete" shortcut in Tools > Preferences > Keyboard shortcuts.
The responsible piece of code is:
https://github.com/spyder-ide/spyder/blob/9c84cd89625d9ad07f54810588ae6464fa4efef1/spyder/plugins/editor/widgets/codeeditor.py#L2218-L2227
Apparently QPlainTextEdit handles Delete events differently than the above. Indeed, if I manually perform the steps above in a QPlainTextEdit I can reproduce the behaviour. The recording below shows the behaviour of three different methods of character deletion in a QPlainTextEdit (same snippet as I posted above). In each case I press up/down immediately after pressing backspace/delete.

Actually, much larger jumps can be produced:

The reason is most likely that the QPlainTextEdit remembers the rightmost position the cursor was at just before the text is deleted and wants to place the cursor there again. So we just need to clear this memory. The simplest method I've found so far is
cursor = self.textCursor()
cursor.setPosition(cursor.position())
self.setTextCursor(cursor)

I'll go ahead and make a PR now.

Thanks @hengin for your help with this one!

Thanks @hengin for your help with this one!

Actually, it turns out the Qt-bug is fixed in pyqt5-5.15.2 which makes my workaround (#14559) somewhat redundant. But spyder seems to require pyqt5<5.13 for some reason?

Actually, it turns out the Qt-bug is fixed in pyqt5-5.15.2 which makes my workaround (#14559) somewhat redundant. But spyder seems to require pyqt5<5.13 for some reason?

Yeah, we haven't had time to increase our requirement to PyQt 5.15, nor we will until Spyder 5, to be released in April (some tests are failing with that version and also the highest version for which Anaconda has packages is 5.12).
So I think we should merge your PR for now. What do you think?

Yeah, we haven't had time to increase our requirement to PyQt 5.15, nor we will until Spyder 5, to be released in April (some tests are failing with that version and also the highest version for which Anaconda has packages is 5.12).
So I think we should merge your PR for now. What do you think?

Yes, that makes sense.

Yes, that makes sense.

Great! Merging then.

Great! Merging then.

A very special thanks to you, @hengin, to track down and solve that rather annoying bug!!!!

A very special thanks to you, @hengin, to track down and solve that rather annoying bug!!!!

Found this thread from the search. Can I get a confirmation of the situation as of late Feb 2021?
Has Spyder 5 been released? April 2020 was mentioned above. It's now 2021 and the Debian packages for Debian testing provide version 4.2.1
Just looking for some advice as I can confirm this bug is extremely frustrating. Appreciate it's not anything to do with the Spyder devs and it's a QT issue.

@ebird: https://github.com/spyder-ide/spyder/issues/12663#issuecomment-758270969 mentions April 2021, because the comment was written in January 2021.
Yes, it is somewhat annoying, but please keep in mind, that this is a voluntary run project with nobody getting paid, so please be patient. April 2021 is only just 2 months away!

@ebird: #12663 (comment) mentions April 2021, because the comment was written in January 2021.
Yes, it is somewhat annoying, but please keep in mind, that this is a voluntary run project with nobody getting paid, so please be patient. April 2021 is only just 2 months away!

Ok I understand, no problem. Thanks for the update. Fully appreciate the work involved.

Note that a workaround has been implemented (see PR #14559) and it is part of the recent Spyder 4.2.2 release: https://github.com/spyder-ide/spyder/releases/tag/v4.2.2

Please note that a workaround has been implemented (see PR #14559) and that it is part of the recent Spyder 4.2.2 release: https://github.com/spyder-ide/spyder/releases/tag/v4.2.2

I've just downloaded it - seems to be working as expected now. Thanks for this, a worth while hack to implement even if you're ditching this for the next major release.


Update npm package

The chai-fs package on npm hasn't been updated since the project was transferred from @Bartvds to @chaijs/chai two years ago.  😩
@keithamus - Not sure what exactly needs to be done to get the npm package updated.  I'm happy to help if I can.

@keithamus - Should I bump the version number and push a version tag, so npm gets updated?  Or will you take care of that?

@BigstickCarpet if you could handle that, that'd be swell 😄


update "remove duplicate code" to use ternary and ES6 harmony

A few things jump out at me here:

My personal opinion is that the ternary operator is a good way to clean code up. It prevents littering code with unnecessary if statements and, in this case, it prevents having to write portfolio = twice. Some might say the ternary operator is a little more clever than clear, but my opinion is the simplicity gains far outweigh the loss in clarity. If you agree, it's probably worth giving the operator its own heading.

I noticed your link to an Eric Elliott article earlier. I agree with him that ES6 should be used when possible.

I want to keep this PR atomic, but I think some clarity can be derived by cleaning up the object.

I think this is an awesome idea and wonderful contribution to the community! Thanks!

I personally don't like the ?: method.
At least if it doesn't fit in one single line.
How about this:
let portfolio = employee.getGithubLink();

if (employee.type === 'manager') {
  portfolio = employee.getMBAProjects();
}

Hm, I do see your point.
However, I do think I'm still partial to the ternary operator because it's up-front and honest about its assignment. It says, 'This value can be one of two things. Whatever gets assigned to it first will be its value.' It's not immediately obvious in your proposal that portfolio may later be overwritten by another value. It also allows for the use of const here, which I believe should be used whenever possible.
That said, I do see the elegance in your proposal and wouldn't be surprised if the community ultimately settled on it.

I also like to use const more. But there is also nothing bad in using let.
In this case using let indeed makes it kind of obvious that portfolio may later be overwritten by another value.
(Also the reassignment is just 3 lines below. What makes it pretty easy to find ^^)
And if you use linting right, the linter would error, if the variable isn't overwritten.

True.
I'm just envisioning a scenario where 1) someone doesn't make the intuitive leap that let is meant to be overwritten and 2) where the variable doesn't immediately get reassigned. Like, I can imagine the case where the reassignment--for one reason or another--isn't 3 lines below, but dozens.
Again, not married to my solution; if anything I'm coming around to you. Just trying to play the Devil's Advocate here.

closing for now 👍


Restore packages and updates folders

Bonus track: https://github.com/concrete5/concrete5/pull/3815/commits/739633b8476eaefc13552861e33a5f267cb2d81d

:+1:


Upper v lowercase MT quality issue

Hello Tommi and all
A translator on the memoQ IO groups forum mentioned that segments in uppercase are not translated nearly as well as those in lowercase by Opus.
I decided to check this out for myself and he is completely right
I took a couple of Swedish sentences off an easy website, pasted them all twice into Word, then converted the identical text into uppercase and ran it through the Opus-Cat tool
The results are in the attached file

What do you make of this Tommi?
Thanks in advance
Dave Neve

The reason for the quality drop with UPPER CASE TEXT is that OPUS-MT and Tatoeba models consider upper and lower case characters to be entirely different symbols, so they are translated in completely different ways. That might seem weird, but the motivation is that words and texts written in upper case often have a different function than the same words and texts written in lower case, e.g. upper case can communicate headings, warnings etc., which are translated differently than when the same words occur in lower case. So that's the theory, but in practise it seems that there's not enough upper case text in the training data for the NMT model learn how to deal with it. I'll make a note of this problem, in case there's an opportunity to change the current preprocessing to handle cases in a more rational way (but that change would only affect future models).
For the current models, you can circumvent the problem by using the edit rules, since they support changing character case. There's a pre-edit rule in the documentation which relates directly to this case (i.e. it lower-cases input to the MT engine): https://helsinki-nlp.github.io/OPUS-CAT/editrules#case_conversion. If you want to revert to upper case in the machine translation, you would need a post-edit rule that would do the reverse operation, i.e. upper-case everything, like this:

Hello Tommi
Thanks for the detailed explanation. I've entered the regex you gave us for converting upprcase to lowercase in the pre-editing phase. Who would ever have thought that uppercase would be translated differently to lowercase (not me in any case)
Thanks for all your help
Dave Neve

That's been my experience with upper-case text, as well, and I agree that upper-case text should be handled differently. The current models can't be changed, but the case handling could be modified in future models, so I'll copy this thread to Jörg Tiedemann who runs the OPUS model training.
@jorgtied Currently the OPUS models don't handle ALL CAPS text well, probably because there isn't enough of it in the training corpora. The motivation with training models with original casing is that it avoids the problem of truecasing/recasing and that casing occasionally has semantic significance (e.g. ALL CAPS text being mostly headings or non-translatables etc.). However, the scarcity of ALL CAPS training data means that in practice the models will not learn to handle ALL CAPS text properly. So it would probably be best to start using truecasing or recasing (or possibly even casing factors) in the models.

That's exactly what I would have said but without the technical jargon of course (as I don't know it)
Thanks for this


How to get the SSH Keys that were just created

Hello, team.  I thought a nice little addition to this page might be a quick section on how users can get the ssh keys generated with the VMSS create command or how to connect directly from cloud shell.  After all, if someone is following this article, there is a good chance they are just getting started and some guidance on how to either connect via cloud shell or download the keys for use locally would probably help them.
Here is an article that could be added for a direct connection from cloud shell to the VM over SSH....
https://learn.microsoft.com/en-us/azure/virtual-machines/ssh-keys-azure-cli#connect-to-the-vm
or if they user would like to download the keys for use locally, they could use the download/upload button within cloud shell itself.  I've placed some screenshots below and the default location of the keys.  Thanks!

Default location of the keys....
/home/user/.ssh/id_rsa
/home/user/.ssh/id_rsa.pub

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

ID: da9be68b-6d1e-2cc1-b5dd-1b5e83f3b0c0
Version Independent ID: 8599de08-e5f3-df97-2a71-94c01f648388
Content: Create virtual machines in a Flexible scale set using Azure CLI - Azure Virtual Machine Scale Sets
Content Source: articles/virtual-machine-scale-sets/flexible-virtual-machine-scale-sets-cli.md
Service: virtual-machine-scale-sets
GitHub Login: @fitzgeraldsteele
Microsoft Alias: fisteele

@mbiver
Thanks for your feedback! We will investigate and update as appropriate.

@mbiver
Thanks for your contribution. Please add your ideas in below link, so our production team can review it and update the same.
Ideas · Community (azure.com)


Browser Link - Browse With - not honouring launch url of project

I believe this is a bug - I originally raised it on stackoverflow here but yet to receive a response.
The issue is, when the asp.net project is configured with a "Launch URL" - if you then use the "Browse With" option in VS  to start multiple browsers - those browsers all open up but don't use the Launch Url configured..

@sayedihashimi ?

@billhiebert any thoughts?

This issue is being closed because it has not been updated in 3 months.
We apologize if this causes any inconvenience. We ask that if you are still encountering this issue, please log a new issue with updated information and we will investigate.


it's too hard to compile dll in windows!

who can give me the dll compiled? i'm try it for few days,but i'm failed;
PHP Version 5.5.12
MSVC11 (Visual C++ 2012)
x64
<EMAIL_ADDRESS>thank you!

@Gielert are you able to help out here? I recall you were able to build the extension for Windows. It would be great if I could put compiled extension as a part of the 0.11.0 release so others can easily find it.

Sure, i'll take a look at it.

Great, thanks!

@whysohandsome have you tried binaries from #4?

Closing due to the lack of response.


(Carbon) Text entered into text inputs (such as when choosing your name for a new alias) is invisible

Probably has something to do with the fact that it doesn't use an on-screen keyboard like console does.

I can't confirm this issue. Works fine for me. I hadn't touched anything in regards to this function.

Similar behaviour can be reproduced with FirstControlDevice = 1 (set as controller) and UseDynamicFEngSwitching = 0

OK so it's the object being marked for PC being hidden.
Then it should be a relatively simple fix to do. Just have exempt it from ever being hidden and that's it.
FE keyboard could also be restored technically but I don't think it's a big deal.

Update to my comment: also this can happen when switching between FEngs during creating a new alias - NAME appears where it shouldn't be, but this time without the above-mentioned settings.

Same thing, I'll just exceptions for those screens.

osk support would be pretty cool tho
could allow you to just play the game entirely using the gamepad


Fix some dead code, missing error checks, shadowings.

I applied
https://medium.com/@jgautheron/quality-pipeline-for-go-projects-497e34d6567
and was greeted with a deluge of warnings, most of which were not
applicable or really fixable realistically. These are some of the first
ones I decided to fix.
Please take a look whether the newly introduced error handlings all make sense.

@fabxc @beorn7

Nice tool and all, but let's apply with caution.
Sure, many things are correct, some cannot hurt. But please let's not become dogmatic for the sake of removing complaints yet another tool makes. Those tools are not always right and sometimes context invalidates their checks.
Even the standard library has plenty of cases where calls to Close() are made ignoring the error because there is no possible action. Spamming our logs doesn't help – "closing zlib writer failed" – great stuff, which one of the 1000 we are creating per second and what am I supposed to do about it?
The situation is of course different when closing our index DBs – context matters.

I think there are two cases:

Close() returns error to satisfy the interface, but the code of it cannot return anything else but nil -> Fine to ignore return.
Close() might in weird cases return an error, but then there is nothing to do about it. -> One might argue we do not care in that case, but it might still be a hint that something weird is going on. So we might still want to log, especially if it cannot happen under normal circumstances (so we wouldn't spam the logs all the time).

:+1: for the cases dealt with here (not trying to preempt the general discussion above).

I removed the closing of the compressed writers, but have kept the others so far. Let me know if you feel strongly about removing others. I think they mostly should be in places where they're not expected to ever happen, but if they do, it's cool to know about it. At least for the fd.watcher.Close() one, we can't do anything either, but that call failing could cause another FD leak and then we'll at least see in the logs why.

Agreeing with all of that :+1:


⚠ Bofrost.be has degraded performance

In dafe79b, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1159 ms

Resolved: Bofrost.be performance has improved in 073a2f0 after 7 minutes.


flist.to_dataframe() fails

Describe the bug
The conversion to data frame fails in the following example. Maybe because of low number of nodes?
To Reproduce
import matplotlib.pyplot as plt
import numpy as np

from ansys.mapdl.core import launch_mapdl

mapdl = launch_mapdl()

mapdl.prep7()
mapdl.units("SI")  # SI - International system (m, kg, s, K).

# define a PLANE183 element type with thickness
mapdl.et(1, "PLANE183", kop3=3)
mapdl.r(1, 0.001)  # thickness of 0.001 meters)

# Define a material (nominal steel in SI)
mapdl.mp("EX", 1, 210e9)  # Elastic moduli in Pa (kg/(m*s**2))
mapdl.mp("DENS", 1, 7800)  # Density in kg/m3
mapdl.mp("NUXY", 1, 0.3)  # Poisson's Ratio

# list currently defined material properties
print(mapdl.mplist())

length = 0.4
width = 0.1

ratio = 0.3  # diameter/width
diameter = width * ratio
radius = diameter * 0.5

# create the rectangle
rect_anum = mapdl.blc4(width=length, height=width)

# create a circle in the middle of the rectangle
circ_anum = mapdl.cyl4(length / 2, width / 2, radius)

# Note how pymapdl parses the output and returns the area numbers
# created by each command.  This can be used to execute a boolean
# operation on these areas to cut the circle out of the rectangle.
plate_with_hole_anum = mapdl.asba(rect_anum, circ_anum)

# ensure there are at 50 elements around the hole
hole_esize = np.pi * diameter / 50  # 0.0002
plate_esize = 0.01

# increased the density of the mesh at the center
mapdl.lsel("S", "LINE", vmin=5, vmax=8)
mapdl.lesize("ALL", hole_esize, kforc=1)
mapdl.lsel("ALL")

# Decrease the area mesh expansion.  This ensures that the mesh
# remains fine nearby the hole
mapdl.mopt("EXPND", 0.7)  # default 1

mapdl.esize(plate_esize)
mapdl.amesh(plate_with_hole_anum)

# Fix the left-hand side.
mapdl.nsel("S", "LOC", "X", 0)
mapdl.d("ALL", "UX")

# Fix a single node on the left-hand side of the plate in the Y
# direction.  Otherwise, the mesh would be allowed to move in the y
# direction and would be an improperly constrained mesh.
mapdl.nsel("R", "LOC", "Y", width / 2)
assert mapdl.mesh.n_node == 1
mapdl.d("ALL", "UY")

# Apply a force on the right-hand side of the plate.  For this
# example, we select the nodes at the right-most side of the plate.
mapdl.nsel("S", "LOC", "X", length)

# Verify that only the nodes at length have been selected:
assert np.allclose(mapdl.mesh.nodes[:, 0], length)

# Next, couple the DOF for these nodes.  This lets us provide a force
# to one node that will be spread throughout all nodes in this coupled
# set.
mapdl.cp(5, "UX", "ALL")

f = open('Node_disp_xy45.txt', 'a')
for ii in range(0, 1):
   # Select a single node in this set and apply a force to it
   # We use "R" to re-select from the current node group
   mapdl.nsel("R", "LOC", "Y", width / 2)    mapdl.f("ALL", "FY", 10+10*ii)

   # finally, be sure to select all nodes again to solve the entire solution
    _ = mapdl.allsel()

    mapdl.run("/SOLU")
    mapdl.antype("STATIC")
    output = mapdl.solve()
    print(output)

   # grab the result from the ``mapdl`` instance
    result = mapdl.result
    # result.plot_principal_nodal_stress(
    #     0, "SEQV", lighting=False, cpos="xy", background="w", text_color="k",
    #     add_text=False)
    np.savetxt(f, result.nodal_displacement(0)[1])

f.close()

It seems this also fails on Linux:
from ansys.mapdl.core import launch_mapdl
from ansys.mapdl.core import examples
mapdl = launch_mapdl()
example = examples.vmfiles['vm10']
mapdl.input(example)
mapdl.slashsolu()
mapdl.solve()
mapdl.post1()
cmd = mapdl.prnsol('U', 'X')
cmd.to_dataframe()


feat: guides

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

Project coverage is 88.86%. Comparing base (2492523) to head (5c906de).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #150      +/-   ##
==========================================
+ Coverage   88.74%   88.86%   +0.12%
==========================================
  Files          14       15       +1
  Lines         906      934      +28
==========================================
+ Hits          804      830      +26
- Misses        102      104       +2

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


output_2 converted to output_1 if no output_1

First off, I just want to say thank you for creating a wonderful library. Now to the bug (or is it a feature?) that I think I found.
If you have assigned an output_2, but no output_1 to a node, the script converts the output_2 to an output_1.
The same doesn't apply to input_2s where there is no input_1. There, the input_2 remains input_2.
Have a look.
I'm I missing something? Is it supposed to behave like this? Can I keep output_2 as output_2 without an output_1?

Hi @dearsina
You are importing the wrong content.
The nodes would have to be added using "addNode".
The outputs or inputs have to be relative: (Ex: output_1, output_2, ...)
Even the removeNodeInput and removeNodeOutput functions rearrange the outputs_
What you are trying to do cannot by default.

I'm not sure if I follow. Are you saying I shouldn't use the editor.import() function? This is the key snippet from the JSfiddle. I have assigned both an input_2 and an output_2, but no input_1 and output_1. Only the output_2 is converted to output_1, the input_2 remains as is.
      var dataToImport = {

        "drawflow": {
          "Home": {
            "data": {

              "93c27a9c-8f5e-4b61-8330-35afe47cc4b7": {
                "html": "This node has an input_2 and an output_2. input_2 is treated as input_2, but output_2 is converted to output_1 somewhere.",
                "class": "timer",
                "id": "93c27a9c-8f5e-4b61-8330-35afe47cc4b7",
                "name": "93c08768-489d-4a0f-ae20-565540ccc9d2",
                "pos_x": "10",
                "pos_y": "10",
                "typenode": false,
                "data": [],
                "inputs": {
                  "input_2": {
                    "connections": []
                  }
                },
                "outputs": {
                  "output_2": {
                    "connections": []
                  }
                }
              },
            }
          }
        }
      }

      editor.start();
      editor.import(dataToImport);

If you can use "editor.import". But you should run it after you've done an "editor.export" first.
Now you are modifying the json manually and not generated by drawflow.
The inputs and outputs are assigned in drawflow continuously. There can be no jumps.

Ok, good to know. I do a lot of that. 😃