Parameterized circuits in c2qa-qiskit

Hi @tjstavenger-pnnl, I was just talking with @EllaCrane and she mentioned that you are looking into adding support for Parameterized circuits in c2qa-qiskit. Just yesterday I had tested whether this was possible but ran into a TypeError:  unsupported operand type(s) for ** or pow(): 'Parameter' and 'int'.
I'm opening this issue to provide the small example from our use case that reproduces the error, if it is any help to you.
numberofqubits=2
numberofmodes=3
numberofqubitspermode=2

qmr = c2qa.QumodeRegister(num_qumodes=numberofmodes, num_qubits_per_qumode=numberofqubitspermode)
qbr = qiskit.QuantumRegister(size=numberofqubits)
cbr = qiskit.ClassicalRegister(size=1) # To read out the results of the Hadamard test
circuit = c2qa.CVCircuit(qmr, qbr, cbr)

phi = qiskit.circuit.Parameter('phi')
circuit.cv_rh1(phi, qmr[0], qmr[1], qbr[0])

I have a version working of parameterized circuits, but testing needs to be done to see if it is what you'd expect. @kevincsmith is interested in it too. See https://github.com/C2QA/c2qa-qiskit/pull/47 for the current PR into main.

I merged into main this morning. Can you see how it works for you and your needs?

@kevincsmith  has confirmed our implementation works with his VQE effort. I'll close this issue for now. If there are coding changes needed or errors found, please let us know.


[hold] Add batch latency measurement and percentiles to treelite_python

This PR introduces num_threads and batch_size as parameters for inferencing benchmark.
Additions:

code to process batches of data in the treelite_python module,
unified code to record latency metrics and percentiles.
num_threads and batch_size in inferencing variant parameters
num_threads and batch_size in the inferencing pipeline (depending on support from each component)

Split changes into a PR to unify metrics first, waiting for #180 merged


How to create custom helpers in ghost v1.7.1

I wanted to create a helper in ghost to lower case the text.
I used the same in old ghost version it worked fine but with new version it throws an error saying "Helper not found on ghost dashboard"
How do i solve this, there is no proper documentation for ghost theme development... :(
Why so many releases with small small fixes

Hey @vivekmengu016 👋
There is a #themes channel in slack where you can get help from the community for questions like this. Please provide as much information as possible when you ask in the channel, so people are able to assist and help you. You can also find a pretty detailed documentation for themes to get more information.
Closing this as it is not an issue with Ghost.

@AileenCGN using slack for this kind of purpose seems painful to me.
I have the same issue @vivekmengu016 has (and I have it from the first day: the use of custom handlebars helpers in a theme).
I don't event see how one can do a blog without one custom helper: it help so much!
Browsing the history of slack to find the answer @vivekmengu016 got 17 days ago is almost impossible, and it's just 17 days.
I've always use github issue for question, because, with the time, it build a great documentation for an open source project. Anyone can search there if the doc is missing something, and it helps a lot.


Facade support.

Definition of Done

[x] We have all 3 facades working just by adding the "service provider".
[x] We have appropriate tests in place.
[x] There is an example for each use case in a new directory /examples.
[x] A stub class that will make IDEs auto complete for all facades.

@codeliner @prolic @sandrokeil - can you check this over.

For issue #15

This PR if it passes now should be ready to merge. Still not install-able until #18 is finished merged.


Path in bedrock-v465 is wrong

The path to the v465 bedrock protocol has v448 in it instead of v465.
https://github.com/CloudburstMC/Protocol/tree/develop/bedrock/bedrock-v465/src/main/java/com/nukkitx/protocol/bedrock/v448

Resolved


Remove usage of direct Hub commands

We need to remove usage of direct Hub commands to peers including hub processors
Blocked by https://github.com/optdyn/hub/issues/2931

Done


@nuxt/types vue config have to pass all Vue config properties, otherwise Typescript throws an error

Versions

nuxt: 2.14.12

Reproduction
Creating nuxt.config.ts (typescripted file) with '@nuxt/types' NuxtConfig type and using vue.config property to change vue global configs and only passing one property we get Typescript error, to use them all.
Steps to reproduce
Just add at least one property to nuxt.config.ts -> vue -> config
What is Expected?
Allowing to provide any number of properties, and not passing them all.
What is actually happening?
Typescript asks to use all properties of the NuxtOptionsVueConfiguration typescript type.
And looking at the docs of nuxt we see:
export default {
  vue: {
    config: {
      productionTip: true,
      devtools: false
    }
  }
}

which is impossible to achieve while using the types as we get:
Type '{ ignoredElements: string[]; }' is missing the following properties from type 'VueConfiguration': silent, optionMergeStrategies, devtools, productionTip, and 5 more.ts(2740)

Solution
As I do not have much time right now, but I believe that the options should be Partial and not just VueConfiguration.
nuxt.js/packages/types/config/index.d.ts
  router: NuxtOptionsRouter
  server: NuxtOptionsServer
  serverMiddleware: NuxtOptionsServerMiddleware[]
  srcDir: string
  transition: Transition
  vue: {
    config?: NuxtOptionsVueConfiguration       <-- this one I believe should be Partial<NuxtOptionsVueConfiguration>
  }
  watch: string[]
  watchers: NuxtOptionsWatchers
}

Good spot. Thanks. :heart:

Good spot. Thanks. ❤

No problem, thanks for replying so quickly! <3


Pretrained models' training condition

What is the training condition of your cityscapes_best.pth?
Is it

Pretrained on Mapillary?
Use label relaxation loss?
Use sdc-aug label propagation?

I want to do comparison with my models. Thank you.

I don't have it right now, but I can train one for you. I will let you know once it is done.

Thank you. You are so kind.

@kwea123  The training is done, I did a PR at here. You can try the weights there.

Thank you!

Can you also provide the model pretrained on Mapillary only? Thanks for your kindness.

Due to license issue, we are not able to release the Mapillary pre-trained models. You can follow our readme to train your own model. It should reproduce, although I realize that training on Mapillary takes some time. Sorry for the inconvenience.

Thanks for the reply. In this case, can you just share the results (the IoU per class) to allow for comparison? It is also desirable if you can share results for both seresnext and widerresnet.

@karansapra Do you have the number? Or the training log of Mapillary models before? Thank you.

I remember the mIOU was close to 50.03 but this resized, padded and drop last IOU. Let me double-check and get back to you on this.

@kwea123 Just let you know, I'm retraining a widerresnet model on Mapillary to get the per-class IoU. I'll report the number here once the training is done (several days).

@kwea123 Sorry for the long wait, I have re-trained both models on Mapillary and attach the results here. Note that, these results are obtained on validation set during training. As @karansapra have said, this is the resized image, padded and drop_last=True mIoU, it doesn't involve fancy testing strategies such as sliding, flipping and multi-scale. So the numbers here should be 1~2% lower than numbers reported in other papers, but you can use these for comparison.
SE-ResNeXt50 on Mapillary validation set:

10-02 22:37:15.419 IoU:
10-02 22:37:15.419 label_id      label    iU    Precision Recall TP     FP    FN
10-02 22:37:15.419  0                0    0.20   0.00      0.72   0.00   508.42    0.40
10-02 22:37:15.419  1                1   37.78   0.42      0.80   0.00    1.40    0.25
10-02 22:37:15.419  2                2   62.03   0.77      0.76   0.59    0.29    0.32
10-02 22:37:15.420  3                3   61.26   0.75      0.77   0.75    0.33    0.30
10-02 22:37:15.420  4                4   67.20   0.80      0.81   0.15    0.26    0.23
10-02 22:37:15.420  5                5   56.91   0.68      0.78   0.22    0.48    0.28
10-02 22:37:15.420  6                6   52.70   0.66      0.72   0.46    0.50    0.39
10-02 22:37:15.420  7                7   35.96   0.43      0.68   0.19    1.31    0.47
10-02 22:37:15.420  8                8   27.97   0.34      0.62   0.10    1.95    0.62
10-02 22:37:15.420  9                9   18.54   0.24      0.45   0.02    3.17    1.22
10-02 22:37:15.420 10               10   16.95   0.22      0.44   0.05    3.60    1.30
10-02 22:37:15.420 11               11   28.97   0.30      0.90   0.18    2.34    0.11
10-02 22:37:15.420 12               12   56.70   0.67      0.78   0.07    0.48    0.28
10-02 22:37:15.421 13               13   88.91   0.96      0.92  20.07    0.04    0.08
10-02 22:37:15.421 14               14   39.46   0.49      0.68   0.10    1.06    0.48
10-02 22:37:15.421 15               15   68.21   0.85      0.77   2.69    0.17    0.29
10-02 22:37:15.421 16               16   72.64   0.83      0.86   0.57    0.21    0.17
10-02 22:37:15.421 17               17   88.69   0.95      0.93  10.27    0.05    0.07
10-02 22:37:15.421 18               18   26.12   0.28      0.82   0.02    2.61    0.22
10-02 22:37:15.421 19               19   78.04   0.90      0.86   0.26    0.11    0.17
10-02 22:37:15.421 20               20   63.42   0.76      0.79   0.03    0.32    0.26
10-02 22:37:15.421 21               21   66.87   0.80      0.81   0.02    0.26    0.24
10-02 22:37:15.421 22               22    1.90   0.02      0.11   0.00   43.30    8.27
10-02 22:37:15.422 23               23   71.47   0.80      0.87   0.68    0.25    0.15
10-02 22:37:15.422 24               24   64.14   0.75      0.81   1.10    0.33    0.23
10-02 22:37:15.422 25               25   50.44   0.58      0.79   0.13    0.72    0.26
10-02 22:37:15.422 26               26   19.42   0.22      0.63   0.00    3.57    0.58
10-02 22:37:15.422 27               27   98.34   0.99      0.99  31.74    0.01    0.01
10-02 22:37:15.422 28               28   79.76   0.89      0.89   0.31    0.12    0.13
10-02 22:37:15.422 29               29   69.54   0.81      0.83   0.79    0.24    0.20
10-02 22:37:15.422 30               30   90.69   0.96      0.94  13.30    0.04    0.06
10-02 22:37:15.422 31               31   79.14   0.82      0.95   0.06    0.21    0.05
10-02 22:37:15.422 32               32   40.45   0.50      0.68   0.03    0.99    0.48
10-02 22:37:15.423 33               33   46.73   0.58      0.71   0.01    0.73    0.41
10-02 22:37:15.423 34               34   16.66   0.27      0.31   0.00    2.76    2.24
10-02 22:37:15.423 35               35   52.32   0.66      0.71   0.36    0.51    0.40
10-02 22:37:15.423 36               36   42.95   0.54      0.67   0.02    0.84    0.49
10-02 22:37:15.423 37               37   13.31   0.16      0.46   0.00    5.34    1.18
10-02 22:37:15.423 38               38   63.19   0.72      0.84   0.00    0.39    0.19
10-02 22:37:15.423 39               39   46.49   0.57      0.72   0.03    0.77    0.38
10-02 22:37:15.423 40               40   11.50   0.14      0.41   0.00    6.26    1.44
10-02 22:37:15.423 41               41   54.53   0.65      0.77   0.04    0.53    0.30
10-02 22:37:15.423 42               42    5.16   0.07      0.16   0.00   13.18    5.19
10-02 22:37:15.424 43               43   13.57   0.18      0.36   0.00    4.55    1.81
10-02 22:37:15.424 44               44   54.21   0.64      0.77   0.04    0.55    0.29
10-02 22:37:15.424 45               45   56.68   0.72      0.73   0.61    0.40    0.37
10-02 22:37:15.424 46               46   54.32   0.65      0.77   0.07    0.54    0.30
10-02 22:37:15.424 47               47   56.88   0.72      0.73   0.33    0.39    0.36
10-02 22:37:15.424 48               48   73.24   0.84      0.85   0.16    0.19    0.18
10-02 22:37:15.424 49               49   51.00   0.65      0.71   0.05    0.55    0.42
10-02 22:37:15.424 50               50   77.18   0.87      0.87   0.47    0.15    0.15
10-02 22:37:15.424 51               51   63.90   0.78      0.78   0.04    0.29    0.27
10-02 22:37:15.424 52               52   67.62   0.81      0.80   0.04    0.23    0.25
10-02 22:37:15.425 53               53   54.83   0.69      0.73   0.00    0.45    0.37
10-02 22:37:15.425 54               54   84.43   0.91      0.92   0.20    0.10    0.08
10-02 22:37:15.425 55               55   92.01   0.97      0.94   3.04    0.03    0.06
10-02 22:37:15.425 56               56    0.31   0.00      0.03   0.00   286.31   37.24
10-02 22:37:15.425 57               57   62.94   0.77      0.77   0.04    0.29    0.30
10-02 22:37:15.425 58               58   60.78   0.68      0.85   0.02    0.47    0.17
10-02 22:37:15.425 59               59   19.65   0.25      0.49   0.01    3.03    1.06
10-02 22:37:15.425 60               60    9.35   0.10      0.52   0.00    8.76    0.94
10-02 22:37:15.425 61               61   73.97   0.82      0.88   0.29    0.22    0.14
10-02 22:37:15.425 62               62   37.74   0.46      0.67   0.00    1.17    0.48
10-02 22:37:15.426 63               63    8.51   0.39      0.10   0.01    1.56    9.19
10-02 22:37:15.426 64               64   92.34   0.96      0.96   2.00    0.04    0.04
10-02 22:37:15.426 mean 0.5075579285621643
10-02 22:37:18.102 -----------------------------------------------------------------------------------------------------------
10-02 22:37:18.122 [epoch 171], [val loss 0.24626], [acc 0.92842], [acc_cls 0.59483], [mean_iu 0.50756], [fwavacc 0.87452]
10-02 22:37:18.122 best record: [val loss 0.24626], [acc 0.92842], [acc_cls 0.59483], [mean_iu 0.50756], [fwavacc 0.87452], [epoch 171]

