Issue with the version of the pcmdi_metrics repo?

@doutriaux1 @durack1 Last week I've successfully installed the latest version of the PMP here at IPSL, using the latest install_metrics.bash script available. But the pcmdi_metrics_driver.py I get by running the install script does not make use of unidata (for the unity check/management).
But if I get directly the pcmdi_metrics repo from github (git clone git://github.com/PCMDI/pcmdi_metrics.git), the pcmdi_metrics_driver.py file I get does use unidata:
# Before we do anything else we need to create some units
# Salinity Units
import unidata
unidata.udunits_wrap.init()

# Create a dimensionless units named dimless
unidata.addDimensionlessUnit("dimless")

# Created scaled units for dimless
unidata.addScaledUnit("psu", .001, "dimless")
unidata.addScaledUnit("PSS-78", .001, "dimless")
unidata.addScaledUnit("Practical Salinity Scale 78", .001, "dimless")

Lastly, if I clone the sources in tmp/metrics of the successful install, and run "python setup.py install", the the setup looks successful but the test fails:
test_from_parameter_file (test_from_param.TestFromParam) ... Traceback (most recent call last):
  File "/data/jservon/PMP_installs/2015-11-06/PCMDI_METRICS/bin/pcmdi_metrics_driver.py", line 26, in <module>
    unidata.addDimensionlessUnit("dimless")
AttributeError: 'module' object has no attribute 'addDimensionlessUnit'
ok

(well, it says ok but there is an error and it displays no result)
So how can I get the version of the PMP using unidat installed properly?
Thanks!

@jservonnat it seems to me that you're not cloning the master branch correctly, as this version of pcmdi_metrics_driver.py does in fact include the above
We have a couple of tweaks which should be merged into the master branch tomorrow - just have to work with @doutriaux1 to get these in, and then you should be able to try again and successfully install the master version..
To make sure you're on master use this command:
[durack1@oceanonly pcmdi_metrics]$ git log --pretty=format:'%h' -n 1
3100dca

This should match the current master SHA1 3100dca as found on the pcmdi_metrics repo homepage

If you're not you'll need to issue a:
[durack1@oceanonly pcmdi_metrics]$ git fetch --all -p
Fetching origin
remote: Counting objects: 31, done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 31 (delta 18), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (31/31), done.
From github.com:PCMDI/pcmdi_metrics
   063ad34..69873c5  climo_script -> origin/climo_script
 * [new branch]      issue_282_tracking -> origin/issue_282_tracking
 * [new branch]      issue_284_matplotlib -> origin/issue_284_matplotlib
[durack1@oceanonly pcmdi_metrics]$ git pull
Already up-to-date.

And you're up to date with master

@jservonnat let us know if that solves it and I'll close this issue..

@durack1 I've tried an install today (wget the install_metrics.bash script, and run it without changing anything), and this is what I got:
jservon@ciclad-ng:/data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/tmp/metrics> git log --pretty=format:'%h' -n 1
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
11d71de

I've tried to fetch the origin as you explain:
jservon@ciclad-ng:/data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/tmp/metrics> git fetch --all -p
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
Fetching origin
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)

And then:
jservon@ciclad-ng:/data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/tmp/metrics> git pull
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
git: /data/jservon/PMP_installs/2015-11-13/PCMDI_METRICS/Externals/lib/libz.so.1: no version information available (required by git)
You are not currently on a branch, so I cannot use any
'branch.<branchname>.merge' in your configuration file.
Please specify which remote branch you want to use on the command
line and try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.

I suppose that there might be a way for me to make it work on my side but you might also be interested by those feedbacks, so I'm reporting my basic use of the install script as if I was totally new to this game...

@jservonnat yep this is what you'd expect when you haven't cloned the repo (and the hidden .git directory and all the interesting git stuff) and just downloaded the single file outside of git..
When you issue a:
git clone https://github.com/PCMDI/pcmdi_metrics.git
You should then get a (lower case) pcmdi_metrics directory with all the source, and if you do a git log within that directory (with it's .git and other bits) it'll then report your SHA1 and what branch you're on..

@jservonnat and the very top of your comment above you have a SHA1 as 11d71de.
Now that relates to the 13th January 2015 v1.0.0 release.. Which is findable at https://github.com/PCMDI/pcmdi_metrics/tree/v1.0.0

@durack1 Ok, then I might need to learn to control the version from the install script. If you have the solution I take it ;)

@jservonnat for completeness the unidata stuff linked at the top, was included on the 17th April 2015 in https://github.com/PCMDI/pcmdi_metrics/commit/14648146a4dc9ec04e5027468c99bbfbaab4c7a4 with SHA1 1464814

@jservonnat stackoverflow.com is your new best friend http://stackoverflow.com/questions/3555107/git-clone-particular-version-of-remote-repository

@durack1 Ok so I've commented the 'git checkout ${metrics_checkout}' line and now it's fine.
I'll check tomorrow if I can merge my IPSL developments. Thank you for your help!

Thanks @durack1 ;)

@jservonnat you can control this a little better by changing the values at https://github.com/PCMDI/pcmdi_metrics/blob/master/install_metrics.bash#L386-L390 - these set either the v1.0.0 or master versions of the metrics along with also controlling the version of UV-CDAT/CDAT that is installed.. Our current latest master branch uses master for both

@durack1 I'm afraid it's not over...
I've set cdat_version="master" and metrics_checkout="master", and this is what I got:
[...]
Removing /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/cdutil-_-py2.7.egg-info
Writing /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/cdutil-_-py2.7.egg-info

