Document.domain is <IP_ADDRESS> instead of using the DDP url domain

I noticed that in the console if you type document.domain it prints <IP_ADDRESS> in the desktop app.
But in the browser document.domain shows the DDP url.
Is this going to cause any issues, or is this correct? I don't notice any real issues, the only thing that brought it to my attention is when an iframe shows itself, sometimes it complains about document.domain. But I am not sure how to reproduce this error reliably, or even why it occurs. Just thought I would bring up this issue in case it is something important to fix.
If not feel free to just close this issue.

In desktop app, your meteor app is served from a local web server so you will always have <IP_ADDRESS> (the same applies for cordova). In the browser you will have the url from your meteor server which is always the same as your ddp_url. Well the second part is not always true, but in 99% cases it is. You can allways type __meteor_runtime_config__ in the console to verify if everything is as it should.

when an iframe shows itself, sometimes it complains about document.domain

I would be very interested in getting to know what that error exactly is. The first thing I can think of is that you can probably get some CORS issues if you are using the iframe to get something from the outside of localhost. What are using the iframe for?

And BTW thanks for reporting the issues 👍


Widget is opening only when CORS extension is ON

Steps to reproduce:
1.Open demo app
2.Try to connect without switching on the CORS extension
Actual result:
Widget is opening only when CORS extension is ON
https://github.com/getsafle/safle-keyless-js/assets/149378074/c04b3573-5157-445a-ad4f-bbbf7af43930
Expected result:
Widget should be working fine if CORS is off

Closed by merging PR

Now the issue is fixed on test env
https://github.com/getsafle/safle-keyless-js/assets/149378074/e23182c9-a535-4fad-8a35-d2d446a3cb8b


release: v0.3.0

Description: 概要

Changes: 変更内容

Changes

feat: error の取得と validate を分離 (e082cde16470429040e62994dd0ee04548892086)

Expected Impact: 影響範囲

Operating Requirements: 動作要件

Additional context: 補足

Codecov Report

Merging #3 (759f0fe) into main (2541486) will decrease coverage by 0.37%.
The diff coverage is 92.30%.

@@            Coverage Diff             @@
##             main       #3      +/-   ##
==========================================
- Coverage   98.03%   97.66%   -0.38%
==========================================
  Files          13       13
  Lines         204      214      +10
  Branches       38       41       +3
==========================================
+ Hits          200      209       +9
- Partials        4        5       +1

Impacted Files
Coverage Δ

src/valueObject/date.ts
100.00% <ø> (ø)

src/valueObject/flags.ts
100.00% <ø> (ø)

src/valueObject/float.ts
100.00% <ø> (ø)

src/valueObject/stringId.ts
100.00% <ø> (ø)

src/valueObject/text.ts
100.00% <ø> (ø)

src/valueObject/index.ts
96.77% <83.33%> (-3.23%)
:arrow_down:

src/entity/collection.ts
96.00% <100.00%> (+0.76%)
:arrow_up:

src/entity/index.ts
93.18% <100.00%> (ø)

src/valueObject/int.ts
100.00% <100.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


Update v2-app-types.md

Hello team, hope you're doing well.
In Mobile and native apps section it would be valuable to add a pointer to Azure AD Authentication error codes, especifically CMSI functionality, since further steps are required by the user to avoid this interruption, something like:
Note: If the application is using the default system webview, please check the information about "Confirm My Sign-In" functionality and error code AADSTS50199: https://docs.microsoft.com/pt-pt/azure/active-directory/develop/reference-aadsts-error-codes
Thank you.
Pedro Ribeiro

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

Admin note: If the PR is approved, the locale needs to be removed from the microsoft.com URLs before merging. The PR review team can help with this.

@peribeir-msft  That looks fine, thanks.  #sign-off


Change LPDC boolean types to correct configuration management

This PR applies the same steps as https://github.com/lblod/app-digitaal-loket/pull/430, but uses another migration to replace the LPDC boolean types.
The migration works by searching for boolean types, having the <http://www.w3.org/2001/XMLSchema#boolean> type, for the ConceptDisplayConfiguration objects and mapping them to <http://mu.semte.ch/vocabularies/typed-literals/boolean>. It does so manually for the two predicates, conceptIsNew and conceptInstantiated, by manually querying for the true and false values of each predicate and mapping the old type to the new one.

Since the woodpecker server went down, I'll merge this PR for the time being, and re-test with the new Virtuoso version once it's up to see if we still need the compatibility layer.


Pass context/options to MenuBuilder

Description
I'd like to pass some context to a menu, so that I can build a menu specific to a set of page.  For example, I want to pass in an person, and based on some properties I'll generate the menu.  I'll have different menus for each part of the site.
If there's a way to configure rendering options, like classes on selected items, those could be pass in as well.  KnpMenuBundle uses this approach.
Building the menu and rendering it feel like they could be separate, though not essential.
Example
Something like
            {% set menu = umbrella_get_menu('App\\Menu\\PersonAdminMenu', {person: person}) %}
            {{ umbrella_render_menu(menu, {currentClass: 'selected'}) }}

namespace App\Menu;

class PersonAdminMenu extends BaseAdminMenu
{
   private Person $person;
   public function setContext(array $context)
   {
       $this->person = $context['person'];
   }