WideResNet38 on Mapillary validation set:

09-30 04:51:25.332 IoU:
09-30 04:51:25.332 label_id      label    iU    Precision Recall TP     FP    FN
09-30 04:51:25.333  0                0    0.07   0.00      0.27   0.00   1511.59    2.76
09-30 04:51:25.333  1                1   23.69   0.26      0.69   0.00    2.78    0.44
09-30 04:51:25.333  2                2   61.64   0.80      0.73   0.60    0.26    0.37
09-30 04:51:25.333  3                3   61.23   0.77      0.75   0.77    0.30    0.34
09-30 04:51:25.333  4                4   66.03   0.80      0.79   0.15    0.25    0.27
09-30 04:51:25.333  5                5   55.13   0.66      0.77   0.21    0.51    0.30
09-30 04:51:25.333  6                6   52.97   0.66      0.73   0.45    0.52    0.37
09-30 04:51:25.333  7                7   34.20   0.41      0.67   0.18    1.44    0.48
09-30 04:51:25.333  8                8   27.72   0.32      0.67   0.10    2.12    0.49
09-30 04:51:25.334  9                9   21.03   0.28      0.45   0.03    2.53    1.22
09-30 04:51:25.334 10               10   18.18   0.22      0.50   0.05    3.51    0.99
09-30 04:51:25.334 11               11   34.06   0.40      0.69   0.24    1.48    0.45
09-30 04:51:25.334 12               12   53.33   0.70      0.69   0.07    0.43    0.45
09-30 04:51:25.334 13               13   88.36   0.95      0.92  19.94    0.05    0.08
09-30 04:51:25.334 14               14   46.10   0.57      0.70   0.12    0.74    0.43
09-30 04:51:25.334 15               15   66.98   0.81      0.80   2.55    0.24    0.26
09-30 04:51:25.334 16               16   74.99   0.87      0.84   0.60    0.15    0.18
09-30 04:51:25.334 17               17   88.70   0.94      0.94  10.18    0.06    0.07
09-30 04:51:25.334 18               18   42.86   0.48      0.81   0.03    1.10    0.23
09-30 04:51:25.335 19               19   76.35   0.89      0.85   0.25    0.13    0.18
09-30 04:51:25.335 20               20   56.84   0.67      0.79   0.02    0.49    0.27
09-30 04:51:25.335 21               21   63.87   0.79      0.77   0.02    0.27    0.30
09-30 04:51:25.335 22               22    8.35   0.10      0.35   0.00    9.13    1.84
09-30 04:51:25.335 23               23   69.49   0.80      0.84   0.68    0.25    0.19
09-30 04:51:25.335 24               24   62.38   0.76      0.77   1.11    0.31    0.29
09-30 04:51:25.335 25               25   49.77   0.57      0.79   0.13    0.74    0.27
09-30 04:51:25.335 26               26   10.40   0.26      0.15   0.00    2.87    5.74
09-30 04:51:25.335 27               27   98.23   0.99      0.99  31.72    0.01    0.01
09-30 04:51:25.335 28               28   75.68   0.92      0.81   0.32    0.09    0.23
09-30 04:51:25.336 29               29   69.73   0.82      0.82   0.80    0.22    0.21
09-30 04:51:25.336 30               30   90.54   0.96      0.94  13.27    0.04    0.06
09-30 04:51:25.336 31               31   78.26   0.81      0.96   0.06    0.24    0.04
09-30 04:51:25.336 32               32   36.31   0.46      0.64   0.03    1.19    0.56
09-30 04:51:25.336 33               33   44.32   0.60      0.62   0.01    0.65    0.60
09-30 04:51:25.336 34               34   13.65   0.21      0.28   0.00    3.76    2.56
09-30 04:51:25.336 35               35   50.22   0.66      0.68   0.36    0.52    0.48
09-30 04:51:25.336 36               36   39.48   0.52      0.63   0.02    0.94    0.60
09-30 04:51:25.336 37               37    6.79   0.07      0.42   0.00   12.36    1.36
09-30 04:51:25.336 38               38   54.21   0.66      0.76   0.00    0.52    0.32
09-30 04:51:25.337 39               39   42.05   0.55      0.64   0.03    0.81    0.57
09-30 04:51:25.337 40               40    6.33   0.10      0.15   0.00    9.31    5.49
09-30 04:51:25.337 41               41   55.71   0.70      0.73   0.04    0.43    0.37
09-30 04:51:25.337 42               42    8.57   0.12      0.25   0.00    7.59    3.08
09-30 04:51:25.337 43               43    7.92   0.11      0.24   0.00    8.46    3.16
09-30 04:51:25.337 44               44   53.21   0.67      0.73   0.04    0.50    0.38
09-30 04:51:25.337 45               45   56.05   0.72      0.72   0.62    0.39    0.39
09-30 04:51:25.337 46               46   52.74   0.64      0.75   0.07    0.57    0.33
09-30 04:51:25.337 47               47   55.82   0.70      0.73   0.32    0.42    0.37
09-30 04:51:25.338 48               48   71.79   0.86      0.82   0.16    0.17    0.22
09-30 04:51:25.338 49               49   49.53   0.66      0.66   0.05    0.51    0.51
09-30 04:51:25.338 50               50   75.93   0.87      0.86   0.47    0.15    0.16
09-30 04:51:25.338 51               51   58.84   0.77      0.71   0.04    0.29    0.41
09-30 04:51:25.338 52               52   64.81   0.79      0.78   0.04    0.27    0.28
09-30 04:51:25.338 53               53   40.79   0.53      0.64   0.00    0.89    0.56
09-30 04:51:25.338 54               54   80.53   0.86      0.93   0.19    0.16    0.08
09-30 04:51:25.338 55               55   91.46   0.97      0.94   3.04    0.03    0.06
09-30 04:51:25.338 56               56   16.36   0.23      0.35   0.00    3.27    1.85
09-30 04:51:25.338 57               57   60.62   0.76      0.75   0.04    0.32    0.33
09-30 04:51:25.339 58               58   54.87   0.64      0.79   0.02    0.56    0.26
09-30 04:51:25.339 59               59   16.78   0.23      0.37   0.01    3.26    1.70
09-30 04:51:25.339 60               60   18.73   0.30      0.33   0.00    2.28    2.06
09-30 04:51:25.339 61               61   68.98   0.81      0.83   0.29    0.24    0.21
09-30 04:51:25.339 62               62   21.46   0.28      0.48   0.00    2.60    1.06
09-30 04:51:25.339 63               63    6.23   0.39      0.07   0.01    1.58   13.46
09-30 04:51:25.339 64               64   91.52   0.96      0.95   2.00    0.04    0.05
09-30 04:51:25.339 mean 0.4922703802585602
09-30 04:51:37.517 -----------------------------------------------------------------------------------------------------------
09-30 04:51:37.543 [epoch 174], [val loss 0.25166], [acc 0.92571], [acc_cls 0.59429], [mean_iu 0.49227], [fwavacc 0.87120]
09-30 04:51:37.543 best record: [val loss 0.25166], [acc 0.92571], [acc_cls 0.59429], [mean_iu 0.49227], [fwavacc 0.87120], [epoch 174]

Another thing to note is that, each run of the training will give you a little bit different result. This is common for semantic segmentation problem. For example, the Mapillary model in WideResNet bachbone we used has 50.03 mIoU, a little bit higher than this run 49.23. @karansapra Any luck finding the training log?
Right now, our evaluation script doesn't support evaluation on Mapillary. We will work on that, and hopefully provide you more accurate numbers in the future.

Thank you, this helps a lot!

Sorry no training log on this, just the weights and command. But this looks right as Yi mentioned. The key is having a good backbone, we have worked with 49.01 on Mapillary and it works fine :)

I was worried when I only got 34% Miou on the mapillary commercial version. But since it has 100 classes and research only has 65 classes, this corresponds to 34*100/65=52% actually. I'm relieved.

