ImportError: cannot import name '_registerMatType' from 'cv2.cv2'

Trying to import cv2 in python 3.9.2 gives me the following error:
File "C:\Users\My Name\AppData\Local\Programs\Python\Python39\lib\site-packages\cv2_init_.py", line 9, in
from .cv2 import _registerMatType
ImportError: cannot import name '_registerMatType' from 'cv2.cv2' (C:\Users\My Name\AppData\Local\Programs\Python\Python39\lib\site-packages\cv2\cv2.cp39-win_amd64.pyd)
This is on Windows 10, with x86 architecture using opencv version (<IP_ADDRESS>)

There is mess with versions:

_registerMatType is a part of OpenCV 4.5.4
but you mention 4.5.1

Please ensure that you have installed one version of OpenCV only.

yeah, uninstalling opencv-python and then reinstalling it with pip fixed this issue

I solved this error on Google Colab by downloading the headless open-cv and of a version below 4.3 because backward compatibility was dropped since 4.3.0. Try the following command in Google Colab:
!pip install "opencv-python-headless<4.3"
Here's a thread from stack overflow on the same issue.

Thank you aQwus . It worked with  !pip install "opencv-python-headless<4.3"

Thanks @aQwus , that fixed it for me too! It's a little scary when your Colab code works one day and then stops working the next day 😬. I wish we had more control over the Colab environments.

I solved this error on Google Colab by downloading the headless open-cv and of a version below 4.3 because backward compatibility was dropped since 4.3.0. Try the following command in Google Colab:
!pip install "opencv-python-headless<4.3"
Here's a thread from stack overflow on the same issue.

@aQwus , thanks man that saved me to

I solved this error on Google Colab by downloading the headless open-cv and of a version below 4.3 because backward compatibility was dropped since 4.3.0. Try the following command in Google Colab:
!pip install "opencv-python-headless<4.3"
Here's a thread from stack overflow on the same issue.

thank you very much, you save me!

My problem was related to diferent versions of opencv modules. You can check it with:
pip list | grep opencv
upgrading all modules to the same version solved my error:
pip install --upgrade opencv-python
pip install --upgrade opencv-contrib-python
pip install --upgrade opencv-python-headless

@pjbelo You must not install all opencv-python versions at once. You need to chose any one of them.

Hi @abhiTronix. Thanks for your comment but I'm not sure if I understood it. I didn't install nothing new. Using pip list | grep opencv I can see the installed versions (that were different). And then I upgraded them. It seems upgraded versions solved the problem. What's wrong with this approach?

Using pip list | grep opencv I can see the installed versions (that were different)

@pjbelo Every OpenCV binary opencv-python, opencv-contrib-python, opencv-python-headless serves different purpose. See docs:

Option 1 - Main modules package: pip install opencv-python
Option 2 - Full package (contains both main modules and contrib/extra modules): pip install opencv-contrib-python
Option 3 - Headless main modules without GUI package: pip install opencv-python-headless
Option 4 - Headless full without GUI package (contains both main modules and contrib/extra modules): pip install opencv-contrib-python-headless

You don't need all of them at once, just select any one of them according to your application. Installing all of them just going to overwrite previous binaries or cause more problem. Hope that helps.

@abhiTronix I did not install any new packages.
Using Google Colab and after installing TensorFlow Object Detection API I had these three packages installed: opencv-python, opencv-contrib-python, opencv-python-headless. Not sure why Google decided to to have them installed or if they are not necessary.
I just updated their versions and that cleared the error. I'm aware that sometimes you need to have packages at a specific version (sometimes older versions) but I guess it was not my case because I got no errors.
Just wanted to share this approach that might help someone else...

@abhiTronix  I did not install any new packages.
Using Google Colab and after installing TensorFlow Object Detection API I had these three packages installed: opencv-python, opencv-contrib-python, opencv-python-headless. Not sure why Google decided to to have them all installed or if they are not necessary. (you can check this here)
I just updated their versions and that cleared the error. I'm aware that sometimes you need to have packages at a specific version (sometimes older versions) but I guess it was not my case because I got no errors.
Just wanted to share this approach that might help someone else...

Hi @abhiTronix , digging a bit deeper:
Google Colab basic setup comes with these packages (at the moment of this comment):
opencv-contrib-python         <IP_ADDRESS>
opencv-python                 <IP_ADDRESS>
After installing TensorFlow Object Detection API, this package is also installed:
opencv-python-headless        <IP_ADDRESS>
So the conflict between theses packages must be the origin of the error.
TensorFlow Object Detection API does not have a direct opencv dependency, as you can see here, so it must be a dependency of a dependency (is this the so called Hell of Dependencies?).
So, following your reasoning the best solution would be to keep opencv-contrib-python and uninstall the other packages, right?
Anyway, updating all already installed packages to the same version also removed conflicts (and the error).
Sorry about taking so much space here. I think this is not even an opencv issue, but a colab/dependencies config issue...

Hi again @abhiTronix, digging a little bit deeper:
This is the reverse tree of dependencies for colab / object-detection on opencv packages (at the moment of this comment):
opencv-contrib-python==<IP_ADDRESS>
opencv-python==<IP_ADDRESS>

albumentations==0.1.12 [requires: opencv-python]
dopamine-rl==1.0.5 [requires: opencv-python>=<IP_ADDRESS>]
imgaug==0.2.9 [requires: opencv-python]

albumentations==0.1.12 [requires: imgaug>=0.2.5,<0.2.7]

lvis==0.5.3 [requires: opencv-python>=<IP_ADDRESS>]

object-detection==0.1 [requires: lvis]
opencv-python-headless==<IP_ADDRESS>

tf-models-official==2.9.2 [requires: opencv-python-headless]

object-detection==0.1 [requires: tf-models-official>=2.5.1]

As you can see, only opencv-contrib-python is a direct dependency. This raises another question:
How sould a developer manage his list of dependencies? If package A depends on opencv-contrib-python and package B depends on opencv-python they (A and B) can't be used at the same time because their dependencies will be in conflict?
Should OpenCV take this in consideration and allow that all OpenCV packages could be installed at the same time avoiding conflicts? I know this does not make sense as direct dependencies, but considering the above case...
I promise I have stopped my digging :-)

I worked on a Nvidia Jetson container. There might be already cv2 beforehand. You could check with import cv2. and see if there is an error.
After I undo the installation of opencv-python. Things works again.

using cv2 on vscode i was having this problem but nothing worked. Turns out that i named my file as "cv2.py" so it was importing itself
"Generally, the Python Circular Import problem occurs when you accidentally name your working file the same as the module name and those modules depend on each other. This way the python opens the same file which causes a circular loop and eventually throws an error."

Please ensure that you have installed one version of OpenCV only.

pip uninstall opencv-python-headless ; pip uninstall  opencv-contrib-python ; pip uninstall opencv-python

Then install only 1 of those 3.

Probably you can manually delete the recursively duplidated cv2 foldres
rm -rf /usr/local/lib/python3.8/dist-packages/cv2/cv2

I solved this error on Google Colab by downloading the headless open-cv and of a version below 4.3 because backward compatibility was dropped since 4.3.0. Try the following command in Google Colab:
!pip install "opencv-python-headless<4.3"
Here's a thread from stack overflow on the same issue.

@aQwus , thanks man that saved me to

I solved this error on Google Colab by downloading the headless open-cv and of a version below 4.3 because backward compatibility was dropped since 4.3.0. Try the following command in Google Colab:
!pip install "opencv-python-headless<4.3"
Here's a thread from stack overflow on the same issue.

hats off to you brother!

This way relly work! Thanks a lot!


bot: Setup bot, list live duels

Welcome!
This is the initial kick for making the Pistols at 10 Blocks discord bot a reality!
This repository was cloned from dojo.js/examples/node/torii-bot, which is a working implementation of a generic bot that accesses a Dojo game from its Torii server. This example was made by Loaf (@ponderingdemocritus) from the Realms/Dojo team, who is co-hosting this hack and can help if there are any issues.
Tasks

[ ] There's a detailed description of how to setup the bot locally on the bot README
[ ] The manifest file required by dojoConfig.ts is here: manifest.json. Copy it to /discord-bot.
[ ] Configure the bot to access Pistols at 10 Blocks Slot deployment at: https://api.cartridge.gg/x/pistols/torii
[ ] Create a simple read command: live_duels. You must create a GraphQL query that reads the Challenge model, where state = ChallengeState.InProgress. For now, it is enough to just list the Duel Ids.

The Challenge model:
#[derive(Model, Copy, Drop, Serde)]
struct Challenge {
    #[key]
    duel_id: u128,
    //-------------------------
    duelist_a: ContractAddress, // Challenger
    duelist_b: ContractAddress, // Challenged
    message: felt252,           // message to challenged
    // progress and results
    state: u8,                  // actually a ChallengeState
    round_number: u8,           // current or final
    winner: u8,                 // 0:draw, 1:duelist_a, 2:duelist_b
    // timestamps in unix epoch
    timestamp_start: u64,       // Unix time, started
    timestamp_end: u64,         // Unix time, ended
}