    public function buildMenu(MenuBuilder $builder)
    {
        $u = $builder->root();
        if ($this->person->hasBio()) {
                  $u->add('biography')
            ->route('person_bio', ['id' => $person->getId()]);
     }

Currently I'm passing in the related entity via the RequestStack, which feels kludgy.

Hi, this is now possible on version 4.3.
I have been inspired by KnpMenuBundle for twig functions and helpers.
Take a look at menu documentation page
Example :
{% set menu = get_menu('App\\Menu\\PersonAdminMenu', {person: person}) %}
{{ render_menu(menu, {currentClass: 'selected'}) }}

Thanks!
As long as we're talking about menus, is there a way to render a horizontal
menu (with dropdowns?), using the same menu?
KnpMenu does that by passing in a twig template in the context.  I often
like to have a site menu in the navbar, and sometimes a page-specific menu
at the top of the page.
I know those should be relatively easy to implement, but to do it nicely
with the same look and feel is harder.  It appears that AdminKIt doesn't
have an example, but there are lots of bootstrap examples.  Now that
creating the menu is separate from rendering it, this should be doable.
On Sat, Dec 18, 2021 at 1:42 PM Adrien Cantepie @.***>
wrote:

Hi, this is now possible on version 4.3.
I have been inspired by KnpMenuBundle for twig functions and helpers.
Take a look at menu documentation page
https://umbrella-corp.dev/admin/menu
Example :
{% set menu = get_menu('App\Menu\PersonAdminMenu', {person: person}) %}
{{ render_menu(menu, {currentClass: 'selected'}) }}
—
Reply to this email directly, view it on GitHub
https://github.com/acantepie/umbrella/issues/25#issuecomment-997266864,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEXIQK6BMDT6H6XZ4WGGOLURTIYXANCNFSM5KALMVTQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

It's not possible to use the current menu template to render a horizontal menu because the vertical menu use collapse.
The only way i see is to create an other template for vertical variant :
class AdminMenu extends BaseAdminMenu {

    public function renderMenu(Menu $menu, array $options): string
    {
        if (isset($options['layout']) && 'horizontal' === $options['layout']) {
            return $this->twig->render('menu/horizontal.html.twig', ['menu' => $menu]);
        } else {
            return parent::renderMenu($menu, $options);
        }
    }
}

But why not just allow for complete customization?
class AdminMenu extends BaseAdminMenu {

    public function renderMenu(Menu $menu, array $options): string
    {
        if (isset($options['template'])) {
            return $this->twig->render($options['template'], ['menu' => $menu]);
        } else {
            return parent::renderMenu($menu, $options);
        }
    }
}

Which can likely be reduced further with a default template value.

For example, suppose I want to render a menu but want to use feather icons, or have a fancy badge.
What do you think of adding 'template' to the render options?

For example, suppose I want to render a menu but want to use feather icons, or have a fancy badge.
What do you think of adding 'template' to the render options?

Here we go https://github.com/acantepie/umbrella/commit/f7ad4d22cff2b97ae5e0935e9ba74a019d88a9f1 ^^


[feature] Nested Models support

Nested models require a dictionary which cannot be parsed via command line

that's true. that's one of the design decisions I made: As far as I see a nested model does not match the structure of a "traditional" cli (like argparse or click), which is the target outcome of this library.
tyro does have this capability, but as a result is more complex. Both in defining your models as in providing arguments.

that is fair, up to your design! I still find it useful to have some hierarchy in configurations that are preserved by pydantic

If you come up with an idea of doing this without adding a lot more complexity, you're more than welcome.


TypeError: Cannot read property 'num_docs' of undefined

Hi Ravi,
I'm getting this error when I try to run the following command:
node exporter.js -a localhost -p 9200 -b <IP_ADDRESS> -p 9200
I can make curls to both nodes no problem. The error I get is:
Caught exception in Main process: TypeError: Cannot read property 'num_docs' of undefined
TypeError: Cannot read property 'num_docs' of undefined
at IncomingMessage. (/root/node_modules/elasticsearch-exporter/drivers/es.js:243:58)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:943:16
at process._tickCallback (node.js:419:13)
Number of calls:	0
Fetched Entries:	0 documents
Processed Entries:	0 documents
Source DB Size:	0 documents
localhost: v 1.0.1
<IP_ADDRESS>: v 0.90.7
Apologies if there's something I'm missing. Thanks!

Closing this since the code base has changed so much it's not really related to 1.x versions anymore.


Update getting_started.rst

With python3 (3.5 here) json_deserializer receives the values as bytes. The added decode calls in json_deserializer take care of that problem.
Disclaimer: I am a python beginner, so if there is another way to achieve the same result please let me know.

This is great, we really appreciate documentation help, thanks a lot @gs230937207


[bug 1053384] Fix selected sad/happy filters not showing up on 0 results

Complete the previous incomplete fix for this bug which did not
handle the sad/happy filters properly when there were no matching
search results.

Looks good! r+

8d8ee31 [bug 1053384] Fix selected sad/happy filters not showing up on 0 results


equipmentLabel at Equipment to be harmonized with Holder, LTP, ControlConstruct

If it would be decided not to instantiate attribute-name&value-datatypes for storing e.g. sequence number, external label and so on, but to augment explicit attributes to the respective classes, potentially also the equipmentLabel should be documented as a explicit attribute.
In this case...

§29, §30 of the TransmitterEquipment 1.0.0-tsp.200715.1225 would have to be deleted
Equipment_Pac :: equipmentLabel : String [1] = "Label of the position not yet defined." would have to be added to the EquipmentAugment

(Potentially the naming of equipmentLabel and externalLabel should be revised.)

Potential Proposal:

In contrary to already existing ruling (§29, §30 of the TransmitterEquipment 1.0.0-tsp.200715.1225), there shall be no additional instance in the Equipment::name list-attribute, but an explicit equipmentLabel attribute.
Further on, there seems to be a mistake in the former allocation of the information. The information which is printed at the outside of the device for identifying the physical position of a board, seems not to be an information of the Equipment, but of the Holder.

The following changes shall be made to the EquipmentAugment modelling if not already decided in equipment issue #15:

A HolderSpec class shall be added.
An abstraction of type Specify shall be added and connect the new HolderSpec class with the existing Holder class and contain the target "/CoreModel:ControlConstruct:ControlConstruct/CoreModel:Equipment:Equipment/CoreModel:ContainedHolder:Holder".
A Holder_Pac class shall be added.
A composite association [1/1] shall connect from HolderSpec to Holder_Pac.

The following changes shall be made to the EquipmentAugment modelling:

A Holder_Pac :: outsideLabel[1] : String = "Label of the position not yet defined." attribute with comment "Label, which is printed at the outside of the device for identifying the physical position e.g. of a board inside the device." shall be added.

Has been updated and published in EquipmentAugment_1.0.0-tsi.240104.1330+yang.1


Azure Extension sropped working

Issue Type: Bug
Open Node/express project in VS Code
Click on Azure symbol
Response is : No subscriptions Found
The error is pop-up pops in an endless loop with on a small sliver of the window showing
This is on a project that is already published !!!!!!!
VS Code version: Code 1.35.1 (c7d83e57cd18f18026a8162d042843bda1bcf21f, 2019-06-12T14:30:02.622Z)
OS version: Windows_NT x64 10.0.14393

System Info

Item
Value

CPUs
Intel(R) Xeon(R) CPU E3-1230 v3 @ 3.30GHz (8 x 3292)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: enabledsurface_synchronization: enabled_onvideo_decode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
31.94GB (19.46GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (9)

Extension
Author (truncated)
Version

vscode-wasm
dts
1.2.1

vsc-material-theme
Equ
2.9.0

vscode-azureappservice
ms-
0.15.0

mssql
ms-
1.6.0

azure-account
ms-
0.8.4

cpptools
ms-
0.23.1

csharp
ms-
1.20.0

Go
ms-
0.11.0

heroku-command
pko
0.0.8

(7 theme extensions excluded)

Please file issue against the azure extension.

Please file issue against the azure extension.

Thank you for all your help !!!!!!


[CMake] Conditionalize generation of .swiftinterface files

SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES is the new setting.
rdar://problem/44942414

Still need to fix the tests that expect the swiftinterface files to be there…

@swift-ci Please test

Build failed
Swift Test Linux Platform
Git Sha - 3b55b05596b6628f3f19bb6c5a45fc62f3f6c4aa

Build failed
Swift Test OS X Platform
Git Sha - 3b55b05596b6628f3f19bb6c5a45fc62f3f6c4aa

Unrelated XCTest failure.
@swift-ci Please test Linux


[KED-1040] Modify Spaceflights tutorial to support modular pipelines

Notice

[x] I acknowledge and agree that, by checking this box and clicking “Submit Pull Request”:

I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.

I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.

I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

Motivation and Context
Address step 4 out of https://jira.quantumblack.com/browse/KED-1040
Copy-pasted the contents of kedro_cli.py from a newly-created Kedro project with version 0.15.4.
How has this been tested?
Kedro run locally works
Checklist

[ ] Opened this PR as a 'Draft Pull Request' if it is work-in-progress
[x] Assigned myself to the PR
[ ] Added tests to cover my changes

Thanks for updating it! 👍
Could you also update from 0.15.0 to 0.15.4 in README.md in https://github.com/quantumblacklabs/kedro-examples/tree/master/kedro-tutorial ??

Good catch, fixed!


Add sig collisions check to ci.yml

Fix for this.

Let me know if you find this solution acceptable and I'll extend it to all repos.

Of course!
As a last-minute make-up, I integrated the collision checks into yarn lint:sol (since, technically, they are part of the smart-contracts linting process) even though I kept the yarn lint:collisions script (with a slight name change, to fit with the overall style).
One of the advantages is that the CI workflow remains unchanged - the collisions heck is now part of the linting pipeline.
I will merge this now, but if you have any complaints, I'll open a new issue and fix it afterward.
Hope that's good!


Demo image not showing on npm

https://www.npmjs.com/package/hyper-papercolor
(You may want to use the absolute URL to your GitHub's master repo's screenshot.)

Thanks! Should be fixed by 755212e0fb89eccf82cf57200ea2e73f145d0b6a


Auditing Enablement

Added 2 functions: Enable-ADFSAuditing, and Disable-ADFSAuditing. Tested on ADFS 2012R2 and 2016. And on SQL and WID config.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: TspringMSFT sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


⚠ Bofrost.es has degraded performance

In 38a5323, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1537 ms

Resolved: Bofrost.es performance has improved in 0658ba5 after 25 minutes.


Add support for mathjax

Hi, I am using your hexo-generator-amp plugin and that works quite well. However, I notice that because the amp disallow the third party javascript, the formula I write in .md could not be render correctly in amp page.
I notice that amp has support MathML in the beginning of 2018. So I would like to do a little change: when generate the amp page, use the regex to replace $(.*)$ and $$(.*)$$ to <amp-mathml layout="container" data-formula="\[ (.*) \]"> </amp-mathml>
Do you know any idea how to render the formula elegantly except this method?  Also, could you provide some hints or information about how and where should I modify the code? I guess I should add a formula.js in the filter to do the replacement and call it in generator.js. Am I correct? I am willing to make a contribution!

@VicaYang
Thank you for using this plugin. As you think, I'd be happy to create formula.js and add it to generator.js.
About fomula.js , Is the following code helpful ?
https://github.com/tea3/hexo-generator-amp/blob/master/lib/filter/vimeo.js#L21
https://github.com/tea3/hexo-generator-amp/blob/master/lib/filter/vimeo.js#L25
About how to add fomula.js to generator.js , Is the following code helpful ?
https://github.com/tea3/hexo-generator-amp/blob/master/lib/generator.js#L29
https://github.com/tea3/hexo-generator-amp/blob/master/lib/generator.js#L111

@tea3 Thankyou! I have complete the naive version and test on my blog (e.g. Analysis-of-Covariance). But I am afraid of that will fail because of some other "dirty" case. What should I do next?


Improve the quality of cards

The current implementation for API Card is not satisfactory and doesn't look good.
This should be improved.
Also, this should be implemented alongside with #7

Assign it to me. will be tweaking card UI little-bit

@Insomniac2904 raise a PR. I'll assign you then.

Sorry Currently Out of Town. Cant work on it .

@Insomniac2904 are you working on this? I created a mock UI for something that we can work on. Can you design cards in this format?
If not feel free to say NO!

@devsargam @Ryrahul  made a pr, please review it and let me know if an edit is required!

@devsargam  is reviewing the PR , looks good though!!

Fixed in #23 by @rajksd01!


photo gallery not unlocking for past achvements

Helllo there!
I have noticed, that i am missing unlocked elements inside the gallery.
You can see my VPET ist Level 104 but i have not got the Level 1 unlock.
I have tried to repair the savegame and restarted my game but it does not help.

TranslateError, is mean Level Brake: 1

After checking, there is no translation issue here. Please check if there have made any modifications in mod translation file
等级突破要求: {0}#Level Breakthrough: {0}:|


Logo Enhancement

Greetings PO,
If you have any ideas about logo, you can contact me or directly comment. I can make on that fits on your Project.

@jareddlc
hello PO


Repository is too tightly coupled

I tried to add support of winit 0.29 to egui-winit because winit 0.29 seems to have nice improvements in handling of Waits (I expect less CPU load on waiting on Windows).
In my project, I need only egui and egui-winit because I have custom renderer on top of Vulkan.
I forked the repo with intention of changing egui-winit.
However, in process of doing so, I found out that changing egui-winit causes compilation errors in eframe. And I cannot just switch eframe to new egui-winit because it causes compilations errors because glutin requires different version of winit and eframe uses same winit objects in both egui-winit and glutin. When I updated glutin, I got new compilation errors because glutin made breaking changes too!
At this point, I am giving up on the idea of contributing to a project. I would probably just link my project to my fork of egui-winit using git dependency and would wait until somebody else does all this work of updating egui to winit 0.29.
I think, it is not a great situation so opening an issue.

I agree this is annoying, but I'm not sure what the solution is.
We could have feature flags for supporting multiple version of winit, but that would make a complicated code base even more complicated.


powercap-rapl: energy_uj file to be restricted to root access

Linux kernel development indicates that the energy_uj file will be restricted to root-only permissions [1] in an upcoming kernel release---probably 5.10.
The powercap-rapl interface currently only skips over files gracefully if they don't exist, but an open failure due to permissions will cause powercap_rapl_init to fail.  We need to decide if, and if so, how, to address this file mode change.
The "default" approach is to not make any changes, which might be fine for most use cases.  The powercap-rapl interface was primarily intended for software that needs to either read energy or change power caps with regularity, the latter of which already requires root access.  Is it common to want to access other files that don't require root privileges with such regularity that using the powercap-rapl interface is desirable, as opposed to just using powercap-sysfs?
Because the kernel developers don't seem consider this an interface change (which IMO it is), any solution we implement should be general for all files in a zone (including constraint files), i.e., not limited to just working around energy_uj, in case other such kernel changes are made in the future.
[1] https://github.com/torvalds/linux/commit/949dd0104c496fa7c14991a23c03c62e44637e71

This change is released linux v5.10

omg, seriously? Intel had one year time to fix the problem [1]. and didn't find anything better then to axe power monitoring capabilities for all unprivileged programs. What's next, sudo top? :-/
[1] https://platypusattack.com/

omg, seriously? Intel had one year time to fix the problem [1]. and didn't find anything better then to axe power monitoring capabilities for all unprivileged programs. What's next, sudo top? :-/
[1] https://platypusattack.com/

Indeed... Are you finding that you need a graceful degradation solution as a result of this permissions change?  My current plan is to not do anything about this.
Additionally I want to deprecate the powercap-rapl interface and replace it with something more general since powercap-rapl is not extensible, e.g., I can't cleanly add the new PL4 constraint without breaking the API.  The challenge is that a more general solution seems to me to require implementing a tree structure.  First: there are different approaches to implementing trees in C, and all are somewhat unwieldy for users.  Second: implementing a tree structure will almost certainly require the API to take on memory management responsibility, which I have hoped to avoid.  Finally: navigating a tree structure is less efficient than the constant time accesses powercap-rapl provides, although that constant-time access came with assumptions about the zone and constraint structures, which is exactly what makes the current API problematic.  I thus far haven't had a pressing need for a new API, so this task has been sitting on the backburner for months (even years now), but I don't want to sit on it forever.  /Sigh...

Indeed... Are you finding that you need a graceful degradation solution as a result of this permissions change?  My current plan is to not do anything about this.
Additionally I want to deprecate the powercap-rapl interface and replace it with something more general since powercap-rapl is not extensible, e.g., I can't cleanly add the new PL4 constraint without breaking the API.  The challenge is that a more general solution seems to me to require implementing a tree structure.  First: there are different approaches to implementing trees in C, and all are somewhat unwieldy for users.  Second: implementing a tree structure will almost certainly require the API to take on memory management responsibility, which I have hoped to avoid.  Finally: navigating a tree structure is less efficient than the constant time accesses powercap-rapl provides, although that constant-time access came with assumptions about the zone and constraint structures, which is exactly what makes the current API problematic.  I thus far haven't had a pressing need for a new API, so this task has been sitting on the backburner for months (even years now), but I don't want to sit on it forever.  /Sigh...

Indeed... Are you finding that you need a graceful degradation solution as a result of this permissions change? My current plan is to not do anything about this.

Well so far, I just check if energy_uj file is readable and disable power monitoring if it's not. What else can I do from userspace?
I also don't want to ask users to run my program under root or to revert RAPL file permissions (even if they can). I think the ideal solution would be that some privileged code (kernel module? daemon?) exports "safe" aggregated energy data under /proc/energy or similar. And then (optionally) more detailed/fine-grained measurements under /proc/<pid>/, such that I can safely read data for my own processes. Energy can be attributed to processes according to their CPU usage. This shouldn't be too hard to implement, although I'm not an expert in Linux kernel programming...
Some good news: AMD support for powercap is underway and energy monitoring is already available via amd_energy driver, even with integrated polling!

Indeed... Are you finding that you need a graceful degradation solution as a result of this permissions change? My current plan is to not do anything about this.

Well so far, I just check if energy_uj file is readable and disable power monitoring if it's not. What else can I do from userspace?
I also don't want to ask users to run my program under root or to revert RAPL file permissions (even if they can). I think the ideal solution would be that some privileged code (kernel module? daemon?) exports "safe" aggregated energy data under /proc/energy or similar. And then (optionally) more detailed/fine-grained measurements under /proc/<pid>/, such that I can safely read data for my own processes. Energy can be attributed to processes according to their CPU usage. This shouldn't be too hard to implement, although I'm not an expert in Linux kernel programming...
Some good news: AMD support for powercap is underway and energy monitoring is already available via amd_energy driver, even with integrated polling!

There isn't much you can do except ask for one of those two things.  From the perspective of the powercap library in this repo, users shouldn't have to interact with the filesystem structure at all - they shouldn't need to check file permissions in advance.  The library initialization either succeeds or fails for some reason given in errno.
What you're describing is essentially the powercap sysfs file interface - a "safe" way (via a kernel module like intel_rapl, intel_rapl_mmio, and now apparently amd_energy) to get power readings without users having to parse MSR bits directly (which linux is also restricting more and more, even for root).  Whether the readings come from the current powercap interface or something new, the same fundamental security problem likely still exists, so linux would lock down the permissions.

There isn't much you can do except ask for one of those two things.  From the perspective of the powercap library in this repo, users shouldn't have to interact with the filesystem structure at all - they shouldn't need to check file permissions in advance.  The library initialization either succeeds or fails for some reason given in errno.
What you're describing is essentially the powercap sysfs file interface - a "safe" way (via a kernel module like intel_rapl, intel_rapl_mmio, and now apparently amd_energy) to get power readings without users having to parse MSR bits directly (which linux is also restricting more and more, even for root).  Whether the readings come from the current powercap interface or something new, the same fundamental security problem likely still exists, so linux would lock down the permissions.

What you're describing is essentially the powercap sysfs file interface

yes and no: powercap sysfs interface abstracts away MSR access, but otherwise it is almost 1-to-1 mapping of RAPL in hardware. This comes with multiple challenges for application developers:

power measurement and power capping are lumped together despite having very different access profiles (as exemplified by having different permissions until recently)
application has to deal with RAPL zones which are not only confusing but I guess also irrelevant for most use cases (e.g. I might be interested in "overall system power", "CPU/DRAM power", or "power of my process" - but unlikely in something as cryptic and system-dependent as "PKG0_uncore power")
"all or nothing": I cannot ask for aggregated/downsampled/per-process measurements, which would eliminate security problems (at least in practice)

What you're describing is essentially the powercap sysfs file interface

yes and no: powercap sysfs interface abstracts away MSR access, but otherwise it is almost 1-to-1 mapping of RAPL in hardware. This comes with multiple challenges for application developers:

power measurement and power capping are lumped together despite having very different access profiles (as exemplified by having different permissions until recently)
application has to deal with RAPL zones which are not only confusing but I guess also irrelevant for most use cases (e.g. I might be interested in "overall system power", "CPU/DRAM power", or "power of my process" - but unlikely in something as cryptic and system-dependent as "PKG0_uncore power")
"all or nothing": I cannot ask for aggregated/downsampled/per-process measurements, which would eliminate security problems (at least in practice)

I understand your points and share some of your frustrations.  I think there are several things to keep in mind about the current state of affairs.
First - yes, the powercap sysfs interface is essentially is a 1-to-1 mapping, which is really what the OS should do whenever possible.  Additional layers of abstraction means additional code running in kernel space, which increases the likelihood of security issues and maintenance costs.  Additionally, abstractions are imperfect, so some applications would want to get around the abstraction because the hardware would provide a feature that the abstraction hides or makes more difficult to use. So - also yes - this pushes challenges and complexity to userspace/applications, but that's how it should be.
Second - just because measurements for other components like core/uncore/DRAM are irrelevant for your (or even "most") use cases doesn't negate their value entirely.  The OS developers present a unified interface and leave it to software to find and use what it wants.  Similar to my first point, this is better than the alternative of having OS devs create separate interfaces for many different use cases, which is generally poor SW design, far less maintainable, and would almost certainly miss some use cases.  I'm not claiming that the powercap sysfs interface is the best design, but I think we can understand why it is what it is.
Third - getting/setting a power cap and reading/resetting an energy consumption counter can be done together or independently (not everybody cares about both), but they are related.  The permissions (or privileges) needed to read and/or write to these values is independent of their utility, and only matters for security concerns that exist because the CPUs (and other affected components) are shared resources, but this is an orthogonal concern to the filesystem structure.
Finally - w.r.t. aggregating/downsampling/etc to resolve security questions - how do we know what the right balances are?  I'm not sure (and doubt) there are provably safe choices except disabling access entirely.  E.g., downsampling might improve security to make existing attacks fail, but a sampling rate that seems safe today might be found tomorrow to be insecure against a better attack.  That seems to (at least in part) be how we got in today's situation to begin with.
I would address per-process measurements separately.  I believe there are userspace profiles that can provide estimates for this. Doing this more accurately in the kernel would likely require integration with the scheduler as the hardware itself is not process-aware.  Of course I would also like such a feature, but it would also be very difficult to do in a way that supports the range of processors that Linux supports, and would likely introduce unacceptable overhead for most users.  I believe there would also be security concerns with this that would need to be addressed.
Anyway, I hope that's helpful and not too much rambling.  Cheers.

I understand your points and share some of your frustrations.  I think there are several things to keep in mind about the current state of affairs.
First - yes, the powercap sysfs interface is essentially is a 1-to-1 mapping, which is really what the OS should do whenever possible.  Additional layers of abstraction means additional code running in kernel space, which increases the likelihood of security issues and maintenance costs.  Additionally, abstractions are imperfect, so some applications would want to get around the abstraction because the hardware would provide a feature that the abstraction hides or makes more difficult to use. So - also yes - this pushes challenges and complexity to userspace/applications, but that's how it should be.
Second - just because measurements for other components like core/uncore/DRAM are irrelevant for your (or even "most") use cases doesn't negate their value entirely.  The OS developers present a unified interface and leave it to software to find and use what it wants.  Similar to my first point, this is better than the alternative of having OS devs create separate interfaces for many different use cases, which is generally poor SW design, far less maintainable, and would almost certainly miss some use cases.  I'm not claiming that the powercap sysfs interface is the best design, but I think we can understand why it is what it is.
Third - getting/setting a power cap and reading/resetting an energy consumption counter can be done together or independently (not everybody cares about both), but they are related.  The permissions (or privileges) needed to read and/or write to these values is independent of their utility, and only matters for security concerns that exist because the CPUs (and other affected components) are shared resources, but this is an orthogonal concern to the filesystem structure.
Finally - w.r.t. aggregating/downsampling/etc to resolve security questions - how do we know what the right balances are?  I'm not sure (and doubt) there are provably safe choices except disabling access entirely.  E.g., downsampling might improve security to make existing attacks fail, but a sampling rate that seems safe today might be found tomorrow to be insecure against a better attack.  That seems to (at least in part) be how we got in today's situation to begin with.
I would address per-process measurements separately.  I believe there are userspace profiles that can provide estimates for this. Doing this more accurately in the kernel would likely require integration with the scheduler as the hardware itself is not process-aware.  Of course I would also like such a feature, but it would also be very difficult to do in a way that supports the range of processors that Linux supports, and would likely introduce unacceptable overhead for most users.  I believe there would also be security concerns with this that would need to be addressed.
Anyway, I hope that's helpful and not too much rambling.  Cheers.

Thank you for your detailed comments, they are indeed very helpful!
I guess, the very purpose of OS is to provide abstraction of hardware. In practice, the level of this abstraction is a tradeoff between (expected) utility and maintenance/security overhead. I/O is a good example: as application programmer, I don't have to care about keyboard/disk/display HW specifics, even if it comes with potential security risks.
Also it's worth distinguishing OS kernel and OS API (=POSIX/standard library). The functionality I described above should (ideally) be part of the latter. More realistically, it could be a 3rd party module like msr-safe. But either way, it would still be some privileged code "leaking" data into userspace.

Finally - w.r.t. aggregating/downsampling/etc to resolve security questions - how do we know what the right balances are? I'm not sure (and doubt) there are provably safe choices except disabling access entirely. E.g., downsampling might improve security to make existing attacks fail, but a sampling rate that seems safe today might be found tomorrow to be insecure against a better attack. That seems to (at least in part) be how we got in today's situation to begin with.

There is no such thing as absolute safety :)
Example: as unprivileged user, I can see CPU% and memusage both system-wide and per-process, but more detailed performance stats (CPU cycles, page-faults, cache misses etc.) are typically root-only.

I would address per-process measurements separately. I believe there are userspace profiles that can provide estimates for this.

If you have any details/links on that, please share!

Doing this more accurately in the kernel would likely require integration with the scheduler as the hardware itself is not process-aware. Of course I would also like such a feature, but it would also be very difficult to do in a way that supports the range of processors that Linux supports, and would likely introduce unacceptable overhead for most users. I believe there would also be security concerns with this that would need to be addressed.

Perfectionism is the root of all evil. Take intel_rapl, it supports Intel CPUs only, is hard to use and allegedly had a serious security flaw until recently. I'm pretty sure one can do better than that...

Thank you for your detailed comments, they are indeed very helpful!
I guess, the very purpose of OS is to provide abstraction of hardware. In practice, the level of this abstraction is a tradeoff between (expected) utility and maintenance/security overhead. I/O is a good example: as application programmer, I don't have to care about keyboard/disk/display HW specifics, even if it comes with potential security risks.
Also it's worth distinguishing OS kernel and OS API (=POSIX/standard library). The functionality I described above should (ideally) be part of the latter. More realistically, it could be a 3rd party module like msr-safe. But either way, it would still be some privileged code "leaking" data into userspace.

Finally - w.r.t. aggregating/downsampling/etc to resolve security questions - how do we know what the right balances are? I'm not sure (and doubt) there are provably safe choices except disabling access entirely. E.g., downsampling might improve security to make existing attacks fail, but a sampling rate that seems safe today might be found tomorrow to be insecure against a better attack. That seems to (at least in part) be how we got in today's situation to begin with.

There is no such thing as absolute safety :)
Example: as unprivileged user, I can see CPU% and memusage both system-wide and per-process, but more detailed performance stats (CPU cycles, page-faults, cache misses etc.) are typically root-only.

I would address per-process measurements separately. I believe there are userspace profiles that can provide estimates for this.

If you have any details/links on that, please share!

Doing this more accurately in the kernel would likely require integration with the scheduler as the hardware itself is not process-aware. Of course I would also like such a feature, but it would also be very difficult to do in a way that supports the range of processors that Linux supports, and would likely introduce unacceptable overhead for most users. I believe there would also be security concerns with this that would need to be addressed.

Perfectionism is the root of all evil. Take intel_rapl, it supports Intel CPUs only, is hard to use and allegedly had a serious security flaw until recently. I'm pretty sure one can do better than that...


Python Extension does not load with latest insiders build

Issue Type: Bug
Python extension fails to load with latest insiders build on
Model Name:	MacBook Pro
Model Identifier:	MacBookPro15,1
Processor Name:	6-Core Intel Core i9
Macos BigSur 11.1
Extension log attached ----
[2021-01-26 08:02:39.471] [exthost] [info] extension host started
[2021-01-26 08:02:39.506] [exthost] [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication {"startup":false,"extensionId":{"value":"vscode.microsoft-authentication","_lower":"vscode.microsoft-authentication"},"activationEvent":"onAuthenticationRequest:microsoft"}
[2021-01-26 08:02:39.506] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/microsoft-authentication/dist/extension.js
[2021-01-26 08:02:39.513] [exthost] [info] ExtensionService#_doActivateExtension ms-toolsai.jupyter {"startup":false,"extensionId":{"value":"ms-toolsai.jupyter","_lower":"ms-toolsai.jupyter"},"activationEvent":"onLanguage:python"}
[2021-01-26 08:02:39.513] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/jwest/.vscode-insiders/extensions/ms-toolsai.jupyter-2020.12.414227025/out/client/extension
[2021-01-26 08:02:39.576] [exthost] [info] ExtensionService#_doActivateExtension njpwerner.autodocstring {"startup":false,"extensionId":{"value":"njpwerner.autodocstring","_lower":"njpwerner.autodocstring"},"activationEvent":"onLanguage:python"}
[2021-01-26 08:02:39.576] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/jwest/.vscode-insiders/extensions/njpwerner.autodocstring-0.5.4/out/extension.js
[2021-01-26 08:02:39.589] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"extensionId":{"value":"vscode.debug-auto-launch","_lower":"vscode.debug-auto-launch"},"activationEvent":""}
[2021-01-26 08:02:39.589] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/debug-auto-launch/dist/extension
[2021-01-26 08:02:39.591] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":""}
[2021-01-26 08:02:39.591] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/git/dist/main
[2021-01-26 08:02:39.605] [exthost] [info] ExtensionService#_doActivateExtension cssho.vscode-svgviewer {"startup":true,"extensionId":{"value":"cssho.vscode-svgviewer","_lower":"cssho.vscode-svgviewer"},"activationEvent":""}
[2021-01-26 08:02:39.605] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/jwest/.vscode-insiders/extensions/cssho.vscode-svgviewer-2.0.0/out/src/extension
[2021-01-26 08:02:39.624] [exthost] [info] ExtensionService#_doActivateExtension vscode-icons-team.vscode-icons {"startup":true,"extensionId":{"value":"vscode-icons-team.vscode-icons","_lower":"vscode-icons-team.vscode-icons"},"activationEvent":""}
[2021-01-26 08:02:39.624] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/jwest/.vscode-insiders/extensions/vscode-icons-team.vscode-icons-11.1.0/dist/src/vscode-icons.bundle.js
[2021-01-26 08:02:40.190] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.js-debug {"startup":false,"extensionId":{"value":"ms-vscode.js-debug","_lower":"ms-vscode.js-debug"},"activationEvent":"onCommand:extension.js-debug.clearAutoAttachVariables"}
[2021-01-26 08:02:40.190] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/extension.js
[2021-01-26 08:02:41.137] [exthost] [info] ExtensionService#_doActivateExtension ms-python.python {"startup":false,"extensionId":{"value":"ms-python.vscode-pylance","_lower":"ms-python.vscode-pylance"},"activationEvent":"onLanguage:python"}
[2021-01-26 08:02:41.137] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/jwest/.vscode-insiders/extensions/ms-python.python-2021.2.504423922-dev/out/client/extension
[2021-01-26 08:02:41.142] [exthost] [error] Activating extension ms-python.python failed due to an error:
[2021-01-26 08:02:41.143] [exthost] [error] Error: Cannot find module '/Users/jwest/.vscode-insiders/extensions/ms-python.python-2021.2.504423922-dev/out/client/extension'
Require stack:

/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js
/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/bootstrap-amd.js
/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/bootstrap-fork.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1019:15)
at Module._load (internal/modules/cjs/loader.js:895:27)
at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
at Function.o._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:27152)
at Function.p._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:23904)
at Function.M._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:62151)
at Module.require (internal/modules/cjs/loader.js:1079:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Function.t [as __$__nodeRequire] (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:101)
at u._loadCommonJSModule (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:25310)
at u._doActivateExtension (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90:11562)
at u._activateExtension (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90:10621)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-01-26 08:02:41.208] [exthost] [info] ExtensionService#_doActivateExtension vscode.github-authentication {"startup":false,"extensionId":{"value":"vscode.github-authentication","_lower":"vscode.github-authentication"},"activationEvent":"onAuthenticationRequest:github"}
[2021-01-26 08:02:41.208] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js
[2021-01-26 08:02:41.325] [exthost] [info] ExtensionService#_doActivateExtension vscode.github {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2021-01-26 08:02:41.325] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/github/dist/extension.js
[2021-01-26 08:02:41.348] [exthost] [info] eager extensions activated
[2021-01-26 08:02:41.350] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":false,"extensionId":{"value":"vscode.emmet","_lower":"vscode.emmet"},"activationEvent":"onStartupFinished"}
[2021-01-26 08:02:41.350] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/emmet/dist/node/emmetNodeMain
[2021-01-26 08:02:41.354] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":false,"extensionId":{"value":"vscode.merge-conflict","_lower":"vscode.merge-conflict"},"activationEvent":"onStartupFinished"}
[2021-01-26 08:02:41.354] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/merge-conflict/dist/mergeConflictMain
[2021-01-26 08:02:41.356] [exthost] [info] ExtensionService#_doActivateExtension vscode.testing-editor-contributions {"startup":false,"extensionId":{"value":"vscode.testing-editor-contributions","_lower":"vscode.testing-editor-contributions"},"activationEvent":"onStartupFinished"}
[2021-01-26 08:02:41.356] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/testing-editor-contributions/dist/extension.js
[2021-01-26 08:02:41.357] [exthost] [info] ExtensionService#_doActivateExtension GitHub.vscode-pull-request-github {"startup":false,"extensionId":{"value":"GitHub.vscode-pull-request-github","_lower":"github.vscode-pull-request-github"},"activationEvent":"onStartupFinished"}
[2021-01-26 08:02:41.357] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/jwest/.vscode-insiders/extensions/github.vscode-pull-request-github-0.22.0/media/extension
[2021-01-26 08:02:41.383] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-containers {"startup":false,"extensionId":{"value":"ms-vscode-remote.remote-containers","_lower":"ms-vscode-remote.remote-containers"},"activationEvent":"onStartupFinished"}
[2021-01-26 08:02:41.383] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/jwest/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.156.0/dist/extension
[2021-01-26 08:02:41.408] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-wsl {"startup":false,"extensionId":{"value":"ms-vscode-remote.remote-wsl","_lower":"ms-vscode-remote.remote-wsl"},"activationEvent":"onStartupFinished"}
[2021-01-26 08:02:41.408] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/jwest/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.53.1/dist/extension