*******************************
UVCDAT  - master - Install Success
Metrics - master - Install Success
*******************************
Please test as follows:
source /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/bin/setup_runtime.sh or .csh
python /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/test_suite.py
*******************************
Create your customized input_parameters.py (inspire yourself from examples in /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/doc/pcmdi_input_parameters_sample.py
Once you have a parameter file run:
source /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/bin/setup_runtime.sh
pcmdi_metrics_driver.py -p /path/to/your/edited/parameter_file.py
*******************************
Once everything is ok, you can safely remove the temporary directory: /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp
*******************************
For further information or suggestions please contact the PCMDI Metrics Team<EMAIL_ADDRESS>*******************************

jservon@ciclad-ng:/data/jservon/PMP_installs/2015-11-16> source /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/bin/setup_runtime.sh
Successfully updated your environment to use UVCDAT
(changes are valid for this session/terminal only)
Version: 2.4.0.rc2-100-gfa0d2e2
Location: /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS
jservon@ciclad-ng:/data/jservon/PMP_installs/2015-11-16> python /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/test_suite.py
ERROR import vcs, skipping graphics test...
flake8 (test_flake8.TestFlake8) ... ok
test_from_parameter_file (test_from_param.TestFromParam) ...  parameter file ref is:  ['all']
 refs: [u'default']
 ref is:  [u'default']
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/ESMP/src/ESMP_API.py:1241: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if (srcMaskValues != None):
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/ESMP/src/ESMP_API.py:1248: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if (dstMaskValues != None):
 OBS SHAPE IS  (12, 72, 144)
 tos   GFDL-ESM2G   (12, 72, 144)   (12, 72, 144)    default
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/numpy/ma/core.py:935: RuntimeWarning: overflow encountered in multiply
  result = self.f(da, db, *args, **kwargs)
 parameter file ref is:  ['all']
 refs: [u'default', u'alternate1', u'alternate2']
 ref is:  [u'default', u'alternate1', u'alternate2']
 OBS SHAPE IS  (12, 72, 144)
 tas   GFDL-ESM2G   (12, 72, 144)   (12, 72, 144)    default
Fatal Python error: Couldn't create autoTLSkey mapping
comparing: pcmdi_install_test_results/metrics_results/installationTest/tos_2.5x2.5_esmf_linear_metrics.json /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/pcmdi/installationTest/tos_2.5x2.5_esmf_linear_metrics.json
Failing line: -                    "bias_xy_djf_GLB": "0.29",

Failing line: -                    "bias_xy_djf_SHEX": "2.26",

Failing line: -                    "bias_xy_jja_SHEX": "0.70",

Failing line: -                    "bias_xy_mam_GLB": "0.13",

Failing line: -                    "bias_xy_mam_NHEX": "-0.95",

Failing line: -                    "bias_xy_son_NHEX": "-1.18",

Failing line: -                    "bias_xy_son_SHEX": "0.67",

Failing line: -                    "mae_xy_djf_NHEX": "1.30",

Failing line: -                    "mae_xy_jja_NHEX": "1.11",

Failing line: -                    "mae_xy_mam_NHEX": "1.18",

Failing line: -                    "mae_xy_son_NHEX": "1.32",

Failing line: -                    "rms_xy_ann_NHEX": "1.87",

Failing line: -                    "rms_xy_ann_SHEX": "1.61",

Failing line: -                    "rms_xy_djf_GLB": "1.83",

Failing line: -                    "rms_xy_djf_NHEX": "2.18",

Failing line: -                    "rms_xy_jja_TROPICS": "1.19",

Failing line: -                    "rms_xy_mam_NHEX": "1.98",

Failing line: -                    "rms_xy_son_NHEX": "2.09",

Failing line: -                    "rms_xy_son_TROPICS": "1.28",

Failing line: -                    "rms_xyt_ann_NHEX": "2.05",

Failing line: -                    "rms_xyt_ann_TROPICS": "1.30",

FAIL
test_from_parameter_file (test_from_param.TestFromParam) ...  parameter file ref is:  ['default']
 ref is:  ['default']
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/ESMP/src/ESMP_API.py:1241: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if (srcMaskValues != None):
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/ESMP/src/ESMP_API.py:1248: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if (dstMaskValues != None):
 OBS SHAPE IS  (12, 72, 144)
 tas   GFDL-ESM2G   (12, 72, 144)   (12, 72, 144)    default
 Error while processing variable tas:
	not all arguments converted during string formatting
ok
test_from_parameter_file (test_from_param.TestFromParam) ... CDMS system error: No such file or directory
CDMS I/O error: Opening file /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/pcmdi/data/sftflf_not_here_GFDL-ESM2G.nc
 No mask for  /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/pcmdi/data/sftflf_not_here_GFDL-ESM2G.nc
 parameter file ref is:  ['default']
 ref is:  ['default']
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/ESMP/src/ESMP_API.py:1241: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if (srcMaskValues != None):
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/ESMP/src/ESMP_API.py:1248: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if (dstMaskValues != None):
 OBS SHAPE IS  (12, 72, 144)
 tas   GFDL-ESM2G   (12, 72, 144)   (12, 72, 144)    default
 Error while processing variable tas:
	not all arguments converted during string formatting
ok
test_from_parameter_file (test_from_param.TestFromParam) ... CDMS system error: No such file or directory
CDMS I/O error: Opening file /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/pcmdi/data/sftflf_not_here_GFDL-ESM2G.nc
 No mask for  /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/pcmdi/data/sftflf_not_here_GFDL-ESM2G.nc
 parameter file ref is:  ['default']
 ref is:  ['default']
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/ESMP/src/ESMP_API.py:1241: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if (srcMaskValues != None):
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/ESMP/src/ESMP_API.py:1248: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if (dstMaskValues != None):
 OBS SHAPE IS  (12, 72, 144)
 tas   GFDL-ESM2G   (12, 72, 144)   (12, 72, 144)    default
 Error while processing variable tas:
	not all arguments converted during string formatting
ok
test_from_parameter_file (test_from_param.TestFromParam) ... CDMS system error: No such file or directory
CDMS I/O error: Opening file /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/pcmdi/data/sftlf_GFDL-ESM2G_fx_historical_r0i0p0_198501-200512-clim.nc
 No mask for  /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/pcmdi/data/sftlf_GFDL-ESM2G_fx_historical_r0i0p0_198501-200512-clim.nc
 Error while processing variable aVarThatIsNot:
	'aVarThatIsNot'
 parameter file ref is:  ['default']
 ref is:  ['default']
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/ESMP/src/ESMP_API.py:1241: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if (srcMaskValues != None):
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/ESMP/src/ESMP_API.py:1248: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if (dstMaskValues != None):
 OBS SHAPE IS  (12, 72, 144)
 tos   GFDL-ESM2G   (12, 72, 144)   (12, 72, 144)    default
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/numpy/ma/core.py:935: RuntimeWarning: overflow encountered in multiply
  result = self.f(da, db, *args, **kwargs)
CDMS system error: No such file or directory
CDMS I/O error: Opening file /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/pcmdi/obs/fx/sftlf/UKMETOFFICE-HadISST-v1-1/sftlf_pcmdi-metrics_fx_UKMETOFFICE-HadISST-v1-1_198002-200501-clim.nc
 Could not find obs mask, generating
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/cdms2/avariable.py:1088: Warning:
avariable.regrid: We chose regridMethod = linear for you among the following choices:
    'conserve' or 'linear' or 'patch'
  warnings.warn(message, Warning)
 OBS SHAPE IS  (12, 72, 144)
 Error while processing variable tos:
	not all arguments converted during string formatting
ok
test_from_parameter_file (test_from_param.TestFromParam) ...  parameter file ref is:  ['ERAINT']
 ref is:  ['ERAINT']
 OBS SHAPE IS  (12, 72, 144)
 tas   GFDL-ESM2G   (12, 72, 144)   (12, 72, 144)    ERAINT
 OBS SHAPE IS  (12, 72, 144)
 tas   GFDL-ESM2G   (12, 72, 144)   (12, 72, 144)    ERAINT
Fatal Python error: Couldn't create autoTLSkey mapping
ok
test_from_parameter_file (test_from_param.TestFromParam) ... CDMS system error: No such file or directory
CDMS I/O error: Opening file /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/pcmdi/data/sftlf_GFDL-CM3_fx_historical_000101-010012-clim.nc
 No mask for  /data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/pcmdi/data/sftlf_GFDL-CM3_fx_historical_000101-010012-clim.nc
 parameter file ref is:  ['JPL-Aquarius-v2']
 ref is:  ['JPL-Aquarius-v2']
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/ESMP/src/ESMP_API.py:1241: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if (srcMaskValues != None):
/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/lib/python2.7/site-packages/ESMP/src/ESMP_API.py:1248: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if (dstMaskValues != None):
^@ OBS SHAPE IS  (12, 72, 144)
 sos   GFDL-CM3   (12, 72, 144)   (12, 72, 144)    JPL-Aquarius-v2
 Error while processing variable sos:
	not all arguments converted during string formatting
ok

======================================================================
FAIL: test_from_parameter_file (test_from_param.TestFromParam)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/jservon/PMP_installs/2015-11-16/PCMDI_METRICS/tmp/metrics/test/test_from_param.py", line 68, in test_from_parameter_file
    self.assertTrue(ok)
AssertionError: False is not true

----------------------------------------------------------------------
Ran 8 tests in 89.206s

FAILED (failures=1)

And meanwhile the "default" install (with cdat_version="2.1.0" and metrics_checkout="v1.0.0") works fine.
I'm a little bit confused... any idea?

@jservonnat yep this is expected.. and was what I meant by the "tweaks which should be merged into the master branch" comment above
If you can wait a week (@doutriaux1 is locked up finalising the UV-CDAT 2.4.0 release) these issues in master should be solved soon for your reference when #279 and #277 are closed this should be solved..

@durack1 Ok then I'll wait for next week ;).


JAX conflicts with PyTorch at import time

Description
When importing jax and pytorch, namely
import torch

import os
os.environ['XLA_FLAGS'] = '--xla_gpu_force_compilation_parallelism=1'
import jax

I get the following error
Traceback (most recent call last):
  File "debug_script.py", line 6, in <module>
    import jax
  File "/home/badr-moufad/anaconda3/envs/skglm-gpu/lib/python3.7/site-packages/jax/__init__.py", line 35, in <module>
    from jax import config as _config_module
  File "/home/badr-moufad/anaconda3/envs/skglm-gpu/lib/python3.7/site-packages/jax/config.py", line 17, in <module>
    from jax._src.config import config  # noqa: F401
  File "/home/badr-moufad/anaconda3/envs/skglm-gpu/lib/python3.7/site-packages/jax/_src/config.py", line 27, in <module>
    from jax._src import lib
  File "/home/badr-moufad/anaconda3/envs/skglm-gpu/lib/python3.7/site-packages/jax/_src/lib/__init__.py", line 87, in <module>
    import jaxlib.xla_client as xla_client
  File "/home/badr-moufad/anaconda3/envs/skglm-gpu/lib/python3.7/site-packages/jaxlib/xla_client.py", line 25, in <module>
    from . import xla_extension as _xla
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/badr-moufad/anaconda3/envs/skglm-gpu/lib/python3.7/site-packages/jaxlib/xla_extension.so)

I thought it might be an error linked to the version of libstdc++, but it appears to be not the case.
Indeed, the problem disappears when swapping the import order of them.
What jax/jaxlib version are you using?
jax v0.3.25, jaxlib v0.3.22
Which accelerator(s) are you using?
GPU
Additional system info
Python 3.7, OS Linux Ubuntu 64-bit
NVIDIA GPU info
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.105.01   Driver Version: 515.105.01   CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA T600 Lap...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   49C    P0     8W /  N/A |      9MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1766      G   /usr/lib/xorg/Xorg                  4MiB |
|    0   N/A  N/A      2699      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

I would stick with inversing the order of imports as the conflict between both packages persists despite installing them from conda.
Thanks for your response!


Can I implement go-mysql-bigquery using go-mysql

@siddontang
If you don't mind, I want to impl below. If you mind, I will delete below.
https://github.com/letusfly85/go-mysql-bigquery
Please let me know.

sorry, but I see nothing in your repo, can you tell me what do you want to do?

Thank you for replying.
I want to collect data from MySQL BinLog and put them to BigQuery.
And if you don't mind, I wan to use your go-mysql library to impl it.

Of course, you can. My go-mysql uses MIT license, you can use it freely.

Thank you! 😄
I'll impl! 💪


Drop fields overriden with :%{}

Avoid selecting fields overridden with the %{p | my_field: nil}) syntax.
The following works as expected and returns posts with nil as a title:
iex> Post |> select([p], %{p | text: nil}) |> Repo.all()

23:06:01.855 [debug] QUERY OK source="blog_posts" db=8.5ms decode=0.8ms queue=2.9ms idle=1124.6ms
SELECT b0."id", b0."title", b0."text", b0."inserted_at", b0."updated_at" FROM "blog_posts" AS b0 LIMIT 2 []

but the underlying SQL still selects p.text, which could be avoided. This PR should improve this.
Comments welcome 🙂

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:


Add CtaLink as Alpha component

This introduces an experimental component to explore visually separating links from buttons, as discussed in
https://github.com/github/primer/discussions/477 and highlighted in Button a11y audit and API audit.
It has the same API as Button apart from removing the link scheme and button-related args.
Preview

@manuelpuyol I'm not sure what's up with these tests, could you take a look?

ArgumentError: Primer::ButtonComponent declares the leading_visual slot multiple times. - I'm assuming this is because we're extending ButtonComponent in CtaLink? This error didn't occur with the last button changes in #924 🤔 I don't know enough about Rails to debug/solve this on my own 😞

Hey @jonrohan, I recognize this is a blast from the past but would hate to lose valid work just because this went stale. Could you take a look and see whether this is something we should resolve conflicts on and revive, or go ahead and close?

I think we should close this for now, and reevaluate how we would implement this component.


Favicons need to be implemented

Describe the Feature / Enhancement
Wren has designed some favorites-related icons that need to be implemented on the frontend.
Additional Details and Resources
The aforementioned icons.
Next.js documentation on favicons.
Correct Project Selected

[X] This issue is linked to the appropriate project.

Correct Label Selected

[X] This issue has appropriate labels.

Correct Milestone Selected

[X] This issue has appropriate milestone.

Closing for now, as the favicons are still in progress.

Back from the dead!


Device Tab Causes "Unfortunately BaseUI has stopped"

Describe the bug

On Device, tapping on settings icon and tapping on Device tab will cause "Unfortunately BaseUI has stopped"
How to reproduce or log data

Tap Settings icon, tap on Device tab
Expected behavior

Tapping on Device tab should allow me to use functions in said tab
Device/Version information (please complete the following information):

Device: Comma Two
Dongle ID: bdad50b8a1f9fa8e
Route: n/a
Timestamp: n/a
Version: https://github.com/commaai/openpilot/commit/5138d213a75a01f9ba1855131aa4cd712a3a3ce6
Car make/model: n/a
Additional context

What's your Dongle ID? Found in Settings -> Device.

Well if you read above I cannot access the Device menu, but luckily I found it from a previous issue I submitted: bdad50b8a1f9fa8e

We fixed a bug that was on master recently that caused this issue, but you seem to have the fix. Can you reproduce the issue and paste the output of logcat -d in something like a github gist?

We fixed a bug that was on master recently that caused this issue, but you seem to have the fix. Can you reproduce the issue and paste the output of logcat -d in something like a github gist?

I ended up fully uninstalling OP, reinstalling release2, and now back on master-ci. Can no longer reproduce and will close issue. Please reopen if you feel it needs further investigation.


Fix the inference issue #55

The way to passing a doc in inference.py is misleading, and one cannot reproduce the result presented in the paper this way.
It can be found that sentences are passed as they are when the model is trained. We should also pass sentences like that during inference time, rather than pass a whole doc and then get it segmented. And in the modified way, the comparable result (f1 0.78~0.79) can be reproduced.

