update metadata panel review page for press summaries

Changes in this PR:
Reuse the metadata panel static on review page for press summaries as designed https://ct3ku9.axshare.com/?id=8sulyn&p=ps-review-showing_metadata-panel_mvp_static&c=1
Trello card / Rollbar error (etc)
https://trello.com/c/qfPQTUIB/1193-3-eui-mvp-frontend-for-metadata-press-summary
Screenshots of UI changes:
Screencast from 31-07-23 15:53:56.webm
Before

After

[ ] Requires env variable(s) to be updated

 3. EUI: MVP Frontend for metadata Press summary

Codecov Report

Merging #1091 (d84a9a7) into main (5aca2f9) will decrease coverage by 0.09%.
Report is 7 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1091      +/-   ##
==========================================
- Coverage   86.56%   86.48%   -0.09%
==========================================
  Files          40       40
  Lines        1407     1398       -9
  Branches      139      139
==========================================
- Hits         1218     1209       -9
  Misses        167      167
  Partials       22       22

see 3 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Great stuff Donna!

Folks i'm going to take this over, and rebase on top of the new API client branch if that's ok! @Donna-H @jacksonj04


Can __index be changed to another name?

Why does this name need to start with an underscore? By default, github pages ignores such files, making it necessary to add an .nojekyll. So I think this should be changed to another name?

If the for the page with path /, we used to generate import code like "import pageData from "/@virtual/pages/", but that cause bugs. So I added a suffix to it.

So I think this should be changed to another name?
Yes I will do that.


work on J3DMaterialFactory and J3DMaterialFactory_v21

Solve the conflict and you're golden

Okay, the conflict is resolved


Errors in PowerShell scripts

Three times in scripts there are parameters "StandardLRS", which are incorrect. Trying to run scripts with these results in errors.
These should be "Standard_LRS" instead.
One more error is in script for creating SharePoint Server 2016 virtual machine. In the line:
$vm=Set-AzureRmVMOSDisk -VM $vm -Name "DC1-OS"
there is "DC1-OS" disk mentioned. But it was used in previous example, and since following the tutorials it already exists!
This disk should probably be named "SP1-OS" instead.

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

ID: c1b41818-1125-408f-dee5-c3ba0af8b5b1
Version Independent ID: c1e611cc-113f-a77f-1cb7-c819560a172d
Content: Intranet SharePoint Server 2016 in Azure dev/test environment
Content Source: SharePoint/SharePointServer/administration/intranet-sharepoint-server-2016-in-azure-dev-test-environment.md
Product: sharepoint-server-itpro
GitHub Login: @JoeDavies-MSFT
Microsoft Alias: josephd

@AndreaBarr please assign to me.

@wiktorwandachowicz Thank you for submitting this feedback.
From our understanding the issue has been resolved. If you feel it hasn't been resolved please re-open this issue.
@officedocsbot close

@officedocsbot close


Remove all .json files and improve setups

Remove .json files and improve setups
Description
Move all the .cairo programs to cairo_programs and delete .jsons. Modify setups.
Resolves: #214
Checklist

[ ] Linked to Github Issue

Codecov Report

Merging #224 (1b08446) into main (6091bb8) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #224      +/-   ##
==========================================
- Coverage   96.09%   96.02%   -0.08%
==========================================
  Files          28       28
  Lines        5128     5128
==========================================
- Hits         4928     4924       -4
- Misses        200      204       +4

Impacted Files
Coverage Δ

src/cairo_run.rs
85.41% <100.00%> (-2.09%)
:arrow_down:

src/vm/runners/cairo_runner.rs
98.78% <0.00%> (-0.08%)
:arrow_down:

src/vm/vm_core.rs
97.30% <0.00%> (-0.07%)
:arrow_down:

src/types/errors/program_errors.rs
16.66% <0.00%> (ø)

Continue to review full report at Codecov.

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


Doesn't run?

python cubes.py 3
File "", line 1
python cubes.py 3
^^^^^
SyntaxError: invalid syntax

you should run the python cubes.py 3 command in the shell, not in the file or python interpreter


Inconsistency in solved return for Humanoid environment

Hi!
is there an agreed threshold when the humanoid environment is considered to be solved? In the Brax paper, they refer to the environment as solved with an average return of about 12000 as can be seen in Figure 9. In the Brax training tutorial, a threshold of 13000 is stated as given in https://github.com/google/brax/blob/a89322496dcb07ac5a7e002c2e1d287c8c64b7dd/notebooks/training.ipynb#L261
Thanks!

Hi @LabChameleon ,  Looking at Figure 4, the environments are trained with 1e6 steps to 6-8k reward, comparing Brax v1 and MuJoCo. Brax has changed considerably since then and I expect that a similar analysis and comparison would need to be done to find an average return that "solves" the environment in the current Brax version (and also for each physics backend). We don't have a particular number lying around for this currently. @cdfreeman-google may have better insights here.


Quimb tensor contraction is significantly slower than cirqs state vector simulation

See https://github.com/quantumlib/Qualtran/pull/788#issuecomment-1996292451 for more details
I'm not sure what's the fix right now, but this is definitely a blocker to transition away from Cirq and use Qualtran native interfaces when writing Bloqs.

I'll take a look

lp = LPResourceState(10)

%%time
lp.tensor_contract()
CPU times: user 24.6 s, sys: 3.82 s, total: 28.5 s
Wall time: 4.18 s

from qualtran.cirq_interop.testing import GateHelper
circuit = GateHelper(lp).circuit

%%time
circuit.final_state_vector()
CPU times: user 59.3 ms, sys: 9.04 ms, total: 68.3 ms
Wall time: 70.1 ms

%%time
circuit.unitary()
CPU times: user 4.17 s, sys: 1.86 s, total: 6.03 s
Wall time: 3.24 s

so right off the top, a large proportion of the wall time difference is due to comparing apples and oranges. Asking cirq for the unitary is the same order of magnitude; although the cpu time is worse for tensor_contract() and the wall time is still slower for quimb

It's worth pointing out that using the cirq simulation for LPResourceState still makes calls to Hadamard().tensor_contract() and XGate().tensor_contract() which may be slowing down the cirq simulation vs a pure cirq implementation. Is this because of the recent change to proactively change cirq gates into bloqs if the bloqs exist in qualtran? Something worth investigating later is if this slows down the cirq simulation

large proportion of the wall time difference is due to comparing apples and oranges

From a user perspective, I don't think we are comparing apples and oranges. LPResourceState is a Bloq with only a RIGHT register. So bloq.tensor_contract() is expected to return a state vector and not a unitary
The same query to cirq is circuit.final_state_vector(), so the comparison makes sense from an API perspective I think.

Is this because of the recent change to proactively change cirq gates into bloqs if the bloqs exist in qualtran?

No, in this specific case it's because I intentionally used Hadamard().on(*q) when specifying the cirq-style decomposition of LPResourceState; instead of using cirq.H. If I used cirq.H, then the cirq simulation would have used the cirq gate directly but bloq.decompose_bloq() would have used qualtran's Hadamard(). This behavior is enabled by the recent updates to change cirq gates to Bloqs when using the Bloq API

oh, I see. I don't know why quimb is so slow then. The investigation continues

So theres from qualtran.simulation.tensor import flatten_for_tensor_contraction, but the result has a lot of Join,Split combos that blow up the quimb network because of their naive tensor implementation.

it would be nice if quimb had a generalized identity tensor that it could contract efficiently but I didn't find it the first time I ran into this
otherwise, we'll need a function that destroys Join,Split pairs or keeps everything maximally split.

LPResourceState now has a thru register. Do you have an example of a complicated state prep bloq. Also why did that turn into a thru register


pyUSB installed?

A well documented and pretty straight forward container, finally!
Thanks for your job, but which weather station works for you and how is it connected?
I'm running this on an Rpi2 but get an error:
Possibly for a needed dependency for a USB connection.
May 26 12:20:12 syslogd started: BusyBox v1.31.1
May 26 12:20:15 weewx[12] INFO __main__: Initializing weewx version 4.0.0
May 26 12:20:15 weewx[12] INFO __main__: Using Python 3.8.3 (default, May 20 2020, 19:12:37)  [GCC 9.2.0]
May 26 12:20:15 weewx[12] INFO __main__: Platform Linux-4.19.106-armv7l-with
May 26 12:20:15 weewx[12] INFO __main__: Locale is 'C.UTF-8;C;C;C;C;C'
May 26 12:20:15 weewx[12] INFO __main__: Using configuration file /data/weewx.conf
May 26 12:20:15 weewx[12] INFO weewx.engine: Loading station type FineOffsetUSB (weewx.drivers.fousb)
May 26 12:20:15 weewx[12] CRITICAL __main__: Caught unrecoverable exception:
May 26 12:20:15 weewx[12] CRITICAL __main__:     ****  No module named 'usb'
May 26 12:20:15 weewx[12] CRITICAL __main__:     ****  Traceback (most recent call last):
May 26 12:20:15 weewx[12] CRITICAL __main__:     ****    File "./bin/weewxd", line 148, in main
May 26 12:20:15 weewx[12] CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(config_dict)
May 26 12:20:15 weewx[12] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/engine.py", line 69, in __init__
May 26 12:20:15 weewx[12] CRITICAL __main__:     ****      self.setupStation(config_dict)
May 26 12:20:15 weewx[12] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/engine.py", line 92, in setupStation
May 26 12:20:15 weewx[12] CRITICAL __main__:     ****      __import__(driver)
May 26 12:20:15 weewx[12] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/drivers/fousb.py", line 219, in <module>
May 26 12:20:15 weewx[12] CRITICAL __main__:     ****      import usb
May 26 12:20:15 weewx[12] CRITICAL __main__:     ****  ModuleNotFoundError: No module named 'usb'
May 26 12:20:15 weewx[12] CRITICAL __main__:     ****  Exiting.

My weatherization is a FineOffset WH1080 and Docker version 18.09.7, build 18.09.7

Thanks for your issue submission.
pyusb was not part of the container.  I'm testing the addition now.
I'm using a Davis Vantage Vue (Wireless) over a USB serial connection.  So it appears as a serial port on my Linux machine which I map into the container as a device.  I expect you'll need to do something similar with your USB station.
For reference I run it using docker-compose and this docker-compose.yml file:
---
version: "3.7"

volumes:
  data:

services:
  weewx:
    image: felddy/weewx
    init: true
    restart: always
    volumes:
      - type: bind
        source: ./data
        target: /data
    environment:
      - TIMEZONE=US/Eastern
      - WEEWX_UID=weewx
      - WEEWX_GID=dialout
    devices:
      - /dev/ttyUSB0

Once testing is done, I'll build a new pre-release and comment here.  I won't be able to test it, so I would appreciate any feedback you have.
Stay tuned.