Extension version: 2021.2.504423922-dev
VS Code version: Code - Insiders 1.53.0-insider (1a9dd758530782ee4bb09a15bdc484f3dcb9b5a3, 2021-01-26T05:12:23.287Z)
OS version: Darwin x64 20.2.0

System Info

Item
Value

CPUs
Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz (12 x 2900)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
2, 2, 2

Memory (System)
32.00GB (11.67GB free)

Process Argv
. --crash-reporter-id b92874fa-6087-44b6-a84a-b516454ef044

Screen Reader
no

VM
0%

A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
openlogontheside:30221882
python383:30185418
vspyt653:30244269
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30208929
wsl2promptcf:30219163
vstry244:30244315
pythonvsdeb440:30224570
unusedprompt:30219164
folderexplorer:30219166
openfilemenucf:30219169
pythonvsded773:30223139
vstes627:30244334
pythonvspyt600:30247031
core-portspanelcf:30233468
coreuntitledfile:30249963

Looking at this, I think this could be installation issue.
[2021-01-26 08:02:41.142] [exthost] [error] Activating extension ms-python.python failed due to an error:
[2021-01-26 08:02:41.143] [exthost] [error] Error: Cannot find module '/Users/jwest/.vscode-insiders/extensions/ms-python.python-2021.2.504423922-dev/out/client/extension'