[ ] Create a simple settings json file that can be read by commands
[ ] Host the bot at a Node server (we can deploy to our CloudFlare account once it's ready)
[ ] Add the bot to a Discord server (we can provide and configure the server)

Notes

Playable deployment: pistols.lootunder.world
Pistols game source code (Cairo contracts + next.js client): github.com/underware-gg/pistols
There is a GraphQL playground to test queries
The bot will query the game using GraphQL. Go to the Dojo Book for reference.
Got questions? Talk to us! If specific about this issue, coding, Pistols, Discord, setup, etc, please comment here. For anything else, go to our Telegram group.

Requirements
What you need to know to make this happen:

Node
Typescript
GraphQL
Be fast, as all other issues depend on this one being ready and deployed.

Hi, may I please take this?

Good evening @rsodre  please can i be assigned to this? Would love to challenge myself

The Hackathon starts on Monday, we will not be assigning or reviewing applications before then to be fair to everyone.

The Hackathon starts on Monday, we will not be assigning or reviewing applications before then to be fair to everyone.

alright chief

Hello @rsodre please I'd love to contribute to this effort, can i please be assigned to this?

All good, @Ugo-X ?
If you need something let me know.

All good, @Ugo-X ? If you need something let me know.

alright chief, I am working on it, and if I need anything, I'll be sure to let you know.

cool, for now you can create the bot app on your own discord user
we opened a server for testing, get in there and we give you admin role:
https://discord.gg/YVDqKCgU

btw, I was looking at our bot template and you'll need the game's manifest file
I added a link to it on the issue description

alright noted will send a PR immediately i am done

hi @rsodre
This is one of the errors ive been hit with following the guide to setup this bot. Please how do i successfully setup thjis repo on my local machine

<img width="1280" alt="Screenshot 2024-04-23 at 12 22 51"https://github.com/underware-gg/pistols-discord-bot/assets/133219527/9b2971f4-c73c-45c5-b8eb-31903c3420b5">
hi @rsodre this is my error trying to set up the discord bot using the setup guide. This has been my block to working on this task
do you think theres a way to combat this, maybe, you can reclone it and see what the issue is.

hey @Ugo-X
I haven't tried the bot myself, but I think you need to move dojoConfig.ts into /src to be picked by the compiler

ok. let me try this
or do you think i should wait for his input to avoid any complications

the error looks clear to me, you can try moving that file and see if you can proceed

the rootDir here is defined as this
"rootDir": "/Users/os/Documents/code/dojo.js/example",
and i don't think this is a current location within the repo. I tried changing it to ./src but then it raised 16 new errors about missing files and dependencies

I'll also try to build it here, but I need some time

ok chief

hey @Ugo-X
I added the Pistols manifest and graphql schema, and fixed all typescript build errors
It is now building except for getMoves, which should be replaced by our own queries
for this issue, it should become getDuels and access the correspondingChallenge model

okay chief, let me pull , merge and build

ok chief. no wonder codegen failed.

This works for getChallenges.graphql...
(need to uncomment documents from codegen.ts before generating)
query getChallenges($state: u8!) {
    challengeModels(where: { state: $state }) {
        edges {
            node {
                duel_id
                state
            }
        }
    }
}

query getTransations {
    transactions {
        edges {
            node {
                id
                transactionHash
                senderAddress
                calldata
            }
        }
        totalCount
    }
}

Try copying the .env.example to .env again

just did, same old error

Should be
TORII_URL=https://api.cartridge.gg/x/pistols/torii
CLIENT_URL=https://pistols.lootunder.world
But anyway its not reading .env on codegen.ts

yeah, the problem is the schema, not even the env file
'

Oh... try bun install again

i tried running codegen and specifying the schema file but it still didn't cut it.

Oh... try bun install again

ok , give me a minute

bun install done

Dis it generate after bun install?
Codegen.js concatenates TORII_URL with /graphql, it looks undefined. You can try replacing the env for the actual url and see if it generates

hi can we do this? since your own repo runs, can you send me maybe a zip file of it, so i unzip and run just bun install and bun serve.
cos this seems to be taking too long

Dis it generate after bun install?
Codegen.js concatenates TORII_URL with /graphql, it looks undefined. You can try replacing the env for the actual url and see if it generates

let me try this

I'm not at my office now, will be out for a few hours

just ran.
codegen successfull

i'm already trying to run build

current status

if i understand this file well, i have to import a discord client ( should be from the social app from issue 5) and then import the player_id from the discord client?
i believe i'm in the right direction?

current status

The argument is state, in that case always InProgress that can be hard-coded to 5
https://github.com/underware-gg/pistols/blob/main/dojo/src/types/challenge.cairo

state fixed in , and the sdk wants an annotation. to do that, i might have to change the import method and install '../node_modules/graphql-request/build/esm/types.js'

i am trying to register the bot commands but i'm getting an error even though oi gave the bot all permissions.
i'm working on fixing that now though

 i am trying to register the bot commands but i'm getting an error even though oi gave the bot all permissions.
i'm working on fixing that now though

also, i think one of our problems is that the .env values are not being read

yes, the problem might be .env not reading the credentials
you can try using dotenv
bun install dotenv

then add to /src/index.ts and to codegen.ts
require('dotenv').config()

yes, the problem might be .env not reading the credentials
you can try using dotenv
bun install dotenv

then add to /src/index.ts and to codegen.ts
require('dotenv').config()

okay chief, i would do that

hi @rsodre
i'm up now and working on this.
so the current active problem is that the project builds successfully but throws up errors when you are trying to serve the files
i'm trying to find ways to fix this


Fips dsa keygen disable

Checklist

[x] documentation is added or updated
[x] tests are added or updated

This is dependent on the FIPS DSA signing PR https://github.com/openssl/openssl/pull/24799.
Disregard the first commit if reviewing.
The other commits are related to DSA keygen

Short answer is No. There are multiple other PR's that are going to conflict with that PR.

(I also didnt want to add this to the other PR because it was too much in the one PR)

rebased with code style fixups

Minor doc NIT fixes.

ping @openssl/committers

Re-ping @openssl/committers for second review please.

Re-ping @openssl/committers for second review please.

This is already approved!!

Will merge when the extended tests pass.

PR/master seems like a strange combo

PR/master seems like a strange combo

It is valid if you need to fix an issue with PR targeting older branches. Yeah, OTOH in many cases it will fail if run on PR for a master branch. Perhaps we could add some additional condition to skip it if the target branch of the PR is master.

Merged to the master branch. Thank you for your contribution.


failed pull images "ottoyiu-k8s-ec2-srcdst"

failed to pull image "ottoyiu-k8s-ec2-srcdst:v0.2.0-3-gc0c26eca",  need to update ecr repository

dup of https://github.com/nwcdlabs/kops-cn/pull/15


Missing Range (Petrol only)

Looks great so far, I'm currently using NR and Bluelinky so this is a great progression
There is a missing entity for me, the fuel range, signified in the vehicle data as dte: value: unit: 3 is miles.
Also would it be possible for an option for the odometer to be in miles also ? No problem if not, I'll just create a template sensor.
vehicle_data:
vehicleLocation:
  coord:
    lat: xxxxxxxxx
    lon: -xxxxxxxxx
    alt: 0
    type: 0
  head: 2
  speed:
    value: 0
    unit: 1
  accuracy:
    hdop: 10
    pdop: 10
  time: '20210410224324'
vehicleStatus:
  airCtrlOn: false
  engine: false
  doorLock: true
  doorOpen:
    frontLeft: 0
    frontRight: 0
    backLeft: 0
    backRight: 0
  trunkOpen: false
  airTemp:
    value: 01H
    unit: 0
    hvacTempType: 1
  defrost: false
  lowFuelLight: false
  acc: false
  hoodOpen: false
  steerWheelHeat: 0
  sideBackWindowHeat: 0
  dte:
    value: 106
    unit: 3
  tirePressureLamp:
    tirePressureLampAll: 0
    tirePressureLampFL: 0
    tirePressureLampFR: 0
    tirePressureLampRL: 0
    tirePressureLampRR: 0
  battery:
    batSoc: 61
    batState: 0
  time: '20210410224323'
odometer:
  value: 4175.7
  unit: 1

one question, about unit, is your odometer value (4175) is in miles or km?

For me, Kia is returning Odometer in km (unit: 1) and evModeRange etc in miles (unit: 3)
I'm just coding up a fix for the units, so it displays km or mi depending on the returned value - should have a PR shortly.

your range has been fixed in latest version, please update.
In the meantime, i am looking at unit

Hi, the odometer is shown in km.

Edit: Ok, please go ahead with PR for the units and let me know when it is ready

done, see #6 - it will need a slight modification as mentioned in the PR - the code base is moving fast 😄

Edit: Ok, please go ahead with PR for the units and let me know when it is ready

done, see #6 - it will need a slight modification as mentioned in the PR - the code base is moving fast 😄

I was working on a different solution and planning to create another PR, but by mistake I have merged it.
Can you please take a look at this and share your thoughts? https://github.com/fuatakgun/kia_uvo/commit/54416d174f4c3af686109505d8cb3cd53a46be9e

It looks good to me. If it works, I'm good with the solution - many ways to get the same end result.
I'd probably import the "km" and "mi" strings from homeassistant.const but that's just because I prefer importing the strings from there if they exist, and then have the following just after the imports in the file -
DISTANCE_UNITS = {1: LENGTH_KILOMETERS, 3: LENGTH_MILES}
and then instead of lines 93-96 I think you can just have:
self._unit = DISTANCE_UNITS[found_unit]
in a similar way to what was in my PR, but I'm fine with the way you've done it too.

Will improve based on your comments, thanks a lot

your range has been fixed in latest version, please update.
In the meantime, i am looking at unit.
5a67b74
Edit: Ok, please go ahead with PR for the units and let me know when it is ready

Just updated, the range says Not Applicable mi

can you please double check now? should be fixed by this commit: https://github.com/fuatakgun/kia_uvo/commit/348ff4f1ed4d254e685c99108a2f71d7c8fd11c2

No still the same I'm afraid. 348ff4f

if you can update your configuration.yaml like this, we can get more information in Configuration -> Logs page
logger:
  default: warning
  logs:
    custom_components.kia_uvo: debug

example log records;
2021-04-11 14:52:11 DEBUG (MainThread) [custom_components.kia_uvo.sensor] kia_uvo - Check key for dynamic unit generation odometer.value True
2021-04-11 14:52:11 DEBUG (MainThread) [custom_components.kia_uvo.sensor] kia_uvo - Check key for dynamic unit generation vehicleStatus.evStatus.batteryStatus False
2021-04-11 14:52:11 DEBUG (MainThread) [custom_components.kia_uvo.sensor] kia_uvo - Check key for dynamic unit generation vehicleStatus.evStatus.drvDistance.0.rangeByFuel.evModeRange.value True
2021-04-11 14:52:11 DEBUG (MainThread) [custom_components.kia_uvo.sensor] kia_uvo - Check key for dynamic unit generation vehicleStatus.evStatus.drvDistance.0.rangeByFuel.gasModeRange.value True
2021-04-11 14:52:11 DEBUG (MainThread) [custom_components.kia_uvo.sensor] kia_uvo - Check key for dynamic unit generation vehicleStatus.evStatus.drvDistance.0.rangeByFuel.totalAvailableRange.value True
2021-04-11 14:52:11 DEBUG (MainThread) [custom_components.kia_uvo.sensor] kia_uvo - Check key for dynamic unit generation vehicleStatus.battery.batSoc False
2021-04-11 14:52:11 DEBUG (MainThread) [custom_components.kia_uvo.sensor] kia_uvo - Check key for dynamic unit generation last_updated False

I was able to reproduce the issue locally and understood it, fix is on the way.

please enjoy, it should be fixed now: https://github.com/fuatakgun/kia_uvo/commit/c5d55b0df73ea8484870073975fd1dd25e7e328d
merged into mainline

Sorry missed the log request. Anyway works great now. Thanks


Approxfun support

ApproxFun now passes all tests using Domains.jl, though there is still some work to be done.
This makes the following changes:

Support convert(Domain{T}, d::Domain) for each of the current domains. We use this to support in with different types.
Allow UnionDomain(::AbstractVector). This may be removed if #9 goes ahead.
Support == and hash for UnionDomain, using a Set to resolve the issue of ordering
#7: Remove + and other synonyms for union
Support arithmetic for intervals and UnionDomain
Support, for example, convert(Domain, Float64), which now returns a FullSpace{Float64}()
Implement setdiff for intervals and UnionDomain
#6: Point is now a domain
Properly support open and closed endpoints for intervals in setdiff and union (TODO: intersect)
Adds minimum, maximum, supremum and infimum. (TODO: maximum(norm, ::Domain) , etc., for higher dimensions.) for UnionDomain and intervals.

Coverage decreased (-2.7%) to 94.915% when pulling 6c137cd790864c5cc0b98aeb190bf724bcc18b32 on approxfun-support into c90debf6a6f96e3d8b8bf1fc151c74f0b59257e8 on master.

Codecov Report

Merging #11 into master will decrease coverage by 2.65%.
The diff coverage is 84.21%.

@@            Coverage Diff             @@
##           master      #11      +/-   ##
==========================================
- Coverage   97.57%   94.91%   -2.66%
==========================================
  Files          23       23
  Lines         535      649     +114
==========================================
+ Hits          522      616      +94
- Misses         13       33      +20

Impacted Files
Coverage Δ

src/domains/trivial.jl
92.59% <100%> (+1.28%)
:arrow_up:

src/generic/setoperations.jl
79.68% <58.62%> (-17.99%)
:arrow_down:

src/generic/domain.jl
75% <60%> (-10.72%)
:arrow_down:

src/domains/simple.jl
90% <83.33%> (-10%)
:arrow_down:

src/generic/arithmetics.jl
92.85% <90%> (+1.94%)
:arrow_up:

src/domains/interval.jl
97.14% <96.72%> (-0.45%)
:arrow_down:

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 c90debf...6c137cd. Read the comment docs.

Coverage decreased (-2.7%) to 94.915% when pulling 704723ed20fa811304810aac9ffd98be999c7dd5 on approxfun-support into c90debf6a6f96e3d8b8bf1fc151c74f0b59257e8 on master.

I think in should never throw an error, a feature that this branch doesn't actually fix.  For example,
1+im in interval(0,1)

throws an error as intervals can't be promoted to Complex128.
In the case of intervals, we would want something like an EmbeddedDomain:
# represent D embedded in `FullSpace{T}()`.
struct EmbeddedDomain{D,T} <: Domain{T}
   domain::D
end

# default is to embed, probably need to check the types makes sense
convert(::Type{Domain{T}}, d::Domain) where T = EmbeddedDomain{typeof(d),T}(d)

# TODO: can we avoid a try block?
function indomain(x::T, d::EmbeddedDomain{T,D}) where {T,D}
try
    return indomain(convert(eltype(D), x), d.domain)
catch InexactError
    return false
end
end

This is related to https://github.com/JuliaApproximation/ApproxFun.jl/issues/267 which came up with integrating delta functions.

Apparently in never throws an error, so yes, I agree we shouldn't either. I was going to reply that the EmbeddedDomain was already possible since there are embedding maps and mapped domains. However, it wasn't working due to the way mapped domains were implemented. They stored the inverse of the map rather than the map itself. I've changed that in the better_maps branch. Domains can now be embedded in a higher-dimensional space, or in the space of a wider type.
That doesn't fix in yet, but it makes it possible.


:bug: Regression on some detection case showcased in the documentation (#371)

This PR also added a noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife, thanks!)
Close #371

Codecov Report
Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (a4b9b01) 89.98% compared to head (5226e8f) 90.06%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #378      +/-   ##
==========================================
+ Coverage   89.98%   90.06%   +0.08%
==========================================
  Files          12       12
  Lines        1208     1238      +30
==========================================
+ Hits         1087     1115      +28
- Misses        121      123       +2

Files
Coverage Δ

charset_normalizer/md.py
95.34% <100.00%> (+0.26%)
:arrow_up:

charset_normalizer/utils.py
84.86% <85.71%> (+0.05%)
:arrow_up:

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


constrained pip to compatible range

Description
Constrained pip to range that supports editable V2 module installation. Verified to update outdated pip as it would any other package.
closes #3552
Self Check:
Strike through any lines that are not applicable (~~line~~) then check the box

[x] Attached issue to pull request
[x] Changelog entry
[ ] Type annotations are present
[ ] Code is clear and sufficiently documented
[ ] No (preventable) type errors (check using make mypy or make mypy-diff)
[ ] Sufficient test cases (reproduces the bug/tests the requested feature)
[ ] Correct, in line with design
[ ] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )

Reviewer Checklist:

[ ] Sufficient test cases (reproduces the bug/tests the requested feature)
[ ] Code is clear and sufficiently documented
[ ] Correct, in line with design

Processing this pull request

Merged into branches master in 3c5f26fa4ead3d7e604257a4dcfab9ac46da6bf6


importing prism-php package breaks other packages

Information:

Prism version: 1.23.0
Plugins: line-numbers
Environment: webpack

Description
Currently importing scripts in webpack ( due to the failure of the babel plugin ) as follows:
// settings
module.exports = {
    alias: {
        'vue$': 'vue/dist/vue.esm.js'
    },
    copyright: '©2020 Percipio.London',
    entry: {
        'app': [
            'prismjs',
            'prismjs/components/prism-bash',
            'prismjs/components/prism-css',
            'prismjs/components/prism-docker',
            'prismjs/components/prism-git',
            'prismjs/components/prism-graphql',
            'prismjs/components/prism-javascript',
            'prismjs/components/prism-json',
            'prismjs/components/prism-markdown',
            'prismjs/components/prism-markup',
            'prismjs/components/prism-sql',
            'prismjs/components/prism-twig',
            'prismjs/components/prism-typescript',
            'prismjs/components/prism-yaml',
            //'prismjs/components/prism-php',
            'prismjs/plugins/line-numbers/prism-line-numbers',
            '../src/fonts/open-sans-regular.woff',
            '../src/fonts/open-sans-regular.woff2',
            '../src/fonts/open-sans-italic.woff',
            '../src/fonts/open-sans-italic.woff2',
            '../src/fonts/open-sans-600.woff',
            '../src/fonts/open-sans-600.woff2',
            '../src/fonts/open-sans-700.woff',
            '../src/fonts/open-sans-700.woff2',
            '../src/fonts/open-sans-800.woff',
            '../src/fonts/open-sans-800.woff2',
            '../src/fonts/source-code-pro-regular.woff',
            '../src/fonts/source-code-pro-regular.woff2',
            '../src/js/app.ts',
            '../src/js/assets/icons.js',
            '../src/css/tailwind-base.pcss',
            '../src/css/tailwind-components.pcss',
            '../src/css/tailwind-utilities.pcss',
            '../src/css/app-components.pcss',
            '../src/css/app-utilities.pcss',
            '../src/css/vendor.pcss',
        ],
        'lazysizes-wrapper': '../src/js/utils/lazysizes-wrapper.ts',
    },
    extensions: ['.ts', '.js', '.vue', '.json'],
    name: 'percipio.london',
    paths: {
        dist: '../../cms/web/dist/',
    },
    urls: {
        criticalCss: 'https://sandbox.percipio.london/',
        publicPath: () => process.env.PUBLIC_PATH || '/dist/',
    },
};

You see the imports, and prism-php being commented out.
Prism works fine ( loading with Prism.highlightAll() ) - inside of a Vue app:
mounted() {
            window.addEventListener('load', () => {
                Prism.highlightAll();
            })
        }