@Nornode , I've pre-released a new image out to Docker hub.  If you pull latest you should get it.
https://github.com/felddy/weewx-docker/releases/tag/v4.0.0-pre.2%2Busb
Please test and let me know if it solves your issue.

Awesome, thanks for super quick response!
I managed to pull the image but some error still remains.
May 26 22:17:09 syslogd started: BusyBox v1.31.1
May 26 22:17:12 weewx[13] INFO __main__: Initializing weewx version 4.0.0
May 26 22:17:12 weewx[13] INFO __main__: Using Python 3.8.3 (default, May 20 2020, 19:12:37)  [GCC 9.2.0]
May 26 22:17:12 weewx[13] INFO __main__: Platform Linux-4.19.106-armv7l-with
May 26 22:17:12 weewx[13] INFO __main__: Locale is 'C.UTF-8;C;C;C;C;C'
May 26 22:17:12 weewx[13] INFO __main__: Using configuration file /data/weewx.conf
May 26 22:17:12 weewx[13] INFO weewx.engine: Loading station type FineOffsetUSB (weewx.drivers.fousb)
May 26 22:17:12 weewx[13] INFO weewx.drivers.fousb: driver version is 1.20
May 26 22:17:12 weewx[13] INFO weewx.drivers.fousb: polling mode is PERIODIC
May 26 22:17:12 weewx[13] INFO weewx.drivers.fousb: polling interval is 60
May 26 22:17:13 weewx[13] ERROR weewx.engine: Import of driver failed: No backend available (<class 'usb.core.NoBackendError'>)
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****  Traceback (most recent call last):
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/engine.py", line 103, in setupStation
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****      self.console = loader_function(config_dict, self)
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/drivers/fousb.py", line 233, in loader
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****      return FineOffsetUSB(**config_dict[DRIVER_NAME])
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/drivers/fousb.py", line 968, in __init__
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****      self.openPort()
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/drivers/fousb.py", line 1019, in openPort
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****      dev = self._find_device()
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/drivers/fousb.py", line 1052, in _find_device
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****      for bus in usb.busses():
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****    File "/opt/venv/lib/python3.8/site-packages/usb/legacy.py", line 353, in busses
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****      sorted(core.find(find_all=True), key=lambda d: d.bus),
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****    File "/opt/venv/lib/python3.8/site-packages/usb/core.py", line 1263, in find
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****      raise NoBackendError('No backend available')
May 26 22:17:13 weewx[13] CRITICAL weewx.engine:     ****  usb.core.NoBackendError: No backend available
May 26 22:17:13 weewx[13] CRITICAL __main__: Unable to load driver: No backend available
May 26 22:17:13 weewx[13] CRITICAL __main__:     ****  Exiting...

According to this post: https://groups.google.com/forum/#!topic/weewx-user/sY5TJijPPv8
Is the container still missing "the underlying usb "C" library" which translates into python-usb?
I wished that I could use docker-compose to make the initiation as much the same as possible, unfortunately it's not available on the OS I run this.

@Nornode With regards to docker-compose... you can install it with pip:
pip install docker-compose

I've created a new release and pushed it up.   I had to make some substantial changes.  The previous images were based on Alpine Linux.  It wasn't playing well with pyusb and libusb so I've switched to a Debian base.
https://github.com/felddy/weewx-docker/releases/tag/v4.0.0-pre.2%2Busb
Please pull the new image and try it out.  I was able to get Python to successfully load the backend using the test code here:
https://github.com/walac/pyusb/blob/master/docs/faq.rst
Let me know if works.

Wow, some impressive changes you made!
Much, much appreciated!
Unfortunately I think I'm back with a regressed error:
I pulled:
docker pull felddy/weewx:latest
latest: Pulling from felddy/weewx
Digest: sha256:b7a72da239211c5869a4a6dc72694ed8854ee34b77c4b3fff3e2519e05885913
Status: Image is up to date for felddy/weewx:latest

Start log output from container...
May 27 09:15:20 syslogd started: BusyBox v1.31.1
May 27 09:15:24 weewx[13] INFO __main__: Initializing weewx version 4.0.0
May 27 09:15:24 weewx[13] INFO __main__: Using Python 3.8.3 (default, May 20 2020, 19:12:37)  [GCC 9.2.0]
May 27 09:15:24 weewx[13] INFO __main__: Platform Linux-4.19.106-armv7l-with
May 27 09:15:24 weewx[13] INFO __main__: Locale is 'C.UTF-8;C;C;C;C;C'
May 27 09:15:24 weewx[13] INFO __main__: Using configuration file /data/weewx.conf
May 27 09:15:24 weewx[13] INFO weewx.engine: Loading station type FineOffsetUSB (weewx.drivers.fousb)
May 27 09:15:24 weewx[13] CRITICAL __main__: Caught unrecoverable exception:
May 27 09:15:24 weewx[13] CRITICAL __main__:     ****  No module named 'usb'
May 27 09:15:24 weewx[13] CRITICAL __main__:     ****  Traceback (most recent call last):
May 27 09:15:24 weewx[13] CRITICAL __main__:     ****    File "./bin/weewxd", line 148, in main
May 27 09:15:24 weewx[13] CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(config_dict)
May 27 09:15:24 weewx[13] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/engine.py", line 69, in __init__
May 27 09:15:24 weewx[13] CRITICAL __main__:     ****      self.setupStation(config_dict)
May 27 09:15:24 weewx[13] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/engine.py", line 92, in setupStation
May 27 09:15:24 weewx[13] CRITICAL __main__:     ****      __import__(driver)
May 27 09:15:24 weewx[13] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/drivers/fousb.py", line 219, in <module>
May 27 09:15:24 weewx[13] CRITICAL __main__:     ****      import usb
May 27 09:15:24 weewx[13] CRITICAL __main__:     ****  ModuleNotFoundError: No module named 'usb'
May 27 09:15:24 weewx[13] CRITICAL __main__:     ****  Exiting.
Traceback (most recent call last):
  File "./bin/weewxd", line 261, in <module>
    main()
  File "./bin/weewxd", line 148, in main
    engine = weewx.engine.StdEngine(config_dict)
  File "/home/weewx/bin/weewx/engine.py", line 69, in __init__
    self.setupStation(config_dict)
  File "/home/weewx/bin/weewx/engine.py", line 92, in setupStation
    __import__(driver)
  File "/home/weewx/bin/weewx/drivers/fousb.py", line 219, in <module>
    import usb
ModuleNotFoundError: No module named 'usb'

@Nornode Well that is strange... could you please post the output of this command:
docker inspect -f {{.Config.Labels}} felddy/weewx

docker inspect -f {{.Config.Labels}} felddy/weewx
<EMAIL_ADDRESS>org.opencontainers.image.licenses:CC0-1.0 org.opencontainers.image.revision:8fb01a2a4e9ead1e5ca8e6652044cac1782d5e04 org.opencontainers.image.source:https://github.com/felddy/weewx-docker org.opencontainers.image.title:WeeWX org.opencontainers.image.vendor:Geekpad org.opencontainers.image.version:4.0.0]

@Nornode Thanks for the output.
That image's revision is from the wrong branch: 8fb01a2a4e9ead1e5ca8e6652044cac1782d5e04
Looks like I built v4.0.0-pre.3+usb off the develop branch by accident.  Sorry about that.  I just published v4.0.0-pre.4+usb from the correct branch.
This new test image should be labeled with revision c79bf45d236ac5f0f8e838d06697ae8ef25d55d7.
Please pull and test again.

Okay, pulled and I think it's very close to be working!
Yet, there are still some quirks...
Starting the container gives me the following:
Start log output from container...
May 27 21:25:14 syslogd started: BusyBox v1.30.1
May 27 21:25:18 weewx[19] INFO __main__: Initializing weewx version 4.0.0
May 27 21:25:18 weewx[19] INFO __main__: Using Python 3.8.3 (default, May 20 2020, 19:06:13)  [GCC 8.3.0]
May 27 21:25:18 weewx[19] INFO __main__: Platform Linux-4.19.106-armv7l-with-glibc2.4
May 27 21:25:18 weewx[19] INFO __main__: Locale is 'C.UTF-8'
May 27 21:25:18 weewx[19] INFO __main__: Using configuration file /data/weewx.conf
May 27 21:25:18 weewx[19] INFO weewx.engine: Loading station type FineOffsetUSB (weewx.drivers.fousb)
May 27 21:25:18 weewx[19] INFO weewx.drivers.fousb: driver version is 1.20
May 27 21:25:18 weewx[19] INFO weewx.drivers.fousb: polling mode is PERIODIC
May 27 21:25:18 weewx[19] INFO weewx.drivers.fousb: polling interval is 60
May 27 21:25:18 weewx[19] INFO weewx.drivers.fousb: found station on USB bus= device=
May 27 21:25:18 weewx[19] CRITICAL weewx.drivers.fousb: Unable to claim USB interface 0: [Errno 13] Access denied (insufficient permissions)
May 27 21:25:18 weewx[19] ERROR weewx.engine: Import of driver failed: [Errno 13] Access denied (insufficient permissions) (<class 'weewx.WeeWxIOError'>)
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****  Traceback (most recent call last):
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/drivers/fousb.py", line 1037, in openPort
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      self.devh.claimInterface(self.usb_interface)
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/opt/venv/lib/python3.8/site-packages/usb/legacy.py", line 230, in claimInterface
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      util.claim_interface(self.dev, interface)
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/opt/venv/lib/python3.8/site-packages/usb/util.py", line 205, in claim_interface
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      device._ctx.managed_claim_interface(device, interface)
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/opt/venv/lib/python3.8/site-packages/usb/core.py", line 102, in wrapper
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      return f(self, *args, **kwargs)
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/opt/venv/lib/python3.8/site-packages/usb/core.py", line 159, in managed_claim_interface
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      self.managed_open()
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/opt/venv/lib/python3.8/site-packages/usb/core.py", line 102, in wrapper
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      return f(self, *args, **kwargs)
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/opt/venv/lib/python3.8/site-packages/usb/core.py", line 120, in managed_open
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      self.handle = self.backend.open_device(self.dev)
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/opt/venv/lib/python3.8/site-packages/usb/backend/libusb1.py", line 786, in open_device
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      return _DeviceHandle(dev)
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/opt/venv/lib/python3.8/site-packages/usb/backend/libusb1.py", line 643, in __init__
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      _check(_lib.libusb_open(self.devid, byref(self.handle)))
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/opt/venv/lib/python3.8/site-packages/usb/backend/libusb1.py", line 595, in _check
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      raise USBError(_strerror(ret), ret, _libusb_errno[ret])
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****  usb.core.USBError: [Errno 13] Access denied (insufficient permissions)
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****  During handling of the above exception, another exception occurred:
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****  Traceback (most recent call last):
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/engine.py", line 103, in setupStation
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      self.console = loader_function(config_dict, self)
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/drivers/fousb.py", line 233, in loader
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      return FineOffsetUSB(**config_dict[DRIVER_NAME])
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/drivers/fousb.py", line 968, in __init__
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      self.openPort()
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/drivers/fousb.py", line 1041, in openPort
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****      raise weewx.WeeWxIOError(e)
May 27 21:25:18 weewx[19] CRITICAL weewx.engine:     ****  weewx.WeeWxIOError: [Errno 13] Access denied (insufficient permissions)
May 27 21:25:18 weewx[19] CRITICAL __main__: Unable to load driver: [Errno 13] Access denied (insufficient permissions)
May 27 21:25:18 weewx[19] CRITICAL __main__:     ****  Exiting...