Many thanks for the PR!
Actually, there are some post-edits in the predict_one function to avoid returning arguments containing [UNK], which may also result in unexpected results.
So I suggest we NEVER use inference.py to reproduce results on ChFinAnn (important, 'cause DuEE-Fin results are obtained in a similar way, so this suggestion is available only on ChFinAnn).
Nice PR~ I'll change a little bit and add a notice in the README file. Please stay tuned.

I extracted the sent_seg behaviour out of predict_one API to make sure there's no more misunderstandings by the Union[str, List[str]] type.

Thanks for your contribution, Shiina18~


[camera] flip/change camera while recording

Allow switching the camera while recording as requested here https://github.com/flutter/flutter/issues/82467
Currently works for Android and iOS
Possible breaking change: moves cameraDescription from the CameraController to the CameraValue because it can now change without re-initializing a whole new controller. This can be changed if there is a better way

Pre-launch Checklist

[x]  I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
[x]  I read the [Tree Hygiene] wiki page, which explains my responsibilities.
[x]  I read and followed the [relevant style guides] and ran [the auto-formatter]. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
[x]  I signed the [CLA].
[x]  The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[x]  I listed at least one issue that this PR fixes in the description above.
[x]  I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].
[x]  I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style].
[x]  I updated/added relevant documentation (doc comments with ///).
[x]  I added new tests to check the change I am making, or this PR is [test-exempt].
[x]  All existing and new tests are passing.

Finally!!!!

I have a problem when pub the camera plugin using github, there is a problem when run app :
setDescription() is not implemented.
What is the good way to clone the plugin to my flutter project?

@BradenBagby
I have a problem when pub the camera plugin using github, there is a problem when run app :
setDescription() is not implemented.
What is the good way to clone the plugin to my flutter project?

Sometimes the override dependencies for pubspec.yaml do not seem to work. This might be on certain versions because it appears to work in github's checks, but it doesn't work on my machine.
This means you are pointing to the wrong camera packages in your pubspec.yaml which causes it to throw an unimplemented exception.
You can just change the packages to point to the correct ones manually. Under plugins>packages>camera>camera change it to this:
`name: camera
description: A Flutter plugin for controlling the camera. Supports previewing
the camera feed, capturing images and video, and streaming image buffers to
Dart.
repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A"p%3A+camera"
version: 0.11.0
environment:
sdk: ">=2.14.0 <3.0.0"
flutter: ">=2.10.0"
flutter:
plugin:
platforms:
android:
default_package: camera_android
ios:
default_package: camera_avfoundation
web:
default_package: camera_web
dependencies:
camera_android:
path: ../../camera/camera_android
camera_avfoundation:
path: ../../camera/camera_avfoundation
camera_platform_interface:
path: ../../camera/camera_platform_interface
camera_web:
path: ../../camera/camera_web
flutter:
sdk: flutter
flutter_plugin_android_lifecycle: ^2.0.2
quiver: ^3.0.0
dev_dependencies:
flutter_driver:
sdk: flutter
flutter_test:
sdk: flutter
mockito: ^5.0.0
plugin_platform_interface: ^2.0.0
video_player: ^2.0.0
FOR TESTING ONLY. DO NOT MERGE.
dependency_overrides:
camera_android:
path: ../../camera/camera_android
camera_avfoundation:
path: ../../camera/camera_avfoundation
camera_platform_interface:
path: ../../camera/camera_platform_interface
camera_web:
path: ../../camera/camera_web
`
Then run flutter pub get again and it will work. Notice I just copied the override dependencies and moved them into the actual dependencies section.

Is there anything else I need to do to get this reviewed and merged? @stuartmorgan

Re-adding @camsim99 for Android review and @bparrishMines for plugin-level (app-facing and platform interface) review.

Re-adding @camsim99 for Android review and @bparrishMines for plugin-level (app-facing and platform interface) review.

Hey @camsim99 and @bparrishMines, is there anything else I can do to help get the ball rolling on this PR?

VideoRenderer is needed because when switching between cameras, the orientation of the recording usually becomes flipped. @camsim99 here is a quick overview why.
MediaRecorder has setOrientationHint. But, setOrientationHint cannot be called mid recording. So when we switch cameras mid recording we cannot use this.
Android Camera2 has no setDisplayOrientation on the camera itself as it is supposed to 'just work' apparently https://stackoverflow.com/questions/33479004/what-is-the-camera2-api-equivalent-of-setdisplayorientation. So we cannot set the camera's orientation either
This leaves us with routing the recording through a surface texture and performing a matrix transformation on it manually to get the correct orientation once the camera is flipped. This could cause slight latency, but I only route through this surface texture if you setDescriptionWhileRecording, so it should not affect previously existing projects using the camera package.
See this project that takes the same approach for allowing flipping the camera while recording:
https://github.com/koushick123/FlipCam/tree/master/app/src/main/java/com/flipcam

hey sir curtenly i am working with camera package but i have problem. still i cant change camera while record video can you help me pleas
/// here is my simple code can u check pleas. Thank you
`import 'dart:async';
import 'dart:math';
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:tstcam/send/video_view_screen/video_view.dart';

class CameraScreen extends StatefulWidget {
  Future<void> main() async {
    WidgetsFlutterBinding.ensureInitialized();
  }

  const CameraScreen({Key? key}) : super(key: key);

  @override
  CameraScreenState createState() => CameraScreenState();
}

class CameraScreenState extends State<CameraScreen> {
  Timer? countdownTimer;
  Timer? pageTimer;
  Duration myDuration = const Duration(minutes: 1, seconds: 30);
  CameraController? _cameraController;
  Future<void>? cameraValue;
  bool isRecoring = false;
  bool flash = false;
  bool iscamerafront = true;
  double transform = 0;
  List<CameraDescription>? cameras;

  void startTimer() {
    countdownTimer =
        Timer.periodic(const Duration(seconds: 1), (_) => setCountDown());
  }

  void stopTimer() {
    setState(() => countdownTimer!.cancel());
  }

  void resetTimer() {
    stopTimer();
    setState(() => myDuration = const Duration(minutes: 1, seconds: 30));
  }

  void setCountDown() {
    const reduceSecondsBy = 1;
    setState(() {
      final seconds = myDuration.inSeconds - reduceSecondsBy;
      if (seconds < 0) {
        countdownTimer!.cancel();
        stopRecord();
      } else {
        myDuration = Duration(seconds: seconds);
      }
    });
  }

  void startRecord() async {
    startTimer();
    await _cameraController?.startVideoRecording();
    setState(() {
      isRecoring = true;
    });
  }

  void stopRecord() async {
    XFile? videopath = await _cameraController?.stopVideoRecording();
    setState(() {
      isRecoring = false;
      stopTimer();
      resetTimer();
    });
    Navigator.push(
        context,
        MaterialPageRoute(
            builder: (builder) => VideoViewPage(
                  path: videopath!.path,
                )));
  }

  void changeCamLens() {
    setState(() {
      iscamerafront = !iscamerafront;
      transform = transform + pi;
    });
    int cameraPos = iscamerafront ? 0 : 1;
    _cameraController =
        CameraController(cameras![cameraPos], ResolutionPreset.ultraHigh);
    cameraValue = _cameraController!.initialize();
  }

  deneme() async {
    cameras = await availableCameras();
    _cameraController = CameraController(
      cameras![0],
      ResolutionPreset.ultraHigh,
    );
    cameraValue = _cameraController?.initialize();

    setState(() {});
  }

  @override
  void initState() {
    super.initState();
    deneme();
  }

  @override
  void dispose() {
    deneme();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    String strDigits(int n) => n.toString().padLeft(2, '0');
    final minutes = strDigits(myDuration.inMinutes.remainder(60));
    final seconds = strDigits(myDuration.inSeconds.remainder(60));
    return SafeArea(
      child: Scaffold(
        backgroundColor: Colors.black,
        extendBodyBehindAppBar: true,
        appBar: AppBar(
            centerTitle: true,
            backgroundColor: Colors.transparent,
            elevation: 0,
            leading: IconButton(
                onPressed: () => Navigator.pop(context, true),
                icon: const CircleAvatar(
                  backgroundColor: Color(0xff161616),
                  child: Icon(
                    Icons.arrow_back_ios_new_rounded,
                    color: Colors.white,
                  ),
                )),
            title: Container(
                height: 30,
                width: MediaQuery.of(context).size.width / 4.5,
                decoration: BoxDecoration(
                    color: int.parse(seconds) <= 10 &&
                            minutes == "00" &&
                            int.parse(seconds) % 2 == 0
                        ? Colors.red
                        : Colors.black,
                    borderRadius: BorderRadius.circular(30)),
                child:
                    Row(mainAxisAlignment: MainAxisAlignment.center, children: [
                  Padding(
                    padding: const EdgeInsets.only(right: 5.0),
                    child: CircleAvatar(
                      backgroundColor: int.parse(seconds) <= 10 &&
                              minutes == "00" &&
                              int.parse(seconds) % 2 == 0
                          ? Colors.white
                          : Colors.red,
                      maxRadius: 2.5,
                    ),
                  ),
                  Text('$minutes:$seconds',
                      style: const TextStyle(fontSize: 15))
                ]))),
        body: Stack(
          children: [
            FutureBuilder(
                future: cameraValue,
                builder: (
                  context,
                  snapshot,
                ) {
                  if (snapshot.connectionState == ConnectionState.done) {
                    return AspectRatio(
                      aspectRatio: 9 / 16,
                      child: CameraPreview(
                        _cameraController!,
                      ),
                    );
                  } else {
                    return const Center(
                      child: CircularProgressIndicator(),
                    );
                  }
                }),
            Positioned(
              bottom: 0.0,
              child: Container(
                padding: const EdgeInsets.only(top: 5, bottom: 5),
                width: MediaQuery.of(context).size.width,
                child: Column(
                  children: [
                    Row(
                      mainAxisSize: MainAxisSize.max,
                      mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                      children: [
                        IconButton(
                            icon: Icon(
                              flash ? Icons.flash_on : Icons.flash_off,
                              color: Colors.white,
                              size: 28,
                            ),
                            onPressed: () {
                              setState(() {
                                flash = !flash;
                              });
                              flash
                                  ? _cameraController
                                      ?.setFlashMode(FlashMode.torch)
                                  : _cameraController
                                      ?.setFlashMode(FlashMode.off);
                            }),
                        GestureDetector(
                          onLongPress: () async {
                            startRecord();
                          },
                          onLongPressUp: () {
                            stopRecord();
                          },
                          onTap: () {
                            /*
                            if (!isRecoring) takePhoto(context); */
                          },
                          child: isRecoring
                              ? const Icon(
                                  Icons.radio_button_on,
                                  color: Colors.red,
                                  size: 80,
                                )
                              : const Icon(
                                  Icons.panorama_fish_eye,
                                  color: Colors.white,
                                  size: 70,
                                ),
                        ),
                        IconButton(
                            icon: Transform.rotate(
                              angle: transform,
                              child: const Icon(
                                Icons.flip_camera_ios,
                                color: Colors.white,
                                size: 28,
                              ),
                            ),
                            onPressed: () async {
                              changeCamLens();
                            }),
                      ],
                    ),
                  ],
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }

  /*  void takePhoto(BuildContext context) async {
    XFile file = await _cameraController!.takePicture();
    Navigator.push(
        context,
        MaterialPageRoute(
            builder: (builder) => CameraViewPage(
                  path: file.path,
                )));
  } */
}
`

@BradenBagby Thank you for the overview! That makes sense. I'm not super familiar with OpenGL, so I'm going to ping someone else to take a look at the VideoRenderer!

@chinmaygarde Thank you for your review of the OpenGL parts. Are you able to look at my comments so we can continue getting this PR closer to approved?

I don't see any GL resources being collected. Is there a provision for any cleanup after the camera is done being used?

The shaders code was collected. But I was looking for instances where everything else like program, context, etc. is collected when the application is done. In the past, we have seen crashes where we tore down the thread with GL context still attached to it. These are hard to reproduce. So I'd really want use to cleanup all GL resources before we terminate the thread.

Thanks again for the review! I now dispose all OpenGL resources when the VideoRenderer is closed

Hey @chinmaygarde any chance you can look at this PR again?

@chinmaygarde hi! Any chance to look at this amazing PR? We would like to have it in prod.

@camsim99 Looks like @chinmaygarde has approved the OpenGL part. Are you able to check over Android and approve the PR if everything still looks good?

Thanks for the review @camsim99. I have added those tests. Let me know if there is anything else

@bparrishMines I fixed your nits you left a while back. Any chance you can take another look and accept this PR if all is good?

Is there anything else I need to do to get this reviewed and merged? @stuartmorgan

@stuartmorgan hi! Do you have a chance to look at this MR? It's been 3 weeks already 😅
We want to use this feature in prod.

@stuartmorgan all of your comments have been addressed. setDescription can now be called anytime, the CameraController handles it correctly depending on if its mid recording or not, then updates its state.
I want to write tests on calling setDescription while not recording. I will get that done very soon.

Alright those other tests are created and this is ready for review again @stuartmorgan

@bparrishMines @stuartmorgan The split outPR is ready here: https://github.com/flutter/plugins/pull/7011

The split out PR for camera_avfoundation and camera_android is here @hellohuanlin @camsim99 @bparrishMines
https://github.com/flutter/plugins/pull/7109

We've just completed the migration of the plugin code to the flutter/packages repository, as described in https://flutter.dev/go/flutter-plugins-repo-migration, and this repository is now being archived. Unfortunately that means that all in-progress PRs here must be moved to flutter/packages.
Please see our instructions for an explanation of how to move your PR, and if you have any issues moving your PR please don't hesitate to reach out in the #hackers-ecosystem channel in Discord.
Our apologies that your PR was caught in this one-time transition. We're aware that it's disruptive in the short term, and appreciate your help in getting us to a better long-term state!


Search Editor: editable information text

VSCode Version: 1.48.0
OS Version: Windows_NT x64 10.0.19041

Steps to Reproduce:

Open Search Editor (from Command Palette: Search Editor: Open Search Editor)

Type in some search term

Information about matches and files appears above all results:

Edit that information text:

Does this issue occur when all extensions are disabled?: Yes

Thanks for reporting this! Yeah, it's just a part of the result text. It could be a separate element, but that would suggest that it's a "live" value and modifying the editor would change it, which it doesn't. In other search editors (like sublime), it's the same. Going to close as-designed.


Create CODE_OF_CONDUCT.md

CODE_OF_CONDUCT.md Standard
aka.ms/opensource/moderation-support

Thank you for your contribution! We will review the pull request and get back to you soon.


Error with keystone-0.4.0-alpha

With the update of keystone-0.4.0, error occurred in /keystone/signin page when I'm trying run this repo locally.
In 0.4.0, the scripts named packages.js and signin.js will be loaded at this page, and one module is missing after the packages.js aimed to expose modules for window.require after being bundled.
The name of missing one is 'aphrodite/no-important' and others works fine.
I'm in Win10-x64 and node 6++ and npm 3++, and fallback the keystone version by modify package.json will fix this.
So maybe move the https link in package.json to version number until 0.4.0 released? Or is there any guidance about this issue?

related to https://github.com/keystonejs/keystone/issues/3365


ReadByQuery does not return  a response.

When trying to use the ReadByQuery function (only on a project), the API does not return a valid result. By switching to ReadByName I am able to get the results I need. Code:
		$readByQuery = new ReadByQuery(Crypto::getRandomKey(24));    //It's helpful to have a unique controlId passed into the
		//ReadByQuery class for retrieving info encase of errors
		$readByQuery->setObjectName($object::getIntacctObject());  //Yup, we're querying for a PROJECT
		$readByQuery->setQuery($object::getIntacctKeyName() . ' = ' . $object->getIntacctKey()); //Here's our query  PROJECTID = MYPROJECTKEY
		//$readByQuery->setPageSize(1);
		$readByQuery->setFields(['*']);

		$content = new Content([$readByQuery]); //Wrap that ReadByQuery (and other FunctionInterfaces) within a Content class

		$response = $this->execute($content, false, Crypto::getRandomKey(24)); //Call our client to execute that Content
		$result = $response->getOperation()->getResult(); //From the response, get the result out of the Operation
		$result->ensureStatusSuccess();
		//And then parse out the results (which are in XML)
		$totalCount = $result->getTotalCount();

$totalCount = 0;

		$readByQuery = new ReadByName(Crypto::getRandomKey(24));    //It's helpful to have a unique controlId passed into the
		//ReadByQuery class for retrieving info encase of errors
		$readByQuery->setObjectName($object::getIntacctObject());  //Yup, we're querying for a PROJECT
		$readByQuery->setNames([$object->getIntacctKey()]); //Here's our query
				//MYPROJECTKEY
		//$readByQuery->setPageSize(1);
		$readByQuery->setFields(['*']);

		$content = new Content([$readByQuery]); //Wrap that ReadByQuery (and other FunctionInterfaces) within a Content class

		$response = $this->execute($content, false, Crypto::getRandomKey(24)); //Call our client to execute that Content
		$result = $response->getOperation()->getResult(); //From the response, get the result out of the Operation
		$result->ensureStatusSuccess();
		//And then parse out the results (which are in XML)
		$totalCount = $result->getTotalCount();
$totalCount = 1;

Thanks in advance!

Oh XML For ReadByQuery:
<request><control><senderid>Rosewood</senderid><password>pass</password><controlid>NcotynY9UjzZLPuRXXBz6Sx-</controlid><uniqueid>false</uniqueid><dtdversion>3.0</dtdversion><includewhitespace>false</includewhitespace></control><operation transaction="false"><authentication><sessionid>session</sessionid></authentication><content><function controlid="0z46KbD4ARbDGHhVc3uVQc6i"><readbyquery><object>PROJECT</object><query>PROJECTID = J7668-100</query><fields>*</fields><pagesize>1000</pagesize><returnformat>xml</returnformat></readbyquery></function></content></operation></request>

XML for ReadByName:
<request><control><senderid>Rosewood</senderid><password>pass</password><controlid>k-7lsOoke0-wF-lXoDqEcW7y</controlid><uniqueid>false</uniqueid><dtdversion>3.0</dtdversion><includewhitespace>false</includewhitespace></control><operation transaction="false"><authentication><sessionid>session</sessionid></authentication><content><function controlid="iNtaQLl3iAS-eTWiiO8sgTRh"><readbyname><object>PROJECT</object><keys>J7668-100</keys><fields>*</fields></readbyname></function></content></operation></request>

What do you get if you change the query from PROJECTID = J7668-100 to PROJECTID = 'J7668-100' ?

I tried changing to PROJECTID = "J7668-100" and got no result. I will try with single quotes if you like?

Yes, please try single quotes.

Even worse:
XML:
<request><control><senderid></senderid><password>pass</password><controlid>NtcBHH0TfWVqyGZobrFKMYv0</controlid><uniqueid>false</uniqueid><dtdversion>3.0</dtdversion><includewhitespace>false</includewhitespace></control><operation transaction="false"><authentication><sessionid></sessionid></authentication><content><function controlid="xwBK04vptCBYcdOfJD7HZfCj"><readbyquery><object>CONTACT</object><query>CONTACT = '7693-100'</query><fields>*</fields><pagesize>1000</pagesize><returnformat>xml</returnformat></readbyquery></function></content></operation></request>

Result:
DL02000001 Error There was an error processing the request.
Keep in mind I run the same query for all  my objects to see if they exist or not, so this one is a CONTACT rather than a PROJECT. I would hope it doesn't matter.

:face_with_head_bandage: Ugh, I see my mistake in the query above. And with the change that I need there, and the single quotes it works as expected. But, is the expected behavior?

I shouldn't have to provide single quotes should I? If I should it should be well documented.

I get it, but since it's a "sql-like" query, Oracle using single quotes for the operands.  We're working on new docs, but here's the current docs for using readByQuery directly - https://developer.intacct.com/wiki/readbyquery
Ideally, you would not have to write your own query strings and pass that into the SDK.  Maybe we'll add a query interface and add all of the operators but this doesn't exist currently.

Awesome, thanks again for your help guys! Yes the query Interface would be a great addition. Perhaps we could turn this into an enhancement ticket?

We did this for the legacy get_list function here -- https://github.com/Intacct/intacct-sdk-php/tree/master/src/Intacct/Functions/Common/GetList
The difference of course with get_list is that you don't write a SQL string to filter, its explicitly defined XML you have to pass.  We'll add it to the enhancement list

Awesome, thanks again!


log: warning when import failed with message

So that one can actually tell what happened, when an import failed

well yeah this is not covered, but i think that's actually okay


VS code opens an extra empty window when started

Issue Type: Bug
When started VS Code opens an unintended extra empty window on its own. Even for an empty window, I have enabled the "welcome" page, but this unintended extra empty window doesn't even show the "welcome" page. No matter how many times I close it, it pops up back again on restarting vs code.
VS Code version: Code 1.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48, 2021-06-17T13:26:56.255Z)
OS version: Linux x64 5.8.0-59-generic snap
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz (8 x 3083)