Interesting! I haven't played with commercial version before, and I didn't see anyone reporting the number as well. 34% seems low, but maybe it is a challenging dataset. Thank you for sharing the info.
Start with some visualization will help diagnosing the problem. You will know if the low accuracy is caused by serious class confusion, small classes missing, coarse boundary or sth else.
Also try a baseline FCN or other popular framework with code (like PSPNet). If their performance is also 30ish, you will be more relieved.

Commercial has the same images as research version, it just additionally labels the unknown part of the research version to make more classes. So basically these additional classes have very low iou. I think it's quite fair to compare roughly the score * the number of classes.

Got it. Yes, it makes sense. With the same number of images, these additional classes are expected to have very low IoU.


sort by last updated in cosmosdb (for test server deployment)

Description
Describe the changes in this PR.
Related issues
Addresses [issue #].
Testing
Describe how this change was tested.

/azp run


Fixed #34305 -- Changed GeoIP2 tests to use MaxMind test databases.

ticket-34305
GEOIP_SETTINGS is removed from the global scope as this prevents modifications to the settings using @override_settings in tests.
Additional improvements now that we have stable test databases include:

Made testing more comprehensive and improved coverage
Patched socket.gethostbyname() for whole test case
Added testing of non-free GeoIP2 databases

This will mean that Django's CI setup will no longer need to worry about the GeoIP databases \o/

I moved enterClassContext() to the separate commit.

Thanks 😊 I thought later that it might be better to move it as you have done - probably some other places it'll come in handy.


SQFormMultiSelect tooltip disable prop

Component: SQFormMultiSelect : https://github.com/SelectQuoteLabs/SQForm/blob/master/src/components/SQForm/SQFormMultiSelect.js
I ran into a scenario when using the SQFormMultiSelect and specifically it's the on-hover tooltip that is displayed. When hovering over the input it displays the selected items and it does work, however, after your list of items grows the tooltip gets very large in size. I've attached a quick loom to demonstrate this here: https://www.loom.com/share/18e789906b58496c901926ecf581c66d
I don't think we would have giant lists selected too often but I know at times we may and the tooltip will likely get in the way for users, if we had a prop that would/could disable tooltip that might be preferred for SQFormMultiSelect instances that may have many options checked.

I'm curious why we even have a tooltip for this in the first place. Seems like overkill considering we show the selected items (though truncated) in a list in the input.

We faced this issue again :) I wish I could either:

disable tooltip, or
feed the component my own tooltip text, be it static or dynamic. In this case, I can provide informative text rather than listing potentially hundreds of items in a not-very-informative and yet absolute unit of a tooltip.

We faced this issue again :) I wish I could either:

disable tooltip, or
feed the component my own tooltip text, be it static or dynamic. In this case, I can provide informative text rather than listing potentially hundreds of items in a not-very-informative and yet absolute unit of a tooltip.

I'd like both of these options. Doing a state select right now, would love to show the state abbrevs in the tooltip instead of their full names, but want full names in the select.


Aggregation

Please use the following questions as a guideline to help me answer
your issue/question without further inquiry. Thank you.
Which version of Elastic are you using?
[ ] elastic.v7 (for Elasticsearch 7.x)
Please describe the expected behavior
I make aggregation query as below:
{
"size": 0,
"query": {
//omit
},
"aggs": {
"vul_count": {
"terms": {
"size": 100,
"field": "data.vulnerability.cve"
},
"aggs": {
"agent_count": {
"cardinality": {
"field": "agent.id"
}
},
"s_bucket_sort": {
"bucket_sort": {
"sort": {
"agent_count": {
"order": "desc"
}
}
}
}
}
}
}
}
code:
agentsAgg := elastic.NewCardinalityAggregation().
Field("agent.id")
vulAgg := elastic.NewTermsAggregation().
	Field("data.vulnerability.cve").
	Size(100).
	SubAggregation("agent_count", agentsAgg)

Please describe the actual behavior
I cannot get the count of "agent.id" from the query result.
But I can check the results directly through the browser query:
{
"took": 191,
"timed_out": false,
"_shards": {
"total": 369,
"successful": 369,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 1218,
"relation": "eq"
},
"max_score": null,
"hits": []
},
"aggregations": {
"vul_count": {
"doc_count_error_upper_bound": 22,
"sum_other_doc_count": 1143,
"buckets": [
{
"key": "CVE-2019-10126",
"doc_count": 17,
"agent_count": {
"value": 3
}
},
{
"key": "CVE-2019-14821",
"doc_count": 16,
"agent_count": {
"value": 3
}
},
// omit the leftover
What I want to get is:
"agent_count": {
"value": 3
}

Here's an example of retrieving sub-aggregation values. That search_aggs_test.go file has a lot of examples for working with aggregations.
HTH


LEVEL 7 debugging infinite loop weird output

Hi! I'm having issue passing 7_2.
The logic I'm using is
arrive -> serve/wait/leave
serve -> done
done -> resting
resting -> new eventStub()// means finish
wait -> pending
pending -> serve/pending.
I tried to use system.out.println to check and I got this weird output when I check the updatedServerTime i pass in to resting event.

I don't know why I have 2 print outputs, and seems like the second output time is wrong and is what i pass in to the next event. I only wrote one line in Done tho, this is my done class execute() method:

Supplier is an attribute in my server class, and my getRestTime() returns the supplier(this.restTime).
If anyone knows how to solve it I would be rlly appreciate!!

I found out it's my run() in simulate7 implementation went wrong.


Use ArgumentDefaultsHelpFormatter to show defaults in --help

Coverage increased (+0.004%) to 97.055% when pulling 4316882ae7f449f17707d5e38fd588b8c6a87920 on altendky:show_defaults into 52b1421ee9a4dcf443348ccf554686037f051778 on eerimoq:master.

Hmm, this might be good, but I prefer the flexibility of formatting the help text freely instead.

Talk about maintenance hassle...

@andlaus, thanks for the interested.  If you meant you wanted a description added in the OP then that is done.  If you meant something else, let me know. :]


refactor: fix typos, align names, simplify code

:tada: This PR is included in version 0.6.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Progress towards challenge submission autograder

Closes #2
Closes #4
Closes #5
Follow the updated README.md instructions to review this PR
Overview

install.ts script to fetch, save, and update the  challenge repositories
Temporary GET route for challenge submission that will eventually be refactored into a POST
Validate the params for the submission route with express-validator
Fetch the contract source code from Etherscan and save it into challenge repo
Run the test from within the challenge repo against the downloaded contract

Future Issues

The foundry tests for challenges may need to be modified in order for it to be possible to import the downloaded contract into the foundry test. The test is currently passing because downloaded repo contains passing contract code, but we need to figure out how to make the test run against the downloaded contract instead of the default contract. Here is snippet of viable solution used for speedrun ethereum which is built with hardhat

The first time you hit the submission route will be slow because the submodule dependencies in the foundry/ folder don't get installed until the forge test command is triggered despite previously running yarn install in the root of challenge repo during the yarn install:challenges execution
The stdout from the command that executes a test is just a string so it will probably need to be parsed with a ton of edge cases handled to figure out the % of passing tests and whatever other data we want to extract
How we will handle installing foundry in the production server environment?

@escottalexander the scripts have been amended to install all the challenges into a challenges/ directory. I also figured out how to speed up the submission route results by adding forge install to the install.ts script so that we don't have to wait for sub module install the first time the route is consumed.
Let me know what you decide about axios and express-validator and if the changes should be made as part of this PR or future PR
I kinda think it makes sense to stop here with this PR because you will need time to play with the flow of operations in order to decide what kind of response you want to send back to your CLI client


Add nominee: python-for-power-system-analysis

Automatic addition of a new nominee submitted through the online form available at https://digitalpublicgoods.net/submission

This submission looks good. @nathanbaleeta - should the filename be changed to match the product name (PyPSA) rather than the alias?

@conradsp according to the website, it seems the acronym is more popular and widely used hence that's why I settled for the same. Thanks.


[docs] comments inside snippets + README pass (DOCS-CODE-012)

Purpose

Pushes code comments inside the named snippets so they're rendered on docs.
Added DOCS-CODE-012 identifier to README
Light edit pass on the README

ℹ Companion to tutorial content PR https://github.com/MicrosoftDocs/azure-docs-pr/pull/187725.

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type
What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x] Documentation content changes
[ ] Other... Please describe:

How to Test
N/A - no code changes made.
What to Check
Verify that the following are valid:

README.md
Code comments

Other Information

None.

You should merge your own stuff.  You did the hard work to make the change, you get the satisfaction of making it live. Ship it. :)


Is it possible to inject a package using git url?

The documentation for inject only has examples for named packages, but I optimistically tried: pipx inject python-language-server git+https://github.com/emanspeaks/pyls-flake8.git
and pipx inject python-language-server --spec git+https://github.com/emanspeaks/pyls-flake8.git and, of course, neither worked.
Is it possible to inject packages based off of a git url instead of just a pypi package name?

Oh actually I think it did work. pipx has an error in how it tries to confirm a package was installed when injecting.
Try
pipx runpip python-language-server freeze

and you should see the packages you attempted to install.
This check should be removed. It will be a simple PR to fix, I can add it soon.
https://github.com/pipxproject/pipx/blob/96a0a06bd79d23b50c9c8fc329f841662165248c/pipx/commands.py#L423