Code highlighting works as expected, line numbers show up.
Now the odd case: The moment prism-php is uncommented and brought into play, the code highlighting breaks completely. No elements added inside of the code block ( can't find any spans or classes with tokens or whatsoever )
If I use Twig/CSS/Javascript/Docker/Git/GraphQL ... they all work perfect, they all break once prism-php is added into play.
Without the php package

With the php package

I can't find any errors in the console or in the buildchain whatsoever which could explain what is going on.

after only loading the php language file I get the following error:
prism-php.js?8e9b:311 Uncaught TypeError: Cannot read property 'tokenizePlaceholders' of undefined
    at eval (prism-php.js?8e9b:311)
    at Object.run (prism.js?c197:705)
    at Object.highlight (prism.js?c197:614)
    at Object.highlightElement (prism.js?c197:582)
    at Object.highlightAllUnder (prism.js?c197:486)
    at Object.highlightAll (prism.js?c197:454)
    at eval (app.ts?53a0:57)
    ```

So definitely something going on here.

Prism languages have dependencies and the one loading Prism files is responsible for resolving them. This is a non-trivial task which is why we provide a few ways for doing so. Please use one of the officially supported methods to load languages. They are guaranteed to work and will continue to work in the future.

If I use Twig/CSS/Javascript/Docker/Git/GraphQL ... they all work perfect

That is because the default entry file of the prismjs package includes the Markup, CSS, JS, and C-like languages. All other languages you manually specified either only depend on those languages or happen to be in the correct load order.
The reason PHP fails is that it also depends on our Markup templating component. (Markup Templating exports the tokenizePlaceholders function you know from the error message.)

This is a quick close to be honest @RunDevelopment as you can see I am importing the markup templating` component as well, still this error persists, the entry points don't do more than simply importing the files.
If I put :
import Prism from 'prismjs';
import 'prismjs/components/prism-bash';
import 'prismjs/components/prism-css';
import 'prismjs/components/prism-docker';
import 'prismjs/components/prism-git';
import 'prismjs/components/prism-graphql';
import 'prismjs/components/prism-javascript';
import 'prismjs/components/prism-json';
import 'prismjs/components/prism-markdown';
import 'prismjs/components/prism-markup';
import 'prismjs/components/prism-sql';
import 'prismjs/components/prism-twig';
import 'prismjs/components/prism-typescript';
import 'prismjs/components/prism-yaml';
import 'prismjs/components/prism-php';
import 'prismjs/plugins/line-numbers/prism-line-numbers';

Inside my main app.ts the error persists.

Also using the babel config as written in the documentation:
module.exports = (type = 'modern', settings) => {
    // common config
    const common = (browserList) => ({
        module: {
            rules: [
                {
                    test: /\.js$/,
                    exclude: settings.exclude,
                    use: {
                        loader: 'babel-loader',
                        options: {
                            cacheDirectory: true,
                            presets: [
                                [
                                    '@babel/preset-env', {
                                    modules: type === 'legacy' ? 'auto' : false,
                                    corejs: {
                                        version: 3,
                                        proposals: true
                                    },
                                    debug: false,
                                    useBuiltIns: 'usage',
                                    targets: {
                                        browsers: browserList,
                                    },
                                }
                                ],
                                [
                                    '@babel/preset-typescript', {
                                    'allExtensions': true,
                                    'isTSX': false,
                                }
                                ],
                            ],
                            plugins: [
                                '@babel/plugin-syntax-dynamic-import',
                                '@babel/plugin-transform-runtime',
                                '@babel/plugin-proposal-class-properties',
                                '@babel/plugin-proposal-object-rest-spread',
                                '@babel/plugin-proposal-nullish-coalescing-operator',
                                '@babel/plugin-proposal-optional-chaining',
                                [
                                    'prismjs', {
                                        'languages': [
                                            'bash',
                                            'css',
                                            'docker',
                                            'git',
                                            'graphql',
                                            'javascript',
                                            'json',
                                            'markdown',
                                            'markup',
                                            'php',
                                            'sql',
                                            'twig',
                                            'typescript',
                                            'yaml'
                                        ],
                                        'plugins': ['line-numbers'],
                                        'theme': 'okaida',
                                        'css': false
                                    }
                                ]
                            ],
                            sourceType: 'unambiguous',
                        },
                    },
                },
            ],
        },
    });
    // configs
    const configs = {
        // development config
        development: {
            // legacy development config
            legacy: {
            },
            // modern development config
            modern: {
                ...common(pkg.browserslist.modernBrowsers),
            },
        },
        // production config
        production: {
            // legacy production config
            legacy: {
                ...common(pkg.browserslist.legacyBrowsers),
            },
            // modern production config
            modern: {
                ...common(pkg.browserslist.modernBrowsers),
            },
        }
    };

    return configs[process.env.NODE_ENV][type];
}

simply using:
import Prism from 'prismjs';
Prism.highlightAll();

still doesn't give me anything.
See screenshots: The plugin loads but seems to be broken / not triggering - code highlighting is not applied, since no components seem to be loaded:

That is because the default entry file of the prismjs package includes the Markup, CSS, JS, and C-like languages. All other languages you manually specified either only depend on those languages or happen to be in the correct load order.

On it's turn is what I meant, all packages work ... only the PHP one doesn't, and does break all the rest when it is being added.
Load all the components --> every component will get code highlighting, working as expected. Add the php component in the mix, none of the languages highlight anymore, remove the component again, and everything magically works.
This wasn't a remark based on "missing dependencies"

Yeah, we get this kind of issue like once every two months, so I'm quick to close...

This wasn't a remark based on "missing dependencies"

I am very sure it was. The error message you provided is a clear giveaway that Markup Templating isn't loaded.

If I put :
import Prism from 'prismjs';
import 'prismjs/components/prism-bash';
import 'prismjs/components/prism-css';
import 'prismjs/components/prism-docker';
import 'prismjs/components/prism-git';
import 'prismjs/components/prism-graphql';
import 'prismjs/components/prism-javascript';
import 'prismjs/components/prism-json';
import 'prismjs/components/prism-markdown';
import 'prismjs/components/prism-markup';
import 'prismjs/components/prism-sql';
import 'prismjs/components/prism-twig';
import 'prismjs/components/prism-typescript';
import 'prismjs/components/prism-yaml';
import 'prismjs/components/prism-php';
import 'prismjs/plugins/line-numbers/prism-line-numbers';

Inside my main app.ts the error persists.

This doesn't include prismjs/components/prism-markup-templating.

Also using the babel config as written in the documentation:

@mAAdhaTTah Could you please check this? It seems right to me.
Just to make sure: @michtio, the plugin is installed via npm, right? (It's the only thing I can't verify from the information you've given.)

@michtio Could you please show us the transformed output file that contains the import Prism from 'prismjs'? Just the imports are enough. The babel plugin is supposed to generate a bunch of import statements for you, so I want to verify that it does so correctly.

Off the top, if you're using the babel plugin, you shouldn't also import all of the dependencies manually. Use import Prism from 'prismjs' only + the babel plugin (which looks correctly configured) and maybe that'll fix it.

@mAAdhaTTah it was the one or the other, I tried it without importing all the rest, still no success whatsoever.
I will try @RunDevelopment his suggestion with importing  prism-markup-templating without the babel setup and report back.

I can already confirm:
    entry: {
        'app': [
            'prismjs',
            'prismjs/components/prism-markup-templating',
            'prismjs/components/prism-bash',
            'prismjs/components/prism-css',
            'prismjs/components/prism-docker',
            'prismjs/components/prism-git',
            'prismjs/components/prism-graphql',
            'prismjs/components/prism-javascript',
            'prismjs/components/prism-json',
            'prismjs/components/prism-markdown',
            'prismjs/components/prism-markup',
            'prismjs/components/prism-sql',
            'prismjs/components/prism-twig',
            'prismjs/components/prism-typescript',
            'prismjs/components/prism-yaml',
            'prismjs/components/prism-php',
            'prismjs/plugins/line-numbers/prism-line-numbers',
            '../src/fonts/open-sans-regular.woff',
            '../src/fonts/open-sans-regular.woff2',
            '../src/fonts/open-sans-italic.woff',
            '../src/fonts/open-sans-italic.woff2',
            '../src/fonts/open-sans-600.woff',
            '../src/fonts/open-sans-600.woff2',
            '../src/fonts/open-sans-700.woff',
            '../src/fonts/open-sans-700.woff2',
            '../src/fonts/open-sans-800.woff',
            '../src/fonts/open-sans-800.woff2',
            '../src/fonts/source-code-pro-regular.woff',
            '../src/fonts/source-code-pro-regular.woff2',
            '../src/js/app.ts',
            '../src/js/assets/icons.js',
            '../src/css/tailwind-base.pcss',
            '../src/css/tailwind-components.pcss',
            '../src/css/tailwind-utilities.pcss',
            '../src/css/app-components.pcss',
            '../src/css/app-utilities.pcss',
            '../src/css/vendor.pcss',
        ],
        'lazysizes-wrapper': '../src/js/utils/lazysizes-wrapper.ts',
    },
    ```

    All these entry points ( with `prism-markup-templating` added, do work for php now )

    **not** using those entrypoints and relying on babel:

    ```
    import { createStore } from './stores/store.js';

import Prism from 'prismjs';
Prism.highlightAll();

// App main
const site = async () => {
    // Async load the vue module
    const [ Vue ] = await Promise.all([
        import(/* webpackChunkName: "vue" */ 'vue'),
        //import(/* webpackChunkName: "prism" */ 'prismjs'),
    ]).then(arr => arr.map(({ default: defaults }) => defaults));

    const store = await createStore(Vue);

    const vm = new Vue({

        el: '#page-container',
        store,
        components: {
            'navigation--main': () => import(/* webpackChunkName: "navigation--main" */ '../vue/organisms/navigations/navigation--main.vue'),
            'notification--cookie': () => import(/* webpackChunkName: "notification--cookie" */ '../vue/molecules/notifications/notification--cookie.vue'),
        },

        data: () => ({}),

        methods: {

            // Pre-render pages when the user mouses over a link
            // Usage: <a href="" @mouseover="prerenderLink">
            prerenderLink: function (e : Event) {
                const head = document.getElementsByTagName("head")[0];
                const refs = head.childNodes;
                const ref = refs[refs.length - 1];

                const elements = head.getElementsByTagName("link");
                Array.prototype.forEach.call(elements, function (el, i) {
                    if (("rel" in el) && (el.rel === "prerender")) {
                        el.parentNode.removeChild(el);
                    }
                });

                if (ref.parentNode && e.currentTarget) {
                    const target : HTMLAnchorElement = <HTMLAnchorElement>e.currentTarget;
                    const prerenderTag = document.createElement("link");
                    prerenderTag.rel = "prerender";
                    prerenderTag.href = target.href;
                    ref.parentNode.insertBefore(prerenderTag, ref);
                }
            },

            printPage() {
                window.print();
            }

        },

        mounted() {
            window.addEventListener('load', () => {
                //Prism.highlightAll();
            })
        }

    })
};

// Execute async function
site().then( (value) => {
});

// Accept HMR as per: https://webpack.js.org/api/hot-module-replacement#accept
if (module.hot) {
    module.hot.accept();
}

with the above babel config, doesn't highlight the code.

with the above babel config, doesn't highlight the code.

That's very strange. Could you please provide a project to reproduce this behavior?

This happens to me too
Error
Error in function eval in ./.yarn/cache/prismjs-npm-1.26.0-15be1ab06b-6de058930c.zip/node_modules/prismjs/components/prism-php.js:339
Cannot read properties of undefined (reading 'tokenizePlaceholders')

./.yarn/cache/prismjs-npm-1.26.0-15be1ab06b-6de058930c.zip/node_modules/prismjs/components/prism-php.js:339
Open in Editor
  337 |
  338 | 	Prism.hooks.add('after-tokenize', function (env) {
> 339 | 		Prism.languages['markup-templating'].tokenizePlaceholders(env, 'php');
  340 | 	});
  341 |
  342 | }(Prism));

