[RFC] Jest-internal sandbox escape hatch

Motivation
This stems from #7792, where we need to load multiple dependencies outside of the sandbox from jest-snapshot running within the sandbox. Passing things in from the outside is becoming very tedious, and even passing in a requireOutside function doesn't seem easy enough - it should be easy for our own code to make the right call on when to import from outside the sandbox for correctness (not being influenced by mocking/module mutation from user code) and perf (not creating many new module instances).
jest-snapshot will now need @babel/{core,traverse,types,generator} and prettier from outside the sandbox. I can also imagine that in future extensions of inline snapshot logic, and other parts of Jest loaded inside the sandbox, we may want to require outside dependencies, both for performance and for correctness (not requiring mocks or modules modified by the user). @SimenB has also mentioned that it would be nice if e.g. inside expect could get an outside jest-diff to improve performance.
I also want to avoid this requirement introducing lots of boilerplate into our packages because we have to pass either imported dependency objects or requireOutside functions around, so I'd like to have a way for Jest's own packages to require outside modules more easily, while still preventing user code from doing so (i.e. no globalThis.__requireOutside()). It should be easy for us to correctly require external dependencies, but as close to impossible as we can get for the user.
🚀 Feature Proposal
Here's my proposal, slightly wild but I think the downsides can actually be mitigated:
jest-runtime adds a require(moduleName, {outside: true}) to the createRequireImplementation() return value, but only for modules required as internal (fortunately we already know this info) to make sure user code doesn't get it.
We already have code around this, the require implementation for internal modules is already different in that it, firstly, requires further modules as internal as well, and secondly, never considers mocks.
This require interface extension is compatible with the official Node require, so loading Jest packages using outside: true when already outside of a sandbox will still work. This applies both for us, if we load util code sometimes inside and sometimes outside a sandbox, and for external users of jest-diff etc.
Because the outside option will (CAN) only be used by Jest's internal modules that also makes it okay in the unlikely event that Node ever decides to add a second parameter to require - we can refactor our interface and all usages to make it compatible again.
Variants
Node API compatibility
@SimenB voiced concerns regarding Node API compatibility if we extend require.
A possible way to fix this:
We have a Babel plugin (applied to Jest's internal modules) transform requireOutside('/module.js') to require(require.resolve('/module.js', {outsideJestVm: true})). The runtime's resolve returns 'jest-outside-vm:///module.js'. This protocol is handled by the runtime's require, prompting it to use the real require to retrieve the module. This should be a 100% compliant require implementation, unless you consider coming up with extra options forbidden.
This does expose a way for users to break outside of the sandbox again, if they know the protocol. To secure against this, we can generate a random crypto number on runtime startup and attach that to the protocol, or even an HMAC over the path using the number, so that in case we leak one such URL it cannot be used to require any file from outside the VM.

it should be easy for our own code to make the right call on when to import from outside the sandbox for correctness (not being influenced by mocking/module mutation from user code) and perf (not creating many new module instances).

The require in internal modules is never affected by mocks (require injected in modules loaded via requireInternalModule is always requireInternalModule, which doesn't consider mocks), so this is purely a perf thing.

Because the outside option will (CAN) only be used by Jest's internal modules that also makes it okay in the unlikely event that Node ever decides to add a second parameter to require - we can refactor our interface and all usages to make it compatible again.

My main concern here is that if we have this running for some time, node 18 might introduce this second param, and then all old versions of Jest would be broken unless we backported some fix (which I don't think we would ever do). So I'm in favour of the second option you suggest.

This does expose a way for users to break outside of the sandbox again, if they know the protocol.

Not really - we can throw if that protocol is passed to the normal require rather than the one backed by requireInternalModule

The require in internal modules is never affected by mocks (require injected in modules loaded via requireInternalModule is always requireInternalModule, which doesn't consider mocks), so this is purely a perf thing.

Oh, true.
Reminds me of one aspect though: We can only use this inside of requireInternalModule cascades like circus' jestAdapterInit. E.g. if we decide to import the "real" outside pretty-format from jest-diff (not saying we want to, haven't checked if that's dangerous because of global types or so), this doesn't mean that the user importing jest-diff will get that, because their test run is not in an internal context. Don't see that causing problems though?

Not really - we can throw if that protocol is passed to the normal require rather than the one backed by requireInternalModule

Oh, so maybe it's actually quite simple. The thing providing the security here is really the internal runtime context - if only that can give you special require.resolve tokens, only that can also accept special tokens in the require :+1:

Don't see that causing problems though?

Nah, I think it's fine (and the behavior we want).

Oh, so maybe it's actually quite simple.

Yeah, should be pretty clean.


⚠ ClamAV has degraded performance

In 97eac93, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 217 ms

Resolved: ClamAV performance has improved in da4f3af.


Ignore long lines in HTML comments

Hello.
Is there a way how to skip all checks inside the HTML comments in markdown file?
Example:
$ cat > test.md << \EOF
<!---
ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+
-->

[//]: # ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+
EOF

$ markdownlint test.md
test.md:2:81 MD013/line-length Line length [Expected: 80; Actual: 121]
test.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 129]

❯ markdownlint --version
0.38.0

It would be nice if markdownlint will ignore everything inside <!--- ... -->.
Currently I do not know how to ignore commented long like in markdown.
Thank you

The content of HTML comments is generally ignored by default. In the case here, MD013 is operating in its default/enabled configuration which reports lines longer than 80 characters as being too long. Unlike some Markdown constructs, HTML comments can be wrapped so this is possible/easy to address. You can read more here: https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md.
The second line you show is not an HTML comment, but a valid link reference definition. It is not reported as being unused because that pattern is specifically ignored. More info on that here: https://github.com/DavidAnson/markdownlint/blob/main/doc/md053.md. But it can be easily wrapped as well.
If you don't like this rule, you can disable it using any of the techniques described in the documentation. But here is your example updated to produce no violations of the line-length rule:
https://dlaa.me/markdownlint/#%25m%23 Issue 1080

<!--
ComponentStatus (and ComponentStatusList) holds the cluster validation info.
Deprecated%3A This API is deprecated in v1.19%2B
-->

[%2F%2F]%3A %23 ComponentStatus (and ComponentStatusList) holds the cluster validation info.
Deprecated%3A This API is deprecated in v1.19%2B

<!-- markdownlint-enable-file md013 -->

Update: The example link reference definition is almost valid. If it is quoted properly, it will not report a length violation even without wrapping:
[//]: # "ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+"

Thank you for a quick reaction David.
You are right in both cases, but the sentence I use is just example.
My real usecase is:
I have some command (visible to the reader) in markdown and then the command's output which should be hidden for the user (but needs to be preserved for the "technical writer"):
# Issue 1080

This is my command:

```bash
kubectl stern -n cert-manager . --tail 5 --since 1h --no-follow
```

<!--
+ cert-manager-webhook-54f9d96756-8nbqx › cert-manager-webhook
+ cert-manager-777fbdc9f8-qhk2d › cert-manager-controller
+ cert-manager-cainjector-65857fccf8-t68lk › cert-manager-cainjector
cert-manager-cainjector-65857fccf8-t68lk cert-manager-cainjector I0624 11:34:24.790420       1 reconciler.go:118] "cert-manager: could not find any ca data in data source for target" kind="validatingwebhookconfiguration" kind="validatingwebhookconfiguration" name="cert-manager-webhook"
cert-manager-cainjector-65857fccf8-t68lk cert-manager-cainjector I0624 11:34:25.603904       1 reconciler.go:142] "cert-manager: Updated object" kind="mutatingwebhookconfiguration" kind="mutatingwebhookconfiguration" name="cert-manager-webhook"
cert-manager-cainjector-65857fccf8-t68lk cert-manager-cainjector I0624 11:34:25.604466       1 reconciler.go:142] "cert-manager: Updated object" kind="validatingwebhookconfiguration" kind="validatingwebhookconfiguration" name="cert-manager-webhook"
cert-manager-cainjector-65857fccf8-t68lk cert-manager-cainjector I0624 11:34:25.609019       1 reconciler.go:142] "cert-manager: Updated object" kind="mutatingwebhookconfiguration" kind="mutatingwebhookconfiguration" name="cert-manager-webhook"
cert-manager-cainjector-65857fccf8-t68lk cert-manager-cainjector I0624 11:34:25.609755       1 reconciler.go:142] "cert-manager: Updated object" kind="validatingwebhookconfiguration" kind="validatingwebhookconfiguration" name="cert-manager-webhook"
cert-manager-777fbdc9f8-qhk2d cert-manager-controller I0624 11:39:26.254284       1 acme.go:233] "cert-manager/certificaterequests-issuer-acme/sign: certificate issued" resource_name="ingress-cert-staging-tnp9z" resource_namespace="cert-manager" resource_kind="CertificateRequest" resource_version="v1" related_resource_name="ingress-cert-staging-tnp9z-569747980" ...
- cert-manager-cainjector-65857fccf8-t68lk › cert-manager-cainjector
cert-manager-777fbdc9f8-qhk2d cert-manager-controller I0624 11:39:26.254523       1 conditions.go:252] Found status change for CertificateRequest "ingress-cert-staging-tnp9z" condition "Ready": "False" -> "True"; setting lastTransitionTime to 2023-06-24 11:39:26.254515881 +0000 UTC m=+301.629669662
cert-manager-777fbdc9f8-qhk2d cert-manager-controller I0624 11:39:26.309171       1 controller.go:162] "cert-manager/certificates-readiness: re-queuing item due to optimistic locking on resource" key="cert-manager/ingress-cert-staging" error="Operation cannot be fulfilled on certificates.cert-manager.io \"ingress-cert-staging\": the object has been modified; please ...
cert-manager-777fbdc9f8-qhk2d cert-manager-controller I0624 11:39:26.322662       1 controller.go:162] "cert-manager/certificates-issuing: re-queuing item due to optimistic locking on resource" key="cert-manager/ingress-cert-staging" error="Operation cannot be fulfilled on certificates.cert-manager.io \"ingress-cert-staging\": the object has been modified; please ...
cert-manager-777fbdc9f8-qhk2d cert-manager-controller I0624 11:39:26.331743       1 controller.go:162] "cert-manager/certificates-key-manager: re-queuing item due to optimistic locking on resource" key="cert-manager/ingress-cert-staging" error="Operation cannot be fulfilled on certificates.cert-manager.io \"ingress-cert-staging\": the object has been modified; ...
- cert-manager-777fbdc9f8-qhk2d › cert-manager-controller
cert-manager-webhook-54f9d96756-8nbqx cert-manager-webhook I0624 11:34:50.197304       1 logs.go:59] http: TLS handshake error from <IP_ADDRESS>:47560: EOF
cert-manager-webhook-54f9d96756-8nbqx cert-manager-webhook I0624 11:34:50.200121       1 logs.go:59] http: TLS handshake error from <IP_ADDRESS>:47572: read tcp <IP_ADDRESS>:10250-><IP_ADDRESS>:47572: read: connection reset by peer
cert-manager-webhook-54f9d96756-8nbqx cert-manager-webhook I0624 11:38:31.687229       1 logs.go:59] http: TLS handshake error from <IP_ADDRESS>:54464: EOF
cert-manager-webhook-54f9d96756-8nbqx cert-manager-webhook I0624 11:39:26.294153       1 logs.go:59] http: TLS handshake error from <IP_ADDRESS>:49836: EOF
cert-manager-webhook-54f9d96756-8nbqx cert-manager-webhook I0624 11:39:26.318155       1 logs.go:59] http: TLS handshake error from <IP_ADDRESS>:49852: EOF
- cert-manager-webhook-54f9d96756-8nbqx › cert-manager-webhook
-->