It leads me to think... Does the user running weewx process have root privileges?
Updated the start script to keep the container running:
docker create \
  -i \
  -t \
  --privileged \
  --name=$name \
  --hostname=$name \
  --net=host \
  --device=/dev/ttyUSB0 \
  --device=/dev/ttyAMA0 \
  -v /storage/nfs.docker/$name:/data \
  --restart unless-stopped \
  -e TIMEZONE=Europe/Helsinki \
  -e WEEWX_UID=weewx \
  -e WEEWX_GID=dialout \
  --entrypoint='tail' \
    felddy/weewx:latest -f /dev/null

Law and behold!
root@weewx:/home/weewx/bin# ./wee_device /data/weewx.conf --info >> /data/output-wee_device2.txt
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/lib/python3.8/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "./wee_device", line 78, in <module>
    main()
  File "./wee_device", line 74, in main
    device.configure(config_dict)
  File "/home/weewx/bin/weewx/drivers/__init__.py", line 67, in configure
    self.do_options(options, parser, config_dict, not options.noprompt)
  File "/home/weewx/bin/weewx/drivers/fousb.py", line 382, in do_options
    self.station = FineOffsetUSB(**config_dict[DRIVER_NAME])
  File "/home/weewx/bin/weewx/drivers/fousb.py", line 960, in __init__
    log.info('driver version is %s' % DRIVER_VERSION)
Message: 'driver version is 1.20'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

...
...
...
  File "/usr/local/lib/python3.8/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "./wee_device", line 78, in <module>
    main()
  File "./wee_device", line 74, in main
    device.configure(config_dict)
  File "/home/weewx/bin/weewx/drivers/__init__.py", line 67, in configure
    self.do_options(options, parser, config_dict, not options.noprompt)
  File "/home/weewx/bin/weewx/drivers/fousb.py", line 382, in do_options
    self.station = FineOffsetUSB(**config_dict[DRIVER_NAME])
  File "/home/weewx/bin/weewx/drivers/fousb.py", line 968, in __init__
    self.openPort()
  File "/home/weewx/bin/weewx/drivers/fousb.py", line 1019, in openPort
    dev = self._find_device()
  File "/home/weewx/bin/weewx/drivers/fousb.py", line 1056, in _find_device
    log.info('found station on USB bus=%s device=%s' % (bus.dirname, dev.filename))
Message: 'found station on USB bus= device='
Arguments: ()

But Output into the file however looks "ok":
Using configuration file /data/weewx.conf
Using FineOffsetUSB driver version 1.20 (weewx.drivers.fousb)
Querying the station...
Fine Offset station settings:
                    local time: 2020.05.27 18:07:29 UTC
                  polling mode: PERIODIC

                  abs_pressure: 1021.3000000000001
                   current_pos: 352
                  data_changed: 0
                    data_count: 7
                     date_time: 2007-01-01 12:46
                 hum_in_offset: 17938
                hum_out_offset: 257
                            id: 46175
                 lux_wm2_coeff: 0
                       magic_1: 0x55
                       magic_2: 0xaa
                         model: 57656
                     rain_coef: 17152
                   read_period: 7
                  rel_pressure: 1013.0
                temp_in_offset: 1792
               temp_out_offset: 0
                      timezone: 32
                    unknown_01: 9
                    unknown_18: 0
                       version: 0
                     wind_coef: 39
                     wind_mult: 0

         max.abs_pressure.date: 2020-05-27 05:34
          max.abs_pressure.val: 1032.1000000000001
             max.dewpoint.date: 2018-09-07 14:50
              max.dewpoint.val: 14.9
               max.hum_in.date: 2019-08-31 07:04
                max.hum_in.val: 73
              max.hum_out.date: 2007-01-05 18:55
...
...

Running this:
root@weewx:/home/weewx/bin# ./wee_device /data/weewx.conf --current
Will give me error messages similar or equal to above but actually readings from the station!
{'usUnits': 16, 'dateTime':<PHONE_NUMBER>, 'inHumidity': 41.0, 'inTemp': 20.8, 'outHumidity': None, 'outTemp': 13.600000000000001, 'pressure': 1021.4000000000001, 'windSpeed': 0.0, 'windGust': 0.0, 'windDir': 315.0, 'rain': None, 'radiation': None, 'UV': None, 'status': 0, 'ptr': 384, 'delay': 2, 'rxCheckPercent': 100, 'outTempBatteryStatus': 0, 'rainTotal':<PHONE_NUMBER>9999996}

Well that is some progress.   It looks like we've got a permission error to take care of:
May 27 21:25:18 weewx[19] CRITICAL weewx.drivers.fousb: Unable to claim USB interface 0: [Errno 13] Access denied (insufficient permissions)

We've already got --privileged set, so I'd try setting the WEEWX_UID and WEEWX_GID to a uid/gid that are in the USB group on your machine.    You could try running at as root (0) to test this idea.

Thanks for the help again, and sorry for the slow response!
A bit of life happened in between.

Do worries on the delay.  I've fixed the loop bug when requesting uid 0.  A new release has been pushed to the hub.

Thank you for your help!
I wonder why this won't be the new default weewx image when this is done?...
I'm no longer sure if this is an error related to the container, or if this is in my configs somewhere?
The docker logs complain about the database being locked even if it's just created.