+1 Reviving this unexpected error encountered with Prism 1.29 via prism-react-renderer 2.0.6.
Importing several other language packages via require (prism-ruby, prism-pug, prism-python, etc.) successfully, but the app consistently breaks with (and only with) prism-php.
Uncaught TypeError: Cannot read properties of undefined (reading 'tokenizePlaceholders')
    at eval (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/prismjs@1.29.0/node_modules/prismjs/components/prism-php.js:339:40)
    at Object.run (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/prism-react-renderer@2.0.6_react@18.2.0/node_modules/prism-react-renderer/dist/index.mjs:525:15)
    at eval (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/prism-react-renderer@2.0.6_react@18.2.0/node_modules/prism-react-renderer/dist/index.mjs:2753:28)
    at updateMemo (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:12186:19)
    at Object.useMemo (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:13087:16)
    at useMemo (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-experimental/cjs/react.development.js:1814:21)
    at useTokenize (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/prism-react-renderer@2.0.6_react@18.2.0/node_modules/prism-react-renderer/dist/index.mjs:2742:56)
    at Highlight (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/prism-react-renderer@2.0.6_react@18.2.0/node_modules/prism-react-renderer/dist/index.mjs:2771:18)
    at renderWithHooks (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:10855:18)
    at updateFunctionComponent (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:15893:20)
    at beginWork$1 (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:18102:16)
    at HTMLUnknownElement.callCallback (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:20207:14)
    at Object.invokeGuardedCallbackImpl (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:20256:16)
    at invokeGuardedCallback (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:20331:29)
    at beginWork (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:26498:7)
    at performUnitOfWork (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:25327:12)
    at workLoopConcurrent (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:25313:5)
    at renderRootConcurrent (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:25269:9)
    at performConcurrentWorkOnRoot (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:24122:38)
    at workLoop (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/scheduler-experimental/cjs/scheduler.development.js:261:34)
    at flushWork (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/scheduler-experimental/cjs/scheduler.development.js:230:14)
    at MessagePort.performWorkUntilDeadline (webpack-internal:///(app-pages-browser)/./node_modules/.pnpm/next@13.4.12_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/scheduler-experimental/cjs/scheduler.development.js:537:21)

I had the exact same issue as @skullface with Docusaurus 3 and their upgraded prism-react-renderer depend. It breaks until we remove the php language option.

The general issue here remains a combination of doing manual dependency management and including php without including markup-templating before it. If you're having issues with the babel plugin, please file a ticket on that repository with a reproduction and I can look into it: https://github.com/mAAdhaTTah/babel-plugin-prismjs
The general problem is experienced as Cannot read properties of undefined (reading 'tokenizePlaceholders'); depending on the browser, the message may be different, but the lack of tokenizePlaceholders or something similar is how the issue appears. The solution is to add an import or require of 'prismjs/components/prism-markup-templating' before you import php or configure babel-plugin-prismjs to manage the dependencies for you.
Looking over the issues in this thread, they all seem to be covered by the above solution, so I'm going to close this, as this isn't an issue in Prismjs. If you try the above and are still experiencing issues, please provide a reproduction that I can run and investigate.


Coordinate UX

I think this is pretty straightforward as we just need the lat, lon and time coordinates, all other can be discarded. Unstaggering will be done in the variable initialization. However, we should be aware of moving-nest runs and keep the time-dependence of lat and lon for these occasions.

I think this is pretty straightforward as we just need the lat, lon and time coordinates, all other can be discarded.

I disagree with that list, as we also need the projection coordinates (south_north and west_east) and the vertical coordinate (bottom_top). However, it's still straightforward, as hopefully #14 indicates!

Unstaggering will be done in the variable initialization.

Sounds good to me to do the destaggering of coordinates at the same time as data variables.

However, we should be aware of moving-nest runs and keep the time-dependence of lat and lon for these occasions.

In what little xwrf currently has, it assumes that we don't have a moving-nest. This simplifies things greatly with respect to dimension coordinates, so that's what I've stuck with in #14. That being said, moving nests are definitely important to handle eventually, but I'd vote to not worry about that for an initial release milestone.

You're right, I was maybe a bit rash. What I meant was: if we decide to destagger, we don't need to keep the destaggered variables.
To me it is important to obtain clarity in the xarray API. The user should be able to see on a glance which coordinates correspond to the various diagnostics and data. However, I think your PR makes good headway into this direction :)

That being said, moving nests are definitely important to handle eventually, but I'd vote to not worry about that for an initial release milestone.

Seconding the prioritization :)