Worked:
~ » pipx runpip python-language-server uninstall pyls-flake8
Uninstalling pyls-flake8-0.2.0:
  Would remove:
    /home/jobevers/.local/pipx/venvs/python-language-server/lib/python3.6/site-packages/pyls_flake8-0.2.0.egg-info
    /home/jobevers/.local/pipx/venvs/python-language-server/lib/python3.6/site-packages/pyls_flake8/*
Proceed (y/n)? y
  Successfully uninstalled pyls-flake8-0.2.0
~ » pipx runpip python-language-server freeze | grep flake8
flake8==3.7.8
~ » pipx inject python-language-server git+https://github.com/emanspeaks/pyls-flake8.git
WARNING: You are using pip version 19.1.1, however version 19.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Could not find package git+https://github.com/emanspeaks/pyls-flake8.git. Is the name correct?
~ » pipx runpip python-language-server freeze | grep flake8
flake8==3.7.8
pyls-flake8==0.2.0


Flip system button images horizontally for RTL locales

RTL locales seem to flip the keyboard button images:

This can be tested in master.


Review change per PR comment post merge

See comment https://github.com/PowerShell/PowerShell/pull/7104#pullrequestreview-149959259

This was reverted:  https://github.com/PowerShell/PowerShell/pull/7754


Enable ephemeral_external_ip on GCP

There are a few reasons I'm suggesting this change:

BOSH director on GCP doesn't have internet access without this, which
seems to make CPI calls fail
Folks (e.g. bosh-bootloader) appear to then solve this problem by using
external-ip-not-recommended.yml opsfile which seems sub-optimal,
because:

It requires a static external IP address
It unnecessarily binds services to the external IP
It seems from the name, that it isn't recommended

Seems gcp/cloud-config.yml intends for all other VMs in the cloud to
have this anyway

Reference in bosh-bootloader repo: https://github.com/cloudfoundry/bosh-bootloader/blob/7716481f9f1aa78e34d52ea8a918757bf440946b/bosh/executor.go#L221

Hey Sam! While it is the case that bbl currently enables an external IP on our director, this is not the recommendation of the BOSH team and we're working to fix that and migrate teams off of external IP. there is no significant difference between your PR and external-ip-not-recommended.yml: the director API should not be exposed to the internet. In bbl 5.0 teams using BBL will get a jumpbox, NAT, a bosh director, and credhub when they bbl up.
Some version of 4.x will allow you to opt in to this new setup.

On further reflection I take that back: there is a significant difference between your pull request and external-ip-not-recommended.yml: BOSH is not bound to the external IP, you can deny all new connections via that IP address. We're patching in this change as an ops file, and recommend it be merged.
Is there any reason to recommend a NAT on GCP? I assume it would save significant money on AWS, but if all VMs are get these same outbound only firewall rules, is there a significant difference?

@evanfarrar Hey, thanks for looking at this.
Isn't it true that this PR would only give an external IP address to the BOSH director, but it would not actually bind jobs to those addresses as external-ip-not-recommended.yml would?

@evanfarrar Anyway to get this merged, or possibly abstracting this into an optional ops file? Reason I ask is when deploying BOSH directors on GCP and attempting to have the director pull stemcells from the cloud or pull releases from the cloud we need to access the internet. With GCP there is 2 ways to have the director access the internet, add an ephemeral IP or setup a special NAT. I would prefer the ephemeral IP since that is what the GCP docs recommend.

Closing this due to inactivity.
If you would like to discuss this contribution further, please open a new issue.


why can not get the courses、subjects、organzations?

when I click the courses in the index, the page show ,but no course、subjects、organzations. like this image（get 500 error）:

Hello @kylincode,
Thanks for your report. We're indeed missing documentation about this. This is somewhat intentional as the Search is one of the parts that still needs some serious work to be done before it can be used by anyone.
Quick answer
You can get a glimpse of how it looks like and how it works right now. You'll notice the search box and filters need some UX improvements.
CAVEAT: it is hardcoded to use demo data pulled directly from our own openedx instance.
Just run docker-compose exec app python sandbox/manage.py bootstrap_elasticsearch (with the app container running, otherwise replace exec with run --rm and relaunch the app container).
Explanation
Richie is built around the idea that course marketing material relevant to a marketing site and a search engine is not the same thing as an actual course on openedx. This is why it has its own models for courses and other objects.
Our search engine uses an API running with ElasticSearch. This means eg. courses need to be indexed into this ElasticSearch instance before you can use the Search view. This is exactly what the command I gave you above does.
Data retrieval for the purpose of indexing is done in individual indexers for each resource that are decoupled from the CLI command and other parts of the Search. The get_data_for_es method implements this for each indexer. You can see the one for courses right there.
We intend to modify them to get data from the models instead of the remote API they're using now (with the walk_api_json_list call). In the meantime, you can get a nice demo with your own data if you modify get_data_for_es to get data from your own sources, and just respect the returned objects shape in the existing methods.

I hope this answers your questions. Let me know if you're interested in learning more about and working with Richie in the future 👍


Refactor Backend with Abstract CustomBackend using AoP (Aspect Oriented Programming) and PropertyManager [WIP]

Refactor Backend with Abstract CustomBackend using AoP (Aspect Oriented Programming) and PropertyManager [WIP] - Not Yet Ready for Merge!
Description:
This pull request is part of our ongoing effort to refactor the backend services by introducing an abstract CustomBackend, leveraging a hierarchical factory pattern, specifically implemented using Aspect Oriented Programming (AoP) through 'custom-factory' package. I also incorporate JSONSchema definitions for UI elements management in React applications via rjsf (React JSon Schema Form). Additionally, I use the 'property-manager` library to manage and organize our back-end properties related to these services within a structured and consistent manner.
Motivation:
The refactoring is crucial due to growing complexity and difficulty managing various implementations across similar services like chatbots, text-to-speech systems, etc., within our application's backend architecture. By decoupling interface logic from concrete implementation details through the use of abstract interfaces, employing AoP techniques with 'custom-factory', and using property-manager to manage JSON Schema properties in a structured way
Implementation Status:
At present, this PR has completed initial setup work for integrating Aspect Oriented Programming (AoP) through the use of the custom factory pattern provided by 'custom-factory' package. This includes setting up abstract interfaces and factories that manage different products associated with each back-end service based on their configurations

Abstract Backend: CustomBackend
Hierarchical back-end factory pattern

bot: chatbot (Factory Item)

llamacpp (Product Item)
chatgpt (Product Item)

tts (Factory Item)
stt (Factory Item)
storage (Factory Item)

Separate UI from backend, use JSONSchema.

WIP & Documentation:
Please note that this PR is a work in progress, meaning many sections are not yet fully working or documented. I encourage you to review the code changes carefully. If any questions arise, feel free to ask for clarification; I will do my best to provide a detailed explanation and address concerns promptly.

Wow, this looks like a great start. Busy with christmas stuff so haven't had time to digest this yet, will review soon.

@kasumi-1  I originally intended to abstract a framework for freely registering and using AI tools: https://github.com/isdk/ai-tool.js
However, the project evolved significantly and ultimately transformed into Programmable Prompt Engine Language: https://github.com/offline-ai/cli
Now I find myself stuck in the complexity of my own project.


test(app): Add data-test for PanelError

This would enable more stable and readable tests to test the PanelError component in future.

I have read the CLA Document and I hereby sign the CLA


Added some more links to projects I work with

terraform-aws-modules/meta
terraform-cost-estimation
terragrunt-reference-architecture
...

Great additions!


Calibre not launching

Describe the bug
calibre does not run and gives the following error:
Traceback (most recent call last):
  File "/nix/store/sl6sxknc03rhsdd7ywzhzf3g52kigcj0-calibre-7.10.0/bin/.calibre-wrapped", line 22, in <module>
    sys.exit(calibre())
             ^^^^^^^^^
  File "/nix/store/sl6sxknc03rhsdd7ywzhzf3g52kigcj0-calibre-7.10.0/lib/calibre/calibre/gui_launch.py", line 74, in calibre
    main(args)
  File "/nix/store/sl6sxknc03rhsdd7ywzhzf3g52kigcj0-calibre-7.10.0/lib/calibre/calibre/gui2/main.py", line 547, in main
    run_main(app, opts, args, gui_debug, si, retry_communicate=True)
  File "/nix/store/sl6sxknc03rhsdd7ywzhzf3g52kigcj0-calibre-7.10.0/lib/calibre/calibre/gui2/main.py", line 559, in run_main
    return run_gui(opts, args, app, gui_debug=gui_debug)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/sl6sxknc03rhsdd7ywzhzf3g52kigcj0-calibre-7.10.0/lib/calibre/calibre/gui2/main.py", line 397, in run_gui
    run_gui_(opts, args, app, gui_debug)
  File "/nix/store/sl6sxknc03rhsdd7ywzhzf3g52kigcj0-calibre-7.10.0/lib/calibre/calibre/gui2/main.py", line 407, in run_gui_
    from calibre.gui2.ui import Main
  File "/nix/store/sl6sxknc03rhsdd7ywzhzf3g52kigcj0-calibre-7.10.0/lib/calibre/calibre/gui2/ui.py", line 50, in <module>
    from calibre.gui2.init import LayoutMixin, LibraryViewMixin
  File "/nix/store/sl6sxknc03rhsdd7ywzhzf3g52kigcj0-calibre-7.10.0/lib/calibre/calibre/gui2/init.py", line 37, in <module>
    from calibre.gui2.library.alternate_views import GridView
  File "/nix/store/sl6sxknc03rhsdd7ywzhzf3g52kigcj0-calibre-7.10.0/lib/calibre/calibre/gui2/library/alternate_views.py", line 18, in <module>
    from PIL import Image
  File "/nix/store/bnkg9gk85zn8q37phhiiacrr407lqp7k-python3.11-pillow-10.3.0/lib/python3.11/site-packages/PIL/Image.py", line 88, in <module>
    from . import _imaging as core
ImportError: /nix/store/ic5bx78h039m3lfxxb6bl64qlbdxzzj9-libtiff-4.6.0/lib/libtiff.so.6: undefined symbol: jpeg12_read_raw_data, version LIBJPEG_6.2

Steps To Reproduce
Run nix run nixpkgs#calibre
Expected behavior
I expect calibre to launch
Notify maintainers
@kilianar @pSub
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.69, NixOS, 23.05 (Stoat), 23.05.20240103.70bdade`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.6`
 - channels(sherk): `"nixos-23.05, unstable"`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

This is most likely the issue:

host os: `Linux 6.1.69, NixOS, 23.05 (Stoat)

Have you thought about upgrading to a more recent version, e.g. 24.05 which just came out?

Oh nice, that fixed the error, thanks!


Generalise to 3D input

Hi lucidrains,
Again, thanks a lot for the amazing work you are doing with all your repos.
Could you please try and generalise this codebase to 3D inputs?
Best regards,
Dan

Hi @danieltudosiu, if you're still looking for a 3D implementation: We have published the code to our paper where we generate three-dimensional medical images at https://github.com/FirasGit/medicaldiffusion. We based the code largely on the amazing repositories built by lucidrains.


can't transition from demo

I posted this describing the situation but haven't heard back.
http://talk.projectjellyfish.org/t/how-to-tie-in-manageiq-after-building-jellyfish/49

Hello,
Sorry for the delay in responding.  Please take a look here and let me know if you have any questions:
http://projectjellyfish.readthedocs.org/en/latest/how-tos/setup-manageiq/


Trying to load module 'pwd' fails after latest pull

I don't think the pwd module is available for folks running Windows.
--
Error loading script: system-info.py
Traceback (most recent call last):
File "F:\stable-diffusion-webui\modules\scripts.py", line 229, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "F:\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "F:\stable-diffusion-webui\extensions\sd-extension-system-info\scripts\system-info.py", line 3, in
import pwd
ModuleNotFoundError: No module named 'pwd'

yeah, just figured that out, fixed and pushed new version.


Using "YYYY-MM-DD" format (w/ dashes) causes datepicker to report wrong date

Describe the bug
When a user types a date (e.g., "2020-03-30") that is dash-seperated, it will report the day prior (e.g., "2020-03-29") after entry. Similarly, with the react-datepicker with the time attribute enabled, it will report the day prior and the timestamp 8:00 PM.
To Reproduce
Steps to reproduce the behavior:

Go to https://reactdatepicker.com/.
Type "2022-03-30" in any of the date or datetime datepicker input fields. Hit the enter/return key.
Notice it will report "03/29/2022" for date only datepicker or it will report "03/29/2022 8:00 PM" for date time datepickers.

Expected behavior
I expect it to translate the data entry "2022-03-30" into "03/30/2022" as the former is a standard date format.

Uh, looks like this issue has been reported in a longer thread before - the exact example I provide is in this gif: https://github.com/Hacker0x01/react-datepicker/issues/1018#issuecomment-937419540


[ENV-215] Add distinct deriver

Created new: com.cloudera.labs.envelope.derive.DistinctDeriver.java
New JUnit test: com.cloudera.labs.envelope.derive.TestDistinctDeriver.java
Updated resource file: /resources/META-INF/services/com.cloudera.labs.envelope.derive.Deriver

Wrong repo


[PIP-160] ManagedLedger decorator for batch append enties

Motivation
ManagedLedger provides apis for operating on Bookie, now  has only one implementation: ManagedLedgerImpl, In the case of an Entry only has single message, performance is less perfect. We should provide a feature that could accumulative and batch processing. Just like this:
public void addEntry(ByteBuf buffer){
    list.add(buffer);
    if (list.size() > 512){
        doFlush();
    }
}

If Pulsar have this feature, Broker can recieve a lot request in short time, but only write to Bookie once, this will greatly improve performance.
User need this feature at some case:

User has a lot client, send message at regular intervals. For example: statistics data collect/ device data collect.
At transaction mode, Broker will receive more tx-request in short time. These requests contains ADD_PARTITION_TO_TXN, ADD_SUBSCRIPTION_TO_TXN, ACK_RESPONSE and more.

Goal
1.Add a ManagedLedger decorator class EntryBatchHandler

EntryBatchHandlerImpl
public class EntryBatchHandlerImpl implements EntryBatchHandler{

    /** When items count reaches the threshold, do batch flush. default: 512. **/
    private final int batchThresholdRecordCount;
    /** When data size reaches the threshold, do batch flush. default: 4m. **/
    private final int batchThresholdByteSize;
    /** Do batch flush scheduled at fixed time, no matter whether the threshold is reached. **/
    private final int batchIntervalMillis;

    private ManagedLedgerImpl managedLedger;

    private ManagedCursorImpl managedCursor;

    @Override
    public void asyncAddEntry(final ByteBuf buffer, final AsyncCallbacks.AddEntryCallback callback,
                              final Object context){
        // batch write
    }

    @Override
    public void asyncReadEntries(int numberOfEntriesToRead, AsyncCallbacks.ReadEntriesCallback callback, Object ctx,
                                 PositionImpl maxPosition){
        // batch read
    }

}