Anyway - I solved it using <!-- markdownlint-disable --> like mentioned in Configuration section:
# Issue 1080

This is my command:

```bash
kubectl stern -n cert-manager . --tail 5 --since 1h --no-follow
```

<!-- markdownlint-disable -->
<!--
Many very long lines...
-->
<!-- markdownlint-restore -->

Thank you for a quick response...


version 0.28.3  on-timespan-click event not working

Hi,
This was worked for me in version  0.27.5.
EDIT : It's working until version 0.28.0.
This is a code example :
HTML :
<mwl-calendar
    view="vm.calendarView"
    view-date="vm.viewDate"
    events="vm.events"
    view-title="vm.calendarTitle"
    on-event-click="vm.eventClicked(calendarEvent)"
    on-event-times-changed="vm.calendarEvent.startsAt = calendarNewEventStart; vm.calendarEvent.endsAt = calendarNewEventEnd"
    cell-is-open="true"
    on-timespan-click="vm.timespanClicked(calendarDate)"
    >
</mwl-calendar>

Controller :
                     vm.timespanClicked = function (time) {
                         // debugger;
                         console.log('onTimespanClick clicked');
                     };

After I have upgraded the version to 0.28.3 its stopped working.
Thanks.

I found the problem.
In my Code, I was overridden the weekly view template,
In the new version this code in green was added:

I added it and solve the problem.

Great :) Should you need more help, feel free to ask again :)


IP settings problem in docker compose

Hello,
I ran the generated docker compose file. However, I am not being able to see the simulator display in gui mode. Here is the output of the docker compose: With run.bash, the display shows up but with compose, it does not.

[+] Running 5/5
[/mbzirc/score (ignition.msgs.Float) -> /mbzirc/score (std_msgs/msg/Float32)] (Lazy 0)
compose-bridge1-1    | [parameter_bridge-6] [INFO] [1658343218.140491380] [ros_ign_bridge]: Creating IGN->ROS Bridge: [/clock (ignition.msgs.Clock) -> /clock (rosgraph_msgs/msg/Clock)] (Lazy 0)
compose-bridge1-1    | [parameter_bridge-6] [INFO] [1658343218.141054363] [ros_ign_bridge]: Creating IGN->ROS Bridge: [/mbzirc/run_clock (ignition.msgs.Clock) -> /mbzirc/run_clock (rosgraph_msgs/msg/Clock)] (Lazy 0)
compose-bridge1-1    | [parameter_bridge-6] [INFO] [1658343218.141348718] [ros_ign_bridge]: Creating IGN->ROS Bridge: [/mbzirc/phase (ignition.msgs.StringMsg) -> /mbzirc/phase (std_msgs/msg/String)] (Lazy 0)
compose-bridge1-1    | [parameter_bridge-6] [INFO] [1658343218.141804397] [ros_ign_bridge]: Creating IGN->ROS Bridge: [/mbzirc/target/stream/status (ignition.msgs.StringMsg) -> /mbzirc/target/stream/status (std_msgs/msg/String)] (Lazy 0)
compose-solution1-1  | [INFO] [launch]: All log files can be found below /tmp/ign/logs/ros/2022-07-20-18-53-38-592974-afbf94c6da5a-55
compose-solution1-1  | [INFO] [launch]: Default logging verbosity is set to INFO