Maybe we should use #31 as a reason to discuss which coordinates we will have in the dataset at the end.
For the time coordinate, e.g., information in wrfout files is redundant. We have the Times coordinate, which contains timestamps (in string form) and we have XTIME, which contains timedeltas (minutes since simulation start). To avoid too much redundant data, I would propose to just drop XTIME and only keep Time.
The same goes for the spatial coordinates. I would suggest making dropping redundant information a rule. So if it were not too much hassle to compute on the fly, I would propose to keep south_north, west_east and bottom_top (+ staggered? #35) and just drop XLAT, XLONG etc.. This would simply entail adding tutorials on how to generate the lats and longs.
What do you say to these suggestions?

I just remembered this might also apply to data variables. For use_theta_m = 0, the THM and the T field are identical.

@lpilz:  This sounds reasonable to me.

For the time coordinate, e.g., information in wrfout files is redundant. We have the Times coordinate, which contains timestamps (in string form) and we have XTIME, which contains timedeltas (minutes since simulation start). To avoid too much redundant data, I would propose to just drop XTIME and only keep Time.

That makes sense to me for this kind of one-dimension coordinate (so long as Times is parsed into a datetime dimension coordinate as previously intended)!

The same goes for the spatial coordinates. I would suggest making dropping redundant information a rule. So if it were not too much hassle to compute on the fly, I would propose to keep south_north, west_east and bottom_top (+ staggered? #35) and just drop XLAT, XLONG etc.. This would simply entail adding tutorials on how to generate the lats and longs.

I'd disagree with dropping latitude and longitude, however. While it is true that they can be re-generated (with careful handling of datums), it is not always trivial or cheap to compute, particularly with large/dense domains. Having both dimension coordinates and latitudes/longitudes is important for many workflows; a key example of this is projection-correct dynamical calculations (xref https://github.com/Unidata/MetPy/issues/893), where you'll simultaneously need x/west_east, y/south_north and latitude. I'd think we'd be imposing an unnecessary burden on users if we decided to always drop latitude and longitude, especially given there isn't a significant cost to keeping them around (as they aren't dimension coordinates, they can be automatically lazy-loaded just like any data variable).
Also, generalizing from that, I don't think always "dropping redundant information" is a good rule. For example, this rule would mean

drop/not include pressure, since it is redundant from surface pressure, model top pressure, and sigma coordinate
drop/not include geopotential height, since it is redundant from geopotential
drop all the map factors, since they are redundant with the horizontal coordinates
I think redundant data, so long as it is lazy-loaded, still has a place and would be appreciated by users. Perhaps a better rule would be "dropping redundant 0-D and 1-D information"?

@jthielen:  I think you've hit the nail on the head by pointing out that the data is lazy-loaded.  With that in mind, I'm more in favor of not dropping anything unless it's presence creates a problem.  I'm not even sure it's necessary to remove the redundant time coordinates, now that I think about it.
This is one of those things that seems to be an issue of "trying to guess what the user wants."  And my experience over the years is that you should always assume that the user wants everything.  So, I'm now of the opinion that we shouldn't drop anything unless it becomes a problem for us to keep it.

@jthielen you are completely right regarding data variables. My point was mainly on coordinates, though. Here, I feel that we should not include too much information and keep coordinates and dimensions as close to another as possible to avoid confusing the users who are mostly coming from earth and natural sciences. However, I do see your point regarding lat/long data. I didn't know there were applications which actually directly used this info.
My idea for how this could look when all features are implemented would be:
>>> ds = xr.open_dataset('wrfout_d03_2018-10-15_00:00:00').xwrf.process()
>>> list(ds.coords)
['XLAT',
 'XLONG',
 'south_north',
 'west_east',
 'bottom_top',
 'Time']

and
>>> ds = xr.open_dataset('wrfout_d03_2018-10-15_00:00:00').xwrf.process(destagger=False)
>>> list(ds.coords)
['XLAT',
 'XLONG',
 'south_north',
 'west_east',
 'south_north_stag',
 'west_east_stag',
 'bottom_top',
 'bottom_top_stag',
 'Time']

What do you say to these?
@kmpaul if you really want to retain XTIME, I would propose to parse it as a np.timedelta64 dtype. What do you think of this idea?

@lpilz:  Yeah.  If we can process the time-like dimensions into timedelta64 or datetime64 datatypes, that would be ideal.  Just keep in mind that if any changes are made to the raw data (i.e., the DataArray data doesn't exactly match the corresponding data in the original file), then the modification should be stored in the encoding.


Windows installation?

Hi,
Do you have info for Windows installation?

The easiest way to start Openkoda on Windows is to install Docker Engine for Windows.
Then download this docker compose file.
and start instance by running
docker compose up

I've managed to get it working on Windows...
Congrats! This is an awesome project.
I'm willing to spend time to write tutorials, how-to's and code free add-ons (MIT-licensed).


Add extensible context to CommandSpec

Coverage remained the same at 92.874% when pulling 4fe6baf3e2692c7c0c4ab2f1223e0465bd9b51ad on spec-generic into 3ed5cdd032cb251167e3f03a965d9c937d011647 on master.


fix(series): volume & days

⚠ We still won't see negative numbers on % volume ⚠
PR type

[x] Bugfix
[x] Feature
[x] Refactoring

Before submitting this PR, please make sure:

[x] Code builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've didn't break any original functionality
[x] I've posted screenshot of demonstrated change in this PR

Optional

[x] I've tested it on mobile and everything works

What's new? (may be part of changelog)

[x] sorting on series
#839 related
#849  related
#850 related

Screenshot

It's all good to go out 👀

We still won't see negative numbers on % volume

Why is this happening?

Current volume: TotalVolume = add up all nfts price from collection with "BUY" event
Current percentage: Volume changes (%) = ((TotalVolume - TotalVolumeFromYesterday) / TotalVolume) * 100
This looks like you can't have negative numbers as current volume will always be bigger than 24h/7d/30d volume, or I could be wrong.

I see, legit


Clean up and document the codebase

In GitLab by @Asacolips on Jul 16, 2022, 17:00
Summary

Remove vestigial code that came from Dungeon World.
Refactor to simplify code where possible.
Refactor the actor migration code.
Document code with more comments.
Improve the README to explain the fundamental structure of the system.

Why this is important
This isn't really glamorous work or work that will be noticeable by users, but it is a blocker for some of the more impactful features like the sheet builder GUI.
/cc @Asacolips

In GitLab by @Asacolips on Jul 16, 2022, 17:00
marked this issue as related to #18

In GitLab by @mclemente on Nov 28, 2023, 16:40
mentioned in commit 9360b826d63f17634dd366c7acc416444c81d66d


Various improvements

Relax the requirement for glibc on prebuilt binary for x86_64-unknown-linux-gnu.
You can now install cargo-hack using Homebrew tap on macOS and Linux: brew install taiki-e/tap/cargo-hack
Documentation improvements.

Add a complete list of options to readme
Improve docs about installation

Clean up some code

bors r+

Relax the requirement for glibc on prebuilt binary for x86_64-unknown-linux-gnu.

In fact, cargo-hack is not dynamically linked to glibc and it seems that this was not always necessary.
That said, this change is still worth it, as it can prevent such cases from occurring in the future.


Bucket cache for metadata

Utilize S3 to enable persistent cache for dynamically extracted metadata.

Dynamically extracted metadata (e.g. chunk locations retrieved by the DN node) are saved to S3 (or whatever storage system being used).


[Request] linux-cachyos-sched-ext

Link to the package upstream website/repository
linux-cachyos-sched-ext - https://github.com/CachyOS/linux-cachyos/tree/master/linux-cachyos-sched-ext
Utility this package has for you
I am still learning Nix and am working on building this one for myself.  But I really want to experiment with this new CPU Scheduler and it is tempting me to hop on Arch just to give it a try (the easy way).  I think it would be neat if we had additional kernel options in the repo.  For this request I really am just requesting sched-ext.  I realize we don't need a million kernel options :).
Do you consider the package(s) to be useful for every Chaotic-Nyx user?
No, but for a few.
Do you consider the package to be useful for feature testing/preview?

[X] Yes

Are you sure the package isn't available upstream already?

[X] Yes

Does the package's license allow redistributing it?
YES!
Have you searched the issues to ensure this request is unique?

[X] YES!

Have you read the README to ensure this package is not banned?

[X] YES!

More information
No response

Hi @HippieMitch I've added them, but didn't add the "exemples" of schedules, not sure what's the best Nix-way to package them all.

Closed with https://github.com/chaotic-cx/nyx/commit/b59a68c4371708f7e459ad58bea609c64c37a79d (init kernel), https://github.com/chaotic-cx/nyx/commit/b8f8426f8369681521ef6f1c56f3ff53f2cde28e (fix kernel), and https://github.com/chaotic-cx/nyx/commit/4e6d94c4035d1ce87916f1a10d7f993db019b826 (init schedulers)

Guiding for the lost souls:
After following our "How to use on NixOS" , just add this to your configuration:
{
  boot.kernelPackages = pkgs.linuxPackages_cachyos-sched-ext;
  environment.systemPackages =  [ pkgs.scx ];
}

Then, with the new kernel booted:
╰─λ zgrep 'SCHED_CLASS' /proc/config.gz
CONFIG_SCHED_CLASS_EXT=y
╰─λ sudo scx_rusty
21:38:53 [INFO] CPUs: online/possible = 24/32
21:38:53 [INFO] DOM[00] cpumask 00000000FF03F03F (20 cpus)
21:38:53 [INFO] DOM[01] cpumask<PHONE_NUMBER>FC0FC0 (12 cpus)
21:38:53 [INFO] Rusty Scheduler Attached

There are other scx_* binaries for you to play with, or head to https://github.com/sched-ext/scx for instructions of how to write your own.

Hey thanks @PedroHLC!  That is crazy convenient!


Show all container images in Workload view

The images column in workloads lists only shows the first one, subsequent images are hidden behind a +<x> .
To see these images the user has to drill down into the workload and then specific pod

Suggestion - Show list of images on mouse over of +<x>. This won't then consume space in the list

Add a tooltip to the +X more with all of the images in that workload.

@nwmac how does it look?
Since the logic is attached to the formatter and all "image" table cols use that same formatter, it will automatically apply to all "image" table cols.

@AndrewHoffmanQA Just ensure that the images column no longer hides the listed images behind the "+ x more" label. Thanks

image names now populate when the user hovers their mouse over + more. setting this product enhancement ticket to 'done'


how to save the code to generate the flowchart

Hello,
I mean to ask what extension like .py or .cpp is used to save the code?
Thanks

Not sure I follow. It is saved in an intermediate form as a .gv (graphviz) file and then usually it is saved as an image of some kind. It depends on the command line arguments you pass. There is more info if you run
code2flow --help

If I might offer a different interpretation, if you are trying to process a python file, you just do:
code2flow path/to/python/file.py

If for some reason you have a different extension, you can also do something like
code2flow path/to/python/directory/or/file --language py

If I might offer a different interpretation, if you are trying to process a python file, you just do:
code2flow path/to/python/file.py

If for some reason you have a different extension, you can also do something like
code2flow path/to/python/directory/or/file --language py

Thanks @scottrogowski. That's what I was asking.


fix: add missing http filters to the http filter chain

This PR patches HTTP filters on the existing HCM of an HTTP listener's DefaultFilterChain.
Fix https://github.com/envoyproxy/gateway/issues/2742

hey @zhaohuabing thanks for working on the fix + the refactor
can we split up the refactor into another follow PR ? It allows us to back port this into v1.0.0

/restest


Updated Additional Resources section of documentation

Description: Updated Additional Resources section of documentation and added to YouTube videos with excellent playlist of Langchain content from Sam Witteveen
Issue: None -- updating documentation
Dependencies: None
Tag maintainer: @baskaryan

thanks @captivus!


Unable to extract video GUID

youtube-dl.exe -o "27_june_2015_14_263.mp4" "htt
p://www.newstube.ru/media/m24-ru-pokazhet-predstavleniya-mortido-raduga-sudorog-
i-r-j"
[Newstube] m24-ru-pokazhet-predstavleniya-mortido-raduga-sudorog-i-r-j: Download
ing page
ERROR: Unable to extract video GUID; please report this issue on https://yt-dl.o
rg/bug . Make sure you are using the latest version; type  youtube-dl -U  to upd
ate. Be sure to call youtube-dl with the --verbose flag and include its complete
output.

Thanks for the report, it will work in the next version.
For future reports please post the output with the --verbose option.


Error code 999

What does it mean?

No 999 here http://api.fanyi.baidu.com/api/trans/product/apidoc

The third test case in test.js.  The error code will be 999 when from == to


Batch files are executed as SYSTEM user

Description
When double clicking on a batch file, it's executed as SYSTEM user.
USERNAME=SYSTEM
USERPROFILE=C:\Users\OW
When you open a shell on a directory is is executed as the session user.
USERNAME=OW
USERPROFILE=C:\Users\OW
USERPROFILE is good but not USERNAME !
Steps To Reproduce

Edit a batch files with the 2 lines :
SET
PAUSE

Double click the batch file and look at USERNAME

Open a shell and run the batch file

Requirements

eg. Fix crash that occurs when...
eg. Correct action happens when clicking...

Files Version
<IP_ADDRESS>
Windows Version
Window 11 pro 22H2 22261.1555
Log file
debug.log

Thanks for the report. Can you give the following information.

Are you running the bat files as admin?

@Cromagnon31 can you confirm if this is the same as #5648?

No, I just click on it.
If I open a shell at the directory place, the user is the session user.
Strange isn't it ?
De : Josh65-2201 @.***
Envoyé : vendredi 21 avril 2023 15:32
À : files-community/Files
Cc : OlivierW; Author
Objet : Re: [files-community/Files] Batch files are executed as SYSTEM user (Issue #12139)
Thanks for the report. Can you give the following information.

Are you running the bat files as admin?

—
Reply to this email directly, view it on GitHub https://github.com/files-community/Files/issues/12139#issuecomment-1517841059 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQEVBFXXGGE6PSZ3I6HCGTXCKD45ANCNFSM6AAAAAAXG4DF44 .
You are receiving this because you authored the thread.  https://github.com/notifications/beacon/ABQEVBDZS5JGH7NFAQ2LSKDXCKD45A5CNFSM6AAAAAAXG4DF46WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS2PBVKG.gif Message ID: @.***>

No. Quite a bit different I guess.
Batch is executed normally (ie not as administrator) from data storage outside Windows directories.
De : Yair @.***
Envoyé : vendredi 21 avril 2023 15:37
À : files-community/Files
Cc : OlivierW; Mention
Objet : Re: [files-community/Files] Batch files are executed as SYSTEM user (Issue #12139)
@Cromagnon31 https://github.com/Cromagnon31  can you confirm if this is the same as #5648 https://github.com/files-community/Files/issues/5648 ?
—
Reply to this email directly, view it on GitHub https://github.com/files-community/Files/issues/12139#issuecomment-1517847464 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQEVBDSRMG3AFDVS25TIMTXCKEPNANCNFSM6AAAAAAXG4DF44 .
You are receiving this because you were mentioned.  https://github.com/notifications/beacon/ABQEVBCKE2NWY6XEJMUOFITXCKEPNA5CNFSM6AAAAAAXG4DF46WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS2PCB2Q.gif Message ID: @.***>

The issue is tagged as more-info. Do you need more information ?
Do you expect to fix it in a near release ?

In facts it's not necessary for me to have multiple graphical sessions. I'll follow issue #2491.
RemoteFX seems not to be the good horse. It's deprecated since 2021.
https://support.microsoft.com/en-us/topic/kb4570006-update-to-disable-and-remove-the-remotefx-vgpu-component-in-windows-bbdf1531-7188-2bf4-0de6-641de79f09d2
I already use VNC for console management of my server which is hosted somewhere outside.
On Manjaro TigerVncC seems better then X11Vnc.
VNC lacks of encryption then I use it only on local network directly or via VPN. SSH tunnelling is also a way, but I didn't find at this time a Windows vnc client able to manage automatically the tunnel.
An important info : I've removed the "pam-close-systemd_system-dbus.so" and now polkit rights elevation works fine without. #1684 issue is not more applicable.
Is there a link with the fact that the D-Bus session is created by systemd --user ?
I've installed Xrpd on fresh install of Manjaro below is the process to make it working :
Install xorg an xorgxrdp paquet with GUI (-git or -del version seems not uptodate)
May be command line shoud work (not tested) :

sudo pamac install xrdp xorgxrdp

Start xrdp services

sudo systemctl start xrdp xrdp-sesman

At startup

sudo systemctl enable xrdp xrdp-sesman

Modify Xorg section in /etc/xrdp/sesman.ini as explained ;
[Xorg]
param=/usr/lib/xorg

Modify/create /etc/X11/Xwrapper.config
# Allow anyone to start X:
allowed_users=anybody

Modify ~/.xinitrc to make xfce the default manager and not create D-Bus session if already present :
Also modify .xinitrc of others users ans /etc/skel/.xinitrc for future users.

!/bin/bash
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

SESSION=${1:-xfce}

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

get_session(){
        local args=
        if [[ -z $DBUS_SESSION_BUS_ADDRESS ]]; then
        # Need dbus-session
                args+=(dbus-launch --sh-syntax --exit-with-session)
        fi
        case "$1" in
                awesome) args+=(awesome) ;;
                bspwm) args+=(bspwm-session) ;;
                budgie) args+=(budgie-desktop) ;;
                cinnamon) args+=(cinnamon-session) ;;
                deepin) args+=(startdde) ;;
                enlightenment) args+=(enlightenment_start) ;;
                fluxbox) args+=(startfluxbox) ;;
                gnome) args+=(gnome-session) ;;
                i3|i3wm) args+=(i3 --shmlog-size 0) ;;
                jwm) args+=(jwm) ;;
                kde) args+=(startplasma-x11) ;;
                lxde) args+=(startlxde) ;;
                lxqt) args+=(lxqt-session) ;;
                mate) args+=(mate-session) ;;
                xfce) args+=(xfce4-session) ;;
                openbox) args+=(openbox-session) ;;
                *) args+=("$1") ;;
        esac

        echo "${args[*]}"
}

That is all. Rdp connection should work fine !

The issue is tagged as more-info. Do you need more information ?

This is more a reminder for me to come back to this, I haven't had the chance to properly read up on the latest comments.

Can you do us a favor and update the requirements to include the expected behavior?