Traceback (most recent call last):
  File "./bin/weewxd", line 261, in <module>
    main()
  File "./bin/weewxd", line 148, in main
    engine = weewx.engine.StdEngine(config_dict)
  File "/home/weewx/bin/weewx/engine.py", line 75, in __init__
    self.loadServices(config_dict)
  File "/home/weewx/bin/weewx/engine.py", line 138, in loadServices
    obj = weeutil.weeutil.get_object(svc)(self,config_dict)
  File "/home/weewx/bin/weewx/wxservices.py", line 77, in __init__
    self.calc = WXCalculate(config_dict,
  File "/home/weewx/bin/weewx/wxservices.py", line 122, in __init__
    self.db_manager = db_binder.get_manager(
  File "/home/weewx/bin/weewx/manager.py", line 530, in get_manager
    self.manager_cache[data_binding] = open_manager(manager_dict, initialize)
  File "/home/weewx/bin/weewx/manager.py", line 678, in open_manager
    return manager_cls.open_with_create(manager_dict['database_dict'],
  File "/home/weewx/bin/weewx/manager.py", line 163, in open_with_create
    dbmanager = cls(connection, table_name=table_name, schema=schema)
  File "/home/weewx/bin/weewx/manager.py", line 813, in __init__
    super(DaySummaryManager, self).__init__(connection, table_name, schema)
  File "/home/weewx/bin/weewx/manager.py", line 83, in __init__
    self.sqlkeys = self.connection.columnsOf(self.table_name)
  File "/home/weewx/bin/weedb/sqlite.py", line 170, in columnsOf
    column_list = [row[1] for row in self.genSchemaOf(table)]
  File "/home/weewx/bin/weedb/sqlite.py", line 170, in <listcomp>
    column_list = [row[1] for row in self.genSchemaOf(table)]
  File "/home/weewx/bin/weedb/sqlite.py", line 159, in genSchemaOf
    for row in self.connection.execute("""PRAGMA table_info(%s);""" % table):
**sqlite3.OperationalError: database is locked**

relevant(?) part of my weewx.conf (in /data)
[DatabaseTypes]

    # Defaults for SQLite databases
    [[SQLite]]
        driver = weedb.sqlite
        SQLITE_ROOT = /data

The DB file is created but maintains a size of zero:
-rw-r--r--    1 root     root           0 Jun  3 23:00 weewx.sdb

After further research I can't find anything that points to this not being something in the container itself. @felddy could you think if anything that might prevent writes/db locks?


Packages which normalize casing in import path comment don't show

Our organisation name is Teamwork, and our packages are github.com/Teamwork/<name>.
For historical reasons, we've always used lowercase import paths: github.com/teamwork/<name>; I recently added some import comments to enforce this to prevent confusion down the line (to prevent e.g the recent logrus confusion):
package test // import "github.com/teamwork/test"

It seems that this confuses godoc.org. Any packages with such an import don't have working documentation pages.
For example for the github.com/teamwork/test example I fixed it with:
https://github.com/Teamwork/test/commit/c3703d09f4f6ee38d5aa06054007c149bd050937
A still-broken example is https://godoc.org/github.com/Teamwork/mailaddress, which has the import path enforcement, but doesn't show as either https://godoc.org/github.com/Teamwork/mailaddress or  https://godoc.org/github.com/teamwork/mailaddress

I got a local development environment running, and I have this error in the logs:
2017/08/26 16:03:51 web   fetch: 411 notfound: Github import path has incorrect case. github.com/teamwork/mailaddress

Which is due to this check: https://github.com/golang/gddo/blob/master/gosrc/github.go#L130
Commenting that check out fixes it.
I'm not sure what the best way to fix it is, as this is before any Go code is parsed.

I simply want to ask this question first. Is it a viable option for you to rename your GitHub organization from Teamwork to teamwork, so that the canonical URL of your repos would match the canonical import path you've chosen to use?

I simply want to ask this question first. Is it a viable option for you to rename your GitHub organization from Teamwork to teamwork

This is good question, but tricky because there is a lot tied in to our GitHub account (not just Go, also other languages/environments).
Predicting what will break is not so easy. Even worse, it's not easy to test if everything works, and failures related to the rename may not be noticed for days, weeks, or even months, and many of these errors would likely be confusing.

Another alternative would be to use Teamwork in the Go import paths; there's no good reason to use the lowercase variant other than that's what someone started using years ago. Renaming this everywhere is also tricky, since it's a bit of an all-or-nothing approach across many packages/repos. It would also break people's local development environments.
It's do-able, but would be fairly time-consuming/costly across the entire company. It would be more cost-effective if I spend time fixing this bug :-)

I understand, thank you for providing that information.
I agree, although it's a bit unfortunate, I don't think what you're doing is breaking any rules, and as such, godoc.org should be able to display documentation with the current setup.
The reason some of those checks exist is because we don't want a normal github.com/user/repo import path to be available at many, many different casing variants thereof:

github.com/user/repo
github.com/User/repo
github.com/user/Repo
github.com/user/REPO
github.com/USER/repo
etc.

That would cause an huge artificial increase in the number of packages available.
At the same time, a non-github import path such as example.com/foo may be case sensitive, so example.com/foo and example.com/Foo may be two completely different Go packages. As bad of an idea as that probably is, I don't think Go disallows it... But I think it should be useful to confirm this before proceeding.

I'm not entirely sure how to fix this; to get the canonical import path from the comment we need to clone the code and parse it; but to clone the code we first want to normalize the path. It's a bit of a catch-22 :-/
Any suggestions would be appreciated.

I have an idea for how to deal with the catch-22.
If my memory of how gddo works is right, I recall there's github.com-specific logic that first checks if the user/repo casing is canonical, and redirects to canonical if not. (Then, the canonical casing gives 404 because the import path comment doesn't match.)
To solve this, we can consider delaying the redirect when the casing doesn't match, and instead fetch the package as normal and see if it happens to have a matching import path comment. If not, then proceed to redirect to canonical casing.
Does that make sense? It seems that it would resolve this bug, but not cause the alternative-casing repos to show up unnecessarily.

Thanks for your feedback @shurcooL!
Simply removing this check would implement your suggestion, since redirection to the canonical import path is already done in doc.newPackage().
I had assumed that this check was added to save disk space, network, or some such, but if that's not an issue, then it's an easy fix.

Oh wait, that's only in cases where an import path is specified.
Perhaps adding a CanonicalPath to &gosrc.Directory would be a solution? Then we can move the logic to doc.newPackage().

I changed the PR. Let me know what you think!


How to access data exposed by facet_return_parent

Description
We have enabled facet_return_parent in the search parameters for a particular field. This is returning the data properly, but we can only see the parent field if using raw requests. Is there a way to see this information if using instantsearch/typesense instantsearch adapter?
Steps to reproduce
facet_return_parent: 'FieldName.Property'
Expected Behavior
I would expect this data to be exposed somewhere by the InstantSearch adapter
Actual Behavior
All facet data and component data doesn't contain the parent data exposed by facet_return_parent
Metadata
Typesense Version: 26
OS: Windows

AFAICT, this is not possible with Instantsearch, since Algolia does not have this feature...


📝 import sorting is messing up spaces between ts type and non-type imports

Environment information
CLI:
  Version:                      1.5.3
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v21.6.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/4.0.2"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Configuration
No response
Playground link
https://biomejs.dev/playground/?indentStyle=space&indentWidth=4&code=aQBtAHAAbwByAHQAIAB7AHQAeQBwAGUAIABDAG8AbgB0AGEAYwB0AE8AcAB0AGkAbwBuACwAIABsAG8AYQBkAFMAdAByAGkAcABlACwAIAB0AHkAcABlACAAUwB0AHIAaQBwAGUARQBsAGUAbQBlAG4AdABzAE8AcAB0AGkAbwBuAHMAfQAgAGYAcgBvAG0AIAAnAEAAcwB0AHIAaQBwAGUALwBzAHQAcgBpAHAAZQAtAGoAcwAnADsA
Code of Conduct

[X] I agree to follow Biome's Code of Conduct

I think this is an issue of whitespace handling by sorting, not just with or without type import.
-import {l1, l3,l2} from 'l';
+import {l1, l2,l3} from 'l';

-import {type m1, m3, type m2} from 'm';
+import {type m1, type m2,m3 } from 'm';

-import { n1, n3, n2} from 'n';
+import { n1, n2,n3 } from 'n';

-import {o1, o3, o2} from 'o';
+import {o1, o2,o3 } from 'o';

Same here, auto add type on saving.
import type React from 'react'  --> import type React from 'react'


pixi-picture should support filterBlendMode

Recreating the issue here after this discussion: https://github.com/pixijs/pixi.js/issues/4079#issuecomment-309747319

Didnt have time for this one. Do you still need it?

I've been using the workaround you helped with in the discussion above, but I'd love to replace that at some point. I can definitely wait on that though.


Html file not loading in WkWebView but works on UIWebView

Attach (recommended) or Link to PDF file here:
Configuration:

Web browser and its version: Loading on WKWEBView
Operating system and its version: iOS
PDF.js version:
Is a browser extension:

Steps to reproduce the problem:
NSString *sPath = [[NSBundle mainBundle] pathForResource:@"pdfjs/web/viewer" ofType:@"html"];
if(isTestLecture){
docSeekPosition = 1;
}
NSString *finalPath = [NSString stringWithFormat:@"%@?file=%@#page=%d",sPath,docPath,(int)docSeekPosition];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:finalPath]];
[self.webView loadRequest:request];

Using the above lines of code to load the HTML . sPath is URL to PDF file on a server (https://......cloudfront.net...../book/AUD-0.01.pdf)
I found a solution where the PDF is being downloaded first and then the URL is being passed to the pdfjs but I do not want to download the file; Instead directly load the file from server in the pdfJS.
It working perfectly fine on UIWebView and we recently changed it to WKWebView and it stopped loading the PDF
What is the expected behavior? (add screenshot)

What went wrong? (add screenshot)
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

It working perfectly fine on UIWebView and we recently changed it to WKWebView and it stopped loading the PDF

Given the somewhat limited information provided, there's unfortunately nothing here that would indicate a bug in the PDF.js library. Rather it would seem to be platform/browser specific, and thus not something that can be fixed here.


FIx broken Invite dialog

Pull Request Description

Important Notes

Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:

[ ] The documentation has been updated, if necessary.
[ ] Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
[ ] All code follows the
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
[ ] Unit tests have been written where possible.

(approving code changes)

@somebody1234 I removed eslint rules for using aria.* instead of native HTML elements, looks like it's not always a good idea...


Many Miscellaneous Typing Fixes

Type of changes

[x] Bug fix
[ ] New feature
[ ] Documentation / docstrings
[ ] Tests
[x] Other

Checklist

[x] I've run the latest black with default args on new code.
[ ] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
[ ] I've added tests for new code.
[x] I accept that @willmcgugan may be pedantic in the code review.

Description
This PR fixes almost the entirety of the remaining bugs that would prevent adding pyright to rich's CI if desired. All of these changes are genuine typing bugs that just aren't flagged by mypy --strict due to limitations in its design or particular quirks with how it works. Some of these changes are especially subtle, but I've included detailed explanations in the commit message for each change.
Are you interested in adding pyright to the CI? It's not necessary, but going through it has helped me find a number of genuinely incorrect things in the codebase.
The remaining 10 errors and 3 warnings thrown by pyright when run on the codebase (but not addressed by this PR and left for possible future work) fall into one of these categories:

4 errors: these are normal typing errors that are errors when using mypy too, but they're incidentally hidden due to the project configuration and CI not having the types-pygments package installed. If you install types-pygments locally and run mypy --strict on the codebase you will see the errors. At their surface they seem like they could be indicative of genuine bugs, but I haven't had a chance to look into them since validating the errors would require me learning some internals of the pygments package beyond the scope of this PR.
1 error: There is a padding property in table.py where the getter/setter don't have symmetric types; pyright is set to lint this asymmetry by default and throw an error. I've inspected the code in question and there is no bug or typing error; this is just a stylistic complaint from pyright. I see no way to change this without breaking rich's public API so an ignore for this error would need to be added to the file or project if pyright was added to CI.
5 errors: A variable is possibly unbound: these occur in cases where there is code that uses the iterating variable x after a for x in y has closed, but without setting a default value for x. I wasn't sure how you'd feel about merging code to work around this type of error. Leave it? Add code to init x? Look at it to see if it can be refactored?
3 warnings: warning: TypeVar "DefaultType" appears only once in generic function signature: These occur in the PromptBase class where the class is not a generic of DefaultType, but nonetheless uses these variables alone in class methods. I've inspected the methods in question and the DefaultType in these cases can safely be replaced with object; another possibility is to make the class a proper generic of DefaultType too. However, this latter option would be a bit awkward for usage. These warnings are addressed with #1607

I still intend to at some point make a pass on the codebase narrowing Any to object where possible, but I'd like to address the existing typing stuff first.

Branch rebased with the commit removed. Apologies, I wasn't intending to make any backward-incompatible changes there and should have tested as carefully as I did the other things.

I think I have a good handle now of typed descriptors, their interactions with the project, and what the best approach for us is here. In particular, typing the descriptor to indicate it can only belong to the class we intend to use it with obviates the need to make separate getter methods or pepper the implementation with excessive casts. I'm going to open a new PR with it when it's ready.

The pick_bool function seems to be only used as A ?? B ?? False if PEP 505 is ever accepted, or A ?? bool(B) I guess.


Hindi characters in markdown are not being rendered properly

I noticed that Hindi characters are not being render properly in markdown file. It happens only with list.

VSCode Version: 1.19.3
OS Version: Ubuntu 17.10

Steps to Reproduce:

Copy the following code in markdown file in ordered list "वो ऐसा क्या है जो हमारे अंदर भी है और बाहर भी है। जिसकी वजह से हम सब हैं। जिसने इस सृष्टि की रचना की है।"

Does this issue occur when all extensions are disabled?: Yes
Impact: minimum as selection, search, final view, and copy paste to other files are ok.

Ok, here's what I see in the current insiders build after pasting in the text:

I can sometimes trigger the invalid glyph while editing the text itself. It also shows up in the editor.
Do you see this problem after pasting in the text or only while editing the text? Can you please test this on VS Code insiders

I have noticed that the issue is not with list but with number of spaces in starting. In above picture, I left 3 spaces before 1st line, 6 spaces before 2nd line, and 11 spaces before 3rd line. One more observation, it is not related to MD files only, I have found it on text, and file with no extension. However I didn't find the issue on  HTML, JS, JSON etc. files .

This issue like looks the same as the one with Tamil (https://github.com/Microsoft/vscode/issues/22352). It seems that all Indic languages are having this issue.


[with-jest] Upgrade to jest 22 and so remove raf deps

Thanks @timneutkens for your fast feedback :+1: , can I ask you to take a look at #3423 ?


Domains search by "nsLdhName" not working as expected

Hi, I'm currently implementing RDAP using your code.
The issue is: when searching domains with a valid nameserver that isn't an IDN (eg. ns1.example.com) I get a "400 - Bad Request" response; but when I search using a nameserver that is an IDN and with LDH notation, I get a valid response (eg. "200 - OK" when at least one domain is found).
The problem is at the class DomainSearchServlet private function getPartialSearch, line
if (nsNameLabel.getLabel().equals(nsNameLabel.getULabel())) {
    throw new BadRequestException("Only LDH domain labels are allowed.");
}

As said before, this logic works fine when the nameserver is an IDN and is sent in LDH notation or when the nameserver is sent with unicode chars (in this case the exception is thrown, so it´s ok).
Proposal: instead of comparing the label sent against the U-label and throw the exception when they're equal, the exception should be thrown if the A-label and the label sent aren't equal:
if (!nsNameLabel.getLabel().equals(nsNameLabel.getALabel())) {
    throw new BadRequestException("Only LDH domain labels are allowed.");
}

Greetings!!

Sorry for answering this late, the issue was correctly solved, thanks! =)


Failure by running gekko on raspberry 3

I'm submitting a ...
[x ] bug report
[ ] question about the decisions made in the repository
I get this Message after trying to run gekko 0.6.2 on raspberry 3:
Gekko v0.6.2
       I'm gonna make you rich, Bud Fox.
vents.js:165
     throw er; // Unhandled 'error' event
     ^

rror: listen EADDRINUSE <IP_ADDRESS>:3000
   at Server.setupListenHandle [as _listen2] (net.js:1346:14)
   at listenInCluster (net.js:1387:12)
   at doListen (net.js:1502:7)
   at process._tickCallback (internal/process/next_tick.js:178:19)
   at Function.Module.runMain (internal/modules/cjs/loader.js:697:11)
   at startup (internal/bootstrap/node.js:201:19)
   at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
mitted 'error' event at:
   at Server.WebSocketServer._onServerError (/home/pi/gekko/node_modules/ws/lib/WebSocketServer.js:82:50)
   at Server.emit (events.js:180:13)
   at emitErrorNT (net.js:1366:8)
   at process._tickCallback (internal/process/next_tick.js:178:19)
   [... lines matching original stack trace ...]
   at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)