compose-sim-1        | [ign gazebo-1] [GUI] [Dbg] [GuiRunner.cc:375] Loaded system [ignition::gazebo::systems::WaveVisual] for entity [12] in GUI
compose-sim-1        | [ign gazebo-1] [GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
compose-sim-1        | [ign gazebo-1] [GUI] [Dbg] [MinimalScene.cc:534] Create scene [scene]
compose-sim-1        | [ign gazebo-1] [GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
compose-sim-1        | [ign gazebo-1] [GUI] [Dbg] [ViewAngle.cc:346] ViewAngle plugin is moving camera [scene::Camera(65527)]
compose-sim-1        | [ign gazebo-1] [GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
compose-sim-1        | [ign gazebo-1] [GUI] [Dbg] [VideoRecorder.cc:151] Video Recorder plugin is recoding camera [scene::Camera(65527)]
compose-sim-1        | [ign gazebo-1] [GUI] [Msg] Video recorder stats topic advertised on [/gui/record_video/stats]
compose-sim-1        | [ign gazebo-1] [GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
compose-sim-1        | [ign gazebo-1] [GUI] [Dbg] [TransformControl.cc:528] TransformControl plugin is using camera [scene::Camera(65527)]
compose-sim-1        | [ign gazebo-1] [GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
compose-sim-1        | [ign gazebo-1] [GUI] [Dbg] [Spawn.cc:289] Spawn plugin is using camera [scene::Camera(65527)]
compose-sim-1        | [ign gazebo-1] [GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
compose-sim-1        | [ign gazebo-1] [Wrn] [Ogre2RenderTarget.cc:575] Anti-aliasing level of '2' is not supported; valid FSAA levels are: [ 0 4 ]. Setting to 0
compose-sim-1        | [ign gazebo-1] [GUI] [Msg] Loading plugin [
compose-sim-1        | [ign gazebo-1] [Dbg] [SimulationRunner.cc:502] Creating postupdate worker thread (21)
compose-sim-1        | [ign gazebo-1] [Dbg] [SimulationRunner.cc:502] Creating postupdate worker thread (22)
compose-sim-1        | [ign gazebo-1] [Dbg] [SimulationRunner.cc:502] Creating postupdate worker thread (23)
compose-sim-1        | [ign gazebo-1] [Msg] Address [quadrotor_2] bound to model [quadrotor_2] on topic [model/quadrotor_2/rx]
compose-sim-1        | [ign gazebo-1] [Dbg] [CommsEndpoint.cc:89] Succesfuly bound to [quadrotor_2] on topic [model/quadrotor_2/rx]
compose-sim-1        | [ign gazebo-1] [Msg] Address [usv] bound to model [usv] on topic [model/usv/rx]
compose-sim-1        | [ign gazebo-1] [Dbg] [CommsEndpoint.cc:89] Succesfuly bound to [usv] on topic [model/usv/rx]
compose-sim-1        | [ign gazebo-1] [Msg] Address [quadrotor_1] bound to model [quadrotor_1] on topic [model/quadrotor_1/rx]
compose-sim-1        | [ign gazebo-1] [Dbg] [CommsEndpoint.cc:89] Succesfuly bound to [quadrotor_1] on topic [model/quadrotor_1/rx]
compose-sim-1        | [ign gazebo-1] [Dbg] [RenderUtil.cc:2529] Create scene [scene]
compose-sim-1        | [ign gazebo-1] [Dbg] [Sensors.cc:254] Rendering Thread initialized
compose-sim-1        | [ign gazebo-1] [Dbg] [Ogre2ParticleEmitter.cc:514] Particle emitter initialized
compose-sim-1        | [ign gazebo-1] [Dbg] [Ogre2ParticleEmitter.cc:514] Particle emitter initialized
compose-sim-1        | [ign gazebo-1] [Dbg] [Ogre2ParticleEmitter.cc:514] Particle emitter initialized
compose-sim-1        | [ign gazebo-1] [Dbg] [Ogre2ParticleEmitter.cc:514] Particle emitter initialized
compose-sim-1        | [ign gazebo-1] [Dbg] [Ogre2ParticleEmitter.cc:514] Particle emitter initialized
compose-sim-1        | [ign gazebo-1] [Dbg] [Ogre2ParticleEmitter.cc:514] Particle emitter initialized
compose-sim-1        | [ign gazebo-1] [Dbg] [CameraSensor.cc:297] Camera images for [quadrotor_2::sensor_0::sensor_link::camera] advertised on [world/coast/model/quadrotor_2/model/sensor_0/link/sensor_link/sensor/camera/image]
compose-sim-1        | [ign gazebo-1] [Dbg] [CameraSensor.cc:598] Camera info for [quadrotor_2::sensor_0::sensor_link::camera] advertised on [/world/coast/model/quadrotor_2/model/sensor_0/link/sensor_link/sensor/camera/camera_info]
compose-sim-1        | [ign gazebo-1] [Dbg] [CameraSensor.cc:297] Camera images for [usv::sensor_0::sensor_link::camera] advertised on [world/coast/model/usv/model/sensor_0/link/sensor_link/sensor/camera/image]
compose-sim-1        | [ign gazebo-1] [Dbg] [CameraSensor.cc:598] Camera info for [usv::sensor_0::sensor_link::camera] advertised on [/world/coast/model/usv/model/sensor_0/link/sensor_link/sensor/camera/camera_info]
compose-sim-1        | [ign gazebo-1] [Dbg] [CameraSensor.cc:297] Camera images for [quadrotor_1::sensor_0::sensor_link::camera] advertised on [world/coast/model/quadrotor_1/model/sensor_0/link/sensor_link/sensor/camera/image]
compose-sim-1        | [ign gazebo-1] [Dbg] [CameraSensor.cc:598] Camera info for [quadrotor_1::sensor_0::sensor_link::camera] advertised on [/world/coast/model/quadrotor_1/model/sensor_0/link/sensor_link/sensor/camera/camera_info]
compose-sim-1        | [ign gazebo-1] [Msg] Loading plugin [ignition-rendering-ogre2]
compose-sim-1        | [ign gazebo-1] [Dbg] [CameraSensor.cc:415] Enabling camera sensor: 'usv::sensor_0::sensor_link::camera' data generation.

hmm the attached output does not reveal the error. The error could be printed out earlier in the terminal. Are you able to attach the whole output? You can run docker compose -f mbzirc_compose.yaml up without -d arg to see the console msgs. My current guess is that rendering failed to start due to X auth issue in the simulation docker container started by docker-compose.

The error message is too long to post. Here are some suspicious lines:

[GUI] [Wrn] [Application.cc:753] [QT] QXcbConnection: XCB error: 3 (BadWindow), sequence: 179, resource id: 6291470, major code: 20 (GetProperty), minor code: 0
compose-sim-1        | [ign gazebo-1] [GUI] [Wrn] [Application.cc:753] [QT] QXcbConnection: XCB error: 3 (BadWindow), sequence: 180, resource id: 6291470, major code: 20 (GetProperty), minor code: 0
compose-sim-1        | [ign gazebo-1] libEGL warning: failed to open /dev/dri/renderD128: Permission denied
compose-sim-1        | [ign gazebo-1]
compose-sim-1        | [ign gazebo-1] libEGL warning: failed to open /dev/dri/renderD128: Permission denied
compose-sim-1        | [ign gazebo-1]
compose-sim-1  d

I ran it with the run.bash, it worked fine....I could see the display

If I undo everything I did, following is the error I am getting:

compose-sim-1        | [ign gazebo-1] [GUI] [Err] [Ogre2RenderEngine.cc:973]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3364)
compose-sim-1        | [ign gazebo-1] [GUI] [Err] [Ogre2RenderEngine.cc:973]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3364)
compose-sim-1        | [ign gazebo-1] [GUI] [Err] [Ogre2RenderEngine.cc:973]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3364)
compose-sim-1        | [ign gazebo-1] [GUI] [Err] [Ogre2RenderEngine.cc:973]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3364)
compose-sim-1        | [ign gazebo-1] [GUI] [Err] [Ogre2RenderEngine.cc:973]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3364)
compose-sim-1        | [ign gazebo-1] [GUI] [Err] [Ogre2RenderEngine.cc:973]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3364)
compose-sim-1        | [ign gazebo-1] [GUI] [Err] [Ogre2RenderEngine.cc:973]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3364)
compose-sim-1        | [ign gazebo-1] [GUI] [Err] [Ogre2RenderEngine.cc:973]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3364)
compose-sim-1        | [ign gazebo-1] [GUI] [Err] [Ogre2RenderEngine.cc:973]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3364)
compose-sim-1        | [ign gazebo-1] [GUI] [Err] [Ogre2RenderEngine.cc:973]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3364)
compose-sim-1        | [ign gazebo-1] [GUI] [Err] [Ogre2RenderEngine.cc:981] Unable to create the rendering window after [11] attempts.
compose-sim-1        | [ign gazebo-1] [GUI] [Err] [Ogre2RenderEngine.cc:902] Failed to create dummy render window.
compose-sim-1        | [ign gazebo-1] Stack trace (most recent call last) in thread 372:
compose-sim-1        | [ign gazebo-1] #31   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd7d0eb5784, in QThread::exec()
compose-sim-1        | [ign gazebo-1] #30   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd7d107d3aa, in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag)
compose-sim-1        | [ign gazebo-1] #29   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd7d10d6434, in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag)
compose-sim-1        | [ign gazebo-1] #28   Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7fd7ceeb04a2, in g_main_context_iteration
compose-sim-1        | [ign gazebo-1] #27   Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7fd7ceeb03ff, in
compose-sim-1        | [ign gazebo-1] #26   Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7fd7ceeb017c, in g_main_context_dispatch
compose-sim-1        | [ign gazebo-1] #25   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd7d10d6e36, in
compose-sim-1        | [ign gazebo-1] #24   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd7d1081487, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
compose-sim-1        | [ign gazebo-1] #23   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd7d107e809, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
compose-sim-1        | [ign gazebo-1] #22   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7fd7d082b0ef, in QApplication::notify(QObject*, QEvent*)
compose-sim-1        | [ign gazebo-1] #21   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7fd7d0821a65, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
compose-sim-1        | [ign gazebo-1] #20   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd7d10aac29, in QObject::event(QEvent*)
compose-sim-1        | [ign gazebo-1] #19   Object "/usr/lib/x86_64-linux-gnu/ign-gui-6/plugins/libMinimalScene.so", at 0x7fd7b821fb0f, in ignition::gui::plugins::RenderThread::RenderNext(ignition::gui::plugins::RenderSync*)
compose-sim-1        | [ign gazebo-1] #18   Object "/usr/lib/x86_64-linux-gnu/ign-gui-6/plugins/libMinimalScene.so", at 0x7fd7b821f21d, in ignition::gui::plugins::IgnRenderer::Initialize()
compose-sim-1        | [ign gazebo-1] #17   Object "/usr/lib/x86_64-linux-gnu/libignition-rendering6.so.6", at 0x7fd7b81b9427, in ignition::rendering::v6::RenderEngineManager::Engine(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::less<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
compose-sim-1        | [ign gazebo-1] #16   Object "/usr/lib/x86_64-linux-gnu/libignition-rendering6.so.6", at 0x7fd7b81b921e, in ignition::rendering::v6::RenderEngineManagerPrivate::Engine(EngineInfo, std::map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::less<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
compose-sim-1        | [ign gazebo-1] #15   Object "/usr/lib/x86_64-linux-gnu/libignition-rendering6.so.6", at 0x7fd7b81c4b41, in ignition::rendering::v6::BaseRenderEngine::Init()
compose-sim-1        | [ign gazebo-1] #14   Object "/usr/lib/x86_64-linux-gnu/ign-rendering-6/engine-plugins/libignition-rendering-ogre2.so", at 0x7fd6fec01dbe, in ignition::rendering::v6::Ogre2RenderEngine::InitImpl()
compose-sim-1        | [ign gazebo-1] #13   Object "/usr/lib/x86_64-linux-gnu/ign-rendering-6/engine-plugins/libignition-rendering-ogre2.so", at 0x7fd6febfd127, in ignition::rendering::v6::Ogre2RenderEngine::InitAttempt()
compose-sim-1        | [ign gazebo-1] #12   Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe6f6928, in Ogre::ResourceGroupManager::initialiseAllResourceGroups(bool)
compose-sim-1        | [ign gazebo-1] #11   Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe6f6396, in Ogre::ResourceGroupManager::parseResourceGroupScripts(Ogre::ResourceGroupManager::ResourceGroup*)
compose-sim-1        | [ign gazebo-1] #10   Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe739551, in Ogre::ScriptCompilerManager::parseScript(Ogre::SharedPtrOgre::DataStream&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
compose-sim-1        | [ign gazebo-1] #9    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe7393de, in Ogre::ScriptCompiler::compile(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
compose-sim-1        | [ign gazebo-1] #8    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe7390f2, in Ogre::ScriptCompiler::compile(Ogre::SharedPtr<std::__cxx11::list<Ogre::SharedPtrOgre::ConcreteNode, Ogre::STLAllocator<Ogre::SharedPtrOgre::ConcreteNode, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
compose-sim-1        | [ign gazebo-1] #7    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe748bf5, in Ogre::MaterialTranslator::translate(Ogre::ScriptCompiler*, Ogre::SharedPtrOgre::AbstractNode const&)
compose-sim-1        | [ign gazebo-1] #6    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe743d71, in Ogre::ScriptTranslator::processNode(Ogre::ScriptCompiler*, Ogre::SharedPtrOgre::AbstractNode const&)
compose-sim-1        | [ign gazebo-1] #5    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe74e478, in Ogre::TechniqueTranslator::translate(Ogre::ScriptCompiler*, Ogre::SharedPtrOgre::AbstractNode const&)
compose-sim-1        | [ign gazebo-1] #4    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe743d71, in Ogre::ScriptTranslator::processNode(Ogre::ScriptCompiler*, Ogre::SharedPtrOgre::AbstractNode const&)
compose-sim-1        | [ign gazebo-1] #3    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe762ecc, in Ogre::PassTranslator::translate(Ogre::ScriptCompiler*, Ogre::SharedPtrOgre::AbstractNode const&)
compose-sim-1        | [ign gazebo-1] #2    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe7ce729, in Ogre::Technique::createPass()
compose-sim-1        | [ign gazebo-1] #1    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe6a00e4, in Ogre::Pass::Pass(Ogre::Technique*, unsigned short)
compose-sim-1        | [ign gazebo-1] #0    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd6fe5a383a, in Ogre::Hlms::createDatablock(Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, Ogre::HlmsMacroblock const&, Ogre::HlmsBlendblock const&, std::vector<std::pair<Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, Ogre::STLAllocator<std::pair<Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const&, bool, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
compose-sim-1        | [ign gazebo-1] Segmentation fault (Address not mapped to object [0x220])
compose-sim-1        | [ign gazebo-1] [GUI] [Msg] model:     PMSEscalating to SIGKILL on [Ignition Gazebo Server]
compose-sim-1        | [INFO] [ign gazebo-1]: process has finished cleanly [pid 81]