API Changes
No API change.
Implementation
How to cache requests and trigger flush ?

Three flush strategies

When requests count reach threshold
When requests byte size reach threshold
Schedule at fixed rate

How to merge multi Entry ?
Add a field at BrokerEntryMetadata:  elementEndIndexArray
PulsarApi.proto
message BrokerEntryMetadata {
    optional uint64 broker_timestamp = 1;
    optional uint64 index = 2;
     // add this field
    repeated uint32 batch_record_index = 3;
}

batch_record_index  field has two meanings:

Mark the entry is a batch entry
Mark every inner entry's range( start at & end at )

Provide another implementation for ManagedLedgerInterceptor, to set elementEndIndexArray value.
After completing the design, what to do next ?
1. Make MLTransactionLogImpl & MLPendingAckStore batch submit.
Add property at broker.conf: transactionLogBatchSubmitEnbled
Due to design rely on the BrokerEntryMetadata, so must be opened after brokerEntryMetadataInterceptors to take effect.
2. Make Producer.publishMessage() batch submit( User optional ).

@eolivelli @hangc0276 @codelipenghui @merlimat @rdhabalia @315157973 @congbobo184 @gaoran10
I have sended email. Could you take a look. Thanks
https://lists.apache.org/thread/mfgctq88oocj30h3yh69hh8vqps4rgdb

@eolivelli @gaoran10 @gaozhangmin @315157973 @lhotari @michaeljmarshall @congbobo184 @Technoboy-   I have start a vote and already send email, could you take a look.
Discuss Link: https://lists.apache.org/thread/lsmn0hg9np97qrzzh2wovxq1yhxj9qhy

@nicoloboschi FYI

message BatchedTransactionMetadataEntry{
// Array for buffer transaction log data.
repeated TransactionMetadataEntry transaction_log = 1;
}

message BatchedPendingAckMetadataEntry{
// Array for buffer pending ack data.
repeated PendingAckMetadataEntry pending_ack_log=1;
}

we should use plural names for the repeated fields such as entries or records.

We should use plural names for the repeated fields such as entries or records.

OK

@eolivelli @gaoran10 @gaozhangmin @315157973 @lhotari @michaeljmarshall @congbobo184 @Technoboy-   @hangc0276  @merlimat @jiazhai @lhotari  I have start a vote and already send an email, could you take a look.
Discuss Link: https://lists.apache.org/thread/lsmn0hg9np97qrzzh2wovxq1yhxj9qhy
Vote Link: https://lists.apache.org/thread/hykz4fpz6dnz1skzks3h4ht0t3twf70b


inline admin GeoPosition not rendering the map unless you resize the browser window

When I use a geoposition as an inline admin the map does not render until you resize the browser. It just is grey but you can see the red location marker.  It works normally as a stand alone admin component.
Any idea whats causing this?

Happens on both safari and chrome

Any progress on this one?

I might be too late to answer this, but the solution is by [resizing the map](google.maps.event.trigger(map, 'resize')). However, my JS skills aren't goo enough to have it done.
Reference:
https://developers.google.com/maps/documentation/javascript/reference#Map

is there a solution for this ?

I would try what dubsnipe suggested and use JavaScript to resize the map as a workaround

@imran31415
can you share any snippet of code?
I am trying all the day and get no result

What did you try?

I was try @dubsnipe solution
tried add script in form to resize it when new one created

Did you try it exactly as the comment here suggests?  https://stackoverflow.com/questions/42222130/google-maps-shows-gray-screen-instead-of-map

also https://stackoverflow.com/questions/11742839/showing-a-google-map-in-a-modal-created-with-twitter-bootstrap

$("#contact-modal").on("shown.bs.modal", function () {
    google.maps.event.trigger(map, "resize");
});

I am keep trying to change contact-model to geoposition-widget and other classes in map widget .
what is the correct one to add instead of "contact-modal"
thanks in advance

it should be whatever the ID of your element is in the HTML.  See the HTML of the person asking the question here:
https://stackoverflow.com/questions/11742839/showing-a-google-map-in-a-modal-created-with-twitter-bootstrap

then what is the id or class name for geo-position widget
{% load l10n %}
<div class="geoposition-widget" id="{{widget.attrs.id}}" data-map-widget-height="{{ widget.config.map_widget_height }}" data-map-options='{{ widget.config.map_options }}' data-marker-options='{{ widget.config.marker_options }}'>
    {{ widget.latitude.label|capfirst }}:
    <input type="text" name="{{widget.name}}_0" class="{{widget.attrs.class}}" value="{{ widget.latitude.html|unlocalize }}" />
    {{ widget.longitude.label|capfirst }}:
    <input type="text" name="{{widget.name}}_1" class="{{widget.attrs.class}}" value="{{ widget.longitude.html|unlocalize }}" />
</div>

this is the html code from the lib it self.
I have tried geoposition-widget as a class name, although there is an id but it changed when creating new inline form model
this issue happens only in Inline admin from to a model with no extra and use add new location to show a new form with the geo-position map widget
this is the big picture of it
and thanks a lot for your efforts to help me <3