GPU Status
2d_canvas: unavailable_softwaregpu_compositing: disabled_softwaremultiple_raster_threads: enabled_onoop_rasterization: disabled_offopengl: disabled_offrasterization: disabled_softwareskia_renderer: enabled_onvideo_decode: disabled_softwarevulkan: disabled_offwebgl: unavailable_softwarewebgl2: unavailable_software

Load (avg)
4, 2, 1

Memory (System)
7.56GB (1.92GB free)

Process Argv
--force-user-env --no-sandbox --unity-launch --no-sandbox --crash-reporter-id e672c25f-4d9f-4748-bf1a-50db2dfa97c8

Screen Reader
no

VM
0%

DESKTOP_SESSION
ubuntu

XDG_CURRENT_DESKTOP
Unity

XDG_SESSION_DESKTOP
ubuntu

XDG_SESSION_TYPE
x11

Extensions (17)

Extension
Author (truncated)
Version

better-comments
aar
2.1.0

preview-pdf
ana
1.0.0

markdown-checkbox
bie
0.1.3

vscode-eslint
dba
2.1.23

gitlens
eam
11.5.1

prettier-vscode
esb
8.0.1

mdmath
goe
2.7.4

gc-excelviewer
Gra
3.0.42

git-graph
mhu
1.30.0