I found the problem, somehow with --gpus all in docker run, the access to GPU is incomplete. I configured the --runtime nvidia at docker.json and then it started working fine!


Rationalize the introduction to the WN installs.

This tries to streamline / clarify the introduction of the three WN install variants.  Now, each of them has the same introductory text and mostly have the same header names.
Remove unnecessary / empty header levels.

LGTM, merging


OCPBUGS-34521: Fix DiskToMirror without internet connection without r…

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #OCPBUGS-34521
Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Using the following ImageSetConfig:
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2

mirror:
  operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.14
    targetCatalog: hij/redhat-operator-index
    packages:
    - name: aws-load-balancer-operator
  - catalog: oci:///home/skhoury/clid20/working-dir/operator-images/redhat-operator-index/008c9fedc8ca8103203166a959515a383d694039b29670a596c99e3a78f46c5f
    targetCatalog: def/redhat-operator-index
    targetTag: v4.14
    packages:
    - name: external-dns-operator

First run a Mirror to disk, with internet connection on:
$ ./bin/oc-mirror -c configs_logs/isc_34521.yaml file:///home/skhoury/ocpbugs34521

Next cut your internet connection, and perform a Disk To Mirror to a local registry:
$ ./bin/oc-mirror --from /home/skhoury/ocpbugs34521 docker://localhost:5000 --dest-use-http --dest-skip-tls

Expected Outcome
-$ curl http://localhost:5000/v2/hij/redhat-operator-index/tags/list
{"name":"hij/redhat-operator-index","tags":["v4.14"]}
-$ curl http://localhost:5000/v2/def/redhat-operator-index/tags/list
{"name":"def/redhat-operator-index","tags":["v4.14"]}

We should also be able to apply the catalog source to a cluster accessing this mirror registry, and the pods should not fail.

/label qe-approved

/cherrypick release-4.16 release-4.15

/lgtm


Playlist is missing

Not sure what's going on here, I noticed sometime (not sure how) the playlist may be missing with no reason. Need to figure out what's going on here.

I think this only happens when I am doing testing on local environment because I can't see this again when I am using production version. Close the bug first.


preference_api crash on connect button press with default install IP address

On a fresh install of this branch, if you press connect in the Connect to a Boat dialog that pops up, the app crashes. Once I put in another IP, it did not crash and connects normally.

I noticed this too, looking into it tonight or tomorrow. I think its caused by the initial default value for the boats IP.

Thanks Shantanu. You can copy the code we use in the server to initialize
the default values for the preferences from a string resource.


Add missing requires

add https://github.com/kgrgreer/foam3/pull/1233 to the Release-v3.15 branch

we should do this with a cherry-pick instead of a duplicate PR

@nanoscott How do you cherry pick without creating a pr?

Closing this pr as this change is moved to Release-v3.15 already


OSL transparency NaN warnings fix

After the 2.0 release, we'll need to revisit this topic: https://github.com/appleseedhq/appleseed/issues/2201


Guess the song!

This is a game in which player has to guess the song name and if they want any hint just they need to click a button which is "Need help?" and keep on guessing the letters of the song, hope u will enjoy it!
please review my code and let me know if something is wrong or missing @991rajat
Thank you!
issue #1006 solved

Looks Good.

Thanks for the contribution.
Keep Contributing.


Compatibility with Better Signs and Frames (and TabTPS)

I don't know if you care for mod compatibility or not, but this mod is partially broken for Bedrock users.
https://github.com/Ivan0xFF/BetterSignsAndFrames
They can interact with chests through a sign or item frame, but they can't edit a sign the same way Java Edition users can.
Also TabTPS doesn't work right. Not sure if this should be in the same issue. (Yes, they were op)

The sign issue is known - see https://github.com/GeyserMC/Geyser/issues/1671 for more detail (Bedrock doesn't have an option to open a sign GUI).
As for TabTPS, I see no way that can be a Geyser issue. Maybe a Floodgate issue; try temporarily removing that and see if the issue persists (and if so, it is likely not our fault).

The problem with signs is unfortunate, but understandable. They get the sign GUI when they place a sign, Java players don't, so I guess it balances out anyway.
As for removing floodgate, I'll have to try that tomorrow, as the people I was testing with are currently unavailable, and I cannot readily use Bedrock myself. (I own the Windows 10 edition, however I have no Windows 10 devices as of now.)

The sign issue is known - see GeyserMC/Geyser#1671 for more detail (Bedrock doesn't have an option to open a sign GUI).
As for TabTPS, I see no way that can be a Geyser issue. Maybe a Floodgate issue; try temporarily removing that and see if the issue persists (and if so, it is likely not our fault).