Hi,
I have deleted a message which was for another project issue.
My Files version is actually <IP_ADDRESS>.
Issue is still there.
The expected behavior is that batch files should be executed as the logged user and not as the SYSTEM user.
Notice that if I open a terminal with the context menu, the user is the logged user.

New feedback for this issue.
Batch is executed with expected user when using contextual menu "Open as administrator" or "Open as other user".
Issue still remain when directly clicking on the batch file name or using contextual menu 'Open".
Another issue appear : if batch is located in "My documents", batch is not executed at all when double clicking on the batch file name or using contextual "Open". batch is not executed and a window pop-up with the message : "File not found, The file you are trying to access may have been moved or deleted".

Actual Windows version : Windows 11 professional 23H2 build 22631.2861
Files : <IP_ADDRESS>
Note that the PC is in a Windows domain and the user too.

A fix for this issue has been merged into main and will be included in the next update.


Fixed headers!

Thank you! I don't know what changed, but GitHub decided #header is no longer valid. (It probably never was to be fair!)


Fixes #173 Support both Role Binding and Cluster Role Binding dependi…

…ng on rbac.limit_to_namespace
Fixes #173
Motivation
Using rbac.rbac.limit_to_namespace allow us to not create a ClusterRole / ClusterRoleBinding if we want multiple helm releases with the same name in different k8s namespaces
Modifications
Added if/then conditions to the template
Verifying this change

[ ] Make sure that the change passes the CI checks.

Seems to be working in my local Minikube
With rbac.limit_to_namespace: true
 $ kubens cogito
Context "minikube" modified.
Active namespace is "cogito".
 $ kubectl get pods
NAME                           READY   STATUS      RESTARTS   AGE
pulsar-bookkeeper-0            1/1     Running     0          4m3s
pulsar-bookkeeper-init-jtk42   0/1     Completed   0          4m3s
pulsar-broker-0                1/1     Running     0          4m3s
pulsar-proxy-0                 1/1     Running     0          4m3s
pulsar-pulsar-init-6bvw4       0/1     Completed   0          4m3s
pulsar-zookeeper-0             1/1     Running     0          4m3s
 $ kubens cogito2
Context "minikube" modified.
Active namespace is "cogito2".
 $ kubectl get pods
NAME                           READY   STATUS      RESTARTS   AGE
pulsar-bookkeeper-0            0/1     Init:0/1    0          45s
pulsar-bookkeeper-init-xsg22   0/1     Completed   0          45s
pulsar-broker-0                0/1     Init:0/2    0          45s
pulsar-proxy-0                 0/1     Init:0/2    0          45s
pulsar-pulsar-init-sbpxx       1/1     Running     0          45s
pulsar-zookeeper-0             1/1     Running     0          45s

@sijie Can you clarify which values you mean?

@frankjkelly - this file https://github.com/apache/pulsar-helm-chart/blob/master/charts/pulsar/values.yaml

@sijie yep but not sure what new values you want me to put there?


Change "ass" to "assertion" in MockReporter.scala

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


fix file relative path issue on mac

This PR fixes #21301
The issue still exists on mac due to the fact that HTMLAnchorElement's attributes['href']?.nodeValue is wrong on mac. Ex: For local files paths the nodeValue is as follows:
'/PathToParentFolder/ ./fiename.ipynb' when it's expected to be: '/PathToParentFolder/fiename.ipynb'

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
5 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.01%) to 42.156%

Files with Coverage Reduction
New Missed Lines
%

extensions/notebook/src/dialog/configurePython/configurePathPage.ts
1
57.02%

extensions/notebook/src/jupyter/serverInstance.ts
4
75.5%

Totals

Change from base Build<PHONE_NUMBER>:
-0.01%

Covered Lines:
28573

Relevant Lines:
62943

💛  - Coveralls

What do you mean in your description by The issue still exists on mac?
The title implies this is fixing this for Macs, am I misreading the description?
Some more description of why this is fixing the issue would be nice too - it's not clear to me why checking whether it's a file schema or not fixes this.

@MaddyDev It looks like you did a rebase instead of a merge, please do a merge from main to get rid of these extra changes


GCM Payload sending error.

First of all thank you for sweet library! But here is some troubles with payload:
       $p256dh = 'BOqfOoMNLxRM0mKrE/WUP3CWF5hIqP9fBvwmjXm1eCFeuztev53xKbXs6m76jl1BTnznHCa4abieKVInHw+2HbA=';
        $auth   = 'fbkbiIno4NIwYZRWc0GXHA==';
        $webPush = new WebPush($apiKeys);
        $message = '{data: "hello"}';
        $res = $webPush->sendNotification($endPoint, $message, $p256dh, $auth, true);

Response:
Catchable fatal error: Argument 2 passed to Mdanter\Ecc\Primitives\CurveParameters::__construct() must be an instance of GMP, resource given, called in /var/www/test.karinagold.ru/push2/vendor/mdanter/ecc/src/Curves/NistCurve.php on line 136 and defined in /var/www/test.karinagold.ru/push2/vendor/mdanter/ecc/src/Primitives/CurveParameters.php on line 39
Call Stack
#   Time    Memory  Function    Location
1   0.1001  240016  {main}( )   .../applu.php:0
2   0.1026  283376  send( ???, ??? )    .../applu.php:109
3   0.1035  340104  Minishlink\WebPush\WebPush->sendNotification( ???, ???, ???, ???, ??? ) .../applu.php:35
4   0.1037  352216  Minishlink\WebPush\WebPush->flush( )    .../WebPush.php:99
5   0.1037  352616  Minishlink\WebPush\WebPush->prepareAndSend( ???, ??? )  .../WebPush.php:142
6   0.1037  353744  Minishlink\WebPush\Encryption::encrypt( ???, ???, ???, ??? )    .../WebPush.php:195
7   0.1043  392688  Mdanter\Ecc\Curves\NistCurve->generator256( ??? )   .../Encryption.php:50
8   0.1043  392824  Mdanter\Ecc\Curves\NistCurve->curve256( )   .../NistCurve.php:149
9   0.1044  397792  Mdanter\Ecc\Primitives\CurveParameters->__construct( ???, ???, ???, ??? )   .../NistCurve.php:136

same error with
        $message = 'hello';
        $res = $webPush->sendNotification($endPoint, $message, $p256dh, $auth, true);

But when sending null payload like:
$res = $webPush->sendNotification($endPoint, null, $p256dh, $auth, true);
Notification receives without any problems...
Can u help me with that? Thanks once again!

Hello,
What version of PHP are you using? Can you please check if the extension GMP is enabled in your php.ini?

PHP 5.6.23
php_gmp.so wasn't enabled. Thank you! Problem solved by adding extension=php_gmp.so to php.ini
Have a nice day! Thank you so much!

A PHP Error was encountered
Severity: 4096
Message:  Argument 2 passed to Mdanter\Ecc\Primitives\CurveParameters::__construct() must be an instance
 of GMP, resource given, called in /var/www/project_name/vendor/mdanter/ecc/src/Curves/NistCurve
.php on line 136 and defined
Filename: Primitives/CurveParameters.php
Line Number: 39
It is working good on localhost. But not working on server.
php_gmp.so is enabled.

I am trying to the same thing on a free hosting site. But I can't edit the php.ini file. Any idea how I can get it to work?

@Minishlink is there any way to catch this error / detect this error message and provide a helpful log indicating that the developer needs to add this to the php.ini

@gauntface Sounds practical, will do!


[Bug] Some Cairo contract read functions not appearing in Interact panel

Steps to reproduce:
Plugin version 0.1.0, use Remote Devnet

Create a new cairo file with following content:

#[starknet::contract]
mod HelloCairo {
    #[storage]
    struct Storage {}

    #[view]
    fn hello_cairo() -> felt252 {
      return 'Hello Cairo!';
    }
}

Compile
Deploy
The "Interact" does not display the hello_cairo() contract method for interaction.

After review - the contract submitted seems to be using "outdated" lancguage constructs/attrbiutes.
The cairo compiler sould probably flag those as "deprecated"??? or give some other warning...

How do we know that the person is using the outdated cairo lang for writing the contract ?


Made bzip2 compression method optional

Sometimes you just don't want unused stuff in your code. This PR adds a no-bzip2 feature for this.
I've seen some people removing it already, so this hopefully will be helpful for them.

Thanks for the suggestion and pull request! :+1:


Code128 machine didn't capture the barcode at all

Hi! Code 128 doesn't match with universal barcode maker and I was using a barcode reader machine for code 128 and it only capture the given barcode image by universal barcode maker software. Please check the attachment, there is a significant difference between both barcode [check the red mark section in image] for same data. one is from "php-barcode" and another one is from "universal barcode maker".

One of the codes could be CodeC

Could you post the PHP code snippet used to make the code please


Possible bug(s) downloading from new History Table

Using 1.4.28
I'll start with the smallest one first. When clicking on the download link next to an episode in History, it adds the title to the queue correctly, but collapses the list so that you would need to re-expand to get a second episode from the series.
Then I foolishly selected a couple episodes using the green checkmark and hit the "Add to Queue" button at the top. All of a sudden every episode from every series was being added to the queue. Probably not the desired result.

"Then I foolishly selected a couple episodes using the green checkmark and hit the "Add to Queue" button at the top. All of a sudden every episode from every series was being added to the queue. Probably not the desired result."
it is the desired result because the green checkmark only shows if you have downloaded the episode previously you can also click it to mark it that you have already downloaded it

Thanks for addressing the first issue. As for the second, um, user error??  :-)

😄 the add to queue is meant to add all new episodes (orange mark) to the queue  - really nice when you are up to date with downloading everything and you only have to go into the history press "refresh" and it checks all series for new episodes and after that you press "Add to Queue" and it adds all the new episodes to the queue


Correct for gradient non-linearity distortions on the SNR maps

@dpapp86 According to our discussions today, I think this is no longer available. If that's the case I'll close this issue.

Sorry, I meant to write "needed". Non-distortion correction is not needed.

right-- i suppose it would be good to also document why it is not needed-- is it because the quantification of SNR is done on the voxel space of the SNR image, and that the SNR and cord segmentation (used to extract SNR on a slice-wise basis) are not affected by those distortions?

After looking at the protocol PDFs I realize that I might have misunderstood @dpapp86. I had understood that distortion correction was turned off for all scans. Looking here https://github.com/spinal-cord-7t/coil-qa-protocol/blob/main/MNI/acdc_7t_spine_073_CoilQA.pdf and here https://docs.google.com/document/d/1rfxDTc-coK96GMKsx5_sBK_srCyuKY7BY51qRYrDmig/edit#heading=h.iytyrwkr1whn I see that distortion correction is ON for all scans EXCEPT coilQA scans (SNR, g-factor, etc). The segmentation is done on the MP2RAGE which is distortion corrected, and that segmentation is used for coilQA images. Therefore, we should visually check if the distortion warrants correction.
Things to consider:

The segmentation is expanded along the cord, so the distortion would have to be significant for the cord mask to not incorporate the cord in the coilQA data.
At one point we will likely choose to restrict analyses to spinal cord levels (ex: C2-T1) so that we are comparing the same levels across coils that may not have the same FOV. When we do that, it may be that the levels that are distorted in the coilQA images are no longer part of the analyses.

Beyond distortion, subject motion could also be cause for mismatch between the MP2RAGE-based mask and the coilQA scans. I would recommend to incorporate in the analysis code a QC output that overlays the mask (used by sct_extract_metric) onto the coilQA scans. I'm happy to help with that once the code is on GitHub and ready to be commented.

The coilQA data is co-registered to the MP2RAGE so that the SC ROI can be overlaid. At the moment, the SNR along the SC ROI is plotted, but there is no visual QA as you described to check the SC ROI on the SNR image itself. This would be a useful addition. The notebook is now on Github BTW (see: https://github.com/spinal-cord-7t/coil-qc-code/blob/main/THS CoilQA code (Kyota).ipynb)


修复zstack绑定多个storage时重复创建disk问题

这个 PR 实现什么功能/修复什么问题:
修复zstack绑定多个storage时重复创建disk问题
是否需要 backport 到之前的 release 分支:

release/2.10.0

Codecov Report

Merging #1057 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

@@            Coverage Diff            @@
##           master   #1057      +/-   ##
=========================================
- Coverage    7.92%   7.89%   -0.03%
=========================================
  Files         356     356
  Lines       56349   56351       +2
=========================================
- Hits         4464    4450      -14
- Misses      51491   51505      +14
- Partials      394     396       +2

Flag
Coverage Δ

#aFlag
7.89% <0%> (-0.03%)
:arrow_down:

Impacted Files
Coverage Δ

pkg/compute/guestdrivers/managedvirtual.go
0% <0%> (ø)
:arrow_up:

pkg/util/rbacutils/rabc.go
72.49% <0%> (-4.54%)
:arrow_down:

pkg/appsrv/response.go
66.15% <0%> (-3.08%)
:arrow_down:

pkg/util/seclib2/seclib.go
95.74% <0%> (+4.25%)
:arrow_up:

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 0b39ff9...e57bda1. Read the comment docs.

/lgtm
/approve


Add an "owner" field to all primary objects

Issue type: Feature request
Originally proposed by @CassioFabius in #979. This would entail adding a new optional ForeignKey field pointing to the User model. Each primary object type (listed below) could be assigned an owning user. Proposed objects include:

Circuits

Provider
Circuit

DCIM

Site
Rack
DeviceType
Device

IPAM

VRF
Aggregate
Prefix
IPAddress
VLAN
Service

Secrets

Secret

Tenancy

Tenant

Would you propose that the object is inherited of not set... Similar to how tenant is inherited for prefixes?

Hi,
I suspect this feature originated from itil practices. If so I would replace "owner" with "accountable" and add responsible.
In itil these are not the same.
http://www.itsmprofessor.net/2011/01/accountable-or-responsible.html
PS: I also needed this and solved this by using custom fields (accountable & responsible).

With the addition of object-based permissions in v2.9, this doesn't seem particularly useful anymore: the new permissions offer a much more flexible approach to designating "ownership" of objects. I'm going to close this issue, but if anyone still has a need for it, please open a new FR citing your specific use case.


Binary vs JSON events

As far as I understand, Eventuous writes/reads events to/from the EventStoreDB using the binary format.
What if a stream also contains JSON events?

In EventStoreDB everything is binary. JSON events have the application/json content type, which is our default serialization format.


Extension not loading

Hey there! thanks for building this!
I'm having an issue with the latest version of the extension (1.1.4) and VSCode (1.56.2) where the extension will not load.
I've attached the log below. Happy to provide anything else if it helps you debug further.
[2021-06-09 20:36:14.502] [exthost] [info] ExtensionService#_doActivateExtension leodevbro.blockman {"startup":false,"extensionId":{"value":"leodevbro.blockman","_lower":"leodevbro.blockman"},"activationEvent":"onStartupFinished"}
[2021-06-09 20:36:14.502] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/lachlanheywood/.vscode/extensions/leodevbro.blockman-1.1.4/out/extension.js
[2021-06-09 20:36:15.085] [exthost] [error] Activating extension leodevbro.blockman failed due to an error:
[2021-06-09 20:36:15.085] [exthost] [error] Error: Cannot invoke loadWASM more than once.
    at Object.t.loadWASM (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-oniguruma/release/main.js:1:4823)
    at TextMateLoader.loadOniguruma (/Users/~~/.vscode/extensions/leodevbro.blockman-1.1.4/out/bracketAlgos/textMateLoader.js:122:19)
    at new TextMateLoader (/Users/~~/.vscode/extensions/leodevbro.blockman-1.1.4/out/bracketAlgos/textMateLoader.js:21:31)
    at new Settings (/Users/~~/.vscode/extensions/leodevbro.blockman-1.1.4/out/bracketAlgos/settings.js:10:31)
    at new DocumentDecorationManager (/Users/~~/.vscode/extensions/leodevbro.blockman-1.1.4/out/bracketAlgos/documentDecorationManager.js:10:25)
    at activate (/Users/~~/.vscode/extensions/leodevbro.blockman-1.1.4/out/extension.js:747:30)
    at Function._callActivateOptional (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:92:14813)
    at Function._callActivate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:92:14486)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:92:12643
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 0)

It also shows an error when I attempt the 'Toggle Enable/Disable' command. Not sure if this is related, or if it is a result of the extension failing to load, but here's that error also:
Command 'Blockman Toggle Enable/Disable' resulted in an error (command 'blockman.toggleEnableDisable' not found)

Hi, maybe there is a conflict to another extension, possibly to Bracket Pair Colorizer 2 (1 works fine, but 2 has conflicts sometimes). You can try uninstalling BPC2, and restart VSCode. Currently I'm searching for the cause of such conflicts.

Hello again, check out this page
https://github.com/CoenraadS/CoenraadS/issues/1
As I see, the solution is to just update VSCode to the latest version.

Confirmed that updating to latest version of VSCode (1.57.0) solves this problem. Thanks, @leodevbro!

Version: 1.72.2 (user setup)
Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075
Date: 2022-10-12T22:15:18.074Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: No
A have tha same issue

@holoubl, I have the same version (1.72.2) of VS Code, and Blockman loads fine. Please try restarting VS Code, maybe twice.

Restarted many times. no effect. I believe to some collision with another extension. But which?

Please try downgrading Blockman to 1.5.9 version and check whether it works or not. If it works, then the update maybe broke something.

Even version 1.5.9 does not work.
but I noticed this box around the code:

The box must be from blockman because after dissabling block man, it disapers. So block man works, but not correctly.

Please show me the settings json files of User and Workspace.

Also, let's move back to this new issue:
https://github.com/leodevbro/vscode-blockman/issues/93
Because your problem seems different.


fluxctl release allow --lock

Currently if you follow along with the https://github.com/weaveworks/flux/blob/master/site/annotations-tutorial.md example between the time you release 1.4.1 and you lock the deployment gets auto-upgraded to latest 1.4.x tag and therefore when you lock it locks on latest version.
I would suggest therefore allowing the "lock" to be passed as a flag to release.
Something similar to:
fluxctl release --workload demo:deployment/podinfo -i stefanprodan/podinfo:1.4.1 --lock --lock-msg="1.4.2 does not work for us"

Other option would be to document step before release to deautomate to avoid automation upgrading the release before being able to lock

Other option would be to document step before release to deautomate to avoid automation upgrading the release before being able to lock

I think that makes sense, I will update the guide


Skip EDPM jobs on content provider irrelevant_files

We are seeing Zuul job freeze issue against different operator changes due to difference in irrelevant_files on content provider and EDPM job.
Keeping the same irrelevant_files list fixes the following issue.
Unable to freeze job graph: Job podified-multinode-edpm-deployment-crc
depends on openstack-k8s-operators-content-provider which was not run.

As a pull request owner and reviewers, I checked that:

[ ] Appropriate testing is done and actually running
[ ] Appropriate documentation exists and/or is up-to-date:

[ ] README in the role
[ ] Content of the docs/source is reflecting the changes

/approve


ppml

@paulofelipe also provided this valuable piece:
Nice to know about this package. I have one suggestion. Nowadays, one of the recommendations to assess the effects of trade policy is to use pair fixed effects (wto book). However, in some settings, this can mean the user will need a method that works with high dimensional fixed effects (in ols or ppml, for example). Otherwise, the estimation can be memory intensive and slow. After a quick look at the repository, I didn't notice any mention to that. In Stata, Thomas Zylkin wrote a specific function for the ppml case (ppml_panel_sg). For ols estimation, it is common to use the reg2hdfe function.
In R, the user can estimate a high dimensional linear model using the lfe package. In order to allow high dimensional fixed effects in PPML, I think it's necessary to rewrite ppml model using lfe inside. I have a sketch here.

The alpaca package can fit highly dimensional fixed effects in glm's.
I have used it several times, it is really blazing fast.

PPML shall use eflm::eglm once it supports vcovHC


Error from chokidar (E:): Error: EBUSY: resource busy or locked, lstat 'E:\DumpStack.log.tmp'

Describe the bug

Node.js version: v16.18.1
OS & version: Windows 11
quill version: 1.3.7
quill-toggle-fullscreen-button version: 0.1.0

Actual behavior
Process crashed. Final log:
`
ERROR  Failed to compile with 1 error                                                                          14:00:13
This dependency was not found:
quill-toggle-fullscreen-button in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Editor/index.vue?vue&type=script&lang=js&
To install it, you can run: npm install --save quill-toggle-fullscreen-button
Error from chokidar (E:): Error: EBUSY: resource busy or locked, lstat 'E:\DumpStack.log.tmp'
`

Hi @hqzmss, would you be able to provide more context around what you have done and are trying to accomplish, what command you are running when you see these errors, what your package.json looks like, how your environment is set up, etc.?
Based on what you've reported, I would recommend to check if quill-toggle-fullscreen-button package is in node_modules directory, and if not, install it by run:
npm install --save quill-toggle-fullscreen-button

For the second error, it looks as if you have something set up incorrectly in the directories you are watching, as in
https://github.com/paulmillr/chokidar/issues/1037

Basically it doesn't install correctly, so when you run it through npm it creates the quill-toggle-fullscreen-button folder, but then it only has 3 files in it
LICENSE-MIT.txt
package.json
README.md
No sub folders are created such as the dist folder that should contain the .js file