The documentation on the website seems to be not uptodate.
There is no UIConfig file in web/vue/

That doc was indeed outdated, I fixed it for now. See
941b3de for the exact changes.
Note that the error you posted has to do with another process already listening to port 3000 (required for Gekko). You most likely still have another Gekko process running, you need to stop that first.


cannot distinguish the difference between the execution results of these two run.py commands.

When I interrupt the execution of the Medformer.sh task and query the execution progress in the result file, I cannot distinguish the difference between the execution results of these two run.py commands.
such as:
when i run this job
ADFD Dataset
python
-u run.py
--task_name classification
--is_training 1
--root_path ./dataset/ADFD/
--model_id ADFD-Indep
--model Medformer
--data ADFD
--e_layers 6
--batch_size 128
--d_model 128
--d_ff 256
--patch_len_list 2,4,8,8,16,16,16,16,32,32,32,32,32,32,32,32
--augmentations drop0.5
--swa
--no_inter_attn
--des 'Exp'
--itr 5
--learning_rate 0.0001
--train_epochs 100
--patience 10
python
-u run.py
--task_name classification
--is_training 1
--root_path ./dataset/ADFD/
--model_id ADFD-Indep
--model Medformer
--data ADFD
--e_layers 6
--batch_size 128
--d_model 128
--d_ff 256
--patch_len_list 2,4,8,8,16,16,16,16,32,32,32,32,32,32,32,32
--augmentations none
--swa
--des 'Exp'
--itr 5
--learning_rate 0.0001
--train_epochs 100
--patience 10
i get a result logs is:
classification_ADFD-Indep_Medformer_ADFD_ftM_sl96_ll48_pl96_dm128_nh8_el6_dl1_df256_fc1_ebtimeF_dtTrue_Exp_seed41
classification_ADFD-Indep_Medformer_ADFD_ftM_sl256_ll48_pl0_dm128_nh8_el6_dl1_df256_fc1_ebtimeF_dtTrue_Exp_seed42
classification_ADFD-Indep_Medformer_ADFD_ftM_sl256_ll48_pl0_dm128_nh8_el6_dl1_df256_fc1_ebtimeF_dtTrue_Exp_seed43
classification_ADFD-Indep_Medformer_ADFD_ftM_sl256_ll48_pl0_dm128_nh8_el6_dl1_df256_fc1_ebtimeF_dtTrue_Exp_seed44
classification_ADFD-Indep_Medformer_ADFD_ftM_sl256_ll48_pl0_dm128_nh8_el6_dl1_df256_fc1_ebtimeF_dtTrue_Exp_seed45
It is impossible to distinguish the execution results of these two run.py commands

Yes, you are right. Since our code includes all the baseline methods, any parameters belonging to a specific method are not included in the log name, such as "--stride", "--augmentations", or "--no_inter_attn". Only the parameters shared among all the methods are recorded automatically in the logs.
The "--itr" is set to 5, which means running 5 times (seed41-45) for each script line. So if we want to distinguish the results for multiple script lines, what we did during parameter tuning was just record these specific parameters down manually in order every 5 lines of results  (:з」∠).).

How to continue executing the remaining Medformer.sh tasks?
Or i need to re-execute everything

You can delete any command lines you have already run in the script. Counting from the beginning, each script line will get 5 results for seeds 41-45. For dataset ADFD under subject-independent setup, there is one main experiment script and three scripts for ablation study. We have included all the script lines for the experiments detailed in our paper, including the ablation study, as a reference. Running all the scripts in the Medformer.sh file can be time-consuming.
For users who do not want to reproduce all the results from our paper, it is sufficient to run only the scripts for the specific tasks you are interested in. Creating a temporary shell file to contain only the necessary scripts and running it may be a good choice.

no
I found that if I run the task directly, the results of ablation study overwrite the results of training.
It is recommended not to save each run.py task in the same result, not just the log and results.

Thanks for the suggestion. We will try to update our code later
to distinguish different tasks in the same method.
Best regards,
Yihe Wang
On Wed, Jun 19, 2024 at 3:34 PM jenovasephiroth @.***>
wrote:

no
I found that if I run the task directly, the results of ablation study
overwrite the results of training.
It is recommended not to save each run.py task in the same result, not
just the log and results.
—
Reply to this email directly, view it on GitHub
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_DL4mHealth_Medformer_issues_1-23issuecomment-2D2177962116&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=AC0MeQYEXFA496TzbiV_mQ&m=vjXeR4EkvnX4Ie9S8oiktjZglfJon--L7W2a1_wrALN21icvQ6ifRjrY4SX448-A&s=6D1pabH_xJFVqva3uaYxDEojJ86ddCLLc8oel5n8ZcU&e=,
or unsubscribe
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AIUIJMHSHOAVI5NFGAZGGADZIEYAFAVCNFSM6AAAAABJPTFXHKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZXHE3DEMJRGY&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=AC0MeQYEXFA496TzbiV_mQ&m=vjXeR4EkvnX4Ie9S8oiktjZglfJon--L7W2a1_wrALN21icvQ6ifRjrY4SX448-A&s=MyHIZA5Neh2uUcC2KHUxaqOhSmj2hUeUvP-DToIZNuY&e=
.
You are receiving this because you modified the open/close state.Message
ID: @.***>


Consider inserting modal at end of body

Hi, thanks for the great project!
I noticed that currently, the modal gets inserted into the DOM at the top of the body. For some use cases, this could be undesirable. For example, when Google picks up content for page descriptions, it often goes to the first text on the page. I imagine that in most cases, content in the modal text would not be considered important enough for that to be desired.
The only change needed would be on this line:
https://github.com/robinparisi/tingle/blob/4e4237a49858667cecbf570374016e66b64f9b21/dist/tingle.js#L53
I noticed that this change would also help solve another issue https://github.com/robinparisi/tingle/issues/109 (cc @emmanuelballery)

Hey @yomed,
Done here: https://github.com/robinparisi/tingle/commit/caaa6ff0b8a1a6d8286a4040d07d92f9246a26be
To be honest, since Google crawlers are using a Chrome headless, they can detect hidden content and are able to extract main content. I'm not sure tingle content can be found in meta description but if you have an example, I'm interested!

@robinparisi Thanks for the fix! In seems like in some cases Google ignores the meta description, and instead goes looking for text from the main content. So I was running into that with my project, where it picked up the modal text.

Ok, that's interesting, thanks for the feedback! :smiley:


add set-syntax package, bump package versions

This just adds a command to set syntax for a file without having to click the syntax link at the bottom of the editor.

Cool, can you update the readme? Then all good

Not really sure what to put in there. There are no keyboard bindings or anything, just a command in the command palette

a reference in https://github.com/substantial/atomfiles#installed

Done.


2.0: Query API

Spec: https://github.com/couchbaselabs/couchbase-lite-apiv2/tree/master/query/java

Ticket for JNI Bindings: https://github.com/couchbase/couchbase-lite-android/issues/1118


M2 Mac unknown architecture error

Hi,
I am trying to install lefthook again, since it stopped working suddenly on my M2 Macbook Pro.  I am getting this error:
jon@Jons-MacBook-Pro ~ % lefthook install -f
Traceback (most recent call last):
	2: from /Users/jon/.rbenv/versions/2.6.6/bin/lefthook:23:in `<main>'
	1: from /Users/jon/.rbenv/versions/2.6.6/bin/lefthook:23:in `load'