Again, not sure if this is a separate issue, but this mod also failed.
https://www.curseforge.com/minecraft/mc-mods/lapis-reserve
Bedrock users just had the lapis return to their inventory. (Thankfully it wasn't a dupe bug or else that would be a whole mess in and of itself. O_O )

As for TabTPS, I see no way that can be a Geyser issue. Maybe a Floodgate issue; try temporarily removing that and see if the issue persists (and if so, it is likely not our fault).

@Camotoy

It is a Floodgate issue.


feat: update dependency zb-client to v2.6.0

Updated the zb-client to 2.6.0 which also requires to implement TenantId field to AbstractJob

 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.You have signed the CLA already but the status is still pending? Let us recheck it.

Hi, @VonDerBeck
Could you please do a review of the changes?

@qdimka
Thanks a lot! This is very appreciated. It has been on my list all along, but I've had too much on my plate the last weeks to really take care of it. Just a few lines of change, but a big help. 👍 👍


Dask Groupby on Multiple Columns takes more times than plain Pandas

code:
def custom(df):
    return df.smth()
ddf = dd.from_pandas(df)
ddf.groupby(['A', 'B'])['C'].apply(custom)
ddf.compute()

This is taking more time than just using pandas to do the groupby().
I read somewhere that this is because dask tries to index in each partition the multiple columns first and that adds to the overhead. It suggested to index the multiple columns, but dask dataframes don't support multiple index.
What I want is that groups are computed in a parallel manner using all cores.
If I just want to use the parallization of dask - I can encapsulate the function in delayed like:
t = df.groupby(['A','B'])['C'].apply(delayed(custom))
t = compute(t)

But compute isn't giving me the results unless I call compute on all the reducers iterating over them. That doesn't seem natural.
What am I missing here fundamentally?

Groupby-apply can be more complex to do in parallel when the data isn't
guaranteed to fit in memory.  The algorithms that dask dataframe uses for
this operation can't be as efficient as those algorithms used by Pandas,
which can assume that the data fits in memory.
On Sun, Nov 25, 2018 at 5:00 AM Harsh Nisar<EMAIL_ADDRESS>wrote:

code:
def custom(df):
return df.smth()
ddf = dd.from_pandas(df)
ddf.groupby(['A', 'B'])['C'].apply(custom)
ddf.compute()
This is taking more time than just using pandas to do the groupby().
I read somewhere that this is because dask tries to index in each
partition the multiple columns first and that adds to the overhead. It
suggested to index the multiple columns, but dask dataframes don't support
multiple index.
What I want is that groups are computed in a parallel manner using all
cores.
If I just want to use the parallization of dask - I can encapsulate the
function in delayed like:
t = df.groupby(['A','B'])['C'].apply(delayed(custom))
t = compute(t)
But compute isn't giving me the results unless I call compute on all the
reducers iterating over them. That doesn't seem natural.
What am I missing here fundamentally?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/dask/dask/issues/4239, or mute the thread
https://github.com/notifications/unsubscribe-auth/AASszHY7mWz9nj6FrEal18BFJMai4UqRks5uymo1gaJpZM4YxzFY
.

Makes sense.
What if I am done with the groupings in memory and just want each of the applies on respective groups to be parallelized. What's the right way to do that using Dask?

You should be able to apply a delayed func to each group: http://docs.dask.org/en/latest/delayed.html
[delayed(f)(v) for for k, v in df.groupby(...)]


Added ValidatorContext.java

Added Strategy and design pattern to Validator module.
We studied your repository in our Software Architecture class and believe we've identified some simple ways in which we can improve the design of your system.
This is in reference to the original group pull request: https://github.com/PreferredAI/venom/pull/15

Hey there,
I made a change to ValidatorContext by implementing Validator so it can be used in place.
I hope the idea that you wanted is maintained. If you have any feedback let me know.
If it looks good I'll merge it in :)

It looks great! The idea is definitely maintained. Thank you for adding in the JavaDocs and tests.


transmit power handing

hi i am also confuse of the power， as you can see ， the power is equal with Trace｛G.G^h｝, but when you compute the power in step part of environment , you use "np.real(np.diag(self.G.conjugate().T @ self.G)).reshape(1, -1) ** 2",
its mean P ** 2,
so i think the transmit power will be a wrong value,
could you tell me why you use the equation, maybe some knowledge i havent learn
thank you
further more, when you normalize the phase , why use sqrt(2) here,torch.sum(torch.abs(Phi_real), dim=1).reshape(-1, 1) * np.sqrt(2)
honstly, i dont knowledge this whole sentence. why normalize the phase need use sum of Phi_real, as i know ,the Phi is computed by the angles and the range is complex area which cant be sure

你好，我最近也在閱讀這篇論文並且研究這位博主的程式碼。
想請問您是否有用他的code試著跑這篇論文圖五(sum rate對ris元件數量作圖)呢?
我將num_ris調大訓練出來結果似乎並沒有變好
如果您有任何建議請不吝指教 謝謝!

你好，我最近也在閱讀這篇論文並且研究這位博主的程式碼。 想請問您是否有用他的code試著跑這篇論文圖五(sum rate對ris元件數量作圖)呢? 我將num_ris調大訓練出來結果似乎並沒有變好 如果您有任何建議請不吝指教 謝謝!

可以参考这篇论文，Active RIS vs. Passive RIS: Which Will Prevail in 6G? , chapter III 中的各个lemma, sum rate 取决于CSI和noise，所以 ris的数量造成的影响是有上界的。
此外我的问题，你没有遇到吗，这里phase 的归一化，为什么要用绝对值的和呢，而且还有乘根号2，我在论文里没有看到这个公式

了解，我之後再好好看您推薦的論文，非常感謝您的建議。
其實我也沒有很了解為何這位博主這樣計算，且事實上我用他的code似乎無法重現這篇論文的模擬圖

it is clear that trace{G.G^{H}} is complex matrix right? so, if we take directly the trace, how can a power value be complex? powers must be real values. the authors of the paper made a huge mistake there. i don't understand how referees allowed that. anyways, this is just an implementation repo. however, to realize the real value (as neural networks cannot process complex numbers), the real part of the trace should be considered. i consulted a friend who does his ph.d. at KTH. he agreed with me so you don't need to worry about that.
the same thing applies for the use of np.sqrt(2). that friend gave me the formula, he thought it would be much easier to implement the phase computation. nevertheless, the conventional way to compute the phase and my implementation are the same in terms of the operation. so you don't need to worry about that either. it's related to real and imaginary parts as far as I could remember.

sorry, I think you still not answer my question.
I know why you use the real part of the trace. I also think you should do this when I read your previous version.
but, I mean the constraint is trace{G.G^{H}} = power.  and in the environment.py, you use power_t = np.real(np.diag(self.G.conjugate().T @ self.G)).reshape(1, -1) ** 2 to compute the real part, its mean power**2.
as I know, Actually, in the Shannon formula, just use power to compute the channel gain. that's me confused.
and can you teach me some detail of the np.sqrt(2), I havn't more knowledge of that, when i debug step by step, the value will be bigger than the sum of the phase torch.sum(torch.abs(Phi_real), dim=1).reshape(-1, 1). did not it will influence the exploring of the agent?

hi i am also confuse of the power， as you can see ， the power is equal with Trace｛G.G^h｝, but when you compute the power in step part of environment , you use "np.real(np.diag(self.G.conjugate().T @ self.G)).reshape(1, -1) ** 2", its mean P ** 2, so i think the transmit power will be a wrong value, could you tell me why you use the equation, maybe some knowledge i havent learn thank you
further more, when you normalize the phase , why use sqrt(2) here,torch.sum(torch.abs(Phi_real), dim=1).reshape(-1, 1) * np.sqrt(2) honstly, i dont knowledge this whole sentence. why normalize the phase need use sum of Phi_real, as i know ,the Phi is computed by the angles and the range is complex area which cant be sure

你好，我也在复现这篇文章，可以加个联系方式吗

hi i am also confuse of the power， as you can see ， the power is equal with Trace｛G.G^h｝, but when you compute the power in step part of environment , you use "np.real(np.diag(self.G.conjugate().T @ self.G)).reshape(1, -1) ** 2", its mean P ** 2, so i think the transmit power will be a wrong value, could you tell me why you use the equation, maybe some knowledge i havent learn thank you
further more, when you normalize the phase , why use sqrt(2) here,torch.sum(torch.abs(Phi_real), dim=1).reshape(-1, 1) * np.sqrt(2) honstly, i dont knowledge this whole sentence. why normalize the phase need use sum of Phi_real, as i know ,the Phi is computed by the angles and the range is complex area which cant be sure

你好，我也在复现这篇文章，可以加个联系方式吗

主页有邮箱的


python311Packages.jedi: 0.19.0 -> 0.19.1

https://github.com/davidhalter/jedi/blob/v0.19.1/CHANGELOG.rst#0191-2023-10-02
Drops django from test inputs, since it causes an infinite recursion.
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Yeah, thanks GitHub. This is clearly based on staging. What's wrong with you?
commit 29009b9dffa26fc0add86e537f734c275ffba30b (HEAD -> jedi-0.19.1, mweinelt/jedi-0.19.1)
Author: Martin Weinelt<EMAIL_ADDRESS>Date:   Mon Oct 23 13:12:08 2023 +0200

    python311Packages.jedi: 0.19.0 -> 0.19.1

    https://github.com/davidhalter/jedi/blob/v0.19.1/CHANGELOG.rst#0191-2023-10-02

    Drops django from test inputs, since it causes an infinite recursion.

commit 25920d8de2f828907aa4059e9330a1edfecceeb8 (origin/staging)
Merge: 2c2c0379b759 4c6fd59fcd6a
Author: Robert Scott<EMAIL_ADDRESS>Date:   Mon Oct 23 19:23:02 2023 +0100

    Merge pull request #253194 from risicle/ris-nix-hardening-enable-fortify3-imply-fortify

    cc-wrapper: ensure `NIX_HARDENING_ENABLE` `fortify3` implies `fortify` too


[Question] how can we do NER for English text ?

Is there any example for English text NER ?

You need to take care of the tokenization part. So using kashgari with any language does not need any additional process, just use it like the Chinese NER task.

@BrikerMan Got it. Thanks


Remove extra sections like 'Also read'

Some articles (http://indiatoday.intoday.in/story/trupti-desai-kapleshwar-temple-bhumata-brigade-nashik/1/677723.html) have sections like 'Also read' and 'Read more' at the end of the article. How can we remove them

There was some code in cleaners.py that cleans up divs with this sort of thing.
But in this case, it looks just like a regular paragraph, without any id or class. I don't know how it could be removed without messing up other cases...


Add an option for checksums

It would be nice to have a checksum attribute for validating downloads, similar to chef's remote_file and similar resources.

The checksums are there:
https://github.com/dhoer/chef-java_se/blob/master/attributes/bind.rb
Can you please submit a pull request that adds that information to the readme?
Thanks in advance.

Thanks for the PR


Fix TileLayer bug at low zoom levels

Background
TileLayer generates invalid tile indices (e.g. x: -1, y: -1, z: 0) at low zoom levels.
Change List

Fix tile index generation from viewport, add tests
Add bbox to arguments when calling getTileData (needed by H3 hexagon lookup)

Coverage increased (+0.02%) to 62.011% when pulling ad89904a77fd90b49a0e601ddd2c919f57df819e on x/tile-layer-fix into 63837b6a4ac5a00970028321622910205843636f on master.


CSOM for Core (Microsoft.SharePointOnline.CSOM) causes Socket Exhaustion

Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint CSOM
Developer environment
Windows
What browser(s) / client(s) have you tested

[ ] 💥 Internet Explorer
[ ] 💥 Microsoft Edge
[ ] 💥 Google Chrome
[ ] 💥 FireFox
[ ] 💥 Safari
[ ] mobile (iOS/iPadOS)
[ ] mobile (Android)
[X] not applicable
[ ] other (enter in the "Additional environment details" area below)

Additional environment details

Microsoft.SharePointOnline.CSOM version 16.1.21909.12000
See https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM
This happens on Windows in AKS but should happen on Linux as well

Describe the bug / error
CSOM Core uses HttpWebRequest, which creates new instances of HttpClient, and could exhausts the available TCP sockets on a system quickly.  See references:

https://github.com/dotnet/runtime/issues/20013
https://docs.microsoft.com/en-us/dotnet/core/compatibility/networking/6.0/webrequest-deprecated
https://github.com/dotnet/runtime/blob/418026050ad0e0d08ea60f77302942d7ba019893/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs#L1480
SPWebRequestExecutor class

To exacerbate the issue, .Net 5 no longer supports System.Net.ServicePointManager, which used to allow us to set the DefaultConnectionLimit, and HttpClient in .Net 5 allows for int.Max of connections per destination server by default.  As a result of this combination, under high volume in .Net 5, we need to be able to limit the number of connections per destination server.  In .Net 5 and .Net 6, the recommended way to do this is by passing in a SocketsHttpHandler or an HttpClient.
Steps to reproduce

Making a ton of CSOM calls over a period of time
Run netstat -ano and inspect the number of TCP connections in TIME_AWAIT

Expected behavior
CSOM core to use HttpClient and allow caller to pass in a HttpMessageHandler (such as SocketsHttpHandler) instead of HttpWebRequest, as recommended in documentation https://docs.microsoft.com/en-us/dotnet/core/compatibility/networking/6.0/webrequest-deprecated

@lengkeng There is a SPWebRequestExecutor that uses HttpClient available in PnP.Framework and this can be used instead of the default SPWebRequestExecutor in CSOM. You can use the static HttpClient available in PnP.Framework (like in the example) or you can provide your own. See pnp/pnpframework#261 for more info.
Usage example:
var authManager = new PnP.Framework.AuthenticationManager(clientId, certificate, tenantId);
var clientContext = authManager.GetContext(siteUrl);
clientContext.WebRequestExecutorFactory = new HttpClientWebRequestExecutorFactory(PnPHttpClient.Instance.GetHttpClient());
clientContext.Load(clientContext.Web, w => w.Title);
await clientContext.ExecuteQueryRetryAsync();

@lengkeng - will @patrikhellgren approach work for you?

Hey sorry for the late response.  Thank you for the suggestion @patrikhellgren  We have been looking into this option.  I will update here as soon as we have a result.

Folks, we ended up cloning just one file - HttpClientWebRequestExecutorFactory.  It ran locally fine on .net 48 but we are seeing an issue running on .net 5 in AKS. Unfortunately I don't have the details but just want to update this thread before I go OOO for a few days.  I will update again when we have more info.


Using ingress deletes all existing virtual servers and real server pools

FortiADCIngressController: 2.0.0 (fortinet/fortiadc-ingress:2.0.0)
FortiADC-2000F v7.4.0,build0308,230706 (GA)
Adding an ingress will remove all existing virtual servers and real server pools on the load balancer/vdom!
The ingress is using the POST /api/declarative API route and it appears it is declarative for the entire load balancer/vdom and as such will try to remove all existing entries.
Looking at the API calls, the result of those /api/declarative calls results various in "payload" errors, yet the load balancer is creating a working virtual server/content routing/real server pools. Other entries created by the ingress are not removed. Only the manually created entries are being removed. I captured a request when adding an ingress and manually ran the API call with the "async" option set to false (gives text errors) and got this payload:
{
    "payload": [
        "Failed to delete content routing 'test2_test2-ingress_service2_1': Entry is used.",
        "Failed to delete content routing 'test2_test2-ingress_service1_2': Entry is used.",
        "Failed to delete content routing 'test_verify-ingress_verify-purple-service': Entry is used.",
        "Failed to delete content routing 'test_verify-ingress_verify-purple-service_1': Entry is used.",
        "Failed to delete content routing 'test_verify-ingress_verify-green-service_2': Entry is used.",
        "Failed to delete content routing 'test_verify-ingress_verify-blue-service_3': Entry is used.",
        "Failed to delete content routing 'test3_test3-ingress_test3-kuard-service': Entry is used.",
        "Failed to delete real server pool 'test2_service1': Entry is used.",
        "Failed to delete real server pool 'test2_service2': Entry is used.",
        "Failed to delete real server pool 'test_verify-purple-service': Entry is used.",
        "Failed to delete real server pool 'test_verify-blue-service': Entry is used.",
        "Failed to delete real server pool 'test_verify-green-service': Entry is used.",
        "Failed to delete real server pool 'test3_test3-kuard-service': Entry is used."
    ]
}

So it appears it is actually trying to delete the other ingress created entries but is being denied by the load balancer due to the lb seeing them as being used.
This behavior removed about 30 virtual servers in root on a lab fortiadc 200 instance and dozen in a vdom on a lab fortiadc 2000 instance. I have further confirmed this behavior while rebuilding those.

Hi Matt,
This is the main design of ingress controller 2.0. Ingress controller takes the main control of vs, rs and other ingress related objects. This means on FAD you will only see vs, rs and other ingress related objects that is deployed on k8s side. We use declarative api call to make the synchronization and other manually created objects will be removed since they are not deployed on k8s side.
We will add a warning for customers on 2.0.0 document.


delta --list-syntax-themes shows Catppuccin Latte as a dark theme

I can't get Catppuccin Latte to work properly as a light theme. delta --list-syntax-themes shows it as a dark theme.
I thought that https://github.com/catppuccin/delta/pull/6 would fix this, but apparently not.

The culprit seems to be https://github.com/dandavison/delta/blob/0.17.0/src/options/theme.rs#L48. delta has a hardcoded list of themes that are considered light-mode.
The value there should be catppuccin-latte (all lowercase) instead of Catppuccin-latte.

https://github.com/dandavison/delta/pull/1745

Side note: This probably wasn't a typo actually. The casing was changed at some point after https://github.com/dandavison/delta/pull/1573 was opened but before this repo was started.

Hmm, I think I made a bad PR. Should've changed it to Catppuccin Latte, not catppuccin-latte.

https://github.com/dandavison/delta/pull/1823


[Template] Template doesn't have browser test samples and a standard karma.conf

Update "template" with karma and a sample browser test-suite

#4297


Zombie and Skeleton Horses Do Not Respect WorldGuard Deny-Spawn Flag on Purpur

Spark link
https://spark.lucko.me/txVJNFUufp
Expected behavior
Zombie and skeleton horses should respect the deny-spawn flag when added to a WorldGuard region. Tested by using Paper 1.20.2 build 291 and Purpur 2090, and the issue only appears on Purpur. EngineHub told me the solution was to switch to Paper, which I'd ideally rather not do, hence making an issue here.
Observed/Actual behavior
Zombie and skeleton horses are able to spawn regardless of WorldGuard region deny-spawn values.
Steps/models to reproduce

Set zombie_horse and/or skeleton_horse in a region's deny-spawn flags
Attempt to spawn zombie/skeleton horse via spawn eggs or whatever other method

Purpur version
Current: git-Purpur-2090 (MC: 1.20.2)*
Console 21:05:53
Previous: git-Purpur-2088 (MC: 1.20.2)

You are running the latest version

Agreements

[X] I am running the latest version of Purpur available from https://purpurmc.org/downloads.
[X] I have searched for and ensured there isn't already an open issue regarding this.
[ ] I ticked all the boxes without actually reading them
[X] My version of Minecraft is supported by Purpur.

Other
No response

https://github.com/PurpurMC/Purpur/blob/ver/1.20.2/patches/server/0025-Zombie-horse-naturally-spawn.patch#L15-L24
Purpur doesn't anything except that, but there is nothing which would cause the described issue

How about Pufferfish?

ok, can confirm on Purpur but not on Paper and Pufferfish

it's broken even on Purpur 1.16.5

In Worldguard they have a check for tamed mobs right before that flag goes into effect. In purpur, almost since the creation of the project, zombie and skeleton horses would default to always being tamed. This should remedy that by only showing those two mobs as tamable if they're tamed (like it should) OR if the new ridable options are enabled.

I just saw this while updating and the picture caught off guard lmao


Page should warn about CNAMEs using aliases not being included

There you be a warning about CNAMEs using aliases not being included in the BIND text file. Or am I missing something key here ?

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

ID: 5e7a82c4-2bed-a8c7-6ce9-9bd895771337
Version Independent ID: 5233a0b2-fc92-efb5-8d8d-8c53d5e68109
Content: Import and export a domain zone file - Azure CLI - Azure DNS
Content Source: articles/dns/dns-import-export.md
Service: dns
GitHub Login: @greg-lindsay
Microsoft Alias: greglin

@gagsamuel1
Thank you for your feedback! We have assigned this issue to the author to review further and take the next course of action.

Hi - if I understand the issue correctly, you are saying that although we might import a zone, the zone can have CNAMEs that point to other (private) zones that must also be imported for the CNAME to work. Otherwise, name resolution for that host will fail.
I see the problem - thanks for bringing this up.

Adding this now. #please-close


feat(bar): in polar axis provide negative values. close #12109

Brief Information
This pull request is in the type of:

[x] bug fixing
[ ] new feature
[ ] others

What does this PR do?
To support the bar chart in polar axis provide negative values, I hava found an example. In polar coordinate system, the option.radiusAxis.min not only negative values are not supported, but other values except 0 are also not supported, so this submission is to solve this problem.
Here is the example' s option:
option = {
    angleAxis: {
        type: 'category',
        data: ['S1', 'S2', 'S3']
    },
    radiusAxis: {
        min: 1,
        max: 6
    },
    polar: {
    },
    series: [{
        type: 'bar',
        data: [2, 2, 2],
        coordinateSystem: 'polar',
        itemStyle:{
            color:"blue"

        },
        name: 'A',
        stack: 'a'
    },
    {
        type: 'bar',
        data: [2, 2, 2],
        coordinateSystem: 'polar',
        name: 'B',
        stack: 'a'
    },
    {
        type: 'bar',
        data: [2, 2, 2],
        coordinateSystem: 'polar',
        name: 'C',
        stack: 'a'
    }],
    legend: {
        show: true,
        data: ['A', 'B', 'C']
    }
};

Fixed issues
To fix the issue 12109

Details
Before: What was the problem?

12109

After: How is it fixed in this PR?

fix the the issue 12109 and solve the radiusAxis.min do not support value except 0.

Usage
Are there any API changes?

[ ] The API has been changed.

Related test cases or examples to use the new APIs
NA.
Others
Merging options

[ ] Please squash the commits into a single one when merge.

Other information

Thanks for your contribution. The bug has been fixed in #12418.


Add left and right values to style option (includegraphics function)

The function includegraphics has the option style, which currently accepts the values 'centered' and 'inline'.
However, in some cases, it can be convenient to have a left alignment of the figure. Right-alignment is not that useful, but it may also be added to the acceptable values for the shake of completeness.
So this pull request aims at adding the following value for such a keyword:

'left': image to new line a left-aligned
'right': image to new line a right-aligned

The goal of this package is not to look for completeness. But it is an interesting point, I could include such functionality if there is demands for it. For now I won't look into it, in particular because

at the moment there is no way to exploit say the left position to put text on the right (like a minipage).
handling images was a request but is not a core feature

Regarding your pull request :

your function convert_lefted_images_to_html is never called. It should appear in convert_images_to_html ?
you copy/pasted twice the function convert_centered_images_to_html, growing significantly the code and making it hard to parse. Maybe a better way would be to have a unique function with a style argument (left, right etc), and somewhere a dictionary storing what should be the name of the option in latex, in html, the length of the latex block, etc.
why exchanging " characters with ' ?

Hi. Thanks for your comments.
Regarding the feature request, I do understand that giving support to something that will never be used is pointless. Still, I think the left alignment is useful (actually, it is the one that I preferentially use), as it adds some additional flexibility to compose the final moodle question.
Regarding your remarks on the actual code, you are basically right on your criticism:

convert_lefted_images_to_html: it seems I simply copied what was referring to center imager without noticing that the one was not used.
And yes, repeating lines of code does not look like a good practice at all. I'll take a look in case I keep this feature locally
As for the quotations, my text editor (vim) was doing strange things not recognising long commented chunks, and I ended up making such a nonsensical change.

I'll continue with this fork locally. In case I find something relevant to be shared in the future, I'll contact you again. Thanks for the work

I'll continue with this fork locally. In case I find something relevant to be shared in the future

I think this is reasonable. As you can see I don't do updates very often, it is likely that your local version won't diverge quickly from the current one.


add community link

Description
add community links

Job PR-313/1 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-313/1/index.html

Job PR-313/5 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-313/5/index.html

Job PR-313/6 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-313/6/index.html


examples: add a target unit for torcx

This adds an example systemd target unit, which tracks proper
torcx-generator run by checking for the seal file. This example is
lifted from ContainerLinux:
https://github.com/coreos/coreos-overlay/pull/2567
Closes: https://github.com/coreos/torcx/issues/51

Just importing a pre-existing example, self-merging.


Missing submitter e-mail in issue body

Confirm this still exists - no email is submitted (when you check the box for public display of email)


Event not firing 2nd time

so i have a dropdown and on its change event i execute the following code and it works just fine
`$('#ddl-section').on("change", function () {
//  grid.clear();
$("#hidden-section-id").val($('#ddl-section :selected').val());
var selectedSectionId = $('#ddl-section :selected').val();
grid = "";
grid = $('#grid').grid({
primaryKey: 'Id',
dataSource: rootUrl + "page/get1?Id=" + selectedSectionId,
columns: [
{ field: 'Id', width: 56 },
{ field: 'Text', title: 'Text' },
{ field: 'Url', title: 'Url' },
{ field: 'Description', title: 'Description' },
{ field: 'IsActive', title: 'IsActive', width:90 },
{ field: 'DisplayOrder', title: 'Order', width:90 },
{ width: 64, tmpl: 'edit', align: 'center', events: { 'click': Edit } }
            ],
            pager: { limit: 5 }
        });

    });`

but it does not work the 2nd time when the change event is fired.

Can you send me a code sample that I can use for the replication of this issue. Everything seems to work fine with the change event in the following example: http://gijgo.com/dropdown/events/change

I will close the issue. Please reopen if you have replication steps with more details.

sorry i was little busy with other tasks. Now I am back.
`


Error handling in atomic_lib - specify and limit error types

Current error is a dyn Box, which means it's impossible to expect what kind of error will be emitted. Let's limit with some Enum error type.

Types of errors probably look a lot like http errors, since it uses a lot of web concepts

Authorization (401): incorrect rights / signature
Not found (404): (part of) resource could not be resolved
Internal error (500)

Types of errors probably look a lot like http errors, since it uses a lot of web concepts

Authorization (401): incorrect rights / signature
Not found (404): (part of) resource could not be resolved
Internal error (500)

AppError in Atomic-Server is pretty bad. It has some unused fields, unnecessary logic. Feels very unfinished. But perhaps it's better to fix that after fixing Atomic-Lib errors, since that's where pretty much all server errors will be coming from.

AppError in Atomic-Server is pretty bad. It has some unused fields, unnecessary logic. Feels very unfinished. But perhaps it's better to fix that after fixing Atomic-Lib errors, since that's where pretty much all server errors will be coming from.

Current errors are often too verbose, and I don't have a decent strategy of solving this. Example:
 Failed setting propval for 'https://example.com/birthDate' because property 'https://atomicdata.dev/datatypes/Datatype' could not be found. Failed getting property https://atomicdata.dev/datatypes/Datatype. Could not fetch url 'https://atomicdata.dev/datatypes/Datatype'. Status: 500

I currently use map_err + format! a lot to create long chained strings of errors. This is better than throwing information away, but I need a strategy to keep the messages shorter.

Current errors are often too verbose, and I don't have a decent strategy of solving this. Example:
 Failed setting propval for 'https://example.com/birthDate' because property 'https://atomicdata.dev/datatypes/Datatype' could not be found. Failed getting property https://atomicdata.dev/datatypes/Datatype. Could not fetch url 'https://atomicdata.dev/datatypes/Datatype'. Status: 500

I currently use map_err + format! a lot to create long chained strings of errors. This is better than throwing information away, but I need a strategy to keep the messages shorter.

Also, I'd like to standardize these Errors even higher. Maybe introduce an Error class, and maybe give Error types resolvable, persistent IDs. At least I want front-end apps to be more aware of error types. Authentication errors might render a different component, etc.

I think We'll need Error Resources, which can be properly parsed and shown in the front-end. Maybe this will need to be a new Error type. Or maybe all we need is a different handler in server. Not sure what's the best approach here.

We now really need accurate status codes, because the front-end needs to know why requests have failed (authorization => retry when there's a new agent signed in).


Crash when saving the token on disk with AttributeError: DbfilenameShelf instance has no attribute '__exit__'

When creating MonzoAPI object using environmental variables, I get the following error:
"AttributeError: DbfilenameShelf instance has no attribute '__exit__' "

This occurs on any method that is used to interact with the access token on disk.

Could you please provide the whole stacktrace and the code that resulted in this error? Thanks.

Traceback (most recent call last):
File "", line 1, in
File "build/bdist.linux-armv61/egg/pymonzo/monzo_api.py", line 97, in init
File "build/bdist.linux-armv61/egg/pymonzo/monzo_api.py", line 149, in _get_oauth_token
File "build/bdist.linux-armv61/egg/pymonzo/monzo_api.py", line 123, in _save_token_on_disk
AttributeError: DbfilenameShelf instance has no attribute 'exit'

It could be that I am running an older version of the shelve library?

And what was the actual code that resulted in this? Was it just MonzoAPI object initialization?
To be honest I have no idea why that happens and I can't reproduce it. What distro (OS?) and Python version is this?

It could be that I am running an older version of the shelve library?

shelve is in Python standard library so I don't think that should be a problem.

Yes, this happens during object initialisation.
Out of interest, why are you using shelve and not just saving the token string in a text file using open() or close()? Or keeping the token string in the object?
I am running this on Rasbian Jessie, and have tried Python 2.7. also tried 3.4 but had a separate error come up for that.
On 1 Aug 2017 12:32, Paweł Adamczak<EMAIL_ADDRESS>wrote:
And what was the actual code that resulted in this? Was it just MonzoAPI object initialization?
To be honest I have no idea why that happens and I can't reproduce it. What distro (OS?) and Python version is this?
It could be that I am running an older version of the shelve library?
shelve is in Python standard library so I don't think that should be a problem.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/pawelad/pymonzo/issues/1#issuecomment-319344891, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWDLyblyTbNs-C6ItZAeHdN493otk4DBks5sTwy0gaJpZM4Onmql.

It happens on Python 2.7 on both Windows 10, and Mac OS (whatever the latest version is).
This what I did to fix it for those versions at least -
https://github.com/bartonp/pymonzo/commit/95e2edd2324d6a1bcc1f00fc615d28cd56557582?diff=unified - and you don't need the import json. That was there for testing purposes.

@bartonp thanks for the confirmation and the fix, I'll try to find some time this weekend to take a look at it.

OK, I just replicated this as well on Python 2.7.13 on OS X. Sorry it took so long but it's been a crazy couple of weeks.
I'll fix it in the next couple of days and make sure that the test suite covers this as well.
@MajinLogan so the quick fix for now (until I release a fix) is either to install the version patched by @bartonp or use Python 3

I am running this on Rasbian Jessie, and have tried Python 2.7. also tried 3.4 but had a separate error come up for that.

@MajinLogan what error did you get on Python 3.4? Could you open a new issue about it with the stacktrace? I have some free time and would love to squash these bugs

This is the error that I get with python 3 (which I have raised as a separate issue:
m.MonzoAPI()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/site-packages/pymonzo/monzo_api.py", line 95, in init
self._token = self._get_oauth_token()
File "/usr/local/lib/python3.6/site-packages/pymonzo/monzo_api.py", line 144, in _get_oauth_token
client_secret=self._client_secret,
File "/usr/local/lib/python3.6/site-packages/requests_oauthlib/oauth2_session.py", line 244, in fetch_token
self._client.parse_request_body_response(r.text, scope=self.scope)
File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 409, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 376, in parse_token_response
validate_token_parameters(params)
File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 383, in validate_token_parameters
raise_from_error(params.get('error'), params)
File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/errors.py", line 404, in raise_from_error
raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.ServerError: (server_error) Unknown error occurred

Okay, so this issue should be resolved by the just released version 0.9.0.


Add delpoyment documentation

This documentation includes:

How to get deployment artifacts
How to get Docker images for application
How to start the application

@ipa-rwu thanks a lot for this contribution 👍🏽


Render multiple glyph margin decorations

Fixes https://github.com/microsoft/vscode/issues/5923
For https://github.com/microsoft/vscode/issues/176316, I'd like to render a share link decoration in the gutter if a whole line has been selected. This currently doesn't play nicely with breakpoint decorations so I took a stab at expanding the glyph margin to accommodate rendering multiple decorations.
In future we could also add the ability to associate decoration click targets with specific commands (and also update the testing/breakpoint decorations to handle click events), but I wanted to address just the rendering issue as a first pass.

The call to model.getAllDecorations() from the view model is concerning for me because fetching all the decorations could be very expensive perf-wise. And we will now be doing this almost all the time (each keystroke, etc). I think we need to enrich the IntervalTree/IntervalNode to be a lot faster and filter out only margin decorations in the search function. That would avoid needing to do the offset -> range conversion for all decorations on the model all the time.

Could you perhaps explore enriching the IntervalNode.metadata to have a bit flag if the node renders a margin decoration, this can be done similar to getNodeIsForValidation / setNodeIsForValidation. Then, we can enrich the search to be able to include only nodes that render glyph margins, and eventually expose that as a separate method on ITextModel, similar to getAllDecorations, maybe getAllMarginDecorations.

:+1: Done in https://github.com/microsoft/vscode/pull/179657/commits/c322dd0742b27b3f01fa3706846a3dd2bf0f762c

Another thing that might happen is that users might want to opt out of this growing of the margin area, so maybe we need to add an editor option to limit the max glyph margin lane count.

I added editor.glyphMarginDecorationsLimit, here is a demo of how it works. When there are more decorations than can be rendered, we stop rendering decorations, which is pretty much the same behavior that we have today since today only one div gets rendered and all the classnames are merged):
https://user-images.githubusercontent.com/30305945/231246214-8ea89ab2-6cd2-4165-bdad-011cb9f08bab.mp4

From standup today there was some feedback on the approach this PR takes, and I also learned about some prior discussions here. I opened https://github.com/microsoft/vscode/issues/179725 to get additional feedback on a new proposal and will rework this PR once we have settled on a better approach.

Superseded by https://github.com/microsoft/vscode/pull/180013 and https://github.com/microsoft/vscode/pull/179910


[release-2.4] Set health-probe-bind-address in helm chart

Signed-off-by: Yu Cao<EMAIL_ADDRESS>

/approve
/lgtm


TLFS v6.0b, Section 3.7 'Is Nested' field location is inconsistent

** Description**
Is Nested field's position is inconsistent across two tables in the Section 3.7 of the TLFS v6.0b.
In the first table, it is documented that it is before RsvdZ, at bit 26.

In the next table, it is documented that it is after RsvdZ, at bit 31.

Link to doc:
https://github.com/MicrosoftDocs/Virtualization-Documentation/raw/master/tlfs/Hypervisor Top Level Functional Specification v6.0b.pdf

The TLFS document 6 was replaced by this page: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/hypercall-interface


Ensure dependencies are consistent and reviewable via gradle-consistent-versions

Currently, dependencies are managed via Gradle's native support. We have a section in the top level build.gradle that defines the versions for our direct dependencies.
There are several issues with managing dependencies this way:

We don't set failOnVersionConflict as the resolution strategy, so we don't know if a transitive dependency is being pulled in with two conflicting versions and we don't know how Gradle is selecting the version of the transitive dependency.
Reviewers cannot see the versions selected for transitive dependencies. The version that is selected by Gradle is only known after the pom is published.
Transitive dependencies are traditionally resolved independently per Gradle configuration. So the version selected for the test runtime might be different from the version published in the pom. As a result, we end up testing with versions of transitive dependencies that are inconsistent with what will be pulled in transitively by Iceberg's consumers.
The version of a direct dependency has to be written in every line where we declare a dependency. We also have an inconsistency where some of our dependency version numbers are defined in the ext block while others are hardcoded into the dependencies blocks. This is also error-prone because two submodules of Iceberg can depend on the same library but with different hardcoded versions.

gradle-consistent-versions is a means to solve all of the above problems and more. When using gradle-consistent-versions, one defines the versions of all dependencies in a versions.props file. All dependencies are declared without specifically listing the version number. gradle-consistent-versions will ensure that all configurations have the same version of each and every dependency of the project, both direct and transitive. If there are version conflicts, one can use various Gradle tasks to trace the origin of the version conflicts.
Additionally, gradle-consistent-versions will add a versions.lock file in the repository. This is a list of all the dependencies with their respective versions - both direct and transitive. This will allow for reviewers to look over the changes in selected transitive dependencies caused as a result of upgrading the version of a direct dependency.
For more information on gradle-consistent-versions, please see the README in the gradle-consistent-versions repository linked above. A prototype of the proposal can be found here.

@rdblue @rdsr thoughts on the above proposal?

I'm +1 for this, as long as it does not change expectations of the published artifacts. I don't want custom resolution in Iceberg to cause problems when including Iceberg in Presto, for example.
@electrum, any thoughts here?

I'm new to Gradle, but I read through the docs for gradle-consistent-versions and it seems quite reasonable. It has some nice features that I'd like to have in Maven. This appears to be a strict improvement over the current situation.
One problem this doesn't seem to solve is requiring dependency declarations for everything that is used directly. For example, before 37f6a20f324b23c26773b24259ee78d067d41323, the code was directly referencing commons-compress, but there was no direct dependency. The classes happened to be on the classpath via the avro dependency. This is solved in Maven via dependency:analyze. The Gradle equivalent seems to be gradle-dependency-analyze although I'm surprised there's not a more "official" solution.

I merged the PR for this so I'm going to close this issue.


nested symbols being changed

Which version of the plugin are you using?
[x ] Data Populator for Sketch
[ ] Data Populator for Adobe XD
Describe the bug
Data populator changes the override value on a nested symbol that, as far as I can tell, does not have a name that should cause it to be changed.
To Reproduce
The symbol I am populating has this schema:

The selected nested symbol, named 'menu' has this override structure:

After Data Populator runs, the field named 'Icons/z-nested/icon glyphs/utility/... gets set to the value 'none.'
Expected behavior
I would not expect Data Populator to interact with that nested symbol at all, as the name of the item, and the names of its child items do not match any of the names in the JSON file I am using to populate.
Environment (please complete the following information):

macOS Version: macOS Mojave 10.14.2
Sketch Version: Sketch 52.5
Plugin Version: 3.0.3

@tsheiner we’ll have a look!


SetActiveView method name

From what I see in sublime text api there is focus_view(view) method on sublime.Window class, but we have SetActiveView method and it's not exported yet is there any reason behind the naming? Should we go and rename it to FocusView and export it to python api or just make a fucos_view function in window_manual.go which runs SetActiveView?

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/9356337-setactiveview-method-name?utm_campaign=plugin&utm_content=tracker%2F282001&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282001&utm_medium=issues&utm_source=github).

IMO I'd prefer to keep it named SetActiveView as it's the counter part of ActiveView and consistent with general Go function naming, and then just export it as "focus_view".

Closed via b6ada4f4f43ea32a0dde5a4866b2a400bec14e6a kept the SetActiveView name.


Unable to get things working

Part of Code -
screen_recorder.enable_dev_log()
params = screen_recorder.RecorderParams()
screen_recorder.init_resources(params)

Output (as soon as i run the code) -
[2020-11-09 16:22:46.415] [recordLogger] [info] Created d3d11 device from 0
[2020-11-09 16:22:46.415] [recordLogger] [info] found 1 displays
[2020-11-09 16:22:46.418] [recordLogger] [error] invalid arg to create desktopdiplication
[2020-11-09 16:22:46.418] [recordLogger] [trace] stop video recording is called
[2020-11-09 16:22:48.433] [recordLogger] [trace] wait res for stop video is false

could you share full code which you run?

https://docs.microsoft.com/en-us/windows/win32/api/dxgi1_2/nf-dxgi1_2-idxgioutput1-duplicateoutput
this message means this error code:
E_INVALIDARG for one of the following reasons:

The specified device (pDevice) is invalid, was not created on the correct adapter, or was not created from IDXGIFactory1 (or a later version of a DXGI factory interface that inherits from IDXGIFactory1).
The calling application is already duplicating this desktop output.

Are you sure that second is not a case?

nevermind, i fixed it, it was because i was using d3dshot library as well, and for some reason i can't use both of the libs together, but no problem i can get things working with this lib too

Because of this "The calling application is already duplicating this desktop output." I suppose, maybe you can use both libs at the same time if you split them by two different processes using multiprocessing or subprocess

Oh okay thanks for the information but I don't need to use both, i was using it just for screenshots but this lib can do it as well so no problem