python
ms-
2021.6.944021595

vscode-pylance
ms-
2021.6.3

jupyter
ms-
2021.6.999662501

cpptools
ms-
1.4.1

vscode-typescript-next
ms-
4.4.20210624

vscode-icons
vsc
11.5.0

json
Zai
2.0.2

material-theme
zhu
3.10.14

(7 theme extensions excluded)

/duplicate https://github.com/microsoft/vscode/issues/126725
There are instructions within how to resolve this.


AppGW: Add default predefined ssl policy field in resource

Related command
az network application-gateway show
And other similar appgw commands which use the resource model
Resource Provider
Microsoft.Network
Description of Feature or Work Requested
Add readonly enum field defaultPredefinedSslPolicy in application gateway resource model
Swagger PR for the same: https://github.com/Azure/azure-rest-api-specs/pull/24094
This new property is released with API version >= 2023-02-01
Minimum API Version Required
2023-02-01
Swagger PR link / SDK link
https://github.com/Azure/azure-rest-api-specs/pull/24094
Request Example
No response
Target Date
2023-06-28
Additional context
No response

Thank you for opening this issue, we will look into it.

@prateek2211
Could you kindly list the following commands?

And other similar appgw commands which use the resource model

@prateek2211
Could you kindly list the following commands?

And other similar appgw commands which use the resource model

@necusjz
az network application-gateway create
az network application-gateway list
az network application-gateway show
az network application-gateway update

@necusjz Any update on this?

It's planned in the next coming sprint: https://github.com/Azure/azure-cli/milestone/132.

@necusjz Please note that api version has to be bumped up to 2023-02-01

@necusjz can you please share the customer-facing ETA (including CloudShell) for this? We will need to update our docs accordingly for our feature release.

@necusjz can you please share the customer-facing ETA (including CloudShell) for this? We will need to update our docs accordingly for our feature release.

https://github.com/Azure/azure-cli/milestone/132


Increase vCores or storage space

It is not possible at the present time to slide the slider. Can you clarify what must be done to scale the storage (and or vCores).

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

ID: 1997df41-0ae1-63a9-c27f-9a348ffc7499
Version Independent ID: a0870873-07c9-1039-006b-ae472d0eeac7
Content: Scale server group - Hyperscale (Citus) - Azure Database for PostgreSQL
Content Source: articles/postgresql/howto-hyperscale-scaling.md
Service: postgresql
GitHub Login: @jonels-msft
Microsoft Alias: jonels

@AndreasMWalter It is not possible to do this currently using slider. You need to create a ticket with support to do this.
We are aware that it is not mentioned in the portal or document any where. We are trying to add this information in Portal blade. But the realistic time we are looking at having that message there is early next year.
Let us know if you have any other question,

I have got lots of questions, not sure this is the right place to ask them.
For example how smooth will the process run, how long will it take for support to grow the disks.
(The customer in question has premier support as far as I remember)
But most importantly, can it be scaled down if necessary or is it upscaling only...
I assume some of the questions are best asked elsewhere.
However thanks for your quick answer and cheers,
Andreas

@AndreasMWalter Thanks for the questions. Support will be able to help you with all these questions. This will be best way forward.
We are going ahead closing this thread for now but if you have any further question or need any help with support as well, you can respond here and we can continue the dialogue.


Benchmarks & How to properly bind a Singleton in the Laravel service container

Benchmarks using Laravel 9, PHP 8, (16 cores @ 3.60GHz)
About:
Sorry for any bad formatting. This was just a quick test I did and thought I would share :)
Test 1: Initializing generator outside the loop
$zooIdGen = RobThree\HumanoID\HumanoIDs::zooIdGenerator();
while ($i <= 1000) {
  $zooId = $zooIdGen->create($i);
  echo $zooId . '
';
  $i++;
}

Result: 10 000 loops took 1.3485219478607 seconds
Average: 0.13485219 milliseconds per iteration
Peak CPU utilization: ~12%
Test 2: Initializing the generator in each loop
while ($i <= 1000) {
  $zooIdGen = RobThree\HumanoID\HumanoIDs::zooIdGenerator();
  $zooId = $zooIdGen->create($i);
  echo $zooId . '
';
  $i++;
}

Result: Crashed after 615 iterations
Peak CPU utilazation: ~27%
Eventually finished with the following results
Result: 1000 loops took 22.121620178223 seconds
Average: 22.12162018 milliseconds per iteration
Test 3: Initializing the generator as a singleton in the service container
// In AppServiceProvider
$this->app->singleton('HumanoIDs', function ($app) {
  return new HumanoIDs($app->make(HumanoIDs::class));
});

// Benchmark
while ($i <= 10000) {
  $zooId = app('HumanoIDs')->generator->create($i);
  echo $zooId . '
';
  $i++;
}

Result: 10000 loops took 22.320996999741 seconds
Average: 2.2320997 milliseconds per iteration
Peak CPU utilazation: ~21%
This actually suprised me as I thought the result between test 1 and 3 would be much closer. This makes me think that I need to bind the actual generator to the service container instead.
Test 4: Initializing the generator in the service container by binding the generator method
// In AppServiceProvider
$this->app->singleton('HumanoIDGenerator', function ($app) {
  return new HumanoIDGenerator($app->make(HumanoIDGenerator::class));
});

// Intermediary class:
class HumanoIDGenerator
{
  public \RobThree\HumanoID\HumanoID $generator;

  public function __construct()
  {
    $this->generator = \RobThree\HumanoID\HumanoIDs::zooIdGenerator();
  }
}

// Benchmark
while ($i <= 10000) {
  $zooId = app('HumanoIDGenerator')->generator->create($i);
  echo $zooId . '
';
  $i++;
}

Result: 10000 loops took 1.5630679130554 seconds
Average: 0.15630679 milliseconds per iteration
Peak CPU utilazation: ~12% for a short spike
This is just a tiny tiny bit slower than the first test, which is just what I initially expected.
Conclusion
When using Laravel, make sure to bind the actual generator to the service container and not just the main class.

 You are creating new instances of a singleton in a loop and expect it to perform the same as a singleton where you simply request a value. Your test cases 1 and 4 prove that the code itself is performing well within acceptable ranges.
Wontfix imo.

This wasn't really an bug/issue. Just wanted to share my benchmarks and a snippet for Laravel developers to properly bind into the service container :)

Benchmarks are appreciated. Case 2 doesn't make sense though; you should instantiate a generator only once and keep it around as long as possible as mentioned (twice 😉) in the documentation.
I do think, though, that the generators in the HumanoIDs class could be implemented in such a way that the same instance is always returned (singleton). I'll fix that.
Not sure what's going on in case 3; I'm not familiar with Laravel.

Yeah there is absolutely no use case where one would use case 2. I just wanted to benchmark the actual instantiation time as the documentation mentioned it was an expensive operation. It was actually since it was specified so clearly in the documentation that I got curios and decided to benchmark it to see just how expensive it was.
Basically what I'm doing with the Laravel case is that I am binding the HumanoIDs class to the Laravel App instance as a way to keep the HumanoIDs instance alive for as long as possible.

@caendesilva Does this make sense to you? Suggestions or improvements?

I've only ever worked with the singleton pattern in the Laravel context where it's abstracted, so I don't have any practical knowledge in actually implementing them so I could be wrong, but based on the theory of singletons it looks it's implemented the right way.
mallardduck is more experienced than I am and may be a better authority on this though

@RobThree I think that you could use isset() instead of checking for and allowing null. Might make it more readable. Not sure if there is a practical difference, and I don't think it matters much anyway but thought I would mention it.

About your benchmark: aren't your echo's in the loop also counted? I can imagine this makes a difference in the final results? Not sure if it would be of any significance, but hey...

They are probably being counted. I always add echo's to benchmarks to make sure that the generated variable is actually used. I've found that if you don't have that the results can be rather unreliable.
This test was also mainly focused on comparing results for different ways to initialize the main class as I wanted to see the impact of the CPU costs mentioned in the readme. And since all loops have the same echo statement any additional processing time is the same for all the benchmark tests so for the purpose of comparing relative speeds between implementation metods it does what I wanted it to.
The test is also pretty crude and running it through a browser and Laravel have a much higher impact. Again, that's fine for getting the information that I specifically needed. A more fair test to measure the performance of the actual script would be to use a minimal install and run it on several different pieces of hardware, operating systems, and PHP versions. Could be fun to try, but not sure if it's needed since it is already so fast when having an instantiated instance of the class. Data is always fun to have though.
Thank you for bringing it up though, as it gave me a chance to explain my thought process which I always think is useful!

I just added some benchmarks for the create() method using PHPBench and I think the results are rather interesting:
$ ./vendor/bin/phpbench run tests/Benchmark --report=aggregate
PHPBench (1.2.5) running benchmarks...
with configuration file: /Users/rob/Code/HumanoID/phpbench.json
with PHP version 8.1.5, xdebug ✔, opcache ❌

\RobThree\HumanoID\Tests\Benchmark\HumanoIDCreateBench

    benchCreate # 0,0.......................I4 - Mo101,182.284ops/s (±0.54%)
    benchCreate # 1,0.......................I4 - Mo101,164.318ops/s (±0.76%)
    benchCreate # 2,0.......................I4 - Mo100,581.915ops/s (±1.52%)
    benchCreate # 0,1.......................I4 - Mo100,995.104ops/s (±0.31%)
    benchCreate # 1,1.......................I4 - Mo86,917.928ops/s (±0.72%)
    benchCreate # 2,1.......................I4 - Mo101,122.998ops/s (±0.14%)
    benchCreate # 0,2.......................I4 - Mo58,584.259ops/s (±1.28%)
    benchCreate # 1,2.......................I4 - Mo37,540.056ops/s (±0.72%)
    benchCreate # 2,2.......................I4 - Mo37,549.949ops/s (±0.78%)
    benchCreate # 0,3.......................I4 - Mo36,238.651ops/s (±0.49%)
    benchCreate # 1,3.......................I4 - Mo18,434.524ops/s (±0.17%)
    benchCreate # 2,3.......................I4 - Mo18,876.591ops/s (±0.34%)