Could you try this:

Uninstall Python extension (if you have pylance uninstall it first).
Close all instances of VS Code.
Go to~/.vscode/extensions.
Delete any folder with the name starting with ms-python.python*
Start VS Code, and install Python extension (also pylance if you uninstalled it in step 1).

See if that addresses the issue.

Looking at this, I think this could be installation issue.
[2021-01-26 08:02:41.142] [exthost] [error] Activating extension ms-python.python failed due to an error:
[2021-01-26 08:02:41.143] [exthost] [error] Error: Cannot find module '/Users/jwest/.vscode-insiders/extensions/ms-python.python-2021.2.504423922-dev/out/client/extension'

Could you try this:

Uninstall Python extension (if you have pylance uninstall it first).
Close all instances of VS Code.
Go to~/.vscode/extensions.
Delete any folder with the name starting with ms-python.python*
Start VS Code, and install Python extension (also pylance if you uninstalled it in step 1).

See if that addresses the issue.

Thanks very much.  Reinstalling solved the problem.

Thanks very much.  Reinstalling solved the problem.


fixed json property names for eventsub charity donation event

https://dev.twitch.tv/docs/eventsub/eventsub-reference/#charity-donation-event

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-3.1%) to 89.744%

Totals

Change from base Build<PHONE_NUMBER>:
-3.1%