Hi @mohamedAbdElhameed
I think you may be interested in using the jQuery event fomset:added provided by the Django admin (see https://docs.djangoproject.com/en/3.0/ref/contrib/admin/javascript/)
Something like this should work :
(function($) {
    // Add the show modal event handler after a new row is added
    $(document).on('formset:added', function(event, $row, formsetName) {
        if (formsetName === '[[ name of your manytomany inline field ]]') {
            $row.find('.geoposition-widget').on("shown.bs.modal", function () {
                google.maps.event.trigger(map, "resize");
            });
        }
    });
})(django.jQuery);


R

Feature
Is your feature request related to a problem? Please describe.

Describe the solution you'd like

Existing work

Describe alternatives you've considered

Additional context

@gmRr7 Did you mean to include more information about the issue you're seeing?


Incorrect "Possibly null value" error

I was wondering if there is any way to handle a scenario where there is already a null check encapsulated in a different function. A simplified example:
startTheCar() {
  if (this.carIsReady()){
    this.engine.start(); //error here method cannot be called on possibly null value
  }
}

carIsReady() {
  return (this.engine != null)
}

This isn't currently possible. But it's feature that is being worked on.
For now the workaround is to rely on return values instead.
startTheCar() {
  var engine: ?Engine = this.getEngineIfReady();
  engine && engine.start();
}

getEngineIfReady(): ?Engine {
  return this.engine;
}


Fixed typo in rtkDaubechiesWaveletsConvolutionImageFilter

Corrected typo in the exception of the order of rtkDaubechiesWaveletsConvolutionImageFilter to be smaller or equal to 7, instead of larger

Thanks. Can you rebase it onto master and amend the commit to follow ITK guidelines, i.e. start the commit message with DOC I guess?

Sorry for the mess in the first try, this was meant as a quick fix by using the web IDE and it went horribly wrong. I didn't manage to fix the this PR. Replaced by #388


[Feature] : Implement a Label which allow user to Copy HEX Code of Visible Color Patterns

About the Feature
Will be adding a label at the bottom of screen which allow the user to copy the currently visible Colors pattern's HEX Code.
Benefits

Designers can get colors inspiration as well without remembering the color pattern.

Implementation

Will add a Label at the bottom of screen which has a button.
Upon pressing the button will copy the current HEX code in user's clipboard.

@sk66641 please assign this issue to me under GSSOC'24 label
Thanks

I would like to contribute on this. please assign it to me.
Thanks

@gunner26735 but how can someone copy the code if there are thousands of colors changing at a faster rate.

We can try adding a Play/Pause Button as well to start and stop the Disco lights.

@gunner26735  ok

@gunner26735
Do you want to work on this issue?

Yeah sorry for the delay. I will be completing it by the end of this week.


Exclude app usage events table from using window function

Similar to the issue reported in https://github.com/cloudfoundry/cloud_controller_ng/pull/3117, we have noticed performance degradation when using the OVER window function with app_usage_events when the tables has a large-ish number of row (around 150,000).  This PR disables use of the window function for app_usage_events, just as we have disabled it for events.
@kathap @philippthun , since you both worked on the previous PR--are you concerned that this might be a trend with several of our tables?  We don't have a lot of context on the performance benefits of the use of the OVER window function, and it feels like its use may be high risk.  We were wondering if it might be worth disabling the OVER window for more models, or even all of them.  Perhaps a configuration value in capi-release?

[ ] I have reviewed the contributing guide

[ ] I have viewed, signed, and submitted the Contributor License Agreement

[ ] I have made this pull request to the main branch

[ ] I have run all the unit tests using bundle exec rake

[ ] I have run CF Acceptance Tests

I had a look at some database/query statistics/performance dashboards for our largest foundation and can confirm that queries on the app_usage_events table using the OVER window function are relatively slow. It does not seem to be as bad as for the events table, but excluding this table makes sense.
I agree that we should revisit the use of the OVER window function. It might be the case that - due to other recent improvements - its benefit is now neglectable. But in order to judge this, we would need to perform some performance tests with reasonable table sizes.
I'm also open to provide a means to disable the OVER window function by configuration (this might be even helpful to do the performance tests).


Added a config option to disable Cassandra completely if not used.

Saves a DB query on every inventory operation if MySQL inventory is used and not migrated to Cassandra.  (Normal case outside IW.)

Added the halcyon.example.ini entry for legacy_inventory_only and enable it by default in the example file (makes sense for new installations as they are very likely to be MySQL-only).  But at least it's documented in the example INI file now in the [Inventory] section.

Released (finally) in v0.9.42.


Way to disable interface from Craft CP?

Hey mate, Another quick one. In the Craft 2 version, there was an enableCpTab option. Essentially I want to force all configs to be done fie config files rather than in the CP.
Is there a way to force the settings to be hidden / removed?

@marcushouse I'm planning on adding back that setting on the next release. Just with a different name for Craft 3 (enableCpSection) to align with new conventions.
The new release might be a week out or so.
With the new setting, as it was the case in the C2 version, the settings are still there, just no easy way for someone to get to.
One more thing... file configs override cp configs. So if people can see a setting in the cp that it's being managed via a config, they won't be able to change it.

No longer required as of 4.0.0 where the CP page has been removed entirely. There's no need to show the page in the control panel due to only plugin settings being able to be managed, which can (typically) only be done in development environments, or at least with allowAdminChanges = true.
For the most part, This page is no longer required (you can still access things via Settings > Patrol).


Add Order status and status_msg columns

Closes #934

It would be good to include the order status and message into the serialized output.

:+1:


Revert "Gpl861 allow several labs prefix from folder"

Reverts sanger/lighthouse#286
After more tests in UAT, we realised this changes in LH won't be needed. Production version supports the use cases, so these changes are not required anymore and can be rolled back to how it was.

All Sentinel samples will still be from the same source (folder where we read) so we don't have to support different sources at creation. This will be needed if we wanted different COG-UK but that is not going to be the case.
Current version of Beckman in master already supports cherrypicking across different sources.

Testing the functionality was not needed with barcode AP-rna-13070006 in uat.


[5]Add structural config validation

Is your feature request related to a problem? Please describe.
We have large configs which makes it easy to miss details when setting values.
Describe the solution you'd like
I want to see structural config validation with reusable blocks for common occurrences:

enabled
imageRegistry/imageRepository/imageTag - to prepare for eventual support for registry mirrors.
replicas
resources
tolerations
affinity
etc.

It would also help us to standardise how we work and add options to the config to make it easier to manage and maintain.
Additional context
And try to do it in a such way that it doesn't take too long time within bash.
Definition of done:
Improved structural validation of the config.

And with those additional PRs, this is really done! 🎉


Add more style, content and refactor js buttons repetitive code

Update style.css.
Update index.css and questions array in script.js with some content.
Refactor repetitive code for buttons.onclick in script.js into one function

There's a comment ("adds a random greeting to the page") in script.js between lines 15-17, I think you forgot to delete it when you deleted a function.

Mixing camelCase and dash-naming in HTML elements' class names is probably not a good idea for readability.
According to Google style code for HTML and CSS, you should only use dash-naming (4.1.10 section)

AFAIK, it's a good practice to use HTML Semantic elements, instead of <div> everywhere, for a lot of reasons. You can replace some of them with <header> <nav> <section> <footer> etc


HARVESTER: Add hideNamespaceLocation for product config

Related upstream dashboard PR: https://github.com/rancher/dashboard/pull/7702

Will closed this PR after rebase upstream

Rebased, already have commit https://github.com/harvester/dashboard/commit/17f784ccf05b61fdda7d9a874107f277c606b760


'Run' function does not work as expected

problem:
if you click 'run' in one frame and run it, then click 'run' in another, it does not recompile the new code.

only the first run clicked is compiled and run

repro:
choose the first code frame
click run.
choose the next code frame
click run
expected:
first frame compiles and runs
second frame replaces the first and compiles and runs
Actual:
first frame compiles and runs
Second frame does not compile and run, even if I clear using the clear button.  it put the new code in there, but the old fram eis the only thing that compiles and runs.

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

ID: 11ecfc18-477b-f792-4136-2feb46bbc5d3
Version Independent ID: 82f53ae8-a9d4-dea9-5acd-6d9202a40882
Content: How to compare strings - C# Guide
Content Source: docs/csharp/how-to/compare-strings.md
Product: dotnet-csharp
Technology: csharp-fundamentals
GitHub Login: @BillWagner
Microsoft Alias: wiwagn

Oops actually, this was a problem with my browser :( Sorry about that.


Please, fully translatable Via Config.toml

Currently {BLOG, CATEGORIES, ABOUT} are translatable via Config file.
May you use shortcodes for others too, such as: 'Recent Posts', 'View More Posts', ... .

Hi onrea, can you provide more information? I'm not exactly sure what you have in mind.

# Set up your menu items in the navigation bar
# You can use identifier to prepend a font awesome icon to your text
[[menu.main]]
    name = "AAAA"
    url = "/blog"
    identifier = "fa fa-newspaper-o"
    weight = 1

[[menu.main]]
    name = "BBBB"
    url = "/categories"
    weight = 2

[[menu.main]]
    name = "CCCC"
    url = "/about"
    weight = 3

As you see I have replaced Blog with AAAA in above snippet.
We can replace **Blog** word with a native translation. There are some other phrases that are not translatable via config file. We should edit layout/*.html files that makes it hard to keep up-to-date the theme by your theme as upstream.

I personally do not agree with this suggested change.  Let's use Wordpress as a base here.  It is a blogging engine like Hugo and it does not let you customize every piece of text in the theme.  This would cause a ton of bloat.
Instead I recommend you make your own fork of the theme with your own customizations to various text elements.
@jpescador decision.
Best,

Hey onrea, I agree with what Nic is saying here. However, I do understand the inconvenience of not being able to edit text such as the titles in the sidebar: Recent Posts, Categories, About. Therefore, I will look into this when time permits and I believe, Data Files, https://gohugo.io/extras/datafiles/ can be utilized for this kind of issue. Thanks

Would be solved with the implementation of #39.


Invalid article date

The article is dated 9/26/2020, but today's date is only 9/20/2020. Not sure if it really matters, but wanted to report it.

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

ID: 7a54c97f-ddd4-b041-5e5f-a2df009ace50
Version Independent ID: fa488196-1f98-08ea-adcc-17d9dac86727
Content: Razor Pages with Entity Framework Core in ASP.NET Core - Tutorial 1 of 8
Content Source: aspnetcore/data/ef-rp/intro.md
Product: aspnet-core
Technology: aspnetcore-data
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Thanks


It's possible to cheat by hitting the top and bottom at the same time

You can even simplify this by setting the top and bottom to the same key.

For now in the lazer you can do the same thing for every gamemode. I believe that should be fixed osu-side, so for now there's nothing I can do. Will leave this issue open just in case.


Sentry-SDK 1.33 fails to import with "parse_version` is undefined with greenlet installed

How do you use Sentry?
Sentry Saas (sentry.io)
Version
1.33.0
Steps to Reproduce

Install sentry-sdk 1.32 and greenlet:

root@99404168d77f:/opt/airflow# pip freeze | grep -E "greenlet|sentry-sdk"
greenlet==3.0.1
sentry-sdk==1.32.0
root@99404168d77f:/opt/airflow#

Import sentry_sdk

root@99404168d77f:/opt/airflow# python
Python 3.8.18 (default, Oct 11 2023, 23:57:43)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.

import sentry_sdk

Works fine

Upgrade to sentry_sdk 1.33.0

root@99404168d77f:/opt/airflow# pip install --upgrade sentry-sdk==1.33.0
Collecting sentry-sdk==1.33.0
  Downloading sentry_sdk-1.33.0-py2.py3-none-any.whl.metadata (9.6 kB)
Requirement already satisfied: certifi in /usr/local/lib/python3.8/site-packages (from sentry-sdk==1.33.0) (2023.7.22)
Requirement already satisfied: urllib3>=1.26.11 in /usr/local/lib/python3.8/site-packages (from sentry-sdk==1.33.0) (1.26.18)
Downloading sentry_sdk-1.33.0-py2.py3-none-any.whl (243 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 243.2/243.2 kB 2.8 MB/s eta 0:00:00
Installing collected packages: sentry-sdk
  Attempting uninstall: sentry-sdk
    Found existing installation: sentry-sdk 1.32.0
    Uninstalling sentry-sdk-1.32.0:
      Successfully uninstalled sentry-sdk-1.32.0
Successfully installed sentry-sdk-1.33.0

root@99404168d77f:/opt/airflow# pip freeze | grep -E "greenlet|sentry-sdk"
greenlet==3.0.1
sentry-sdk==1.33.0
root@99404168d77f:/opt/airflow#

Import sentry_sdk:

root@99404168d77f:/opt/airflow# python
Python 3.8.18 (default, Oct 11 2023, 23:57:43)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sentry_sdk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/__init__.py", line 1, in <module>
    from sentry_sdk.hub import Hub, init
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/hub.py", line 8, in <module>
    from sentry_sdk.scope import Scope
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/scope.py", line 7, in <module>
    from sentry_sdk.attachments import Attachment
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/attachments.py", line 5, in <module>
    from sentry_sdk.envelope import Item, PayloadRef
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/envelope.py", line 7, in <module>
    from sentry_sdk.session import Session
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/session.py", line 5, in <module>
    from sentry_sdk.utils import format_timestamp
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/utils.py", line 1240, in <module>
    HAS_REAL_CONTEXTVARS, ContextVar = _get_contextvars()
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/utils.py", line 1210, in _get_contextvars
    if not _is_contextvars_broken():
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/utils.py", line 1165, in _is_contextvars_broken
    greenlet_version = parse_version(greenlet.__version__)
NameError: name 'parse_version' is not defined
>>>

Expected Result
The import should succeed.
Actual Result
The import fails with exception:
root@99404168d77f:/opt/airflow# python
Python 3.8.18 (default, Oct 11 2023, 23:57:43)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sentry_sdk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/__init__.py", line 1, in <module>
    from sentry_sdk.hub import Hub, init
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/hub.py", line 8, in <module>
    from sentry_sdk.scope import Scope
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/scope.py", line 7, in <module>
    from sentry_sdk.attachments import Attachment
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/attachments.py", line 5, in <module>
    from sentry_sdk.envelope import Item, PayloadRef
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/envelope.py", line 7, in <module>
    from sentry_sdk.session import Session
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/session.py", line 5, in <module>
    from sentry_sdk.utils import format_timestamp
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/utils.py", line 1240, in <module>
    HAS_REAL_CONTEXTVARS, ContextVar = _get_contextvars()
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/utils.py", line 1210, in _get_contextvars
    if not _is_contextvars_broken():
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/utils.py", line 1165, in _is_contextvars_broken
    greenlet_version = parse_version(greenlet.__version__)
NameError: name 'parse_version' is not defined
>>>

Very likely caused by https://github.com/getsentry/sentry-python/pull/2464

@potiuk I published a patch for this, please give it a try: https://github.com/getsentry/sentry-python/releases/tag/1.33.1

Confirmed it works!

Thanks for super-speedy fix :)

BTW. Would be great to yank 1.33.0 if you have not done it yet, that will avoid someone getting into it accidentally

True. I see If I have the permissions to do this.

Yanked!

Fantastic! Thanks!


Failed to make membrane

Describe the bug
Checked out  the project and tried to build it using make membrane and got the following error
installing go dependencies
Building Go Project...
adapters/grpc/auth_grpc.go:20:2: no required module provides package github.com/nitric-dev/membrane/interfaces/nitric/v1; to add it:
        go get github.com/nitric-dev/membrane/interfaces/nitric/v1
pluggable_membrane.go:24:2: no required module provides package github.com/nitric-dev/membrane/plugins/sdk; to add it:
        go get github.com/nitric-dev/membrane/plugins/sdk
make: *** [makefile:3: membrane] Error 1

it's missing /sdk inside plugins directory  ?

Hi @nanikjava, thanks for raising this, it looks like we've left an older build target in the makefile. We'll get that cleaned up, in the meantime, you can try one of these depending on which platform you're building for:
Binary for local run
make dev-static
Docker image for local run
make dev-docker
You should be able to substitute dev for aws, gcp, or do to target AWS, Google Cloud or DigitalOcean for the builds also.

Thanks @jyecusch
Tried your suggestion to build binary for local run and got the following error
└─ $ ▶ make dev-static
Generating Proto Sources
./contracts/proto: warning: directory does not exist.
./contracts/proto/*/**/*.proto: No such file or directory
make: *** [makefile:67: generate-proto] Error 1

The contents of the /contracts directory contain protobuf contracts, which we include as a git submodule. Can you try git submodule init from the root of the project?

Apologies, I mean git submodule update --init --recursive

Also, if you're just getting started you can skip the build step for the Membrane by building a project with our CLI. It will use Docker to pull pre-built images for targeted environments.

Apologies, I mean git submodule update --init --recursive

Yes, this works able to compile membrane
I'm interested to learn the internals of the membrane server, trying to look into the code inside IDE too :)
When running membrane, got the following
└─ $ ▶ ./membrane
mkdir /nitric: permission denied
2021/07/06 12:13:02 There was an error initialising the membraneServer server: Missing membrane plugins, if you meant to load with missing plugins set options.TolerateMissingServices to true

didn't see any --help option for membrane though ?

Also, if you're just getting started you can skip the build step for the Membrane by building a project with our CLI. It will use Docker to pull pre-built images for targeted environments.

I'm interested to learn the internals of the membrane server, trying to look into the code inside IDE too :)

At the moment, the Membrane isn't really intended to run outside of a container, so that error you're seeing is it trying to access a directory it expects to exist. We need to make that configurable, I'll add another issue for that. Happy to answer questions about the server is general though as you have them.

Created #71 to deal with the local run issue mentioned.


Fixed helper showing html tags

Wouldn't </br> be replaced with \n?

It would seem like so but it ends up looking correct on the helper because LuaDoc puts in \n after each line of comments in the source code.

@EpicG @Jazzelhawk Is this good to go?

Looks good to me, unless @Jazzelhawk wants to change anything.

Good to go.


Entity not following bounding box after undo

I have found two ways to reproduce the issue, (therefor two slightly different issues),
First methode:

you create an entity and then flip it over X/Y values,
suppress it
ctrl+Z twice to undo suppress and undo flipping,
if you try to move the entity you should be able to move just the bounding box, not the entity..
Second:
same as first one just change the renderable value instead of flipping..
I guess that there may be other ways to reproduce it, but I think that it's related to the same problem..

Suppress is weird way of saying delete ;) I can reproduce it so I will investigate now.

Hahaha yeah, polyglot problems.. :smiley:

Fixed it, also done #98 at the same time and fixed some crash when doing something like this:

Add Entity
Change any of it's property using Entity Properties
Remove Entity
Undo 3 times, redo 3 times
Repeat step 4 until crash.


About Parallel File System

Issue on page:        https://github.com/opentelekomcloud-docs/object-storage-service/blob/main/doc/parallel-file-system/source/introduction/about_parallel_file_system.rst
Its mentioned that the PFS can support "Terabytes of bandwidth and can handle millions of IOPS". this is not correct.
Can we replace this with "high Bandwidth" and "huge amount of IOPS". We should not specify numbers. I receive complains by customers as this is not correct.

Hello @DanielTSI , thank you for your request, we'll update the documentation.

The text was updated.


[Feature Request]: Authentication and in weather image.

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
Authentication can be provided using clerk
In Weather we can use a place api to fetch image of that place and weather conditions as well
Use Case
to identify and track user and his profile
Benefits
No response
Add ScreenShots
No response
Priority
High
Record

[X] I have read the Contributing Guidelines
[ ] I'm a GSSOC'24 contributor
[X] I have starred the repository

Hi @SunkaraboinaPraveenKumar ..I think...the weather forecast which is already there
.is good..it need some extra features like...
Hourly
Daily
Weekly
Monthly
Yearly
Type of functions...so that user can see what ever he wants...
If you have a new idea raise a new issue...I am closing this one...

I can do hourly and daily with reactjs and using beautiful toasts.

hi @SunkaraboinaPraveenKumar raise anew issue by following issue template.. iw ill assign you..please do it perfectly by not changing the existing look and design..
thank you @SunkaraboinaPraveenKumar

Thank You i will raise but once have a look at your app weather functionality is not working well i think

Yesterday it worked well

Another Thing If You Feel like Chatbot is necessary in can do that as well if weather is not that important

I will raise an issue if none are working on it

hi @SunkaraboinaPraveenKumar you first work on chat bot...later you can do weather

when it comes to workinng of weather..the api calls limit is over..i just updated the api key...it is working fine now..

Ok Bro I will work on Chatbot i will raise issue


Possible bug: clarify intended behaviour of 'globstar' (**) on files in the top level directory

My understanding is that ** ('globstar') matches zero or more directories (as stated in the readme)
Intuitively, this (to me) implies that a pattern like  Dashboards/**/*.json would bring back a file such as Dashboards/examples/example.json (which it does) but also Dashboards/example.json
At least when using .GlobFiles, the second example does not appear to be true for this library
Comparison with other libraries/tools
It's not totally clear to me whether this behaviour is expected - googling around, you see a mixture of behaviours for these kinds of patterns (e.g. Bash may not allow these kinds of patterns without a special option being set gobally - but sometimes it does) - whereas tools such as http://www.globtester.com/ match both examples for the pattern above (which admittedly uses minimatch, and explicitly states it is not compliant)
What is actually the intended behaviour for globstar in this library, and/or is this a bug?

It should match both Dashboards/examples/example.json and Dashboards/example.json as in your example.

Here is a small example for it:
using System;
using System.Collections.Generic;
using System.Linq;
using Glob;

namespace glob_testcase
{
    class Program
    {
        // glob 0.3.3
        public static void Main(string[] args)
        {
            Glob.Glob g = new Glob.Glob("dashboards/**/*.json", GlobOptions.Compiled);

            string[] files = new string[]
            {
                "dashboards/example.json",
                "dashboards/examples/example.json",
                "dashboards/toplevel.json"
            };

            IEnumerable<string> results = files.Where(f => g.IsMatch(f));

            Console.WriteLine(String.Join(", ", results));
        }
    }
}

Prints only:
dashboards/examples/example.json

Previously I had made mistakes with case (not realising it would understandably be case sensitive), but after correcting for that, this issue still stands.
For my use case this isn't a huge issue (I'm just auto-adding folder/*.json style rules automatically when globstar is detected) and I imagine this would be difficult to address without compatibility breakage
Might just be worth a note in the readme or something for the time being though

I ran into this too, and have fixed it locally by post-processing the regex that is generated within the Glob class. It was either this, or keep state in the Visitor so that '/' would not be prepended to Path Segments when immediately preceded by the Directory Wildcard.
Pull Requested created: #24


goku: 0.5.2 -> 0.6.0, fix deps, add aarch64

Description of changes

Version bump
Add missing dependency on Joker (program would crash before if Joker was not installed via brew)
Add aarch64-specific version

Things done

Built on platform(s)

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

[x] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[x] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Seems like directory structures of zips for arm and intel versions are different; just pushed fix.

Result of nixpkgs-review pr 205182 run on aarch64-darwin 1

1 package built:

goku

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/1584


Comment about pytest-reportlog

Was browsing the code and came across this comment:
https://github.com/asottile/detect-test-pollution/blob/cb049b119f6f6e17287e6cdbf3544c5632b6fd78/detect_test_pollution.py#L15
Wanted to point out that https://github.com/pytest-dev/pytest-reportlog is meant to support this use case exactly. If any feature you need is missing, should be easy to enhance that plugin too.

heh yeah -- I'd rather not depend on another plugin though -- too many moving parts already!
thanks though!


Fix test container network setup

The network setup of the test containers were faulty. In between containers there were no wireguard handshakes and keep alives during the tests. This PR fixes this by using the same network setup the just interactive test does.
I couldn't figure out what the exact problem was. The main issue I found was that restarting systemd-networkd inside a container restarted it in every other container running wiresmith. After the restart every container used the netdev configuration of the one single container which restarted its systemd-networkd.

This is fine but please find out what made it fail to begin with as this might be an important finding, actually.

Closed in favor of #32.


Make error reports be user friendly

I've been using fastpack lately with several projects and found out that error reporting is far from being perfect of even usable. Here are some ideas which I've got so far:

Parse errors
Parse errors are received from the Flow_parser and then displayed by fastpack in a quite ugly manner:
Project Directory: /.../test/error-parse
Mode: development
Call Stack:
        './a' from module: index.js
'./index.js' from module: $fp$main
Processing Module: a.js

Parse Error
File: a.js
        (1:15) - (1:16): Unexpected token ;

As you can see, it shows the file and the location(s) of the error, as well as the error text. Ideally, we would show the code frame and highlight (using color or some ASCII art) the location for each error in the list.

Parse errors - non-JS files
The error message for the error above gets even uglier when fastpack consumes the CSS or static file, thinking of it as being JS. Here is an example:
$ cat App.css
@import '~antd/dist/antd.css';

.logo {
    height: 60px;
    font-weight: bold;
    font-size: 1.2em;
    background: white;
    text-align: center;
}
$ fpack App.css

Project Directory: /Users/zindel/neuron/neuron-ant/src
Mode: production
Call Stack:
        './App.css' from module: $fp$main
Processing Module: App.css

Parse Error
File: App.css
        (1:8) - (1:29): Unexpected string
        (1:29) - (1:30): Unexpected token ;
        (1:1) - (3:5): Found a decorator in an unsupported position.
        (4:12) - (4:16): Unexpected token ILLEGAL
        (4:14) - (4:16): Unexpected identifier
        (5:15) - (5:16): Unexpected token :
        (6:13) - (6:14): Unexpected token :
        (6:15) - (6:20): Unexpected token ILLEGAL
        (6:18) - (6:20): Unexpected identifier
        (8:14) - (8:15): Unexpected token :

Lots of misleading errors for such a short file! Imagine, how long is this list for the binary file. We definitely can do better here by handling the case when module doesn't have preprocessors (we expect all of them to return valid JS) + has some non-JS extension (.less, .sass, .ts, .png etc). Moreover, we could suggest the --preprocess command line argument if we see this instead of displaying the  list of errors. For instance for the case above, we could say:
Parse Error
File: App.css
It looks like you're trying to import the CSS file.
Try adding the following argument to the config:
    --preprocess='\.css$:style-loader!css-loader'

Here is the list of extensions & loaders we could offer (fill free to add more :)):

.css: style-loader!css-loader
.scss, .sass: style-loader!css-loader!sass-loader
.less: style-loader!css-loader!less-loader
.ts: ts-loader
.html, .htm: html-loader
.txt: raw-loader
.woff, .woff2, .svg, .png, .jpg, .jpeg, .gif, .ttf: url-loader or file-loader

Suggest the mock package for node libraries
Sometimes some of the 2+ level dependencies requires some of node.js base libraries, like fs or stream. This may be a general error or done for reason, just accounting for the browser-specific mocks. It would be great if fastpack could detect those cases and make a suggestion alongside with reporting the resolve error. For example:
Cannot resolve request 'stream' from module 'x.js'.
This looks like base node.js library and unlikely is required in the browser environment.
If you still want to use it, here is the suggested command line option:
--mock stream:stream-browserify

Here is an example of possible pairs: https://github.com/webpack/node-libs-browser

Dump the last error & the last source file where it happened
Finally, it may be useful to be able to dump the last error alongside with the JS source processed into the file (just like npm-error.log). I've been thinking about the fpack-debug/error.txt and fpack-debug/source.js. Maybe only when --debug is provided. There are few reasons for it:

sometimes we see the error in the internal transpiler/printer, which leads to a parse error on the bundling phase, but the location reported is misleading;
we are currently reporting a lot of additional information (project directory, call stack etc.); maybe this should not be reported to the user interactively, but keeping this info for further processing may be useful.
also, it'd be easier for people to report bugs and provide information by just attaching those files to the issue.

Thoughts? Also, feel free to append to this list if you think something is missing here :)

Hi @zindel!
Thank you for spelling everything out so clearly.
I've started working on solving number 1 (Parse errors) here

@samouri Regarding the first suggestion, it looks quite magical. Also user may want to do it differently or handle the css with some other settings (for example style-loader!css-loader?cssModules=true). I think the best we can do at a later phase is to have the --dry-run mode of the fpack (or some other binary) where it runs on the project & suggests the config.
The --mock one. I agree that the name is less than ideal. I would offer we rename in a separate pull request though. --replace sounds good. How about the --resolve one?
@andreypopp @TrySound any opinion on this ^


Can items not belong to multiple categories?

I can't find a way to make the plugin work with multiple categories.   Is this really not possible?  If so its a deal breaker for me and I'd love to see it added.

you can, in data-category attribute add coma to separate multiple categories. like data-category="1, 2"
data-category="1, 2, 3". is that what you are looking for? its shown in http://yiotis.net/filterizr/ > tutorials > install

Sorry yes of course, I will close this!


Screening process

As an event organizer, I need a way to screen and understand who I am bringing into my community. This way I don't disrupt the community

Also can include a rating process / reputation system for musicians that is community based

Also, needs to be able to approve of a musician coming in before the time is booked


Verify all required VMware permissions and alert users if necessary

What would you like to be added:
I wish the eksctl anywhere tool can verify the required VMware permission before creating a kind cluster. If the permission check failed, alert the user, instead of failed with errors in the debug logs.
Why is this needed:
When running eksctl anywhere to create EKS Anywhere cluster on VMware, check all the required permissions.
$ kubectl get machines -n eksa-system lindarr-mgmt-etcd-ck9fw -o yaml

For example, I get this one after creating the kind cluster:
...
    - lastTransitionTime: "2022-01-05T02:18:21Z"
      message: 'error trigging clone op for machine infrastructure.cluster.x-k8s.io/v1alpha3, Kind=VSphereVM eksa-system/lindarr-mgmt-etcd-ck9fw: ServerFaultCode: Permission to perform this operation was denied.'
      reason: CloningFailed

Thanks for the request!  This is something well look at in a future release.

This has been implemented in the latest version of EKS Anywhere


compile_fail compilation failing to fail

Let me start by thanking you @dtolnay for your tireless efforts and contributions to the Rust community!
I am working on an experimental ranged types crate with typestatey/compile-time checks.  One of those checks is an invariant which ensures the END bound is not less than the START bound.
I created a trybuild test and was surprised when compile_fail reported a test failure because the test code actually compiles successfully, when it shouldn't.
I tried extracting the same code as a unit test, as an integration test and as a standalone package.  In each of these cases, the test code failed to compile, which is what I was expecting.
I am at a loss to explain why the compilation succeeds under trybuild, so I am working though debugging trybuild to see what might be wrong.  So far, I have determined that trybuild is invoking the test with "<path to cargo>/cargo" "--offline" "build" "--target" "x86_64-apple-darwin" "--bin" "trybuild-tests" "--no-default-features" "--features" "" which all seems fine.  Issuing this command line manually fails to find trybuild-tests, so I am working on getting trybuild to leave behind the compilation project so that I can examine it, but have not yet succeeded.
I thought that in parallel, I would post a minimal compiling reproducible example of the issue and the three tests to highlight the inconsistency and provide context in case there was something simple I am missing and someone with more experience with trybuild could point out what I am missing.
Thanks in advance!
U007D

I think this is behaving correctly. If you run cargo check --test integration_tests, the same code also compiles there.

Interesting.  cargo check --test integration_tests does indeed pass, but cargo build --test integration_tests fails (as does cargo test/cargo test --test integration_tests).
Perhaps trybuild is emitting a cargo check for my test after all?  According to run.rs it appears trybuild will use cargo check if project.has_pass is false, which appears to be the case if I am expecting a compilation failure.
Is there some way to force a cargo build from trybuild?

[I] sergibli@HephaestusMobi ~/D/b/trybuild_test (main) [101]> cargo check --test integration_tests
    Checking trybuild_test v0.1.0 (/Users/sergibli/Development/bg/trybuild_test)
warning: unused variable: `result`
  --> tests/integration_tests.rs:14:9
   |
14 |     let result = Range::<START, END>;    // Invalid `Range`
   |         ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: `trybuild_test` (test "integration_tests") generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 0.67s
[I] sergibli@HephaestusMobi ~/D/b/trybuild_test (main)> cargo build --test integration_tests
   Compiling trybuild_test v0.1.0 (/Users/sergibli/Development/bg/trybuild_test)
warning: unused variable: `result`
  --> tests/integration_tests.rs:14:9
   |
14 |     let result = Range::<START, END>;    // Invalid `Range`
   |         ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result`
   |
   = note: `#[warn(unused_variables)]` on by default

error[E0080]: evaluation of `trybuild_test::Range::<100_i32, 1_i32>::INVARIANT` failed
 --> /Users/sergibli/Development/bg/trybuild_test/src/range.rs:8:27
  |
8 |     const INVARIANT: () = assert!(START <= END);
  |                           ^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: START <= END', /Users/sergibli/Development/bg/trybuild_test/src/range.rs:8:27
  |
  = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)

note: the above error was encountered while instantiating `fn <trybuild_test::Range<100_i32, 1_i32> as std::ops::Drop>::drop`
   --> /Users/sergibli/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:188:1
    |
188 | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0080`.
warning: `trybuild_test` (test "integration_tests") generated 1 warning
error: could not compile `trybuild_test` due to previous error; 1 warning emitted
[I] sergibli@HephaestusMobi ~/D/b/trybuild_test (main) [101]> cargo test --test integration_tests
   Compiling trybuild_test v0.1.0 (/Users/sergibli/Development/bg/trybuild_test)
warning: unused variable: `result`
  --> tests/integration_tests.rs:14:9
   |
14 |     let result = Range::<START, END>;    // Invalid `Range`
   |         ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result`
   |
   = note: `#[warn(unused_variables)]` on by default

error[E0080]: evaluation of `trybuild_test::Range::<100_i32, 1_i32>::INVARIANT` failed
 --> /Users/sergibli/Development/bg/trybuild_test/src/range.rs:8:27
  |
8 |     const INVARIANT: () = assert!(START <= END);
  |                           ^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: START <= END', /Users/sergibli/Development/bg/trybuild_test/src/range.rs:8:27
  |
  = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)

note: the above error was encountered while instantiating `fn <trybuild_test::Range<100_i32, 1_i32> as std::ops::Drop>::drop`
   --> /Users/sergibli/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:188:1
    |
188 | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0080`.
warning: `trybuild_test` (test "integration_tests") generated 1 warning
error: could not compile `trybuild_test` due to previous error; 1 warning emitted


Why does compilation happen on the remote machine?

I'm curious to understand why the compilation happens on the remote machine instead of compiling at the developer machine and then uploading to binary? It seems to me that that this would remove the need for accessing private git repos on the remote machine; making this approach simpler and potentially more secure.
Thanks for the project; keep up the good work.
 Maybe in the next updates, we can add the option to copy a compiled executable in the local machine to the remote machine, but this approach requires more configuration.


[.NET] Hindi DateTime Time enhancements

Support for additional cases in Time (7 in TimeExtractor, 6 in TimeParser).
All new test cases pass.
One old case skipped (due to different sentence structure as pointed out in  #1983)

Which previous spec was disabled? I didn't see any Time case disabled for dotnet here. Did I miss it?

This one "मैं साढ़े पाँच बजने में तीन मिनट बाकी होने पर वापस जाउंगा" that corresponds to "I'll go back three mins to five thirty" but in Hindi has a different structure (half past five three mins to).

Which previous spec was disabled? I didn't see any Time case disabled for dotnet here. Did I miss it?

This one "मैं साढ़े पाँच बजने में तीन मिनट बाकी होने पर वापस जाउंगा" that corresponds to "I'll go back three mins to five thirty" but in Hindi has a different structure (half past five three mins to).

I don't see this case being disabled in this PR. If it was already previously disabled, that's OK.
Can you add a Comment on the spec case describing why not support for documentation (if not already commented)?