Subjects: 1, Assertions: 0, Failures: 0, Errors: 0
+---------------------+-------------+-----+-------+-----+----------+------------------+--------+
| benchmark           | subject     | set | revs  | its | mem_peak | mode             | rstdev |
+---------------------+-------------+-----+-------+-----+----------+------------------+--------+
| HumanoIDCreateBench | benchCreate | 0,0 | 10000 | 5   | 6.987mb  | 101,182.284ops/s | ±0.54% |
| HumanoIDCreateBench | benchCreate | 1,0 | 10000 | 5   | 4.761mb  | 101,164.318ops/s | ±0.76% |
| HumanoIDCreateBench | benchCreate | 2,0 | 10000 | 5   | 4.540mb  | 100,581.915ops/s | ±1.52% |
| HumanoIDCreateBench | benchCreate | 0,1 | 10000 | 5   | 6.987mb  | 100,995.104ops/s | ±0.31% |
| HumanoIDCreateBench | benchCreate | 1,1 | 10000 | 5   | 4.761mb  | 86,917.928ops/s  | ±0.72% |
| HumanoIDCreateBench | benchCreate | 2,1 | 10000 | 5   | 4.540mb  | 101,122.998ops/s | ±0.14% |
| HumanoIDCreateBench | benchCreate | 0,2 | 10000 | 5   | 6.987mb  | 58,584.259ops/s  | ±1.28% |
| HumanoIDCreateBench | benchCreate | 1,2 | 10000 | 5   | 4.761mb  | 37,540.056ops/s  | ±0.72% |
| HumanoIDCreateBench | benchCreate | 2,2 | 10000 | 5   | 4.540mb  | 37,549.949ops/s  | ±0.78% |
| HumanoIDCreateBench | benchCreate | 0,3 | 10000 | 5   | 6.987mb  | 36,238.651ops/s  | ±0.49% |
| HumanoIDCreateBench | benchCreate | 1,3 | 10000 | 5   | 4.761mb  | 18,434.524ops/s  | ±0.17% |
| HumanoIDCreateBench | benchCreate | 2,3 | 10000 | 5   | 4.540mb  | 18,876.591ops/s  | ±0.34% |
+---------------------+-------------+-----+-------+-----+----------+------------------+--------+

I ran these benchmarks on my Macbook Air (M1, 2020, 16GB) and will run these later on my i9.
About these results
I'm (also) new to PHPBench so I haven't figured out (yet) how to make the above report a bit more readable, especially regarding the sets(). What the above report shows, in essence, is for 3 HumanoID generators being benchmarked for several magnitudes of int -> string conversions. The generators are the two out-of-the-box zoo and space generators and a custom generator. Next are the ranges of 0, 10, 1000 and 1000000 respectively. So the above results should read something like this:
+-----------------+-------+-----+----------+------------------+
| set             | revs  | its | mem_peak | mode             |
+-----------------+-------+-----+----------+------------------+
| zoo    ,0       | 10000 | 5   | 6.987mb  | 101,182.284ops/s |
| space  ,0       | 10000 | 5   | 4.761mb  | 101,164.318ops/s |
| custom ,0       | 10000 | 5   | 4.540mb  | 100,581.915ops/s |
| zoo    ,10      | 10000 | 5   | 6.987mb  | 100,995.104ops/s |
| space  ,10      | 10000 | 5   | 4.761mb  | 86,917.928ops/s  |
| custom ,10      | 10000 | 5   | 4.540mb  | 101,122.998ops/s |
| zoo    ,1000    | 10000 | 5   | 6.987mb  | 58,584.259ops/s  |
| space  ,1000    | 10000 | 5   | 4.761mb  | 37,540.056ops/s  |
| custom ,1000    | 10000 | 5   | 4.540mb  | 37,549.949ops/s  |
| zoo    ,1000000 | 10000 | 5   | 6.987mb  | 36,238.651ops/s  |
| space  ,1000000 | 10000 | 5   | 4.761mb  | 18,434.524ops/s  |
| custom ,1000000 | 10000 | 5   | 4.540mb  | 18,876.591ops/s  |
+-----------------+-------+-----+----------+------------------+

The first set (where the id is 'fixed' to a single, 0, id) shows that there's no real difference; all three generators produce the same HumanoID at the same rate. At about 100,000,000 per second (which is quite mind blowing IMO).
Where it gets interesting is the next sets. My first instincts were that the larger wordsets would be slower, but it actually turns out to be the opposite. Yes, for generating a single HumanoID the smaller wordsets will be (much) more efficient since you don't need to load in a huge dataset and prepare it for use. But as you're generating more and more HumanoID's the larger wordsets will become (much) more efficient. This is because the resulting HumanoID can be much shorter because there are a lot more 'digits' (words) available. For a small wordset a large integer may convert to red-blue-pink-yellow-sad-cow for example whereas when you use a huge wordset that same integer may convert into smart-lobster, which means less iterations, less string concatenations etc.
Does this mean that large wordsets should be preferred? Well, yes, no, it... depends. There's a tradeoff; when you generate a single HumanoID in a request then you're better of with a smal(ler) wordset so you don't incur the cost of loading a huge wordset. But you also don't want the wordset to be too small since that will result in longer HumanoID's. On the other end of the spectrum: if you're generating huge batches of HumanoID's a huge wordset will be more efficient since the resulting strings will be much shorter whereas a smal(ler) wordset will result in slower operations due to longer resulting strings.
Since I'm primarily a .Net developer I do have a somewhat different take on this matter I guess; In ".Net world" I would load the wordset at application start, once, and be done with it. Then the size of the wordset wouldn't really matter (unless there are some tight memory restrictions maybe) and the cost of loading the wordset would only be incurred once. But since PHP doesn't really have an "application scope" (as far as I'm aware) the wordset would have to be loaded every request (be it from disk, memory cache, database, whatever). I don't think you can "keep a HumanoID-generator around" across multiple requests so it can be (re)used every time. But I may be mistaken and would be happy to hear how to get around this "limitation".
Conclusion
So now what? Do you need a huge wordset or a small one? Well, as you can read above: it depends. I think the only conclusion we can make is: use a decently sized wordset for your application, make sure there's enough 'headroom' to grow but don't go overboard loading huge wordsets of multiple megabytes.
In respect to speed/performance: you should be easily able to generate over 10 million HumanoID's per second (on a Macbook M1) and, with some effort and a bit more CPU power, I think an order of magnitude more should be achievable as well. So, depending on context ofcourse, I think generating a HumanoID is pretty negligible in most situations. Thinks like Opcache and whathaveyou will skew things even more ofcourse.
What's next
Well, I'd like to test variations where different WordOptions are used in combination with different (or no) separators. And whenever #5 is implemented I'm sure there will be some more interesting benchmarks to be done. But, for now, what I'm more interested in is benchmarking the parse() method. I'll try to create a basic benchmark for this too sometime soon, but maybe someone beats me to it. This will involve a little more thought and setup to be put in since we'd first need to get a (huge) bunch of HumanoID's to be parsed from somewhere (they can easily be generated before running the test but since I'd like to benchmark this, too, with small, medium and large wordsets it'll be a little heavier on memory etc.).

Okay wow this is extensive, so breaking it down both to give feedback and for me to understand it better. I've never used PHPBench before so cool to learn!

At about 100,000 per second (which is quite mind blowing IMO).

Holy cow! That is incredible
I also think it's interesting that larger word sets can be faster. It makes full sense of course, given your explanation but it's something I'm not sure I would have spontaneously assumed without these benchmarks.

But since PHP doesn't really have an "application scope" (as far as I'm aware) the wordset would have to be loaded every request (be it from disk, memory cache, database, whatever). I don't think you can "keep a HumanoID-generator around" across multiple requests so it can be (re)used every time. But I may be mistaken and would be happy to hear how to get around this "limitation".

This is a really interesting scope. I don't actually know exactly how the PHP lifecycle works and if we can persist something in a memory cache or similar. @mallardduck might know? Hope it's alright that I pinged you.
I think from this thread we can conclude that the HumanoID-integer conversion is mind-blowingly fast already, so when considering any performance improvements they should be focused on ways to keep the generator instance around, if that is possible, as it is something I'd be really interested in learning.

Offtopic:

These are interesting concerns, I've never used PHPBench so I can't answer any of them, but had a quick glance on the readme and I see that they have report outputting as Markdown and HTML. Thinking that Markdown format could me useful for us here? Markdown is pretty easy to reformat using multi-cursor editing in VSCode/Sublime.
Thank you for making this benchmark, it's really interesting! Great analysis as well :)

I had a thought, could results be affected in any way by using sequential ID's in the ranges? AFAIK PHP uses some black-magic trickery with variables that are similar (which is correlated to me needing to use echo statements). I could be extremely wrong about this though. Take this comment with a heap of salt.
Still, could be cool to test by pre-generating an array mapping test values, and then scrambling it.

could results be affected in any way by using sequential ID's in the ranges

I'm not sure what you mean; I'm generating random ID's. If you're asking wether sequential ID's could perform different: possibly. I think it would depend on how many integers are converted in the sequence etc. since the number of iterations and calculations will differ. That is why I chose random ID's spread over a range to get a decent average to avoid results being skewed by optimal, or worst-case, cases.

Oh, sorry, I misunderstood the benchmarking. I was using sequential input ID's, and assumed you did too.

but had a quick glance on the readme and I see that they have report outputting as Markdown

Again, yes there's mention in the documentation of markdown, but HOW to do it is nowhere to be found in the docs. I sort-of expected something like --output=markdown from this but that results in:
No renderer configuration or service named "markdown" exists. Known configurations: "csv", known services: "console     ", "delimited", "html"
So... yeah

Anyway, I will be using this comment to post the results from a few different machines. Just for shits'n'giggles.
Macbook M1 2020:
+---------------------+-------------+-----+-------+-----+----------+------------------+--------+
| benchmark           | subject     | set | revs  | its | mem_peak | mode             | rstdev |
+---------------------+-------------+-----+-------+-----+----------+------------------+--------+
| HumanoIDCreateBench | benchCreate | 0,0 | 10000 | 5   | 6.987mb  | 101,732.351ops/s | ±0.19% |
| HumanoIDCreateBench | benchCreate | 1,0 | 10000 | 5   | 4.761mb  | 101,819.018ops/s | ±0.42% |
| HumanoIDCreateBench | benchCreate | 2,0 | 10000 | 5   | 4.540mb  | 101,698.136ops/s | ±0.19% |
| HumanoIDCreateBench | benchCreate | 0,1 | 10000 | 5   | 6.987mb  | 101,272.438ops/s | ±4.98% |
| HumanoIDCreateBench | benchCreate | 1,1 | 10000 | 5   | 4.761mb  | 87,125.065ops/s  | ±1.57% |
| HumanoIDCreateBench | benchCreate | 2,1 | 10000 | 5   | 4.540mb  | 101,291.283ops/s | ±0.14% |
| HumanoIDCreateBench | benchCreate | 0,2 | 10000 | 5   | 6.987mb  | 59,188.797ops/s  | ±0.24% |
| HumanoIDCreateBench | benchCreate | 1,2 | 10000 | 5   | 4.761mb  | 37,830.427ops/s  | ±0.25% |
| HumanoIDCreateBench | benchCreate | 2,2 | 10000 | 5   | 4.540mb  | 37,590.875ops/s  | ±0.07% |
| HumanoIDCreateBench | benchCreate | 0,3 | 10000 | 5   | 6.987mb  | 36,214.954ops/s  | ±0.13% |
| HumanoIDCreateBench | benchCreate | 1,3 | 10000 | 5   | 4.761mb  | 18,369.065ops/s  | ±1.07% |
| HumanoIDCreateBench | benchCreate | 2,3 | 10000 | 5   | 4.540mb  | 18,857.328ops/s  | ±0.33% |
+---------------------+-------------+-----+-------+-----+----------+------------------+--------+