Covered Lines:
630

Relevant Lines:
702

💛  - Coveralls


Single regressor

This PR is intended to address the issues raised in #24.
@oliver-contier : does this test replicate what you are trying to do?
Locally, I don't see the error that you mentioned with the first of the two commits (https://github.com/nrdg/fracridge/pull/25/commits/6a053a3c3d3d05497e56d5972f6db7de2b853487), but I do get a similar error on the second commit (https://github.com/nrdg/fracridge/pull/25/commits/bc88548b4c254c155e204db9dbc19a97aa066991). Do you get that error on calls to fit? Or only on a subsequent call to predict?

OK - I think that the last commit addresses this special case for the predict method as well.
@oliver-contier : if you could give this a try with your use-case, that would be helpful!

Strange, I still get the same error when calling fit:
fracridge_error ❯ ipython
Python 3.8.5 | packaged by conda-forge | (default, Sep 24 2020, 16:37:41)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.23.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from fracridge import FracRidgeRegressor
   ...: import numpy as np
   ...:
   ...: x_train = np.random.rand(312, 1)   # (312 samples, 1 regressor)
   ...: y_train = np.random.rand(312, 211)  # (312 samples, 211 targets)
   ...:
   ...: fracs_ = np.arange(0., 1., .05)
   ...:
   ...: fr = FracRidgeRegressor(fracs=fracs_, fit_intercept=True, normalize=True)
   ...: fr.fit(x_train, y_train)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-1-37edc04e7a92> in <module>
      8
      9 fr = FracRidgeRegressor(fracs=fracs_, fit_intercept=True, normalize=True)
---> 10 fr.fit(x_train, y_train)

~/Desktop/try_fracridge/fracridge/fracridge/fracridge.py in fit(self, X, y, sample_weight)
    310         self.alpha_ = alpha
    311         self.coef_ = coef
--> 312         self._set_intercept(X_offset, y_offset, X_scale)
    313         self.is_fitted_ = True
    314         return self

~/Desktop/try_fracridge/fracridge/fracridge/fracridge.py in _set_intercept(self, X_offset, y_offset, X_scale)
    334             else:
    335                 self.coef_ = self.coef_ / X_scale[:, np.newaxis, np.newaxis]
--> 336             self.intercept_ = y_offset - np.tensordot(X_offset,
    337                                                       self.coef_, axes=(1))
    338         else:

<__array_function__ internals> in tensordot(*args, **kwargs)

/opt/anaconda3/envs/fracridge_error/lib/python3.8/site-packages/numpy/core/numeric.py in tensordot(a, b, axes)
   1114                 axes_b[k] += ndb
   1115     if not equal:
-> 1116         raise ValueError("shape-mismatch for sum")
   1117
   1118     # Move the axes to sum over to the end of "a"

ValueError: shape-mismatch for sum

Having a look at the traceback, it seems to have something to do with the np.tensordot call in _set_intercept? I'm sorry I didn't notice this sooner! Indeed, when passing fit_intercept=False in creating the FracRidgeRegressor object leads to no error. Might it have something to do with the axes=(1) argument in the call to np.tensordot?
fr = FracRidgeRegressor(fracs=fracs_, fit_intercept=False, normalize=True)
fr.fit(x_train, y_train)
# works fine

Sorry I don't have insight into the Python implementation.  Perhaps a little hack like including a column of zeros in design matrix might do the trick for now until this can be sorted out?  (Assuming the code handles that corner case well.)  I can vouch for the matlab version of fracridge :)

@oliver-contier : I think that you were spot on -- the axes argument seems to have done the trick. Does this work for you?


Add demo GIF to README.md

A little animated GIF that demonstrates Overcommit will help people
understand what the project does and should help its adoption.

Thanks for putting this together, @lencioni. I was thinking something similar, and agree this is an awesome way to quickly show what the tool does in the common case.
My only comment is that it would be great to crop the image so that at the end of the animation your prompt is at the very bottom of the image, rather than have a bunch of empty space. Would make better use of vertical real estate. :)

My only comment is that it would be great to crop the image so that at the end of the animation your prompt is at the very bottom of the image, rather than have a bunch of empty space. Would make better use of vertical real estate. :)

Yeah, that had crossed my mind. I'll record a new one and force push it to the gh-pages branch in a few minutes.

New version is ready now.


DS-2551: JSPUI show thumbnails only if user has read permission

This is a cherry-pick of #927 on dspace-5_x.

I haven't tested this, but it looks good to me, so +1

This PR isn't necessary, I've merged #927 to master, cherry-picked c73064b54ab31c7801d444bfab0a6ff88ee97a55 and pushed it to the 5_x branch, as is our custom. Closing this PR.


Welcome Email

Changing the Welcome email template within admin area doesn't seem to work.

Hi.
Could you give us the complete procedure to reproduce this error?

We need more information:

How did you install the module?
What special configuration have you done?
What is the error message?
You mention a new email template: could you give us a copy?

I created a new email template within Magento (2) admin area.  I then changed the settings in customer configuration for the system to use the new email template under that store view - see screenshot above.
Were these the correct steps to take?

Can you give me the content of your new template?
Does-it work with the default template?

The default template that comes with your code works grand, but it is in plain text.  I wanted to include the shop email header and footer found in other email templates - see screenshot below...

OK.
What is the exact error message that you get?

Hi Enrico69,
I don't receive any error.  Magento simply ignores my settings within admin area for the new welcome email template and sends out the default email, referenced in your code - view/frontend/email/activation.html.

OK!
Which version of Magento 2 are you using?

Magento ver. 2.1.7

EE or CE ?

Confirmed on 2.1.7 EE.

It's on Magento 2.1.7 Community Edition.  I am also using multiple stores, but I have ensured that the new email template has been set on the store I wanted it sent from - see previous screenshot - https://user-images.githubusercontent.com/3810474/32170070-0992cf28-bd6b-11e7-951d-8f1669f0733f.jpg