/Users/jon/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/lefthook-1.2.2/bin/lefthook:12:in `<top (required)>': Unknown architecture:  (RuntimeError)

And when I  check what architecture leefthook recognizes my mac as:
irb(main):001:0> platform = Gem::Platform.new(RUBY_PLATFORM)
=> #<Gem::Platform:0x000000014d33b8c0 @cpu="", @os="darwin", @version="21" @cpu="", @os="darwin", @version="21">

As you can see, the cpu section is empty, that is why I am getting the Unknown architecture error. Maybe this is specific to M2 macs? I need some help :()

Hey! Thank you for the issue! I guess there is something wrong with the ruby interpreter 🤔 but I need to ask my colleagues who has M2 to make sure. Maybe it can be fixed for the gem.
I recommend installing with either
go install github.com/evilmartians/lefthook@latest or with brew install lefthook. You can also download the binary from release attachments.

Hey! It doesn't look like an error on all M2 chips, because I asked a few people who have them, and they don't have such an issue. Is it a builtin ruby executable or an rvm/rbenv one?


[Release process] Continue using Git tags

Would you kindly continue creating tags on master when a version on the branch is considered done i.e. ready to be used by consumers of the plugin.
Master is technically a moving target and some developers or build scripts would prefer to have a clear control on what version of the plugin is being downloaded / integrated in a project.
So one can instead of
cordova plugin add https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git
use
cordova plugin add https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git#X.Y.Z
(where X.Y.X is any existing tag of own choice)
Thanks!

Hello @zarko-tg ! Thank you for your interest!
Just created new tag 0.5.1.
From now, I'll regulary create new tags.

Cheers @VitaliiBlagodir !


lifetime of _ref properties and stored messages

Take this code, for example:
    void send_pubrel(
        packet_id_t packet_id,
        mqtt::optional<std::uint8_t> reason = mqtt::nullopt,
        std::vector<v5::property_variant> props = {}
    ) {

        auto impl =
            [&](auto&& msg, auto const& serialize) {
                {
                    LockGuard<Mutex> lck (store_mtx_);

                    // insert if not registerd (start from pubrel sending case)
                    packet_id_.insert(packet_id);

                    auto ret = store_.emplace(
                        packet_id,
                        control_packet_type::pubcomp,
                        msg
                    );
                    BOOST_ASSERT(ret.second);
                }

                if (serialize) {
                    serialize(msg);
                }
                do_sync_write(msg);
            };

        switch (version_) {
        case protocol_version::v3_1_1:
            impl(
                v3_1_1::basic_pubrel_message<PacketIdBytes>(packet_id),
                h_serialize_pubrel_
            );
            break;
        case protocol_version::v5:
            impl(
                v5::basic_pubrel_message<PacketIdBytes>(packet_id, reason, std::move(props)),
                h_serialize_v5_pubrel_
            );
            break;
        default:
            BOOST_ASSERT(false);
            break;
        }
    }

Imagine passing function a mqtt::v5::property_variant that has a _ref property type.
When the function exits, the data that the _ref property type points to may no longer exist.
Two ways to solve this:

Always convert _ref properties into their real type before storing them for later access.
Any place where a _ref property may be involved can have an optional lifetime keeper parameter provided that preserves the lifetime of the property's data.

I prefer 2, but 1 is much easier to implement. Though it's entirely possible to support both versions of the concept.
It should be noted that it's perfectly fine for mqtt_cpp to send messages to user provided callbacks that are 100% _ref properties, and not provide any kind of lifetime keeper object. The _ref properties in that situation would be backed by the data received from the network, and user code should always assume that as soon as the current function exits, the data will disappear. That puts the responsibility onto user code to manage the lifetime of property data that it receives.
Specifically, mqtt_cpp shouldn't copy that data into some shared pointer owned object, because mqtt_cpp can't predict what the user's code wants to do with the data. If the user wants to keep the data, they can make their own shared pointer. But if there is no method for the user to provide a handle to that shared pointer when providing mqtt_cpp with their vector of property_variants, then mqtt_cpp MUST create a copy of the provided vector that has non-ref properties, so that the lifetime of the data is known.
This all ties together with: #247 and various other issues that I've opened.

I'm not sure I understand perfectly what you mean.
Storing message are only publish and pubrel.
publish already has life_keeper. Similarly, pubrel should have like_keeper.
https://github.com/redboltz/mqtt_cpp/blob/master/include/mqtt/endpoint.hpp#L9515
I think that it is 2nd approach you mentioned.
For storing, it is good enough.

I implement 2nd approach.
If you think there is still problems, please post a new issue.


provide(isSingleton = true)

I am trying to share a presenter between an Android Activity and a Fragment, and am using ContextAwareActivity/ContextAwareFragment, with the same context name. However, the 'by inject' of the presenter object is creating multiple instances (even though I'm specifyig isSingleton in provide).

Hello,
by default, every bean that you declare with provide { } is a singleton. But, using ContextAware components help you automatically drop the configured context. To share a presenter, declare it in a context:
context("YourContext"){
    provide { MyPreenter() }
}

Inject in into your Fragment and Activity. But, the context have to be dropped by the last component, tied to your context: the activity. Only your activity has to be ContextAware.
To better understand, try to make it without ContextAware* component and just call releaseContext(/* your context name */) from onPause or onStopin your Activity.
Hope this is a bit clearer for you.

OK, thanks.  I just made my Fragment a normal one, instead of ContextAware,
and works fine now.
I didn't realise the ContextAware stuff did the release
On Tue, Dec 12, 2017 at 8:33 PM, Arnaud Giuliani<EMAIL_ADDRESS>wrote:

Hello,
by default, every bean that you declare with provide { } is a singleton.
But, using ContextAware components help you automatically drop the
configured context. To share a presenter, declare it in a context:
context("YourContext"){
provide { MyPreenter() }
}
Inject in into your Fragment and Activity. But, the context have to be
dropped by the last component, tied to your context: the activity. Only
your activity has to be ContextAware.
To better understand, try to make it without ContextAware* component and
just call releaseContext(/* your context name */) from onPause or onStopin
your Activity.
Hope this is a bit clearer for you.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Ekito/koin/issues/28#issuecomment-350995959, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABFbJU4jIForrJbFbT8TWFlEWjbLtWo7ks5s_kh4gaJpZM4Q-VfO
.

Also, what is the recommendation way to have inject() retain an instance,
eg. a Presenter, across an Android config change (like device rotation)?
ie. to prevent the usual release in these cases.
On Wed, Dec 13, 2017 at 9:13 AM, Scott Powell<EMAIL_ADDRESS>wrote:

OK, thanks.  I just made my Fragment a normal one, instead of
ContextAware, and works fine now.
I didn't realise the ContextAware stuff did the release
On Tue, Dec 12, 2017 at 8:33 PM, Arnaud Giuliani<EMAIL_ADDRESS>
wrote:

Hello,
by default, every bean that you declare with provide { } is a singleton.
But, using ContextAware components help you automatically drop the
configured context. To share a presenter, declare it in a context:
context("YourContext"){
provide { MyPreenter() }
}
Inject in into your Fragment and Activity. But, the context have to be
dropped by the last component, tied to your context: the activity. Only
your activity has to be ContextAware.
To better understand, try to make it without ContextAware* component and
just call releaseContext(/* your context name */) from onPause or onStopin
your Activity.
Hope this is a bit clearer for you.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Ekito/koin/issues/28#issuecomment-350995959, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABFbJU4jIForrJbFbT8TWFlEWjbLtWo7ks5s_kh4gaJpZM4Q-VfO
.

To retain things over rotation, you must use Koin properties: Inject & set your data to retain as properties, it will be available as long as the application is alive. I'm preparing an article about that pattern point for next weeks.


prometheus_version: latest => failed to get sha256sums.txt

Hi,
A little error :)
FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'url'. Error was a <class 'ansible.errors.AnsibleError'>, original message: Received HTTP error for https://github.com/prometheus/prometheus/releases/download/vlatest/sha256sums.txt : HTTP Error 404: Not Found"}
Best regards

What was the status of Get latest release task in run with prometheus_version: latest?

Hi,
It looks like the version is set but not taken into account in the checksum download task
TASK [cloudalchemy.prometheus : Get latest release] is OK (very long json)
And after
TASK [cloudalchemy.prometheus : Set prometheus version to 2.12.0]

task path: /home/bdupuis/git/vpnssl/ansible/roles/cloudalchemy.prometheus/tasks/preflight.yml:91
Monday 23 September 2019  10:36:53 +0200 (0:00:02.941)       0:00:07.842 ******

ok: [vpnssl-d01-mon] => {
    "ansible_facts": {
        "prometheus_version": "2.12.0"
    },
    "changed": false
}

It looks like for some reason prometheus_version is not passed to Get checksum for {{ go_arch }} architecture task. All this is happening in https://github.com/cloudalchemy/ansible-prometheus/blob/master/tasks/preflight.yml#L75-L101. It is strange that there is any error here as we are constantly checking the validity of that piece of code with molecule playbook at https://github.com/cloudalchemy/ansible-prometheus/blob/master/molecule/latest/playbook.yml
Which ansible version are you using?

ansible 2.8.4
  config file = /home/xxxx/git/vpnssl/ansible/ansible.cfg
  configured module search path = [u'/home/xxxx/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.16 (default, Jul  9 2019, 16:43:02) [GCC 8.3.0]

bump

PR #239 can act as a workaround for this issue.

got the same error on MacOS Mojave
TASK [cloudalchemy.prometheus : Get checksum for amd64 architecture] *****************************************************************************************
objc[4197]: +[NSValue initialize] may have been in progress in another thread when fork() was called.
objc[4197]: +[NSValue initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

this error could be temporary resolved by exporting OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

@x25 this is an ansible problem and not something we can fix here.

In case anyone is looking for a workaround: https://github.com/ansible/ansible/issues/62244#issuecomment-532295957
The following works on MacOS (10.14.6).
$ OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES ansible-playbook site.yml

Another workaround for MacOS Catalina: https://github.com/ansible/ansible/issues/65108#issuecomment-557016371

This is a general python issue on macOS and I do not treat it as an issue with ansible role itself. I am closing this as good workarounds are provided in https://github.com/cloudalchemy/ansible-prometheus/issues/230#issuecomment-559041480

$ cat playbook.yml
---
- name: Run role
  hosts: all
  any_errors_fatal: true
  roles:
    - cloudalchemy.prometheus
  vars:
    prometheus_version: latest

When you run ansible-playbook -v playbook.yml, it will be OK, but if you pass prometheus_version=latest in cmd ansible-playbook -v playbook.yml -e prometheus_version=latest it'll fail:
  msg: 'An unhandled exception occurred while running the lookup plugin ''url''. Error was a <class ''ansible.errors.AnsibleError''>, original message: Received HTTP error for https://github.com/prometheus/prometheus/releases/download/vlatest/sha256sums.txt : HTTP Error 404: Not Found'

$ cat playbook.yml
---
- name: Run role
  hosts: all
  any_errors_fatal: true
  tasks:
    - include_role:
        name: cloudalchemy.prometheus
      vars:
        prometheus_version: latest

If you use in include_role along with vars, it'll also fail to run ansible-playbook -v playbook.yml.
It's all because of variable precedence, vars from -e or vars in include_role has higher priority than set_fact in preflight.yml.


Async Realm open with external package

Support async Realm open using cancellation_tocken package. Fixes #71

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

-3 of 36 (91.67%)  changed or added relevant lines in 3 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.8%) to 87.467%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

lib/src/native/realm_core.dart
8
9
88.89%

lib/src/realm_class.dart
24
26
92.31%

Files with Coverage Reduction
New Missed Lines
%

lib/src/subscription.dart
1
89.74%

Totals

Change from base Build<PHONE_NUMBER>:
-0.8%

Covered Lines:
1996

Relevant Lines:
2282

💛  - Coveralls


Add unit tests for prometheus package

Signed-off-by: yeya24<EMAIL_ADDRESS>Add uni tests for the functions in Prometheus package. I also update the makefile to include test target.

/lgtm
/approve

Thanks!


Auto-closing of issues via PR doesn't work

Gitea version (or commit ref): 1.2.0+6-g46bb1cf
Git version:
Operating system:
Database (use [x]):

[ ] PostgreSQL
[x] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[x] Yes (provide example URL)
[ ] No
[ ] Not relevant

Log gist:

Description
I've tried a few things to automatically close issues when a PR is merged. I haven't found a way to do it.
Neither a commit with the message containing closes #xx nor using closes #xx as title or pr message has any effect.
This is problematic because gitea doesn't display references that are made to the pr / issue in the discussion tab like github does. So there is no indicator if the issue was discussed / handled in another issue / pr.
Screenshots

@lafriks this should be a bug, but not an enhancement.

@lunny It might be both. A bug for not recognizing the "closes #xx" in a commit message after the pr is merged.
Feature request for also supporting closing issues by title / description of the PR.

Is there any plan for this issue?

Fixed since #8866


Fix MaxListenersExceededWarning warning observed when running tests on macOS

...
💼 Compiling project wallet-opt...
   > 👀 Enabling inline
   > Wallet: tact compiler
   > Wallet: func compiler
(node:513) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 uncaughtException listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
   > Wallet: fift decompiler
   > Packaging
   > Wallet
   > Bindings
   > Wallet
   > Reports
   > Wallet
...

The problem is somewhere inside of the func compiler used by Tact

@Gusarich I'm wondering if this can be replicated with @ton-community/func-js since we basically re-use a wasm build of FunC. We could create an issue there and see if someone resolves it for us :)


fix: remove manifestFile to fit gradle 3.x

移除BetaPlugin.groovy#L95，适配 Gradle 3.X

please update latest.release soon.


Django scrapping

how many ideas?

Here is how you can implement scraping using Django:
The first step is to install the necessary libraries. Django comes bundled with an extensive set of utilities for building web crawlers and scrapers. The main libraries we will use are:
Requests: For making HTTP requests to scrape URLs
BeautifulSoup: For parsing HTML and extracting data from response bodies

thank you.
The core technology for web scraping using Django framework usually involves the following components:

Django:

Django is a high-level Python web framework that provides a set of tools and libraries for building web applications.
It offers features like URL routing, template rendering, database connectivity, and handling HTTP requests and responses.

Requests:

The requests library is a widely used Python package for making HTTP requests.
It is used in conjunction with Django to send HTTP requests to the target website and retrieve the web page content.

BeautifulSoup:

BeautifulSoup is a Python library for parsing and navigating HTML and XML documents.
It helps extract data from the HTML received through the requests library.
BeautifulSoup provides methods to find specific HTML elements using CSS selectors or XPath expressions and extract their values.

Scrapy:

Although Django is a powerful framework for web development, it is not specifically designed for web scraping.
To enhance the web scraping capabilities in Django, you can combine it with Scrapy, a popular Python web scraping framework.
Scrapy provides powerful tools and features for crawling and scraping websites efficiently.

Celery:

Celery is a distributed task queue system that can be integrated with Django.
It enables the execution of web scraping tasks asynchronously or in the background.
By using Celery, you can offload the scraping process to separate worker processes or machines, ensuring better performance and scalability.

Database:

Django supports various database backends such as SQLite, MySQL, PostgreSQL, etc.
You can utilize a database to store and persist the scraped data for further processing or presentation.

Django Extensions:

Django Extensions is a package that provides additional useful features for Django projects.
It offers a powerful command-line interface and management commands for executing recurring or scheduled scraping tasks.

These technologies form the core toolkit for web scraping using Django. They provide the necessary functionality to perform HTTP requests, parse HTML content, handle asynchronous tasks, and store scraped data efficiently. Make sure to familiarize yourself with these tools and their documentation to effectively implement web scraping in your Django project. 😊

awasome! u r master.

you are welcome!!
you are master, too


Feature request: QR codes types.

It would be great to have a possibility to change QR types like url or other. I think, most people use QR for links, and scanners do differ URLs and text.

this lib is to create qrcode image, How to do with the text in qrcode is not it's job. Scanner do that.

I've tried to create different types on qr codes here. You can see different types of QR on the left hand, first two are "url" and "text". If you create these two codes with the same content, you'll see they are different.

As far as I can tell, these different "types" are just using different URL schemes. So mailto: call: sms: http: etc. So yeah, the QRCode will look different using the different ones listed because they will be using a different scheme and thus have a different QRCode generated. That being the case, it's not the job of this library to do that, but rather the end user to provide the correct data using a preferred scheme if needed.

I've checked it and I can agree now: text and url qr codes for one link starting with "http://" are the same. Closing the issue.


feat(binary): add sass-embedded binary

see: https://github.com/sass/dart-sass-embedded

https://npmmirror.com/mirrors/sass-embedded/ done


Adding and Choosing TDP values

CodeCarbon version: 2.2.2
Python version: 3.8.19
Operating System: Linux

Description
I was trying to track the emissions of a code and received this message:
[codecarbon WARNING @ 14:50:23] No CPU tracking mode found. Falling back on CPU constant mode.
[codecarbon WARNING @ 14:50:24] We saw that you have a Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz but we don't know it. Please contact us.

What I Did and wish was done
I searched for the proper TDP and did a PR to add it to the CSV file, but I wanted to be able to track it with the right reference value without waiting for a new release. It would be great if you could add a parameter to the function, allowing us to choose the TDP.
Moreover, there is a 3 times larger file on the eco2ai project, which could be very useful to avoid repetitive PRs to add one single TDP. I think I could contribute by writing some code to compare the two, add the missing ones and find inconsistent values (if any).

Hello,
It would be great to automate this part, yes !
Another way is to look at this code : https://github.com/Breakend/experiment-impact-tracker/blob/master/experiment_impact_tracker/cpu/data/scrape_tdp_values.py
See https://github.com/mlco2/codecarbon/issues/400
You could already specify your TDP using the parameter default_cpu_power.
But I realize that it has not been documented in https://mlco2.github.io/codecarbon/parameters.html , sorry.

Thanks for the clarifications.
I checked that code and it seems they used a Wikipedia page that doesn't exist anymore. Maybe it could be achievable using the Intel one and the pages on lists of AMD processors Series (such as this).

Hello,
I have begun doing the comparison I mentioned. Merging the 2 files, it reaches 3749 processors.
Moreover, there are 174 with contrasting values. In 39 of them, the difference seems to be because eco2ai's value is in float, while codecarbon's is in int.
Taking a look at the processor specifications for some of the other incompatible TDPs, in some of them codecarbon has the right value; in others, eco2ai.
Below, I'm sending the table and incompatibility analysis. Hoping to make a pull request, I wanted to know how to deal with the incompatible values. Should I add them to the table with the previous value? Would it create a problem if I inserted float values? Thanks in advance for the feedback.
merged_table.csv
incompability_analysis.txt

Nice job !
In doubt you could keep CodeCarbon value.
You could try to keep float, I saw there is CPU with TDP around 1W so it make sense.

Okay, I will do the pull request using CodeCarbon's values and resend the incompability list. Maybe the issue should remain open or another one should be posted to ask for reviewing those values. I checked some using intel specifications and wikichip.org for AMD chips; and corrected the value when the right one was clear.
In the latter case, it seems Code Carbon's value is rather TDP up instead of TDP for AMD chips. I am not sure which one it should be, so left it as it is in those cases.
While using wikichip I found the following links that may be usuful for webscrapping in the future:

TDP
TDP up

incompatibility_analysis.txt

Thanks a lot !

Closing as PR have been merged.


[1.18.2] statis chamber

DO NOT REPORT AN ISSUE IF YOU HAVEN'T TESTED THE ISSUE WITH THE LATEST VERSION IN CURSEFORGE
**Industrial Foregoing Version:industrial-foregoing-1.18.2-<IP_ADDRESS>-9
**Titanium Version:titanium-1.18.2-3.5.6-38
statis chamber doesn't show working area/ nor does it accept range upgrades

Just to add to this here sense @Warbringer12 touched on the subject.
There is actually a few different machines that don't render there working area.
Sadly I don't have a current list of all of them and this was noticed on a 1.18.2 Stoneblock 3 server.


Create install-collector.sh

This script does a 1 line installation of community maintained collectors from netdata/community github repo
Test results:
cm@shyam-vm1:/etc/netdata$ sudo ./install-collector.sh python.d.plugin/clickhouse

You are about to install a collector that is NOT developed or maintained by Netdata. Would you like to proceed? [y/n]y

Installing collector from community repo...--2022-11-21 22:32:51--  https://raw.githubusercontent.com/netdata/community/main/collectors/python.d.plugin/clickhouse/clickhouse.chart.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14588 (14K) [text/plain]
Saving to: ‘/usr/libexec/netdata/python.d/clickhouse.chart.py’

clickhouse.chart.py                                  100%[===================================================================================================================>]  14.25K  --.-KB/s    in 0.004s

2022-11-21 22:32:52 (3.56 MB/s) - ‘/usr/libexec/netdata/python.d/clickhouse.chart.py’ saved [14588/14588]

--2022-11-21 22:32:52--  https://raw.githubusercontent.com/netdata/community/main/collectors/python.d.plugin/clickhouse/clickhouse.conf
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1415 (1.4K) [text/plain]
Saving to: ‘/etc/netdata/python.d/clickhouse.conf’

clickhouse.conf                                      100%[===================================================================================================================>]   1.38K  --.-KB/s    in 0s

2022-11-21 22:32:52 (14.2 MB/s) - ‘/etc/netdata/python.d/clickhouse.conf’ saved [1415/1415]

"clickhouse: yes"

Successfully restarted Netdata agent

Installed clickhouse collector succesfully.

cm@shyam-vm1:/etc/netdata$ ls -lrt /usr/libexec/netdata/python.d/clickhouse.chart.py
-rw-r--r-- 1 root root 14588 Nov 21 22:32 /usr/libexec/netdata/python.d/clickhouse.chart.py
cm@shyam-vm1:/etc/netdata$ ls -lrt /etc/netdata/python.d/clickhouse.conf
-rw-r--r-- 1 root root 1415 Nov 21 22:32 /etc/netdata/python.d/clickhouse.conf
cm@shyam-vm1:/etc/netdata$ head /etc/netdata/python.d.conf
"clickhouse: yes"
cm@shyam-vm1:/etc/netdata$ date
Mon 21 Nov 2022 10:33:43 PM EET

@thiagoftsm @andrewm4894 @ilyam8
A script that installs collectors from netdata/community repo.

@shyamvalsan there should be a readme in utilities folder maybe that has some info on each script or at least a comment in the script showing example usage.

fyi im going to try it like this:
sudo wget -O /tmp/install-collector.sh https://raw.githubusercontent.com/netdata/community/main/utilities/install-collector.sh && sh /tmp/install-collector.sh charts.d.plugin/speedtest

andrewmaguire@ml-demo-ml-enabled:~$ sudo wget -O /tmp/install-collector.sh https://raw.githubusercontent.com/netdata/community/main/utilities/install-collector.sh && sh /tmp/install-collector.sh charts.d.plugin/speedtest
--2022-11-24 12:06:02--  https://raw.githubusercontent.com/netdata/community/main/utilities/install-collector.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3865 (3.8K) [text/plain]
Saving to: ‘/tmp/install-collector.sh’

/tmp/install-collector.sh                         100%[=============================================================================================================>]   3.77K  --.-KB/s    in 0s

2022-11-24 12:06:02 (30.2 MB/s) - ‘/tmp/install-collector.sh’ saved [3865/3865]

/tmp/install-collector.sh: 12: [: Illegal number:
/tmp/install-collector.sh: 18: [: charts.d.plugin/speedtest: unexpected operator

You are about to install a collector that is NOT developed or maintained by Netdata. Would you like to proceed? [y/n]y

Installing collector from community repo.../tmp/install-collector.sh: 41: [: charts.d: unexpected operator
/tmp/install-collector.sh: 43: [: charts.d: unexpected operator
/tmp/install-collector.sh: 45: [: charts.d: unexpected operator
/tmp/install-collector.sh: 47: [: charts.d: unexpected operator
--2022-11-24 12:06:07--  https://raw.githubusercontent.com/netdata/community/main/collectors/charts.d.plugin/speedtest/speedtest.chart
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-11-24 12:06:07 ERROR 404: Not Found.

--2022-11-24 12:06:07--  https://raw.githubusercontent.com/netdata/community/main/collectors/charts.d.plugin/speedtest/speedtest.conf
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 470 [text/plain]
Saving to: ‘/etc/netdata/charts.d/speedtest.conf’

speedtest.conf                                    100%[=============================================================================================================>]     470  --.-KB/s    in 0s

2022-11-24 12:06:07 (13.4 MB/s) - ‘/etc/netdata/charts.d/speedtest.conf’ saved [470/470]

tee: /etc/netdata/charts.d.conf: Permission denied
"speedtest: yes"

Unable to restart Netdata agent, please follow these instructions to restart manually: https://learn.netdata.cloud/docs/configure/start-stop-restart
/usr/bin/systemctl

@shyamvalsan that does not look like it worked for me

@andrewm4894 you would need to run it as follows (bash instead of sh):
sudo wget -O /tmp/install-collector.sh https://raw.githubusercontent.com/netdata/community/main/utilities/install-collector.sh && sudo bash /tmp/install-collector.sh charts.d.plugin/speedtest

got this now on same machine (maybe we could add option to clobber existing):
andrewmaguire@ml-demo-ml-enabled:~$ sudo wget -O /tmp/install-collector.sh https://raw.githubusercontent.com/netdata/community/main/utilities/install-collector.sh && sudo bash /tmp/install-collector.sh charts.d.plugin/speedtest
--2022-11-24 12:46:29--  https://raw.githubusercontent.com/netdata/community/main/utilities/install-collector.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3865 (3.8K) [text/plain]
Saving to: ‘/tmp/install-collector.sh’

/tmp/install-collector.sh                         100%[=============================================================================================================>]   3.77K  --.-KB/s    in 0s

2022-11-24 12:46:29 (26.7 MB/s) - ‘/tmp/install-collector.sh’ saved [3865/3865]

You are about to install a collector that is NOT developed or maintained by Netdata. Would you like to proceed? [y/n]y

Installing collector from community repo...

A Netdata collector by this name already exists on this system. Exiting...

running on another node fresh i get this:
andrewmaguire@ml-demo-ml-disabled:~$ sudo wget -O /tmp/install-collector.sh https://raw.githubusercontent.com/netdata/community/main/utilities/install-collector.sh && sudo bash /tmp/install-collector.sh charts.d.plugin/speedtest
--2022-11-24 12:48:27--  https://raw.githubusercontent.com/netdata/community/main/utilities/install-collector.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3865 (3.8K) [text/plain]
Saving to: ‘/tmp/install-collector.sh’

/tmp/install-collector.sh                         100%[=============================================================================================================>]   3.77K  --.-KB/s    in 0s

2022-11-24 12:48:27 (22.3 MB/s) - ‘/tmp/install-collector.sh’ saved [3865/3865]

You are about to install a collector that is NOT developed or maintained by Netdata. Would you like to proceed? [y/n]y

Installing collector from community repo...--2022-11-24 12:48:30--  https://raw.githubusercontent.com/netdata/community/main/collectors/charts.d.plugin/speedtest/speedtest.chart.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6498 (6.3K) [text/plain]
Saving to: ‘/usr/libexec/netdata/charts.d/speedtest.chart.sh’

speedtest.chart.sh                                100%[=============================================================================================================>]   6.35K  --.-KB/s    in 0s

2022-11-24 12:48:30 (32.1 MB/s) - ‘/usr/libexec/netdata/charts.d/speedtest.chart.sh’ saved [6498/6498]

--2022-11-24 12:48:30--  https://raw.githubusercontent.com/netdata/community/main/collectors/charts.d.plugin/speedtest/speedtest.conf
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 470 [text/plain]
Saving to: ‘/etc/netdata/charts.d/speedtest.conf’

speedtest.conf                                    100%[=============================================================================================================>]     470  --.-KB/s    in 0s

2022-11-24 12:48:31 (10.9 MB/s) - ‘/etc/netdata/charts.d/speedtest.conf’ saved [470/470]

"speedtest: yes"

Successfully restarted Netdata agent.

Installed speedtest collector succesfully.

@shyamvalsan wonder what this is:
andrewmaguire@ml-demo-ml-disabled:~$ grep 'speedtest' /var/log/netdata/error.log
/etc/netdata/charts.d.conf: line 1: speedtest: yes: command not found
/usr/libexec/netdata/plugins.d/../charts.d/speedtest.chart.sh: line 45: speedtest: command not found
/usr/libexec/netdata/plugins.d/../charts.d/speedtest.chart.sh: line 47: *8/1000: syntax error: operand expected (error token is "*8/1000")
2022-11-24 12:49:53: go.d ERROR: prometheus[prometheus_speedtest_exporter_local] Get "http://<IP_ADDRESS>:9516/metrics": dial tcp <IP_ADDRESS>:9516: connect: connection refused
2022-11-24 12:49:53: go.d ERROR: prometheus[prometheus_speedtest_exporter_local] check failed

anyways - script seems to work - just used it for python clickhouse collector. This is cool, defo should add a note to docs somewhere about how to use it.


Talks and Tools Update

Addition of two automotive security talks and one new tool.
Talks:

TR22: UDS Fuzzing and the Path to Game Over
CCC - Horror Stories From the Automotive Industry

Tool: Caring Caribou Next

Thank you @Cr0wTom! Reviewing and adding. :)


Revert "Merge pull request #814 from bugfix/display_actual_random_seed"

This reverts commit 662d6ef6a6712960f658f7d1bfb16fd9763f70d7, reversing
changes made to 85dd76460a234d5554868f88cc4a157629606684.
Submisison Checklist

[x] Run tests: ./runCmdStanTests.py src/test
[x] Declare copyright holder and open-source license: see below

Summary:
My solution done in #814 turned out to be invalid.
int_argument* random_arg = dynamic_cast<int_argument*>(parser.arg("random")->arg("seed"));
    unsigned int random_seed;
    if (random_arg->is_default()) {
      random_seed = (boost::posix_time::microsec_clock::universal_time() - boost::posix_time::ptime(boost::posix_time::min_date_time)).total_milliseconds();
      random_arg->set_value(random_seed);

The random seed is unsigned int, but the solution done in #814 set the value to the argument which is a int argument (because we want to support -1 as the default value and the value used to get random seeds). And a few hours ago the random_seed has gone outside the int value range, see https://jenkins.mc-stan.org/blue/organizations/jenkins/CmdStan/activity.
Luckily, the random seed used in sampling is still random, just the printed value in stdout and csv is is now again -1, hence I am reopening #803.
Set value ignored it because it tests if the value is valid:
    bool set_value(const T& value) {
      if (is_valid(value)) {
        _value = value;
        return true;
      }
      return false;
    }

Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Rok Češnovar
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

@mcol  would you mind reviewing this. All upstreams tests are currently failing due to this issue.


v9.0.0

Release v9.0.0

Codecov Report

Merging #300 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #300   +/-   ##
=======================================
  Coverage   86.83%   86.83%
=======================================
  Files          39       39
  Lines        3281     3281
=======================================
  Hits         2849     2849
  Misses        432      432

Impacted Files
Coverage Δ

Sources/PusherSwift.swift
67.21% <ø> (ø)

.../Integration/PusherClientInitializationTests.swift
100.00% <ø> (ø)

Continue to review full report at Codecov.

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


PopupMenu visual issues in 3.6 RC1

Tested versions

Reproducible in 3.6 RC1
Not reproducible in 3.5.2 Stable

System information
Windows 10
Issue description
Simply adding a PopupMenu to the scene with some items will result in this look in 3.5.2:

Doing the same thing in 3.6 RC1 will make it look like this

And applying separators on items in 3.6 will make it look like this

Steps to reproduce

Create a new UI scene
Add a PopupMenu node to the scene
Add items to the Popupmenu node
Make the node visible, so you can see the issue

Minimal reproduction project (MRP)
PopupIssue.zip

Haven't bisected, but likely related to:
https://github.com/godotengine/godot/pull/66711
@rsubtil

Haven't bisected, but likely related to: #66711 @rsubtil

Indeed, I've confirmed that reverting that PR (and the follow-ups which fixed regressions from that PR) would solve this issue.
That's one option, but a heavy handed one at this stage, it would be good to at least get the issue debugged a bit to see if the problem is a fundamental one that will require e.g. breaking the behavior again, or an oversight that can be patched easily.

I can have a quick look in the coming days, but if the issue is not simple, I don't think I'll have the availability to fix it. I'll leave any findings if that's the case, maybe someone can pick up from there.

Moving the four add_constant_override() calls to NOTIFICATION_VISIBILITY_CHANGED (the same as the original #41640) seems to solve the issue.
https://github.com/godotengine/godot/blob/67d4b7346f90a9dc4c92a766e6b256168906e573/scene/gui/popup_menu.cpp#L646-L655
Note that there is also a later PR that removes the need for a separate MarginContainer on the master branch.

It looks like the fix #87462 itself may introduce more regressions.
This illustrates the pitfalls of cherry picking from 4.x in areas such as GUI, because of the entangled dependencies.
I guess we must also consider @akien-mga 's test approach of reverting all the popup menu related PRs to 3.5 state.

Fixed by #96557 .