but had a quick glance on the readme and I see that they have report outputting as Markdown

Again, yes there's mention in the documentation of markdown, but HOW to do it is nowhere to be found in the docs. I sort-of expected something like --output=markdown from this but that results in:
No renderer configuration or service named "markdown" exists. Known configurations: "csv", known services: "console ", "delimited", "html"
So... yeah

Oh, wow. That's... not great 🤦♂
Well, the output we are getting now is good enough :)

Okay I downloaded and ran your benchmarking script but I'm getting different output.
I don't think we are using the same run command. I used  ./vendor/bin/phpbench run tests/Benchmark. What are you using?

What are you using?

I'm using --report=aggregate argument.

I'm using --report=aggregate argument.

Thanks! Here is my benchmark:
Win10 Pro AMD Ryzen 7 @3.6GHz / PHP 8.0.13 xdebug ✔, opcache ❌
+---------------------+-------------+-----+-------+-----+----------+-----------------+--------+
| benchmark           | subject     | set | revs  | its | mem_peak | mode            | rstdev |
+---------------------+-------------+-----+-------+-----+----------+-----------------+--------+
| HumanoIDCreateBench | benchCreate | 0,0 | 10000 | 5   | 7.075mb  | 13,975.076ops/s | ±0.54% |
| HumanoIDCreateBench | benchCreate | 1,0 | 10000 | 5   | 4.959mb  | 14,038.253ops/s | ±0.23% |
| HumanoIDCreateBench | benchCreate | 2,0 | 10000 | 5   | 4.747mb  | 14,070.597ops/s | ±0.78% |
| HumanoIDCreateBench | benchCreate | 0,1 | 10000 | 5   | 7.075mb  | 14,068.904ops/s | ±1.23% |
| HumanoIDCreateBench | benchCreate | 1,1 | 10000 | 5   | 4.959mb  | 12,081.363ops/s | ±1.10% |
| HumanoIDCreateBench | benchCreate | 2,1 | 10000 | 5   | 4.747mb  | 13,945.829ops/s | ±0.67% |
| HumanoIDCreateBench | benchCreate | 0,2 | 10000 | 5   | 7.075mb  | 8,182.423ops/s  | ±0.94% |
| HumanoIDCreateBench | benchCreate | 1,2 | 10000 | 5   | 4.959mb  | 5,243.521ops/s  | ±0.86% |
| HumanoIDCreateBench | benchCreate | 2,2 | 10000 | 5   | 4.747mb  | 5,200.883ops/s  | ±0.87% |
| HumanoIDCreateBench | benchCreate | 0,3 | 10000 | 5   | 7.075mb  | 5,028.790ops/s  | ±0.78% |
| HumanoIDCreateBench | benchCreate | 1,3 | 10000 | 5   | 4.959mb  | 2,541.164ops/s  | ±0.57% |
| HumanoIDCreateBench | benchCreate | 2,3 | 10000 | 5   | 4.747mb  | 2,593.760ops/s  | ±0.55% |
+---------------------+-------------+-----+-------+-----+----------+-----------------+--------+

So yeah, I need to disable xdebug for this benchmark.

Hot dang are you gents on a blazing roll today! A whole lot to parse over and grok before I can reply to everything. Just want to hit on a few areas I've started playing with this morning (still before noon for me).
phpbench formatting
Sadly, this is an area that this tool is lacking in IMO. Especially when compared to similar tools like PHPunit you find similar features (provide datasets via method+annotation). In fact with PHPunit's implementation you directly see the value passed by default, OR if you set a key on your "data provider method".
In one of my projects I even went so far as to whip up a helper method on my base TestCase that extracts good labels for you. Which is hecking easy compared to the methods I've seen to accomplish similar with phpbench.
That said, as a means of solving for this while also being lazy, I often just opt to make individual Benchmark classes per unique case. So I may still create a common base (abstract) class for similar benchmarks to pull from. However in a case like this - each default generator would have it's own benchmark class.
Application persistence

But since PHP doesn't really have an "application scope" (as far as I'm aware) the wordset would have to be loaded every request (be it from disk, memory cache, database, whatever). I don't think you can "keep a HumanoID-generator around" across multiple requests so it can be (re)used every time. But I may be mistaken and would be happy to hear how to get around this "limitation".
This is a really interesting scope. I don't actually know exactly how the PHP lifecycle works and if we can persist something in a memory cache or similar. @mallardduck might know? Hope it's alright that I pinged you.

(You gents can absolutely ping me any time.)
Rob is correct that with PHP we can't easily (at least out of the box at a language level) keep an instance of the generator around. It's also hard as PHP's many different SAPIs operate with OpCache differently at times too. So any general statement for one may be false for another.
That in mind, lets assume we're only concerned with the "modern" SAPI models for running PHP - that being PHP-FPM primarily, and similar Roadrunner, CLI+Swoole, etc. For any of these, then as long as you have OpCache setup then at minimum the OpCodes of the class will have been saved from request to request.
AFAIK any solution we have that can share an object between requests will generally involve serializing and deserializing the objects. Which in itself will add a cost of sorts when implemented in an application. This leads me to my current train of thought, wondering what steps of HumanoIDs lifecycle is most expensive in isolation. And secondly, what datasets realistically need to be "hot" for its use to scale.
For instance, if processing from the WordSets array is very fast once read from disk, then caching the disk reads may be most important. However if processing and mapping internally is the most expensive part, then maybe serializing the object to cache that state between requests is most important. On the other hand, does re-using the internal look up structures (across requests) even provide a real benefit at scale? Or can the CPU power behind the device repopulate those via parsing just as fast?
Long story short, this whole thread has given me a lot of ideas on what to play with and test next. I'm working up a branch with some different benchmarks now. :)

So expanding on some of what I mentioned above, I've created benchmarks that target (or at least isolate the cost of) a few things at a time. Much of this will produce fairly predictable (in terms of scale) results, but it's nice to have data behind it none the less IMO.
So for instance, I've created a subset of new benchmarks called AlwaysNew and as the name suggests they always create a new HumanoID instance for every benchmark.
Obviously this is much slower than existing benchmarks. However it gives us a baseline control to compare with that is obviously not best-practice, but similar to the vein of thought @caendesilva had with case 2 at the start of this. However these go a step farther and break it down by "cache nothing", "cache file", "cache json". This gives us a scale of how much or how little these pre initialization steps cost.
Here are those results:
+-----------------------+-------------+-----+-------+-----+----------+----------------+--------+
| benchmark             | subject     | set | revs  | its | mem_peak | mode           | rstdev |
+-----------------------+-------------+-----+-------+-----+----------+----------------+--------+
| ReadsFileCreateBench  | benchCreate | 0   | 10000 | 5   | 1.315mb  | 2,456.828ops/s | ±7.74% |
| ReadsFileCreateBench  | benchCreate | 1   | 10000 | 5   | 1.315mb  | 2,454.637ops/s | ±0.80% |
| ReadsFileCreateBench  | benchCreate | 2   | 10000 | 5   | 1.315mb  | 2,327.230ops/s | ±0.82% |
| ReadsFileCreateBench  | benchCreate | 3   | 10000 | 5   | 1.315mb  | 2,236.784ops/s | ±0.57% |
| ReadsFileCreateBench  | benchCreate | 4   | 10000 | 5   | 1.315mb  | 2,160.614ops/s | ±0.47% |
| CachesFileCreateBench | benchCreate | 0   | 10000 | 5   | 1.315mb  | 3,376.522ops/s | ±0.26% |
| CachesFileCreateBench | benchCreate | 1   | 10000 | 5   | 1.315mb  | 3,336.301ops/s | ±1.17% |
| CachesFileCreateBench | benchCreate | 2   | 10000 | 5   | 1.315mb  | 3,218.834ops/s | ±2.49% |
| CachesFileCreateBench | benchCreate | 3   | 10000 | 5   | 1.315mb  | 2,940.643ops/s | ±1.40% |
| CachesFileCreateBench | benchCreate | 4   | 10000 | 5   | 1.315mb  | 2,844.591ops/s | ±1.13% |
| CachesJsonCreateBench | benchCreate | 0   | 10000 | 5   | 1.315mb  | 3,448.155ops/s | ±1.00% |
| CachesJsonCreateBench | benchCreate | 1   | 10000 | 5   | 1.315mb  | 3,481.036ops/s | ±1.60% |
| CachesJsonCreateBench | benchCreate | 2   | 10000 | 5   | 1.315mb  | 3,331.006ops/s | ±1.09% |
| CachesJsonCreateBench | benchCreate | 3   | 10000 | 5   | 1.315mb  | 3,073.246ops/s | ±0.56% |
| CachesJsonCreateBench | benchCreate | 4   | 10000 | 5   | 1.315mb  | 2,930.555ops/s | ±1.00% |
+-----------------------+-------------+-----+-------+-----+----------+----------------+--------+

Now here's the default SpaceID generator results from the same device:
+------------------+-------------+-----+-------+-----+----------+-----------------+--------+
| benchmark        | subject     | set | revs  | its | mem_peak | mode            | rstdev |
+------------------+-------------+-----+-------+-----+----------+-----------------+--------+
| SpaceCreateBench | benchCreate | 0   | 10000 | 5   | 1.315mb  | 95,245.870ops/s | ±1.96% |
| SpaceCreateBench | benchCreate | 1   | 10000 | 5   | 1.315mb  | 94,713.807ops/s | ±7.78% |
| SpaceCreateBench | benchCreate | 2   | 10000 | 5   | 1.315mb  | 32,538.984ops/s | ±9.75% |
| SpaceCreateBench | benchCreate | 3   | 10000 | 5   | 1.315mb  | 16,737.249ops/s | ±6.31% |
| SpaceCreateBench | benchCreate | 4   | 10000 | 5   | 1.315mb  | 12,963.067ops/s | ±1.26% |
+------------------+-------------+-----+-------+-----+----------+-----------------+--------+

All tests run on an M1 Mini