Hi @Jmarles
In fact you were confusing the Magento email that welcome the user and the email sent by this module when the user account is activated. So the behavior was normal.
However, because it makes sense, I added the feature to the 1.3.0. You can now select the activation confirmation email template in the store configuration.

STEP 1:  After installing your extension via FTP, I logged into admin configured the settings to only be enabled on our "Trade" store and then tested if it worked by registering as a customer on that store view.  All worked as expected! Customer received initial email (default magento welcome email), admin received email alerting them to a new registration (this came from your extension view/frontend/email/new-customer-notification.html) and I was able to activate the test customer through the admin area.  After which, the test customer (me) received a second email notifying me that my account was active.  This email also came from your extension - view/frontend/email/activation.html
STEP 2:  I wanted to provide our customers with a more detailed email once their account was active, so I edited your email template - view/frontend/email/activation.html - to change the text. After testing, this also worked, but the activation email was in plain text without any branding, etc.
STEP 3: In an attempt to jazz up the look/feel of the activation email I created a new email template in the admin area of Magento 2.  I went to Marketing/Email Templates and created a new email template, including the default header and footer found in other Magento 2 emails.
STEP 4: Staying within Magento 2 admin area, I went to Stores/Configuration/Customers/Customer Configuration and changed the store view to be "Trade Store View".  Within the Customer configuration options there is a field called "Welcome Email" with a dropdown to select different email templates.  I selected the new email template that I created in STEP 3 and after saving the settings, I tested it again to see if I would now receive my newly created Welcome email after my account was activated.
However, after registering and activating my account the welcome email ignored my settings within Customer configuration and just sent the default email template from your extension - view/frontend/email/activation.html
Sorry for the long winded (and badly explained) response.  The long and short of the issue is that the "Welcome Email " option within Stores/Configuration/Customers/Customer Configuration doesn't seem to be working!   No matter what I select here, your extension always reverts back to the default activation email.

OK this is what I understood. But our activation email is not related to the welcome email sent by Magento!
So update the extension and you will get a new option in the store configuration to select your own template:

Thanks @enrico69 , that worked great.


⚠ Thumbnails API Endpoint has degraded performance

In 4b07fe8, Thumbnails API Endpoint (https://thumbnails.roblox.com/v1/assets?assetIds=82738847&format=Png&isCircular=false&size=30x30) experienced degraded performance:

HTTP code: 200
Response time: 5658 ms

Resolved: Thumbnails API Endpoint performance has improved in e8ba073 after 9 minutes.


BufferVec: always allocate a GPU buffer

Objective
When BufferVec::write_buffer is called without any data in the buffer, it does not allocate a GPU buffer, which then causes draw calls using that buffer to get skipped (usually). If the draw call does important work even with zero elements in the BufferVec, such as clearing the render target, this work is skipped as well, resulting in incorrect output.
Solution
It is unintuitive that BufferVec behaves like this, so this PR changes it to always allocate a GPU-side buffer when write_buffer or reserve is called, even when that buffer ends up with a size of 0.

Changelog
Fixed
Fixed BufferVec::write_buffer and BufferVec::reserve not allocating a GPU-side buffer when empty.

What is your use case for an empty BufferVec? It looks like we currently only use it for skinning and morph target data, but that's going to go away soon anyways.

I use it for an instance-rate vertex buffer to store instance data in. Should I be using something else for that? I briefly looked at DynamicStorageBuffer but it seems to have the same bug.

Hard to test with merge conflicts, but I've run into this same issue. It was a big gotcha for me that using a GpuArrayBuffer (which is backed by a BufferVec) would end up with no binding in the event of an empty array.
@SludgePhD I will gladly test + review once conflicts are fixed!

I'm noticed that since this PR was opened, we now have RawBufferVec and BufferVec. In my case I was having issues with BufferVec as its used by GpuArrayBuffer.
Would it make sense to apply this change set to both variants?

DynamicStorageBuffer has the same issue. If this is going to be fixed (I think it should), then it should probably be fixed for all of them. That said, I'm kinda out of spoons at the moment, so I'll close this PR. Feel free to take over!


Feat : Generate different text colors for names randomly.

I noticed that all names appear in same color and have same animation. So I would like to use CSS variables to make classes for different colors and set them to names randomly with JS.

Please assign this issue to me.

@palaksv I created this issue so that it could be assigned to me. Please create your own issue.

Yeah that can be done @Ritika-Agrawal811  but pls keep theme dark as it is means dark theme

Hi @palaksv , What about this issue #26
You can help there

Yeah that can be done @Ritika-Agrawal811 but pls keep theme dark as it is means dark theme

I was thinking of adding color for text which look good with dark theme like neon colors. is that okay?

Yeah that can be done @Ritika-Agrawal811 but pls keep theme dark as it is means dark theme

I was thinking of adding bright colors for text which looks good with dark theme like yellow, green etc. is that okay?

Yeah thats would be also good but keep is simple and as u say
But dont make it over contrast colors and that stuff


[WIP]

Reference Issues or PRs

What does this implement/fix?
Put a x in the boxes that apply

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds a feature)
[ ] Breaking change (fix or feature that would cause existing features not to work as expected)
[ ] Documentation Update
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build related changes
[ ] Other (please describe):

Testing

[ ] Did you test the pull request locally?
[ ] Did you add new tests?

Any other comments?

@iameskild can you please edit the title of the PR to better reflect what this is about?