Good morning Dan! Thanks for your input on application persistence as that is an area I'm not familiar with!
I also think it's a good idea to break down and find what takes time to process!
Even if we get into micro-optimization territory where things wont have any real effect in production usage, I got into open-source to learn and let me tell you, I'm learning so much, and I'm having really fun! So just wanted to thank you guys!

Overall from the results I'm seeing - you can view them in the PR at #12 - the "pre-construction" steps that native PHP does aren't that expensive - or rather caching those alone doesn't improve Ops/sec enough at all.
For instance the baseline, would be:

reading the file,
parsing content to JSON,
construct generator

That benchmark is called ReadsFileCreateBench, then I have one to cache reading the fine, then one that caches reading and JSON. These give us granular results up to the "persist the object itself" area.

Test
Ops/s Max
Ops/s Min

ReadsFileCreateBench
2,495.340
2,030.786

CachesFileCreateBench
3,431.956
2,880.577

CachesJsonCreateBench
3,509.448
2,914.060

So each optimization there does certainly help on a step by step basis when compared to each other. IMO the results would best be described as: "reading file expensive, parsing JSON from already read file (in memory string) less expensive".
Again I did say some of these wouldn't be all too exciting to see, but they are interesting IMO for context. My take away from these parts alone is that if you can cache read from disk, do it - and if you need it as parsed JSON you may as well cache it in that form instead of as a string.

Now all that said we know that regular "sane" workflows would not instantiate a new object every time it's needed. At minimum sane workflows would register an instance as a singleton to their service container. So that would give us the same effective results you both have captured above.
I think that answers a lot of the "basic" optimizations for us which leads us to the more interesting one of "object caching". So if a generator object were "warmed up" (just running a bunch of input thru them) then stored in Redis and loaded when needed, does this speed anything up?
And then finally, my last concern is what type of modeling of workflows would a real applications typical requests require? If it's just used for URL slugs, then that's likely a single look up per request (and potentially many renders for URLs on page).
Is there ever a scenario (in the average cover 80% of use cases sense) where applications would need to look up (I.e parse string -> int) multiple IDs? My gut says that's not an average use-case, but potentially still worth benchmarking to understand.

Great breakdown @mallardduck! Thanks!

Is there ever a scenario (in the average cover 80% of use cases sense) where applications would need to look up...

As for this, I can't of the top of my head think of a use case where multiple string IDs need to be parsed to numerical IDs per request.
What I'm currently using it for is to get pretty URL's for projects in a Laravel app.

ID
Name
Project page

1
Corkery, Cronin and Koss
http://openevents.test/projects/backward

2
Mosciski, Schumm and Wiza
http://openevents.test/projects/bode

3
Muller-Towne
http://openevents.test/projects/cigar

4
Murphy, Pfeffer and Harvey
http://openevents.test/projects/hong

5
Lakin, Wiza and Corwin
http://openevents.test/projects/milkyway

6
Ebert Inc
http://openevents.test/projects/pinwheel

7
Ritchie, Sanford and Gislason
http://openevents.test/projects/sombrero

8
Daugherty-Littel
http://openevents.test/projects/tadpole

9
O'Keefe-Leuschke
http://openevents.test/projects/earth-andromeda

When using one of those links, a single reverse lookup is made to find the database primary key from the pretty url.
However, when generating the table, each row uses one integer-to-humanoid conversion. A single page could easily have hundreds of that type of conversion. But not the other way around. I still think it could be fun to benchmark as you said to understand how it all works together.

Awesome thanks for your input on that - it helps confirm my assumption on the "80% use-case" as well.
One other observation I made looking over my PRs benchmarks is that the speed has at least a minor causality with ID size.
benchCreate
+-----------------------------+-----+-------+-----+----------+------------------+--------+
| benchmark                   | set | revs  | its | mem_peak | mode             | rstdev |
+-----------------------------+-----+-------+-----+----------+------------------+--------+
| SpaceBench                  | 0   | 10000 | 5   | 1.303mb  | 250,444.048ops/s | ±0.59% |
| SpaceBench                  | 1   | 10000 | 5   | 1.303mb  | 249,263.478ops/s | ±0.63% |
| SpaceBench                  | 2   | 10000 | 5   | 1.303mb  | 252,738.053ops/s | ±0.63% |
| SpaceBench                  | 3   | 10000 | 5   | 1.303mb  | 170,944.906ops/s | ±0.73% |
| SpaceBench                  | 4   | 10000 | 5   | 1.303mb  | 170,732.398ops/s | ±1.09% |
| SpaceBench                  | 5   | 10000 | 5   | 1.303mb  | 87,901.966ops/s  | ±0.95% |
| SpaceBench                  | 6   | 10000 | 5   | 1.303mb  | 86,940.200ops/s  | ±1.85% |
| SpaceBench                  | 7   | 10000 | 5   | 1.303mb  | 65,796.456ops/s  | ±1.09% |
| CustomSmallerGeneratorBench | 0   | 10000 | 5   | 1.303mb  | 484,181.570ops/s | ±1.79% |
| CustomSmallerGeneratorBench | 1   | 10000 | 5   | 1.303mb  | 251,111.488ops/s | ±0.96% |
| CustomSmallerGeneratorBench | 2   | 10000 | 5   | 1.303mb  | 252,060.135ops/s | ±0.60% |
| CustomSmallerGeneratorBench | 3   | 10000 | 5   | 1.303mb  | 170,539.669ops/s | ±2.76% |
| CustomSmallerGeneratorBench | 4   | 10000 | 5   | 1.303mb  | 171,025.828ops/s | ±0.68% |
| CustomSmallerGeneratorBench | 5   | 10000 | 5   | 1.303mb  | 103,315.341ops/s | ±0.76% |
| CustomSmallerGeneratorBench | 6   | 10000 | 5   | 1.303mb  | 88,018.233ops/s  | ±0.20% |
| CustomSmallerGeneratorBench | 7   | 10000 | 5   | 1.303mb  | 59,290.129ops/s  | ±0.57% |
| ZooBench                    | 0   | 10000 | 5   | 3.361mb  | 480,600.934ops/s | ±1.17% |
| ZooBench                    | 1   | 10000 | 5   | 3.361mb  | 479,483.906ops/s | ±1.12% |
| ZooBench                    | 2   | 10000 | 5   | 3.361mb  | 477,642.008ops/s | ±0.79% |
| ZooBench                    | 3   | 10000 | 5   | 3.361mb  | 246,663.740ops/s | ±0.92% |
| ZooBench                    | 4   | 10000 | 5   | 3.361mb  | 250,284.497ops/s | ±1.32% |
| ZooBench                    | 5   | 10000 | 5   | 3.361mb  | 169,102.140ops/s | ±0.49% |
| ZooBench                    | 6   | 10000 | 5   | 3.361mb  | 170,171.602ops/s | ±0.68% |
| ZooBench                    | 7   | 10000 | 5   | 3.361mb  | 130,059.956ops/s | ±0.80% |
+-----------------------------+-----+-------+-----+----------+------------------+--------+

WSL2, Ubuntu / R9 5900x / PHP version 8.1.5, xdebug ❌, opcache ✔

Each set lines up with a value from this array:
[
            9,
            42,
            100,
            420,
            1_000,
            42_069,
            1_000_000,
            1_000_000_000
        ]

For the most part the results here show that larger numbers particularly in the billions will be bit slower to generate. All that seems pretty logical and easy to rationalize - since all generators seem affected equally by that.
However the curious part in the results was finding that the "custom" generator with the smaller static array of wordsets is faster than the space generator with a larger number of words.

That's interesting!

For the most part the results here show that larger numbers particularly in the billions will be bit slower to generate. All that seems pretty logical and easy to rationalize - since all generators seem affected equally by that.

I do think we can live with numbers in the billion range are a bit slower as most users won't have billions of records.

However the curious part in the results was finding that the "custom" generator with the smaller static array of wordsets is faster than the space generator with a larger number of words.

Hmm, that's odd, I'd be interested in why what is. (probably) unrelated question: do the lengths if the words matter at all when it comes to performance/speed?

most users won't have billions of records.

But the ones that do would need the extra performance even more 😉
As I explained here I do like to tinker with this and see what can be done about performance but I also think we shouldn't get hyper-focussed on squeezing out every last CPU cycle for this. After all, it's still PHP. If we'd need bajillions of HumanoID's to be generated or parsed in bulk for whatever reason then we could trivially write this in faster languages (or ones that have application scopes) or just buy more hardware. I think there's barely ever a usecase where we'd generate more than maybe a few hundred HumanoID's in a single pageview. We also should keep in mind that not every usage of HumanoID's will be in web projects at all which may skew requirements in a totally different direction.

However the curious part in the results was finding that the "custom" generator with the smaller static array of wordsets is faster than the space generator with a larger number of words.

I havent seen the actual code (yet) so I can't comment on that (yet). But I'm gonna leave that for another day, I'm having fun and all (I really am) but it's 21:26 over here and a saturday and I think it's time I unwind and have some quality time and have a 🍺  or open a bottle of 🍾 🍷 . And I suggest you gents do the same 😉  Cheers!

Take care of yourself Rob! There are no deadlines or time-pressures in open-source and we have gotten a ton of fun stuff done. Have a great evening! Cheers! 🥂

@RobThree and @mallardduck Just wanted to let you know I discovered something cool. The Laravel Cache facade actually supports caching of objects!
Not sure how much it helps in practise since it may take some time to put and fetch data from cache depending on the driver, but thought it was fun.
public function constructHydeInstance(): void
{
    $this->hyde = Cache::get(Hyde::class) ?? new Hyde();
}

public function persist(): void
{
    Cache::store('file')->put(Hyde::class, $this->hyde);
}

Just tried it out, but so far works surprisingly great to persist a shared object between requests, since PHP otherwise appears to be stateless.

so I finally had some free time and a neat idea to expand on the DX of this package.
had some ideas around the word dictionary system and how it could be more like it's inspiration.
which allows for reuse of the dictionary components for users to define custom ones.
the api I was inpsired by is here - interestingly the project's has a new name andreasonny83/unique-names-generator, think the last time i looked at it for inspiration it was a-type/adjective-adjective-animal.
WIP PR here: https://github.com/RobThree/HumanoID/pull/16

Hey @mallardduck, long time no see!
I'll take a look tomorrow, but it sounds cool!


Html code block not correct closed in doc "http interface"

code below document https://clickhouse.tech/docs/en/interfaces/http/#static not correct closed:
<http_handlers>
...
<http_handlers>

code links : https://github.com/ClickHouse/clickhouse-website-content/blob/c9d0c4874fbc76291aa74bf1b8ba73438bfb33bb/docs/en/interfaces/http/index.html#L229
should be :
</http_handlers>

Same questions in other language edition.

Could you please send a PR into the main repository?
https://github.com/ClickHouse/ClickHouse/tree/master/docs

Ok, I've applied the changes.