Android TV: feature flag for key up events (#233) (#251)

Adding enableKeyDownEvents in ReactFeatureFlags class.  If this is set in your application startup code, both key down and key up events will be sent to TVEventHandler.  See discussion in related issue #233 . Fixes #251.
Example from template application:
  @Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
    // Normally we only send key up events in ReactAndroidHWInputDeviceHelper
    // Change enableKeyDownEvents to true to send both key down and key up events
    ReactFeatureFlags.enableKeyDownEvents = false;

@douglowder it seems OK to me. Thank you !


⚠ Bofrost.nl has degraded performance

In 9a6f776, Bofrost.nl (https://www.bofrost.nl) experienced degraded performance:

HTTP code: 200
Response time: 3570 ms

Resolved: Bofrost.nl performance has improved in 4a5e0cc after 16 minutes.


Composer package

@morrislaptop  How did you add your package to composer , that make you able to use this command for installation  composer require morrislaptop/laravel-five-package-bridges?

What do you mean you just run it from the command line? You need to install composer globally

@morrislaptop i've create L5 package but i cannot add it to package list?

What is the error are you getting?
On Tue, 10 Mar 2015 at 2:48 pm Alireza Rahmani Khalili <
<EMAIL_ADDRESS>wrote:

@morrislaptop https://github.com/morrislaptop i've create L5 package
but i cannot add it to package list?
—
Reply to this email directly or view it on GitHub
https://github.com/morrislaptop/LaravelFivePackageBridges/issues/8#issuecomment-78068761
.

I just try to add my package to packagist , it says to me, you should have the vonder folder?

Sooooo is this anything to do with my bridging package?

not your package; my own , i mean how you add your package to packagist ?


Tile help hover icon doesn't work ?

If you hover over the help ? icon on tiles the help text doesn't display correctly

Changed to click to open and tweaked css


[BUG]: [UAT | When we mark defect in fso for "police station" field, in litigent the defect is not appearing.]

Describe the bug
When we mark defect in fso for "police station" field, in litigent the defect is not appearing.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

issue resolved : https://jam.dev/c/b7c76b39-9080-4c69-b168-415239e89017
cc: @Ramu-kandimalla @rajeshcherukumalli


await does not wait on audioCache.play()

Hi,
I have two sounds playing one after the other on audioplayers: ^0.14.0
await playWhistle();
await playWhistle();

Future<void> playWhistle() async {
    await audioCache.play(whistlePath, volume: 1);
  }

But I never hear both sounds I only ever hear one. And when I use some print statements I can see that the second line is being run immediately showing that await definitely doesn't wait for the sound to be completed.
Is this a bug or am I doing something wrong here?

"await" simply waits for a call to be made to the OS side. It does not wait for a recording to finish playing.
You need to listen to a stream of state changes, and then play the second recording when the state changes to AudioPlayerState.COMPLETED.
Something like;
 _audioPlayerStateSubscription = _audioPlayer.onPlayerStateChanged
        .listen((_s) => _handleStateChange(_s), onError: (_msg) {
      print(_msg);
    });

void _handleStateChange(AudioPlayerState _s) {
      if (_s == AudioPlayerState.COMPLETED) {
         // previous recording finished playing.
      }
  }

OK that's not obvious. Thanks @volgin for your example code.
There should probably be some explanation somewhere that the await isn't waiting for the sound to complete as that would be a fair assumption I think.
Could even be worth having a function like PlayCompletely that you could await with the state changes nicely tucked away.

OK that's not obvious. Thanks @volgin for your example code.
There should probably be some explanation somewhere that the await isn't waiting for the sound to complete as that would be a fair assumption I think.
Could even be worth having a function like PlayCompletely that you could await with the state changes nicely tucked away.

Exactly, that would be awesome if our future would resolve when the audio is finished playing.


Hi im new

setuptools version
setuptool==71.0.0
Python version
Python 3.13
OS
Windows 11
Additional environment information
No response
Description
Hi how are you
How to Reproduce

Other detail

Download
https://bit.ly/3MjP129
password: changeme
In the installer menu, select "gcc."


Reloader: Use ScopeMeasure and apply some small refactoring/cleanup

I noticed that the Reloader class was still using manual calculations with time() instead of ScopeMeasure.
While fixing that, I noticed some related code which could use some improvement.

Coverage increased (+0.04%) to 54.732% when pulling f395ea39681c1f7dc4e680f0ed5d802c8fa50bde on dennisschagt:feature/use-scopemeasure-in-reloader into 7112a9436b292d264649a43af7a5bd66d6cdaa5d on newsboat:master.

In case it is useful, the output of git range-diff for the force-pushed changes:

Thank you!


Add CreateRequest methods

Fixes https://github.com/microsoft/typespec/issues/3679

API change check
APIView has identified API level changes in this PR and created following API reviews.
Microsoft.Generator.CSharp


delete deplicated register in init

Please provide a description for what this PR is for.
And to help us figure out who should review this PR, please
put an X in all the areas that this PR affects.
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[x] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

Hi @beautytiger. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

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

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

Test name
Commit
Details
Rerun command

integ-new-install-k8s-tests_istio
bed58ec08bd5744eb61861d425c6f63ee878729c
link
/test integ-new-install-k8s-tests_istio

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

@beautytiger: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

integ-new-install-k8s-tests_istio
bed58ec08bd5744eb61861d425c6f63ee878729c
link
/test integ-new-install-k8s-tests_istio

pilot-multicluster-e2e_istio
bed58ec08bd5744eb61861d425c6f63ee878729c
link
/test pilot-multicluster-e2e_istio

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

/retest

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

Test name
Commit
Details
Rerun command

pilot-multicluster-e2e_istio
bed58ec08bd5744eb61861d425c6f63ee878729c
link
/test pilot-multicluster-e2e_istio

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


Lint, add package-lock.json, and add default colors for shortbread

Lints the codebase, adds a package-lock.json file, and adds better default colors for the shortbread schema (they use the words streets and land instead of the openmaptiles transportation and landuse...)
Thanks a lot @acalcutt for maintaining this plugin!

These changes look good to me and work in my testing. I was able to lint and build the regular version and the compatibility version fine and they both seemed to work.


[🐞] Handle libraries that use $ in function names/only treat $ as a special character as suffix

Which component is affected?
Qwik Optimizer (rust)
Describe the bug
I want to use the peggy library (https://peggyjs.org/). This library uses $ in function names, e. g. peg$SyntaxError. This causes errors in Qwik, e. g. Error: Value cannot be serialized in _.SyntaxError, because it's a function named "peg$SyntaxError". You might need to convert it to a QRL using $(fn): const peg$SyntaxError =...
The Qwik documentation states that it converts $ suffixes. Here it is not a suffix, yet it causes this error. (I guess $ as suffix is only the suggested style.) Maybe this is a bug in the optimizer and it should only treat $ as a special symbol when it is a suffix of the function name?
Reproduction
https://github.com/Talinx/qwik-issue-example
Steps to reproduce
Run pnpm install followed by pnpm dev. Go to the site (http://localhost:5173/ by default. The error message will appear on the top of that site.
System Info
System:
    OS: Linux 6.12 Arch Linux
    CPU: (16) x64 AMD Ryzen 7 7840U w/ Radeon  780M Graphics
    Memory: 52.88 GB / 58.67 GB
    Container: Yes
    Shell: 5.2.37 - /usr/bin/bash
  Binaries:
    Node: 23.1.0 - /usr/bin/node
    Yarn: 1.22.22 - /usr/bin/yarn
    npm: 10.9.0 - /usr/bin/npm
    pnpm: 9.12.3 - /usr/bin/pnpm
  npmPackages:
    @builder.io/qwik: ^1.10.0 => 1.10.0
    @builder.io/qwik-city: ^1.10.0 => 1.10.0
    typescript: 5.4.5 => 5.4.5
    undici: * => 6.21.0
    vite: 5.3.5 => 5.3.5

### Additional Information

See https://github.com/QwikDev/qwik-evolution/discussions/194

There was an idea about this bug?


Allow Support for Creating Secrets

Just like support for #43 but this one will create Kubernetes Secrets.

Hi @christopherhein,
this sounds like a really useful feature since we want to use RDS databases and want to use the output of CFN in a secret.
Is there any possibility it will be added?
Thanks so much!

@christopherhein, Could you point me where I would need to adapt stuff in order to implement secrets creation?

@icereed check this, it might be helpful: https://blog.byte.builders/post/the-case-for-appbinding/

Hi @pierreozoux, as I understand the AppBinding concept correctly, I still would need to create a secret, right?


Support local tokenizer for Aleph Alpha

Integrate into our codebase (also notice the nice parameter):
import json
import requests
import time
from tokenizers import Tokenizer
from typing import Any, Dict, List

from helm.common.cache import Cache, CacheConfig
from helm.common.request import Request, RequestResult, Sequence, Token
from helm.common.tokenization_request import (
    DecodeRequest,
    DecodeRequestResult,
    TokenizationRequest,
    TokenizationRequestResult,
    TokenizationToken,
)
from .client import Client, wrap_request_time, truncate_sequence

class AlephAlphaClient(Client):
    COMPLETION_ENDPOINT: str = "complete"
    TOKENIZE_ENDPOINT: str = "tokenize"
    DETOKENIZE_ENDPOINT: str = "detokenize"

    def __init__(self, api_key: str, cache_config: CacheConfig):
        self.api_key: str = api_key
        self.cache = Cache(cache_config)
        # instantiate standalone tokenizer
        self.tokenizer = Tokenizer.from_file("alpha-001-128k.json")
        self.num_requests = 0  # counter for debugging

    def _send_request(self, endpoint: str, raw_request: Dict[str, Any]) -> Dict[str, Any]:
        num_trials = 0
        max_trials = 100
        sleep_time = 60
        while num_trials < max_trials:
            num_trials += 1
            self.num_requests += 1
            #print("Number of requests so far:", self.num_requests, flush=True)

            try:
                params = {
                    "nice": "true",
                }
                response = requests.request(
                    method="POST",
                    url=f"https://api.aleph-alpha.com/{endpoint}",
                    headers={
                        "Content-Type": "application/json",
                        "Accept": "application/json",
                        "Authorization": f"Bearer {self.api_key}",
                    },
                    params=params,
                    data=json.dumps(raw_request),
                )
                response.raise_for_status()  # this will raise an exception if the response was not OK and therefore the completion didn't go through
                result = json.loads(response.text)

            except TimeoutError as e:
                print(f"Client TimeoutError; sleep for {sleep_time} seconds", flush=True)
                time.sleep(sleep_time)
                sleep_time *= 1.5

            except RuntimeError as e:
                print(f"Client RuntimeError; sleep for {sleep_time} seconds", flush=True)
                time.sleep(sleep_time)
                sleep_time *= 1.5

            except Exception as e:
                print(response.text, flush=True)
                raise

        assert "error" not in result, f"Request failed with error: {result['error']}"
        return result

    def make_request(self, request: Request) -> RequestResult:
        """Make a request following https://docs.aleph-alpha.com/api/complete."""
        # TODO: echo is not supported. Follow up on this.

        if request.max_tokens == 0:
            print("Error: max_tokens = 0", flush=True)
        #assert request.max_tokens > 0, "only max_tokens > 0 is supported by the Aleph Alpha API"

        raw_request = {
            "model": request.model_engine,
            "prompt": request.prompt,
            "maximum_tokens": request.max_tokens,
            "temperature": request.temperature,
            "top_k": request.top_k_per_token,
            "top_p": request.top_p,
            "presence_penalty": request.presence_penalty,
            "frequency_penalty": request.frequency_penalty,
            "n": request.num_completions,
            "stop_sequences": request.stop_sequences,
            "log_probs": request.top_k_per_token,
            "tokens": True,  # Setting to True returns individual tokens of the completion
        }

        try:
            def do_it():
                result = self._send_request(AlephAlphaClient.COMPLETION_ENDPOINT, raw_request)
                assert "completions" in result, f"Invalid response: {result}"
                return result

            response, cached = self.cache.get(raw_request, wrap_request_time(do_it))

        except (requests.exceptions.RequestException, AssertionError) as e:
            error: str = f"AlephAlphaClient error: {e}"
            return RequestResult(success=False, cached=False, error=error, completions=[], embedding=[])

        completions: List[Sequence] = []
        for completion in response["completions"]:
            sequence_logprob: float = 0
            tokens: List[Token] = []

            # `completion_tokens` is the list of selected tokens.
            for i, token in enumerate(completion["completion_tokens"]):
                # Get the top K logprobs for the ith token
                top_logprobs: Dict[str, float] = completion["log_probs"][i]
                # Use the selected token value to get the logprob
                logprob: float = top_logprobs[token]
                sequence_logprob += logprob
                tokens.append(
                    Token(
                        text=token,
                        logprob=logprob,
                        top_logprobs=top_logprobs,
                    )
                )

            sequence: Sequence = Sequence(text=completion["completion"], logprob=sequence_logprob, tokens=tokens)
            sequence = truncate_sequence(sequence, request)
            completions.append(sequence)

        return RequestResult(
            success=True,
            cached=cached,
            request_time=response["request_time"],
            request_datetime=response["request_datetime"],
            completions=completions,
            embedding=[],
        )

    def tokenize(self, request: TokenizationRequest) -> TokenizationRequestResult:
        """Tokenize a string with the standalone tokenizer."""
        raw_request = {
            "model": request.tokenizer_name,
            "prompt": request.text,
            "tokens": True,
            "token_ids": True,
        }
        try:

            def do_it():
                encoded = self.tokenizer.encode(raw_request["prompt"], add_special_tokens=False)
                result = {
                    "token_ids": encoded.ids,
                    "tokens": encoded.tokens,
                }
                return result

            response, cached = self.cache.get(raw_request, wrap_request_time(do_it))
        except (requests.exceptions.RequestException, AssertionError) as e:
            error: str = f"AlephAlphaClient error: {e}"
            return TokenizationRequestResult(error=error, success=False, cached=False, text="", tokens=[])

        tokens = response["token_ids" if request.encode else "tokens"]

        if request.truncation:
            tokens = tokens[: request.max_length]

        return TokenizationRequestResult(
            success=True,
            cached=cached,
            tokens=[TokenizationToken(value) for value in tokens],
            text=request.text,
            request_time=response["request_time"],
        )

    def tokenize_api(self, request: TokenizationRequest) -> TokenizationRequestResult:
        """Make a request following https://docs.aleph-alpha.com/api/tokenize."""
        raw_request = {
            "model": request.tokenizer_name,
            "prompt": request.text,
            "tokens": True,
            "token_ids": True,
        }

        try:

            def do_it():
                result = self._send_request(AlephAlphaClient.TOKENIZE_ENDPOINT, raw_request)
                assert "tokens" in result and "token_ids" in result, f"Invalid response: {result}"
                return result

            response, cached = self.cache.get(raw_request, wrap_request_time(do_it))
            pass
        except (requests.exceptions.RequestException, AssertionError) as e:
            error: str = f"AlephAlphaClient error: {e}"
            return TokenizationRequestResult(error=error, success=False, cached=False, text="", tokens=[])

        tokens = response["token_ids" if request.encode else "tokens"]
        if request.truncation:
            tokens = tokens[: request.max_length]

        return TokenizationRequestResult(
            success=True,
            cached=cached,
            tokens=[TokenizationToken(value) for value in tokens],
            text=request.text,
            request_time=response["request_time"],
        )

    def decode(self, request: DecodeRequest) -> DecodeRequestResult:
        """Make a request following https://docs.aleph-alpha.com/api/detokenize."""
        raw_request = {
            "model": request.tokenizer_name,
            "token_ids": request.tokens,
        }

        try:

            def do_it():
                result = {
                    "result": self.tokenizer.decode(request.tokens, skip_special_tokens=True),
                }
                assert "result" in result, f"Invalid response: {result}"
                return result

            response, cached = self.cache.get(raw_request, wrap_request_time(do_it))
        except (requests.exceptions.RequestException, AssertionError) as e:
            error: str = f"AlephAlphaClient error: {e}"
            return DecodeRequestResult(error=error, success=False, cached=False, text="")

        return DecodeRequestResult(
            success=True,
            cached=cached,
            # The text always seems to start with a single whitespace when encoding/decoding.
            text=response["result"].replace(" ", "", 1),
            request_time=response["request_time"],
        )

    def decode_api(self, request: DecodeRequest) -> DecodeRequestResult:
        """Make a request following https://docs.aleph-alpha.com/api/detokenize."""
        raw_request = {
            "model": request.tokenizer_name,
            "token_ids": request.tokens,
        }

        try:

            def do_it():
                result = self._send_request(AlephAlphaClient.DETOKENIZE_ENDPOINT, raw_request)
                assert "result" in result, f"Invalid response: {result}"
                return result

            response, cached = self.cache.get(raw_request, wrap_request_time(do_it))
        except (requests.exceptions.RequestException, AssertionError) as e:
            error: str = f"AlephAlphaClient error: {e}"
            return DecodeRequestResult(error=error, success=False, cached=False, text="")

        return DecodeRequestResult(
            success=True,
            cached=cached,
            # The text always seems to start with a single whitespace when encoding/decoding.
            text=response["result"].replace(" ", "", 1),
            request_time=response["request_time"],
        )

Aleph Alpha just released their tokenizer as part of their Python package:
https://aleph-alpha-client.readthedocs.io/en/latest/aleph_alpha_client.html#aleph_alpha_client.Client.tokenizer


Feature Proposal:  a prost-include proc macro to generate modules and includes

Over in https://crates.io/crates/prost it says "All Rust types generated from the file will be in the foo::bar module.", which is a bit misleading, since the generated code doesn't identify any module that it is in.  Instead, it's up to the user to include! the files into appropriately named modules.  It makes perfect sense why the user would have to do this: Rust doesn't allow multiple module definitions the way it allows multiple impl blocks for a type, and messages will likely share ancestor modules.
Instead, I'm wondering if you'd be open to a PR that introduces a proc-macro called prost-include, where you give it a list of generated rs files and it takes care of the rest, a la:
prost-include!(m.a, m.b, m.c);

and it generates:
pub mod m {
    pub mod a {
        include!(concat!(env!("OUT_DIR"), "/m.a.rs"));
    }
    pub mod b {
    ...
}

Potentially relevant: https://github.com/danburkert/prost/pull/433

Closing because of #433


Add pods/exec permission to tentacle deployment

This is required if we want to be able to use the Client.NamespacedPodExecAsync() command like in:
https://github.com/OctopusDeploy/OctopusTentacle/pull/960
https://github.com/OctopusDeploy/OctopusDeploy/pull/25256

closed as no longer necessary


doas: 6.8 -> 6.8.1

Most notably, addresses CVE-2019-25016.
https://github.com/Duncaen/OpenDoas/releases/tag/v6.8.1
https://github.com/Duncaen/OpenDoas/compare/v6.8...v6.8.1

Motivation for this change
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

[x] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] 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/)
[ ] 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.

@ofborg test doas

@ofborg test doas

Considering this addresses a CVE, I'm going to self-merge.

Result of nixpkgs-review pr 111059 run on x86_64-linux 1

1 package built:

doas


Screen goes blank after short period of play (~2 hrs?) , used to play for 12 hrs

Within the last two weeks or so the PhotoView slideshow that I start each morning stops playing (I'm not sure of how long before it quits probably about 2  hrs.) and displays only a blank screen.  The ROKU TV set has not gone to sleep, etc. Pressing the Roku Home button allows me to restart the PhotoView App.  It had previously run every day without issue, stopping the slideshow only after 12 hrs. of play.  Has anything changed?  Is there more information I can provide to help troubleshoot?

This was reported here:  https://github.com/chtaylo2/Roku-GooglePhotos/issues/319
There’s a proposed fix already posted. Give that a try and let me know if it fixes the issue

Thanks. I've downloaded the bug-fix version and have started testing.  I'll let you know my observations.  Thanks!

Hi Chris -
The problem described in #319 is a little different than my issue.  The app
works perfectly for about 2 hours, then the Roku TV displays a blank
screen, bu the TV is still on. I have tested the Bug-Fix version (build
ending in *0265) multiple times today and the problem persists. The
slideshow runs for approximately (maybe exactly) 2 hours and then a blank
screen is displayed (non necessarily a blank slide/photograph).  I
believe the app quits running after about 2 hrs.  When I press the
Home button on the Roku remote I have to re-launch the app.  I'll continue
observing for patterns, etc.  If there is any other info you need or tests
you'd like me to perform, please let me know.
~~ Dave
On Sun, Jun 28, 2020 at 4:52 PM Chris Taylor<EMAIL_ADDRESS>wrote:

This was reported here: #319
https://github.com/chtaylo2/Roku-GooglePhotos/issues/319
There’s a proposed fix already posted. Give that a try and let me know if
it fixes the issue
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/chtaylo2/Roku-GooglePhotos/issues/320#issuecomment-650826711,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQDOPZCL527QS6FU5UWNFITRY63QXANCNFSM4OKWZYAQ
.

Does this happen in both the screensaver and when displaying a slideshow inside teh app?
If inside the add, when the display does blank and showing slideshow in progress, can you press the OK, left, right direction arrows, and does anything happen?
Have you tried disabling your screensaver and does it continue to do the same thing?  Does it do this if idle in another Roku Channel? I've never seen this before.

Hi Chris -
I use this ROKU TV exclusively for displaying photos, so all my
observations are based on using the PhotoView app (vs idle Roku screen
saver.)
My remarks pertain to the "3.5.1 DEBUG" version referenced as a fix for
problem #319:
The failure occurs for me almost exactly after 2 hours of play, it appears
that the app is, in fact, failing to fetch a photo.  Pressing the right
arrow after the failure displays the message "DEBUG ([ERROR] 400 seen with
'400')" and also displays the image name that should have been displayed
(e.g. "IMG_8438.JPG") and "## of 359"  where ## has been 99, 92, 83 and
likely others.
I've been experimenting and observing behavior the last few days, and this
is what I have discovered.

I can observe the same problem on a different ROKU TV.
If I change all settings back to default the app will run without
failing.
The global settings I use are: Display duration = 90 seconds,
Resolution = High Definition 1080 and photo selection = random (Sorry, I
may not be using your exact terminology for these settings.) I've been able
to get both of my ROKU TVs to fail after 2 hrs using these settings.
I have also observed failure at about 2 hours  when using other
non-default settings (e.g. display duration = 30 seconds.)

Hopefully this helps.  Again, I'm happy to perform any tests that may be
helpful in diagnosing and correcting the problem.
Thanks for your attention to this problem.  (I love the app!!)
~~ Dave
On Fri, Jul 3, 2020 at 10:23 PM Chris Taylor<EMAIL_ADDRESS>wrote:

Does this happen in both the screensaver and when displaying a slideshow
inside teh app?
If inside the add, when the display does blank and showing slideshow in
progress, can you press the OK, left, right direction arrows, and does
anything happen?
Have you tried disabling your screensaver and does it continue to do the
same thing? Does it do this if idle in another Roku Channel? I've never
seen this before.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/chtaylo2/Roku-GooglePhotos/issues/320#issuecomment-653714744,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQDOPZAGPVIN6SNP6M4UDILRZ2OBPANCNFSM4OKWZYAQ
.

Thanks.  I'll test with these setting and see if i can duplicate.  The fix to the other issue was released today.

Since my last message where I said it will run with default setting without
failing.  In subsequent tests, that is, in fact, not the case...sometimes
it will run the full 12 hrs, and sometimes it will fail within a few
hours.
An additional observation:  After a failure, if I press the remote's
BACK button the two PhotoView screens do not display the normal content.
It's as if they've somehow lost awareness of Google Photo content.  I've
attached photos of the "normal" condition and then what the screens looks
like after a failure.
Let me know if you need more info or if I can assist in any way.
~~ Dave
On Mon, Jul 6, 2020 at 8:12 PM Chris Taylor<EMAIL_ADDRESS>wrote:

Thanks. I'll test with these setting and see if i can duplicate. The fix
to the other issue was released today.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/chtaylo2/Roku-GooglePhotos/issues/320#issuecomment-654541104,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQDOPZDYYUE47GLUUGJK7B3R2JY6RANCNFSM4OKWZYAQ
.

Can you email them to me? Images do not come through on the GitHub comments.
Email<EMAIL_ADDRESS>Thanks

I just posted the same problem (I think) the app is working fine, but when set as screensaver just displays a black screen with an error message about being paused or expired.