Can't run SEIRD model

Hi,
I'm having an issue with SEIRD model.
I followed the instructions and I installed latest jax and numpyro libraries.
$ pip freeze | grep "numpyro\|jax"
jax==0.2.3
jaxlib==0.1.56
-e git+https://github.com/pyro-ppl/numpyro.git@42ed07f5b0c761b5fa0c951e4fe64cdd6b5d0723#egg=numpyro

When I run
import jax.numpy as np
from covid.models.SEIRD import SEIRD

model = SEIRD()

confirmed = np.array([1, 2, 3])
death = np.array([0, 0, 1])

model(
    T = 50,
    N = 1e5,
    T_future = 0,
    E_duration_est = 4.0,
    I_duration_est = 2.0,
    R0_est = 3.0,
    beta_shape = 1,
    sigma_shape = 5,
    gamma_shape = 8,
    det_prob_est = 0.3,
    det_prob_conc = 50,
    det_noise_scale = 0.15,
    rw_scale = 2e-1,
    forecast_rw_scale = 0,
    drift_scale = None,
    confirmed=confirmed,
    death=death
)

I get a long error mesage which seems to indicate that death causes TypeError: _random_bits got invalid prng key.
What could be the problem?
Thanks in advance for any help you are able to provide.
---------------------------------------------------------------------------
FilteredStackTrace                        Traceback (most recent call last)
<ipython-input-5-4b35d3f2ba9c> in <module>
     16                  confirmed=confirmed,
---> 17                  death=death)

~/Desktop/project/models/MechBayes/covid/covid/models/SEIRD.py in __call__(self, T, N, T_future, E_duration_est, I_duration_est, R0_est, beta_shape, sigma_shape, gamma_shape, det_prob_est, det_prob_conc, det_noise_scale, rw_scale, forecast_rw_scale, drift_scale, confirmed, death)
     45         # Sample initial number of infected individuals
---> 46         I0 = numpyro.sample("I0", dist.Uniform(0, 0.02*N))
     47         E0 = numpyro.sample("E0", dist.Uniform(0, 0.02*N))

~/Desktop/project/models/MechBayes/numpyro/numpyro/primitives.py in sample(name, fn, obs, rng_key, sample_shape, infer)
     95     if not _PYRO_STACK:
---> 96         return fn(rng_key=rng_key, sample_shape=sample_shape)
     97

~/Desktop/project/models/MechBayes/numpyro/numpyro/distributions/distribution.py in __call__(self, *args, **kwargs)
    269             return self.sample_with_intermediates(key, *args, **kwargs)
--> 270         return self.sample(key, *args, **kwargs)
    271

~/Desktop/project/models/MechBayes/numpyro/numpyro/distributions/distribution.py in sample(self, key, sample_shape)
    736     def sample(self, key, sample_shape=()):
--> 737         x = self.base_dist(rng_key=key, sample_shape=sample_shape)
    738         for transform in self.transforms:

~/Desktop/project/models/MechBayes/numpyro/numpyro/distributions/distribution.py in __call__(self, *args, **kwargs)
    269             return self.sample_with_intermediates(key, *args, **kwargs)
--> 270         return self.sample(key, *args, **kwargs)
    271

~/Desktop/project/models/MechBayes/numpyro/numpyro/distributions/continuous.py in sample(self, key, sample_shape)
   1148         size = sample_shape + self.batch_shape
-> 1149         return random.uniform(key, shape=size)
   1150

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/random.py in uniform(key, shape, dtype, minval, maxval)
    381   shape = abstract_arrays.canonicalize_shape(shape)
--> 382   return _uniform(key, shape, dtype, minval, maxval)  # type: ignore
    383

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/random.py in _uniform(key, shape, dtype, minval, maxval)
    400
--> 401   bits = _random_bits(key, nbits, shape)
    402

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/random.py in _random_bits(key, bit_width, shape)
    305   if not _is_prng_key(key):
--> 306     raise TypeError("_random_bits got invalid prng key.")
    307   if bit_width not in (8, 16, 32, 64):

FilteredStackTrace: TypeError: _random_bits got invalid prng key.

The stack trace above excludes JAX-internal frames.
The following is the original exception that occurred, unmodified.

--------------------

The above exception was the direct cause of the following exception:

TypeError                                 Traceback (most recent call last)
<ipython-input-5-4b35d3f2ba9c> in <module>
     15                  drift_scale = None,
     16                  confirmed=confirmed,
---> 17                  death=death)

~/Desktop/project/models/MechBayes/covid/covid/models/SEIRD.py in __call__(self, T, N, T_future, E_duration_est, I_duration_est, R0_est, beta_shape, sigma_shape, gamma_shape, det_prob_est, det_prob_conc, det_noise_scale, rw_scale, forecast_rw_scale, drift_scale, confirmed, death)
     44
     45         # Sample initial number of infected individuals
---> 46         I0 = numpyro.sample("I0", dist.Uniform(0, 0.02*N))
     47         E0 = numpyro.sample("E0", dist.Uniform(0, 0.02*N))
     48         H0 = numpyro.sample("H0", dist.Uniform(0, 0.02*N))

~/Desktop/project/models/MechBayes/numpyro/numpyro/primitives.py in sample(name, fn, obs, rng_key, sample_shape, infer)
     94     # if there are no active Messengers, we just draw a sample and return it as expected:
     95     if not _PYRO_STACK:
---> 96         return fn(rng_key=rng_key, sample_shape=sample_shape)
     97
     98     # Otherwise, we initialize a message...

~/Desktop/project/models/MechBayes/numpyro/numpyro/distributions/distribution.py in __call__(self, *args, **kwargs)
    268         if sample_intermediates:
    269             return self.sample_with_intermediates(key, *args, **kwargs)
--> 270         return self.sample(key, *args, **kwargs)
    271
    272     def to_event(self, reinterpreted_batch_ndims=None):

~/Desktop/project/models/MechBayes/numpyro/numpyro/distributions/distribution.py in sample(self, key, sample_shape)
    735
    736     def sample(self, key, sample_shape=()):
--> 737         x = self.base_dist(rng_key=key, sample_shape=sample_shape)
    738         for transform in self.transforms:
    739             x = transform(x)

~/Desktop/project/models/MechBayes/numpyro/numpyro/distributions/distribution.py in __call__(self, *args, **kwargs)
    268         if sample_intermediates:
    269             return self.sample_with_intermediates(key, *args, **kwargs)
--> 270         return self.sample(key, *args, **kwargs)
    271
    272     def to_event(self, reinterpreted_batch_ndims=None):

~/Desktop/project/models/MechBayes/numpyro/numpyro/distributions/continuous.py in sample(self, key, sample_shape)
   1147     def sample(self, key, sample_shape=()):
   1148         size = sample_shape + self.batch_shape
-> 1149         return random.uniform(key, shape=size)
   1150
   1151     @validate_sample

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/random.py in uniform(key, shape, dtype, minval, maxval)
    380   dtype = dtypes.canonicalize_dtype(dtype)
    381   shape = abstract_arrays.canonicalize_shape(shape)
--> 382   return _uniform(key, shape, dtype, minval, maxval)  # type: ignore
    383
    384 @partial(jit, static_argnums=(1, 2))

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/traceback_util.py in reraise_with_filtered_traceback(*args, **kwargs)
    137   def reraise_with_filtered_traceback(*args, **kwargs):
    138     try:
--> 139       return fun(*args, **kwargs)
    140     except Exception as e:
    141       if not is_under_reraiser(e):

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/api.py in f_jitted(*args, **kwargs)
    215         backend=backend,
    216         name=flat_fun.__name__,
--> 217         donated_invars=donated_invars)
    218     return tree_unflatten(out_tree(), out)
    219

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/core.py in bind(self, fun, *args, **params)
   1160
   1161   def bind(self, fun, *args, **params):
-> 1162     return call_bind(self, fun, *args, **params)
   1163
   1164   def process(self, trace, fun, tracers, params):

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/core.py in call_bind(primitive, fun, *args, **params)
   1151   tracers = map(top_trace.full_raise, args)
   1152   with maybe_new_sublevel(top_trace):
-> 1153     outs = primitive.process(top_trace, fun, tracers, params)
   1154   return map(full_lower, apply_todos(env_trace_todo(), outs))
   1155

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/core.py in process(self, trace, fun, tracers, params)
   1163
   1164   def process(self, trace, fun, tracers, params):
-> 1165     return trace.process_call(self, fun, tracers, params)
   1166
   1167   def post_process(self, trace, out_tracers, params):

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/core.py in process_call(self, primitive, f, tracers, params)
    573
    574   def process_call(self, primitive, f, tracers, params):
--> 575     return primitive.impl(f, *tracers, **params)
    576   process_map = process_call
    577

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/interpreters/xla.py in _xla_call_impl(fun, device, backend, name, donated_invars, *args)
    555 def _xla_call_impl(fun: lu.WrappedFun, *args, device, backend, name, donated_invars):
    556   compiled_fun = _xla_callable(fun, device, backend, name, donated_invars,
--> 557                                *unsafe_map(arg_spec, args))
    558   try:
    559     return compiled_fun(*args)

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/linear_util.py in memoized_fun(fun, *args)
    245       fun.populate_stores(stores)
    246     else:
--> 247       ans = call(fun, *args)
    248       cache[key] = (ans, fun.stores)
    249

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/interpreters/xla.py in _xla_callable(fun, device, backend, name, donated_invars, *arg_specs)
    630   abstract_args, arg_devices = unzip2(arg_specs)
    631   if config.omnistaging_enabled:
--> 632     jaxpr, out_avals, consts = pe.trace_to_jaxpr_final(fun, abstract_args)
    633     if any(isinstance(c, core.Tracer) for c in consts):
    634       raise core.UnexpectedTracerError("Encountered an unexpected tracer.")

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/interpreters/partial_eval.py in trace_to_jaxpr_final(fun, in_avals)
   1036     main.source_info = fun_sourceinfo(fun.f)  # type: ignore
   1037     main.jaxpr_stack = ()  # type: ignore
-> 1038     jaxpr, out_avals, consts = trace_to_subjaxpr_dynamic(fun, main, in_avals)
   1039     del main
   1040   return jaxpr, out_avals, consts

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/interpreters/partial_eval.py in trace_to_subjaxpr_dynamic(fun, main, in_avals)
   1017     trace = DynamicJaxprTrace(main, core.cur_sublevel())
   1018     in_tracers = map(trace.new_arg, in_avals)
-> 1019     ans = fun.call_wrapped(*in_tracers)
   1020     out_tracers = map(trace.full_raise, ans)
   1021   jaxpr, out_avals, consts = frame.to_jaxpr(in_tracers, out_tracers)

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/linear_util.py in call_wrapped(self, *args, **kwargs)
    154
    155     try:
--> 156       ans = self.f(*args, **dict(self.params, **kwargs))
    157     except:
    158       # Some transformations yield from inside context managers, so we have to

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/random.py in _uniform(key, shape, dtype, minval, maxval)
    399     raise TypeError("uniform only accepts 32- or 64-bit dtypes.")
    400
--> 401   bits = _random_bits(key, nbits, shape)
    402
    403   # The strategy here is to randomize only the mantissa bits with an exponent of

~/Desktop/project/models/MechBayes/.venv/lib/python3.7/site-packages/jax/random.py in _random_bits(key, bit_width, shape)
    304   """Sample uniform random bits of given width and shape using PRNG key."""
    305   if not _is_prng_key(key):
--> 306     raise TypeError("_random_bits got invalid prng key.")
    307   if bit_width not in (8, 16, 32, 64):
    308     raise TypeError("requires 8-, 16-, 32- or 64-bit field width.")

TypeError: _random_bits got invalid prng key.

Sorry, for some reason I had notifications disabled. The model uses numpyro sampling statements, so you need to import numpyro and then run the model within the numpyro seed handler to set the random seed, like this:
import jax.numpy as np
import numpyro
from covid.models.SEIRD import SEIRD

model = SEIRD()

confirmed = np.array([1, 2, 3])
death = np.array([0, 0, 1])

with numpyro.handlers.seed(rng_seed=5):
    model(
        T = 50,
        N = 1e5,
        T_future = 0,
        E_duration_est = 4.0,
        I_duration_est = 2.0,
        R0_est = 3.0,
        beta_shape = 1,
        sigma_shape = 5,
        gamma_shape = 8,
        det_prob_est = 0.3,
        det_prob_conc = 50,
        det_noise_scale = 0.15,
        rw_scale = 2e-1,
        forecast_rw_scale = 0,
        drift_scale = None,
        confirmed=confirmed,
        death=death
    )


Make FileSystem/DB part a bit easier to use as a library

I made the following general changes for the general reasons:

Exposed both Name and DB in db.FileSystem - This allows people to instantiate and use the FileSystem struct without going through New explicitly. This means people can use it inside other Sqlite databases including ones they've already opened (sync.RWMutex was already exposed).
Exposed InitializeDB in db.FileSystem and added option to not do a SQL dump - This allows people to initialize the DB outside of calling New and allows them to turn off the default dump that occurs.
Move the "github.com/mattn/go-sqlite3" import from db.go to main.go - This allows people to create the driver in other ways or just not use that driver at all if they do something instead of calling New.

These changes should be fairly minimal. For my use cases, I refrained from making the following changes:

Make the dump feature optional in rwtxt.go (really I was gonna make it configurable frequency w/ 0 meaning disabled) - It only happens in Serve and due to the great work previously of exposing the Handler, I can just skip Serve altogether
Remove that go-sqlite3 import from dump.go in https://github.com/schollz/sqlite3dump - I can just vendor and stub out the call since I don't want the DB dumped

Now, here are the real reasons for my changes :-)

I made a version at https://github.com/cretz/rwtxt-crypt that uses an encrypted Sqlite DB and exposes it over a Tor onion service (quite awesome, works beautifully, I am kodablah on HN that made the comment that I was gonna do this)
I needed to use https://github.com/cretz/go-sqleet instead of https://github.com/mattn/go-sqlite3, but both cannot be compiled into the same binary due to name conflicts
I do not want the sqlite DB to be dumped ever, it doesn't fit into the security model

Let me know if there are any reservations about what I've done or if you want to solve some of my use-case requirements another way.

Note, that while the build succeeds, db_test.go doesn't even build (unrelated to this change)...just make sure you do the sqlite3 import in there if you ever go back and fix that test.

@cretz Looks really awesome! Don't worry about the tests, I will fix those later.
I've never heard of sqleet - do you know if it supports full-text search?
Your fork sounds awesome. If you'd like you can make a PR with your version. Or, you could just make PR to link your version in the README if you'd like! I bet others would be interested in a fully-encrypted version.
Btw, I love bine - thank you for creating that!

@schollz -

I've never heard of sqleet - do you know if it supports full-text search?

The code is at https://github.com/resilar/sqleet. Since it works at the disk level akin to SQLCipher and others, I believe the answer is yes (of course you have to compile w/ FTS). But I am unsure and would have to test to be sure.

Your fork sounds awesome. If you'd like you can make a PR with your version. Or, you could just make PR to link your version in the README if you'd like! I bet others would be interested in a fully-encrypted version.

Thanks. When complete I will make a PR to add to the bottom of the README, that would be ideal. Don't really want to make a PR to this repo infecting it with my heavy-requirement third party dependencies. I will probably wait for Tor <IP_ADDRESS> to be released (in alpha starting today) so I can statically link it and distribute self-contained binaries comfortably.

Btw, I love bine - thank you for creating that!

👍

@schollz - Not sure how to get in touch (I don't use Twitter), but I have made a release of https://github.com/cretz/rwtxt-crypt. I am not really inclined to include a link in the README since I may not maintain it (it's more of a proof-of-concept), but if you still feel it deserves to be there, I can submit a PR or you can add it.


Workaround for inconsistent behavior of MysqlExtractor with tinyint(1)

… columns
See ETL-5244
There is a bug in the MysqlExtractor where tinyint columns are always treated as ints.
There are MySQL jdbc driver setting (tinyInt1isBit=true and transformedBitIsBoolean=false) that
can cause tinyint(1) columns to be treated as BIT/BOOLEAN columns. The default behavior is to
treat tinyint(1) as BIT.
Currently, {@link MysqlExtractor#getDataTypeMap()} uses the information_schema to check types.
That does not do the above conversion. {@link #parseColumnAsString(ResultSet, ResultSetMetaData, int)}
which does the above type mapping.
On the other hand, SqlServerExtractor treats BIT columns as Booleans. So we can be in a bind
where sometimes BIT has to be converted to an int (for backwards compatibility in MySQL) and
sometimes to a Boolean (for SqlServer).
The fix is to add gobblin.source.extractor.extract.jdbc.JdbcExtractor.convertBitToBoolean() which returns true for everything but MySQL.

@ydai1124 can you review?


dataset

Dear author,
I am trying to do some experiments on the data you mentioned Ultra-low Dose PET Imaging Challenge 2022. Do you know where I can download the dataset? seems like their challenge website is down.
Thanks for your time!

Thank you for reaching out. The dataset used in our paper was obtained through an application process, and I’m not sure about its current availability or sharing permissions. Since I’m uncertain about the copyright and usage rights, I’m unable to provide the download link directly.


Custom hitArea for graphics with 4.1.0 broken?

Hi, I just updated to 4.1.0. I have many graphics with custom hit areas and they all seem to be broken. Can't really provide a reduced test case / fiddle at the moment (no time right now, maybe in the next days) and didn't follow the latest changes enough to have any idea why this is happening. Are there any breaking changes for hitArea's?

Not that I am aware of. Will likely need a test case to investigate :(

Here's a simple example that can be run on pixijs.github.io/examples, just toggle between 4.0.3 and 4.1.0 to see the difference.
var renderer = PIXI.autoDetectRenderer(800, 600, { antialias: true });
document.body.appendChild(renderer.view);

var stage = new PIXI.Container();
var graphics = new PIXI.Graphics();
var hitArea = new PIXI.Polygon(190,190, 410,190, 410,210, 190,210);
graphics.lineStyle(2, 0xffd900, 1);

// draw a shape
graphics.moveTo(200,200);
graphics.lineTo(400, 200);

graphics.hitArea = hitArea;
graphics.interactive = true;
graphics.buttonMode = true;

// just for making the hit area visible
graphics.lineStyle(1, 0xff0000, 0.8);
graphics.drawPolygon(hitArea);

stage.addChild(graphics);

animate();
function animate() {
    renderer.render(stage);
    requestAnimationFrame( animate );
}

Do you have any idea when this fix will be available via npm?

Hi @Custi - if you want you can use "pixi.js": "git+https://github.com/stbaer/pixi.js.git#tmp-release" until this is fixed in a new release in pixi. It's a build of pixi 4.1.0 + this fix.


Testing in python - import tensorflow as tf throws error "Exception: Versioning for this project requires either an sdist tarball"

NOTE: Only file GitHub issues for bugs and feature requests.  All other topics will be closed.
What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?
Some of the issues when searching for "import tensorflow as tf" gave answers related to either mock not being installed correctly or protobuf.  In my case, all were installed correctly and successfully.
Environment info
Operating System:
Amazon Linux
Installed version of CUDA and cuDNN:
(please attach the output of ls -l /path/to/cuda/lib/libcud*):
I installed a CPU only version.  So no CUDA
If installed from binary pip package, provide:

A link to the pip package you installed:
The output from python -c "import tensorflow; print(tensorflow.__version__)".

If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)
the installation completed successfully.  Here is the output:
sudo -H /usr/local/bin/pip install tensorflow
Requirement already satisfied: tensorflow in /usr/local/lib64/python2.7/site-packages
Requirement already satisfied: numpy>=1.11.0 in /usr/local/lib64/python2.7/site-packages (from tensorflow)
Requirement already satisfied: mock>=2.0.0 in /usr/local/lib/python2.7/site-packages (from tensorflow)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python2.7/site-packages (from tensorflow)
Requirement already satisfied: protobuf==3.1.0 in /usr/local/lib/python2.7/site-packages (from tensorflow)
Requirement already satisfied: wheel in /usr/local/lib/python2.7/site-packages (from tensorflow)
Requirement already satisfied: funcsigs>=1; python_version < "3.3" in /usr/local/lib/python2.7/site-packages (from mock>=2.0.0->tensorflow)
Requirement already satisfied: pbr>=0.11 in /usr/local/lib/python2.7/site-packages (from mock>=2.0.0->tensorflow)
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/site-packages/setuptools-28.3.0-py2.7.egg (from protobuf==3.1.0->tensorflow)
What other attempted solutions have you tried?
Installed each of the dependencies individually.  Still same issue.
Logs or other output that would be helpful

python -c "import tensorflow; print(tensorflow.version)"
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/tensorflow/init.py", line 24, in
from tensorflow.python import *
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/init.py", line 106, in
from tensorflow.python.platform import test
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/platform/test.py", line 81, in
import mock                # pylint: disable=g-import-not-at-top,unused-import
File "/usr/local/lib/python2.7/site-packages/mock/init.py", line 2, in
import mock.mock as _mock
File "/usr/local/lib/python2.7/site-packages/mock/mock.py", line 71, in
_v = VersionInfo('mock').semantic_version()
File "/usr/local/lib/python2.7/site-packages/pbr/version.py", line 460, in semantic_version
self._semantic = self._get_version_from_pkg_resources()
File "/usr/local/lib/python2.7/site-packages/pbr/version.py", line 447, in _get_version_from_pkg_resources
result_string = packaging.get_version(self.package)
File "/usr/local/lib/python2.7/site-packages/pbr/packaging.py", line 725, in get_version
raise Exception("Versioning for this project requires either an sdist"
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. Are you sure that git is installed?

Ok, this was resolved.  The only thing I had to do was to upgrade the distribute module - "pip install --upgrade distribute".


Wild Talents 2nd Edition Edits

Changes / Comments
Added more power slots
switch to dice matching
Roll20 Requests
Comments are very helpful for reviewing the code changes. Please answer the relevant questions below in your comment.

[x] Does the pull request title have the sheet name(s)? Include each sheet name.
[ ] Is this a bug fix?
[x] Does this add functional enhancements (new features or extending existing features) ?
[ ] Does this add or change functional aesthetics (such as layout or color scheme) ?
[ ] If changing or removing attributes, what steps have you taken, if any, to preserve player data ?
[ ] If this is a new sheet, did you follow Building Character Sheets standards ?

If you do not know English. Please leave a comment in your native language.

Well, I have no idea how to fix this. It seems to want to merge commits that are already on roll20, and is giving me errors about the changes that aren't.

Yeah I'm not really sure what went wrong. Most of those changes are already live. Do you know how to only pull certain commits, rather than whatever it's trying to do now?

It looks like the merge with master helped. You're just trying to update these two files, correct?

That's right, the other changes are weird because they are already live.


Make it clear in the docs what layers from the layers control are shown

If a map is initiated with more than one base layer, and a L.control.layers is set up for those base layers, then ALL base layers will be shown, in quick sequence. Very ugly. Only one should be drawn, of course.
The problem seems to be in this case that there's no default base layer set. So all of them are drawn.
There should be a built-in mechanism to by default set the first of the specified base layers as 'selected'.
There should also be a API method to specify some other layer as the default selected.
See:
http://leaflet.uservoice.com/forums/150880-ideas-and-suggestions-for-leaflet/suggestions/2635855-make-layer-control-docs-example-clearer-about-whic
http://leaflet.uservoice.com/forums/150880-ideas-and-suggestions-for-leaflet/suggestions/3825916-a-method-to-set-which-radiobutton-is-selected-in-l

Still an issue IMO. I only found the answer here after a few minutes of fruitless searching for "leaflet set default layer", "leaflet set layer", etc.

Hi @Timmmm
As @mourner said, just add to the layer control, but don't add it to the map.
layerControl = L.control.layers().addTo(map);
layerControl.addOverlay(tile_layer , "layer_name");
map.addLayer(tile_layer);  # Add this if you want to show, comment this if you want to hide it.

I stumbled on the same issue also.


Update IotHub Quickstart sample to use latest Event Hubs SDK

https://github.com/Azure-Samples/azure-iot-samples-java is the Java samples repo for IotHub. The read-d2c-messages folder is meant to contain sample that shows how to use the Event Hubs package to get events sent to IotHub.
This currently uses the older Event Hubs package and needs to be updated to use the latest v5 package.
This issue is to track the work needed to update the samples repo to use the latest Event Hubs package.

The sample should use Event Hubs compatible connection string. Please retain existing code that forms the said connection string because there are docs pointing to this sample that talk about which variables to update
Additionally, the sample should also show how to use websockets and proxy support, but should be commented out. This is because not every user would need to know these, but it has been a common enough ask for us to show case it
The readme should talk about how to form the  Event Hubs compatible connection string, checkpointing and websocket/proxy support. Use the JS Readme for reference

Created a PR for updating the sample - https://github.com/Azure-Samples/azure-iot-samples-java/pull/15

PR merged.


Allow the injection of TokenCountEstimator

This PR resolves #697.
The idea is to allow the injection of the TokenCountEstimator interface, which can be used in different ways, for example to know in advance the cost of processing a certain text, or to choose one model or another based on the maximum number of tokens.
Today, when I look at the code to see which LLM providers implement this interface, I see

bam
watsonx
azure-openai

For the azure-openai I found something strange, the tokenizer variable is never set, so when creating tests I always get a NullPointerException(There are some TODOs in the code to understand what the points are).
As far as I understand, the correct way to create the tokenizer for azure-openai is to use something like:
new AzureOpenAiTokenizer(<modelId>)

but I'm not able to test this, so what I've done is just put some TODOs in the code.
Is there anyone who can look into this? Does it make sense to have a TokenCountEstimator for azure-openai or should I just ignore it for now?

Is there anyone who can look into this? Does it make sense to have a TokenCountEstimator for azure-openai or should I just ignore it for now?

Maybe @csotiriou knows :)


Unable to run vs code as root in Redhat 8 & Ubuntu 20

Issue Type: Bug
Using sudo code --user-data-dir={whatever} (or even --user-data-dir alone) works in Ubuntu 16. Does not in Ubuntu 20 and Redhat 8.
I know there are other posts/issues on the same problem, but usually they get it sorted out by a specific format of the user-data-dir parameter value. It does not work for me.
I tried commenting out /usr/bin/code's if [ "${id -u})" = "0" ]; then block thinking I would bypass the root validation and that would help, but no.
I tried running sudo code --user-data-dir={whatever} --log trace, checked the log files and can't find any clue.

We don't really support launching code with sudo:
https://github.com/microsoft/vscode/blob/38e500687d46d56e630822f29ff446c5e9e82423/resources/linux/bin/code.sh#L32-L35
You get a notification in vscode when sudo is needed to save write protected files.

FYI @deepak1556 in case I've missed something

We have been partially running with chromium sandbox on linux https://code.visualstudio.com/updates/v1_59#_progress-for-electron-sandbox-support. Running as root is not supported in this mode, it is very likely you are not hitting the sandbox layer in ubuntu 16. Can you provide the output of sudo code --verbose from either your RHEL8 or ubuntu 20 device to confirm, thanks!

@deepak1556 : you are right.
Thanks @Tyriar , @deepak1556 , although problem does not have a resolution, you helped me understand this is a known issue and not something on my side.
Ubuntu 20.04.2 LTS verbose output:
ubuntu-build@ubuntu-build:~$ sudo code --verbose --user-data-dir
[4233:0825/150341.073920:FATAL:electron_main_delegate.cc(263)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

Redhat 20.4 verbose output:
[redhat-build@redhat-build ~]$ sudo code --verbose --user-data-dir
[0825/145731.147136:FATAL:electron_main_delegate.cc(309)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

By the way, the "working" ubuntu is 18.04.4, although I mentioned it was 16 - must have been recently updated. Can't run the same on 16 to double check, though.


[BUG] RunCommandInputParameter Parameter values all strings

Library name and version
Azure.ResourceManager.Compute v1.6.0
Describe the bug
This goes for both Azure.ResourceManager.Compute v1.6.0 and the new hybrid preview of the same.
When sending a script as a run command we are forced by the SDK to send name and value as strings.
When you then have a powershell script with bool, int og other type, the script fails to convert the parameter to the correct type.
In some situations we are forced to change the script parameters to all strings, and then inside the script parse these to the correct types.
This is a major limitation to run scripts inside both Azure VM's and Arc VM's.
This is the error for a bool parameter
Cannot proc
ess argument transformation on parameter 'HideFromAddressList'. Cannot convert value "System.String" to type "System.Bo
olean". Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or 0.
Expected behavior
The expected behavior would be for the api to convert the values sent into the correct types and then use them as script arguments.
Actual behavior
Everything is being forced to strings, which local powershell scripts can't convert
Reproduction Steps
param (
    [Parameter(Mandatory=$false, ValueFromPipelineByPropertyName)]
    [string]$testString,

    [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName)]
    [int]$testNumber,

    [Parameter(Mandatory)]
    [bool]$testBool
)

Write-Output $testBool
When sending this script to the VM i have tried the following as parameter values:
testBool = $true
testBool = 1
testBool = $True
testBool = true
testBool = True
The powershell script inside the VM always returns:
Cannot proc
ess argument transformation on parameter 'testBool'. Cannot convert value "System.String" to type "System.Bo
olean". Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or 0.
Environment
No response

Hi @shareonline.  Thank you for reaching out and we regret that you're experiencing difficulties.  The Azure SDK packages have no insight nor influence over the format used by Azure services to exchange data; they must conform to the published REST API specification for the service.   In this case, the Compute resource provider defines the set of parameters for the "Run Command" operation as a string-based name and value set.    This can be seen in the RunCommandInputParameter definition of the API spec, as well as the associated example payload.
In your scenario, it seems that the service is not translating these as you'd expect.  The maintainers of the Azure SDK are unable to assist as we do not have insight into the service implementation.   Unfortunately, the Azure services teams do not monitor our repository, do not offer support here, nor provide a way for us to transfer an inquiry to them directly.   To ensure that the right team has visibility and can help, your best path forward for would be to open an Azure support request or inquire on the Microsoft Q&A site.
I'm going to close this out; if I've misunderstood what you're describing, please let us know in a comment and we'd be happy to assist as we're able.


Allow expressions as arguments to attributes

Currently, recipe attributes like [confirm: 'prompt'] only allow string literal arguments. Ideally, these should all be able to take arbitrary expressions, like [confirm: 'are you sure you want to delete ' + path + '?'].
This has been brought up in a number of issues:
https://github.com/casey/just/issues/2510
https://github.com/casey/just/issues/1996
https://github.com/casey/just/issues/553
https://github.com/casey/just/issues/1855

Looking at the attributes, I think all of them should be able to take expressions as arguments, with the possible exception of [group], which needs to be evaluated without executing anything.


fix: Unified invalid credentials error handling

Fixes: #1316
Migrated all error handling for invalid credentials to one place to fix some issues related to that.

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


 The application architecture changed significantly, so
the tests are updated accordingly.
The npm test scripts are re-jiggered. Truffle tests are now run by circleCI. To run application tests in watch mode, run yarn test:app instead.

We should probably update our tests to pull the contracts directly from the packages instead of depend on local files.

@lalexgap, RockPaperScissorsGame imports from the fmg-core package on npm, and not local files.
You might be confused, because there's a fmg-rock-paper-scissors package over there as well. But that package is on its way out, and should be removed.


docker部署的从老版本升级到最新版的容器报错

[error] 13#13: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  require(): Failed opening required 'templates//index.php' (include_path='.:/usr/share/php7') in /data/wwwroot/default/controller/index.php on line 257" while reading response header from upstream, client: <IP_ADDRESS>, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://<IP_ADDRESS>:9000", host: "........:58080"

你是哪个版本升级到哪个版本？


Setup App Integrity check

check for App and device integrity (rooted devices?)

As the app has been Split into FOSS and Standard, this is applicable only to Standard version.


open popup as soon as the webview as completely loaded

fix #62

BTW, this PR will most likely conflict with #64, so one of both PRs needs to be rebased as soon as the other one was merged...

Thanks for the pull request!
However, with this solution, there is a period of time when nothing is displayed until the WebView is loaded, which makes it look like it is not responsive.
For example, you can display a temporary element until it is loaded so that the fps does not drop.
Simple example: change the NestedScrollView in the latest master's popup_layout to android:layout_height="480dp"

you can display a temporary element until it is loaded so that the fps does not drop.

In fact it's not the fps which drops. The screen keeps updating with 50 (?) Hz. It just looks like it got stuck, cause the webview adjusts it's height according to the (slowly) loaded website multiple times.

Simple example: change the NestedScrollView in the latest master's popup_layout to android:layout_height="480dp"

layout_height would probably break the possibility to expand the popup. Oh, and IMHO an empty popup looks even more unresponsive than a popup, which is shown with a very small delay.
But I will take a look what I can do with the "time in-between"

I see, maybe it was not a good to test it on a low performance device.
I'll leave it to you to make the changes here!

Another idea would be to show the popup directly, but use a shimmer effect while loading...
https://github.com/facebook/shimmer-android
(I will provide screenshots as time permits)

With shimmer effect loading animation:

Super cool!!
Thank you for realizing a good solution.


[path_provider_android][path_provider_ios]: MissingPluginException on 2.0.12 and 2.0.7 respectively

Caught this when using the latest version of cached_network_image, which uses flutter_cache_manager, which uses path_provider, which uses path_provider_android and path_provider_ios.
Does not occur in 2.0.11 of path_provider_android and 2.0.7 of path_provider_ios.
Exception:

MissingPluginException(No implementation found for method getTemporaryDirectory on channel plugins.flutter.io/path_provider)
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:175:7)
<asynchronous suspension>
#1      getTemporaryDirectory (package:path_provider/path_provider.dart:55:24)
<asynchronous suspension>
#2      IOFileSystem.createDirectory (package:flutter_cache_manager/src/storage/file_system/file_system_io.dart:15:19)
<asynchronous suspension>

MissingPluginException(No implementation found for method getApplicationSupportDirectory on channel plugins.flutter.io/path_provider)
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:175:7)
<asynchronous suspension>
#1      getApplicationSupportDirectory (package:path_provider/path_provider.dart:77:24)
<asynchronous suspension>
#2      CacheObjectProvider._getPath (package:flutter_cache_manager/src/storage/cache_info_repositories/cache_object_provider.dart:196:20)
<asynchronous suspension>
#3      CacheObjectProvider.open (package:flutter_cache_manager/src/storage/cache_info_repositories/cache_object_provider.dart:28:16)
<asynchronous suspension>
#4      CacheStore._getCacheDataFromDatabase (package:flutter_cache_manager/src/cache_store.dart:115:22)
<asynchronous suspension>

The culprit seems to be: https://github.com/flutter/plugins/pull/4912

flutter doctor
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.3.1 21E258 darwin-arm, locale en-IN)
    • Flutter version 2.10.3 at /Users/viren.khatri/fvm/versions/2.10.3
    • Upstream repository git@github.com:flutter/flutter.git
    • Framework revision 7e9793dee1 (6 weeks ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/viren.khatri/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.66.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.38.1

[✓] Connected device (3 available)
    • HD1901 (mobile) • b25e09dd • android-arm64  • Android 11 (API 30)
    • macOS (desktop) • macos    • darwin-arm64   • macOS 12.3.1 21E258 darwin-arm
    • Chrome (web)    • chrome   • web-javascript • Google Chrome 97.0.4692.71

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

That's the wrong channel name, which means Dart registration hasn't run. Is this in an isolate?

Is this in an isolate?

No
Its a module injected into an existing android app via add2app.
PS: this issue goes away if i reduce the version by one, both on android and ios.

If it's add-to-app, this may be the same underlying issue as https://github.com/flutter/flutter/issues/100844. Does this reproduce on master?

PS: this issue goes away if i reduce the version by one, both on android and ios.

Since the issue is that Dart plugin registration is not running, that's expected; earlier versions don't use Dart plugin registration.

path_provider_android 2.0.14 with the same issue丅
Temporary solution:  https://github.com/flutter/flutter/issues/100844

Closing due to lack of response; please re-open if you can still reproduce on master.


Keyword boundaries

Is your feature request related to a problem? Please describe.
Currently Porcupine library consumes audio frames and notifies client code if the keyword has been detected. However the library doesn't provide information about keyword start/end samples. In other words, user never knows when (at which sample) the keyword has started, and when it has finished.
Describe the solution you'd like
pv_porcupine_process should return not only keyword index, but also offset in samples for the keyword start and end.

what's the use case?

The use case is that the audio stream must be post-processed and the stream must include the keyword itself.

got it. is this an AVS use case?

closing due to inactiviity. reopen if needed


Added support for applying image policy to initContainers

Added support for applying policy to initContainers as per https://github.com/IBM/portieris/issues/30
The diffs are kind of strange because of the indentations. Only edits are actually on the top of mutate function and minor edits.
I had some trouble writing tests for checking the signing with a pod request. I ran into this error:
 Test Panicked
 GetNotaryRepo called before it is stubbed

I tried it with newFakeRequestMultiContainer and couldn't get it to work too. If someone could help me figure out the testing scaffolding, that would be great.
Signed-off-by: Brandon Lum<EMAIL_ADDRESS>

Hi @lumjjb, great spot, thank you for your contribution, too!
I'd be happy to get in touch with you via Webex or Slack or similar on Monday morning US time in order to help figure out your testing issue, if you'd like?

Hey Michael!
Definitely. I'll ping you on slack Monday morning!
Cheers
Brandon
On Sat, Aug 11, 2018 at 4:46 PM Michael Hough<EMAIL_ADDRESS>wrote:

Hi @lumjjb https://github.com/lumjjb, great spot, thank you for your
contribution, too!
I'd be happy to get in touch with you via Webex or Slack or similar on
Monday morning US time in order to help figure out your testing issue, if
you'd like?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/IBM/portieris/pull/31#issuecomment-412300579, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AC6xhtkN54TlQETs0uZ2ss4Bu6FpJziKks5uP0KagaJpZM4V4saA
.

--
Independent Security Blog - lumexsec.wordpress.com
http://lumexsec.wordpress.com
LinkedIn http://www.linkedin.com/profile/view?id=61656575
GPG Key ID: 795B4468

Hi @lumjjb, the code changes LGTM. I'm trying to get a green run of our end-to-end tests before merging, but I'm having trouble with secrets in the cluster. I'll do some debugging and get back ASAP.
Sorry for any inconvenience!

Hi @molepigeon , any luck with the tests?

Oops, sorry, this slipped my mind.
Yes, I have a green run of the tests now, so happy to merge.
We'll need to get an updated image rolled out that contains these changes.


Generic thermostat in Home Assistant

When using a Home Assistant server, coupled with homebridge-homeassistant, this thermostat accessory doesn't work. To provide a compatibility layer, I created a proxy between your thermostat accessory and the API in Home Assistant.
https://github.com/jharmn/homebridge-homeassistant-thermostat
https://hub.docker.com/r/jharmn/docker-homebridge-homeassistant-thermostat/builds/
Feel free to close the issue and ignore, I just thought you might want to share the option for Home Assistant users.

Hello @jharmn, as I'm not a Home Assistant user, feel free to push your work as pull request as you did a few days ago. I will integrate it as soon as possible.
Thank you for your contribution :)


R für vorwarnzeit auf max(1.3, currentRBund)

so far, the 1.3 critical value seems to be adequate. might reopen in the future!


nm_analysis.py calls run_CV three times, optimize with oop?

implement abstract class for run_CV, the results are then set individually

Adapted with last push


[Compat] Useful Trophies

Neither this nor that mod have relevant options, but it'd be nice to be able to wear trophies while also consuming them.
Corresponding issue here: https://github.com/Khairex/ValheimMods/issues/6

This is why the functionality was split to Vanity mod. This incompatibility won't be fixed.

Fair enough.
With this as a hypothetical question (vs insistent), how reasonable would it be to implement vanity versions of each item that is a simple 1-1 recipe from the trophy?
I haven't done any valheim modding, so I'm just looking for a ballpark.


Help to install clang 8 on ubuntu 22.04

Greetings Qengineering team,
Your efforts in writing tools and documentation for Jetson Nano is highly appreciated.
While trying to upgrade to Ubuntu 20.04 from 18.04 using your guide, I accidentally upgraded to 22.04 and so now I'm trying to get  the tools as software from the ubuntu 20.04 working in 22.04.
I was able to install gcc-8 using archive repo, but installing clang-8 has been very difficult as none of the repositories work.
Kindly share your expertise in getting clang-8 working with Ubuntu 22.04.

I don't recommend Ubuntu 22.04 as it doesn't support the CUDA environment.
It looks as if everything is working, but as soon as some app is using CUDA, you might get unexpected behavior.
That's why we never published an 22.04 version.

Thank you for the quick reply, even if I manage to install cuda10.2 on 22.04 would it create issues?

Yes. You are facing low-level driver issues.

Thank you, I will use your 20.04 image and do a fresh install.


executeCompletionItemProvider has a huge perf+memory overhead

This may be known (or even unavoidable) but I've been looking into issues reported in against the Dart extension (and I've seen myself) where the editor gets slower and slower and eventually crashes (usually saying it's out of memory).
I believe it's completion-related - we've recently started returning completions for symbols in files that aren't yet imported and auto-importing them when selected which means we now return a few thousand results instead of a few hundred. I believe the crash may be a combination of bad performance and excessive memory being allocated for each completion invocation that progressively gets worse (in part because we didn't handle cancellation, which I have a change for on its way).
Anyway, while trying to track this down I made a test that called completion repeatedly and logged the time taken and the change in the processes heap size to get an idea of the effect of changes I was making, and I discovered that calling vscode.executeCompletionItemProvider seems to add a huge overhead  to completions (the time and memory allocated is about 3x when going through this). It's hard for me to be sure, but the performance in the editor feels like it may be paying this too.
Here's a dummy provider that returns 20k items:
export class FakeCompletionItemProvider implements CompletionItemProvider {
	public async provideCompletionItems(
		document: TextDocument, position: Position, token: CancellationToken, context: CompletionContext,
	): Promise<CompletionList> {

		const items: CompletionItem[] = Array<CompletionItem>(20000);
		for (let i = 0; i < items.length; i++) {
			const item = new CompletionItem(`Item ${i}`);
			item.filterText = `${item.label}???`;
			item.kind = CompletionItemKind.Constant;
			item.detail = "(deprecated)";
			item.documentation = "docs";
			item.insertText = `${item.label} !!`;
			item.keepWhitespace = true;
			item.commitCharacters = ["["];

			item.command = {
				command: "editor.action.triggerSuggest",
				title: "Suggest",
			};
			items[i] = item;
		}
		return new CompletionList(items);
	}
}

And here's a test that calls it 50 times:
describe("completion support", () => {
		it.only("log performance of completions", async () => {
			await setTestContent(`
main() {
  ProcessInf
}
		`);
			const count = 50;
			const startMemory = process.memoryUsage();
			const startTime = Date.now();

			for (let i = 0; i < count; i++) {
				const startMemoryInner = process.memoryUsage();
				const startTimeInner = Date.now();

				const completions = await (vs.commands.executeCommand("vscode.executeCompletionItemProvider", currentDoc().uri, positionOf("ProcessInf^"), undefined) as Thenable<vs.CompletionList>);

				const heapChangeMbs = (process.memoryUsage().heapUsed - startMemoryInner.heapUsed) / 1024 / 1024;
				console.log(`Iteration #${i < 10 ? " " : ""}${i} took ${Date.now() - startTimeInner} ms to return ${completions.items.length} results, heap change was ${Math.round(heapChangeMbs)} MB`);
			}

			const heapChangeMbs = (process.memoryUsage().heapUsed - startMemory.heapUsed) / 1024 / 1024;
			console.log(`Total run took ${Date.now() - startTime} ms heap change was ${Math.round(heapChangeMbs)} MB`);
		});

Here's the output:
Iteration # 0 took 1294 ms to return 20000 results, heap change was 122 MB
Iteration # 1 took 1326 ms to return 20000 results, heap change was 70 MB
Iteration # 2 took 1098 ms to return 20000 results, heap change was 132 MB
Iteration # 3 took 1232 ms to return 20000 results, heap change was -189 MB
Iteration # 4 took 1092 ms to return 20000 results, heap change was 134 MB
Iteration # 5 took 1117 ms to return 20000 results, heap change was 133 MB
Iteration # 6 took 1339 ms to return 20000 results, heap change was -268 MB
Iteration # 7 took 1142 ms to return 20000 results, heap change was 130 MB
Iteration # 8 took 1119 ms to return 20000 results, heap change was 133 MB
Iteration # 9 took 1139 ms to return 20000 results, heap change was 133 MB
Iteration #10 took 1143 ms to return 20000 results, heap change was 132 MB
Iteration #11 took 1302 ms to return 20000 results, heap change was -469 MB
Iteration #12 took 1139 ms to return 20000 results, heap change was 126 MB
Iteration #13 took 1236 ms to return 20000 results, heap change was -183 MB
Iteration #14 took 1112 ms to return 20000 results, heap change was 133 MB
Iteration #15 took 1139 ms to return 20000 results, heap change was 132 MB
Iteration #16 took 1347 ms to return 20000 results, heap change was -268 MB
Iteration #17 took 1117 ms to return 20000 results, heap change was 131 MB
Iteration #18 took 1120 ms to return 20000 results, heap change was 133 MB
Iteration #19 took 1112 ms to return 20000 results, heap change was 132 MB
Iteration #20 took 1124 ms to return 20000 results, heap change was 132 MB
Iteration #21 took 1307 ms to return 20000 results, heap change was -470 MB
Iteration #22 took 1135 ms to return 20000 results, heap change was 126 MB
Iteration #23 took 1241 ms to return 20000 results, heap change was -183 MB
Iteration #24 took 1123 ms to return 20000 results, heap change was 133 MB
Iteration #25 took 1132 ms to return 20000 results, heap change was 132 MB
Iteration #26 took 1340 ms to return 20000 results, heap change was -268 MB
Iteration #27 took 1118 ms to return 20000 results, heap change was 131 MB
Iteration #28 took 1131 ms to return 20000 results, heap change was 133 MB
Iteration #29 took 1123 ms to return 20000 results, heap change was 132 MB
Iteration #30 took 1107 ms to return 20000 results, heap change was 132 MB
Iteration #31 took 1295 ms to return 20000 results, heap change was -470 MB
Iteration #32 took 1145 ms to return 20000 results, heap change was 126 MB
Iteration #33 took 1240 ms to return 20000 results, heap change was -183 MB
Iteration #34 took 1115 ms to return 20000 results, heap change was 133 MB
Iteration #35 took 1135 ms to return 20000 results, heap change was 132 MB
Iteration #36 took 1296 ms to return 20000 results, heap change was -271 MB
Iteration #37 took 1165 ms to return 20000 results, heap change was 132 MB
Iteration #38 took 1152 ms to return 20000 results, heap change was 132 MB
Iteration #39 took 1124 ms to return 20000 results, heap change was 132 MB
Iteration #40 took 1325 ms to return 20000 results, heap change was -390 MB
Iteration #41 took 1116 ms to return 20000 results, heap change was 124 MB
Iteration #42 took 1126 ms to return 20000 results, heap change was 132 MB
Iteration #43 took 1123 ms to return 20000 results, heap change was 132 MB
Iteration #44 took 1285 ms to return 20000 results, heap change was -392 MB
Iteration #45 took 1123 ms to return 20000 results, heap change was 133 MB
Iteration #46 took 1139 ms to return 20000 results, heap change was 132 MB
Iteration #47 took 1148 ms to return 20000 results, heap change was 132 MB
Iteration #48 took 1271 ms to return 20000 results, heap change was -397 MB
Iteration #49 took 1124 ms to return 20000 results, heap change was 134 MB
Total run took 59028 ms heap change was 270 MB

If I change the test to use the provider directly:
const completions = await provider.provideCompletionItems(currentDoc(), positionOf("ProcessInf^"), undefined, undefined);

Then the results look like this:
Iteration # 0 took 259 ms to return 20000 results, heap change was 29 MB
Iteration # 1 took 264 ms to return 20000 results, heap change was 36 MB
Iteration # 2 took 267 ms to return 20000 results, heap change was 36 MB
Iteration # 3 took 282 ms to return 20000 results, heap change was 29 MB
Iteration # 4 took 324 ms to return 20000 results, heap change was -78 MB
Iteration # 5 took 261 ms to return 20000 results, heap change was 36 MB
Iteration # 6 took 264 ms to return 20000 results, heap change was 29 MB
Iteration # 7 took 261 ms to return 20000 results, heap change was 36 MB
Iteration # 8 took 270 ms to return 20000 results, heap change was 36 MB
Iteration # 9 took 265 ms to return 20000 results, heap change was 36 MB
Iteration #10 took 256 ms to return 20000 results, heap change was 36 MB
Iteration #11 took 1056 ms to return 20000 results, heap change was -212 MB
Iteration #12 took 393 ms to return 20000 results, heap change was 33 MB
Iteration #13 took 386 ms to return 20000 results, heap change was 36 MB
Iteration #14 took 404 ms to return 20000 results, heap change was 36 MB
Iteration #15 took 385 ms to return 20000 results, heap change was 36 MB
Iteration #16 took 386 ms to return 20000 results, heap change was 36 MB
Iteration #17 took 401 ms to return 20000 results, heap change was 29 MB
Iteration #18 took 408 ms to return 20000 results, heap change was 36 MB
Iteration #19 took 394 ms to return 20000 results, heap change was 36 MB
Iteration #20 took 488 ms to return 20000 results, heap change was -280 MB
Iteration #21 took 412 ms to return 20000 results, heap change was 36 MB
Iteration #22 took 397 ms to return 20000 results, heap change was 36 MB
Iteration #23 took 347 ms to return 20000 results, heap change was 36 MB
Iteration #24 took 295 ms to return 20000 results, heap change was 36 MB
Iteration #25 took 264 ms to return 20000 results, heap change was 36 MB
Iteration #26 took 262 ms to return 20000 results, heap change was 36 MB
Iteration #27 took 270 ms to return 20000 results, heap change was 28 MB
Iteration #28 took 375 ms to return 20000 results, heap change was -237 MB
Iteration #29 took 261 ms to return 20000 results, heap change was 33 MB
Iteration #30 took 264 ms to return 20000 results, heap change was 28 MB
Iteration #31 took 256 ms to return 20000 results, heap change was 36 MB
Iteration #32 took 260 ms to return 20000 results, heap change was 36 MB
Iteration #33 took 259 ms to return 20000 results, heap change was 36 MB
Iteration #34 took 263 ms to return 20000 results, heap change was 36 MB
Iteration #35 took 260 ms to return 20000 results, heap change was 36 MB
Iteration #36 took 270 ms to return 20000 results, heap change was 36 MB
Iteration #37 took 321 ms to return 20000 results, heap change was -278 MB
Iteration #38 took 256 ms to return 20000 results, heap change was 36 MB
Iteration #39 took 257 ms to return 20000 results, heap change was 36 MB
Iteration #40 took 262 ms to return 20000 results, heap change was 36 MB
Iteration #41 took 264 ms to return 20000 results, heap change was 29 MB
Iteration #42 took 259 ms to return 20000 results, heap change was 36 MB
Iteration #43 took 260 ms to return 20000 results, heap change was 36 MB
Iteration #44 took 321 ms to return 20000 results, heap change was -206 MB
Iteration #45 took 257 ms to return 20000 results, heap change was 36 MB
Iteration #46 took 253 ms to return 20000 results, heap change was 36 MB
Iteration #47 took 300 ms to return 20000 results, heap change was 29 MB
Iteration #48 took 258 ms to return 20000 results, heap change was 36 MB
Iteration #49 took 258 ms to return 20000 results, heap change was 36 MB
Total run took 15944 ms heap change was 223 MB

So going through the command seems to be over 3 times slower and appears to allocate 3-4 times as much memory for the call (presumably resulting in a lot more GC).
I'm not familiar with the differences in these code-paths (though I presume the command is going to JSON and back and being sorted/ranked), but the difference is so big that I thought it was worth raising since I've run out of things to optimise in the provider, it seems I'm stuck on this.

Using the API command to measure the performance of completions is the wrong approach because the former does much more. The command is orchestrated from the UI side, e.g (1) all providers (running in the extension host (extensions), the web worker (words), and in the renderer (snippets)) are asked, (2) the result is merged/sorted, etc (3) the result is send to the extension host. That's a lot of serialziation/deserialization and naturally slower compared to doing step 1 only.

@jrieken sure, I wasn't specifically trying to compare the two - more highlight how much work is going on outside of the extension code. I'm trying to resolve some (significant) performance issues in completion (some of which are definitely my own) but it seems like there's a ceiling to how much I can improve when the significant portion of time/CPU/memory is outside of the provider.
1.2s to show completion for 20k items seems like a lot of time but I don't have much to compare it to. Is this in line with what you'd expect?
Do you happen to know where this time goes? Is it all serialisation, or could sorting be a factor too? Is there anything we can do when preparing the completions that might improve this? I thought moving some things to resolve might help (since in reality we have huge doc comments on these), but in the example I'd already trimmed that off and it didn't change much.
(and finally... sorry for all the questions!) How are the objects round-tripped for resolve? In LSP we have data where we stash the extra fields we need. In VS Code's API there is no data so I'm stashing extra properties (via a subclass) on the completions. One of them is a TextDocument but now I'm wondering how that round-trips through JSON...

(3) the result is send to the extension host.

Oh, does this also mean in my test I'm seeing the serialisation cost twice here, but in the editor it's only once?

Oh, does this also mean in my test I'm seeing the serialisation cost twice here, but in the editor it's only once?

Yes

In LSP we have data where we stash the extra fields we need. In VS Code's API there is no data so I'm stashing extra properties (via a subclass) on the completions.

That's OK - we send a copy, keep the original, and clear everything at the end

1.2s to show completion for 20k items seems like a lot of time but I don't have much to compare it to. Is this in line with what you'd expect?

Depends on the shape of the items, but roughly like so: 50% is deserialise, 25% is sorting, and 25% is UI

@jrieken thanks for the info! I think I've tracked down the issue - I think there is a leak, but this sample doesn't show it - I'll raise an issue with a repro shortly (I suspect it's related to your keeping a copy for resolve).

Oh, you are right... Looking at the code there is leak when using the executeCompletionItemProvider-command


face_recognition reports version as 1.3.0 and 1.2.3

face_recognition reports version as 1.3.0 and 1.2.3
this occurs on windows 10 and Jetson Nano (jetpack 4.6)
asking pip it reports 1.3.0
>pip3 show face_recognition
Name: face-recognition
Version: 1.3.0
Summary: Recognize faces from Python or from the command line
...

in a python program
import dlib
print('dlib.DLIB_USE_CUDA = ' + str(dlib.DLIB_USE_CUDA))
print('dlib version = ' + dlib.__version__ )
print('dlib compiled = ' + dlib.__time_compiled__)
import face_recognition
print('face_recognition.__version__ = ' + face_recognition.__version__ )

dlib.DLIB_USE_CUDA = True
dlib version = 19.22.0
dlib compiled = Jul 10 2021 14:26:39
face_recognition.version = 1.2.3
is this consistant? I hope I haven't tangled versions

I have the problem too. even I installed using conda. install from source, using pip.


Fix yarn installation command

yarn installation does not support yarn install anymore

Coverage remained the same at 82.362% when pulling a94e8036c8a851c1c0558de021ce2a6b5628463c on gauravmuk:yarn-readme-fix into bbce7ae5f3b959fd53b4ca11b5232b216b1c2d9a on softvar:master.

Thanks @gauravmuk


Add set functions with better performance

Operate in place to save copies and temporary space.
$ go test -run=^$ -bench=BenchmarkOperateInPlace -test.benchmem -count=1
os: darwin
goarch: amd64
pkg: istio.io/istio/pkg/util/sets
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkOperateInPlace/Difference-12         	  215138	      5794 ns/op	    1522 B/op	      12 allocs/op
BenchmarkOperateInPlace/DifferenceInPlace-12  	  909678	      1351 ns/op	       0 B/op	       0 allocs/op
BenchmarkOperateInPlace/Intersection-12       	  860622	      1391 ns/op	      48 B/op	       1 allocs/op
BenchmarkOperateInPlace/IntersectInPlace-12   	361817298	         3.302 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	istio.io/istio/pkg/util/sets	6.857s

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

/test all

@wulianglongrd: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

gencheck_istio
19ab0a1c36c33aa78eab98f96557b9ded2558f1d
link
true
/test gencheck

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@wulianglongrd: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

gencheck_istio
19ab0a1c36c33aa78eab98f96557b9ded2558f1d
link
true
/test gencheck

lint_istio
19ab0a1c36c33aa78eab98f96557b9ded2558f1d
link
true
/test lint

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@wulianglongrd: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

lint_istio
f1e160e673b22b47b4a242ab86c7d1a3b16c6714
link
true
/test lint

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


Emitter crash if no tspconfig file

tspconfig is an optional file, it shouldn't be necessary.
The following steps crash the emitter:
tsp init  # Chose generic restapi
tsp install
npm install @typespec/http-client-python
tsp compile . --emit @typespec/http-client-python

Error log:
Emitter "@typespec/http-client-python" crashed! This is a bug.
Please file an issue at https://github.com/microsoft/typespec/issues

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at addDefaultOptions (file:///tmp/testtsp/node_modules/@typespec/http-client-python/dist/emitter/emitter.js:36:102)
    at Object.$onEmit [as emitFunction] (file:///tmp/testtsp/node_modules/@typespec/http-client-python/dist/emitter/emitter.js:60:5)
    at async runEmitter (file:///tmp/testtsp/node_modules/@typespec/compiler/dist/src/core/program.js:366:13)
    at async compile (file:///tmp/testtsp/node_modules/@typespec/compiler/dist/src/core/program.js:123:9)
    at async compileOnce (file:///tmp/testtsp/node_modules/@typespec/compiler/dist/src/core/cli/actions/compile/compile.js:36:25)
    at async compileAction (file:///tmp/testtsp/node_modules/@typespec/compiler/dist/src/core/cli/actions/compile/compile.js:19:9)

The root cause is for empty main.tsp, python emitter doesn't check whether there is valid namespace defined then crash.


refactor: skeleton command

Similar to #714, this is a proof of concept for what I'd eventually like Modifiers to look like: only allowing enum values instead of ints or strings.
Avoid casts by moving away from Object[][].

If your enum is inside the class, you can declare a map from String to Skeleton - and populate it from the enum constructor - and obviate iterating through Skeleton.values() in order to lookup by name.
You do need to invoke Skeleton.values() in a static block to force all those constructors, if you want to reference that map from tests, which apparently do not necessarily build the while enum.

I think this one is better as a map with no enum involved. The values aren't exposed outside the class, and the only use of the enum is

iterate over all values
if the name is identical (.equals)
then return the number

This is a perfect use-case for a map!


Pie world Conference page: Capstone project

[x] Use semantic HTML tags.
[x] Apply best practices in HTML code.
[X] Use CSS selectors correctly.
[x] Use the CSS box model.
[x] Use Flexbox to place elements on the page.
[x] Demonstrate ability to create UIs adaptable to different screen sizes using media queries.
[x] Use GitHub Pages to deploy web pages.
[x] Apply JavaScript best practices and language style guides in code.
[x] Use JavaScript to manipulate DOM elements.
[x] Use JavaScript events.
[x] Use objects to store and access data.
[x] Communicate technical concepts to other technical people.
[x] there are no linter errors
[x] Readme file create in a professional way.
[x] Follow these design guidelines, including:

Colors.
Typography: font face, size, and weight (we suggest using Lato as it is a free font similar to the one used in the original design).
Layout: composition and space between elements.

[x] build only these 2 pages:

The home page.
The about page.

[x] Each of these pages should have versions for 2 different screen sizes:

Mobile: up to 768px wide.
Desktop: 768px or wider.

[x] Interactions

Links

The home page should have a link in the menu to the about page.
The logo in the header links to the home page.

Mobile menu

When the user clicks (or taps) the hamburger button on the header, the mobile menu appears over the page.
The mobile has a close (X) button that closes the menu.

[x] Dynamic page
The section "Featured speakers" should be created dynamically in JavaScript.

Update Required Changes ♻

[x] Change the header top div tag to nav as the correct usage of the html5 semantic tag.
[x] Change speakers card section elements gap, text size, and colors as suggested.
[x] Update the readme file as resent readme template.
[x] Add presentation video link in the readme file
[x] Hide the footer section for the mobile view as suggested.


Help building

Having a little bit of trouble here with the minio-go modules, not sure if i am missing some steps here. Any suggestions ?
Thanks
~ GO111MODULE=on go get github.com/minio/minio-go/v6
go: cannot find main module; see 'go help modules'
~/ git clone https://github.com/minio/minio-go/v6.git
cd minio-go
~/minio-go$ GO111MODULE=on go get github.com/minio/minio-go/v6
github.com/minio/minio-go/v6
./api.go:569:16: c.httpClient.CloseIdleConnections undefined (type *http.Client has no field or method CloseIdleConnections)
Go hello world works as per the https://golang.org/doc/install

you are using an old Go version @i0x71 please move to latest.

Thanks, will try that

Installed latest 1.14 and GO111MODULE=on go get github.com/minio/minio-go/v6
works.
Thanks, please close the ticket

I am not facing another issue, any suggestions would be welcome, thank you
i0x71@debian:~/mcpipe/src$ GO111MODULE=on go get github.com/minio/minio-go/v6
go: downloading github.com/minio/minio-go v1.0.0
go: downloading github.com/minio/minio-go/v6 v6.0.54
go: downloading github.com/minio/minio-go v6.0.14+incompatible
go: github.com/minio/minio-go/v6 upgrade => v6.0.54
go: downloading github.com/minio/sha256-simd v0.1.1
go: downloading golang.org/x/net v0.0.0-20190522155817-f3200d17e092
go: downloading gopkg.in/ini.v1 v1.42.0
go: downloading golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: downloading golang.org/x/text v0.3.0
i0x71@debian:~/mcpipe/src$ go run mcpipe.go
mcpipe.go:4:2: cannot find module providing package github.com/minio/minio-go/v6: working directory is not part of a module
i0x71@debian:~/mcpipe/src$ cd ..
i0x71@debian:~/mcpipe$ go run src/mcpipe.go
src/mcpipe.go:4:2: cannot find module providing package github.com/minio/minio-go/v6: working directory is not part of a module

GO111MODULE=on go run src/mcpipe.go

You need to start reading Go docs on how to do these things @i0x71 - our issues are not meant for Q/A on go building exercise.

Issue was fixed by running the following steps
GO111MODULE=on go get github.com/minio/minio-go/v6
go mod init github.com/minio


Client get SSL internal error

Summary
We use Kong as kubernetes ingress controller.
This environment is an ARM-based environment, and we figure out a very strange issue.
Through the Kong dynamic certificate binding mechanism, we bind a SSL certificate to Kong for HTTPS connection. And it triggers an error about TLS shake-hands, the error rate is only about 5%. Through cURL, the error message is “curl: (35) error:14004438:SSL routines:CONNECT_CR_SRVR_HELLO:tlsv1 alert internal error”
Steps To Reproduce

Install kubernetes kong ingress controller
Bind the SSL certificate through kubernetes secret
Locally curl https address
Over about 100 times, it happen 5 times.

Additional Details & Logs

Kong version 1.4.3
Kong debug-level startup logs ($ kong start --vv)
Kong error logs ( It does not appear any error message)
Kong configuration (the output of a GET request to Kong's Admin port - see
https://docs.konghq.com/latest/admin-api/#retrieve-node-information)
Operating system: Ubuntu 9.1.0-2ubuntu2~16.04

Hi, is it possible for you to try a more recent version of Kong, like 1.5.1 or even 2.0.2?

Similar to this report https://github.com/Kong/kong/issues/1464#issuecomment-254502910.
Also, can you provide detailed error logs and debug logs?
You can add an environment variable in Kubernetes CRD KONG_LOG_LEVEL=debug to enable the debug logs.

Based on the logs provided, this is the same issue as #5042 and i'm able to reproduce using the script from mentioned issue with kong 1.5.1.
2020/04/08 05:56:37 [error] 27#0: *1087 lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/kong/cache.lua:243: key at index 2.1217691418087e-314 must be a string for operation 1 (got nil)
stack traceback:
coroutine 0:
	[C]: in function 'error'
	/usr/local/share/lua/5.1/resty/mlcache.lua:985: in function 'get_bulk'
	/usr/local/share/lua/5.1/kong/cache.lua:243: in function 'get_bulk'
	/usr/local/share/lua/5.1/kong/runloop/certificate.lua:185: in function 'find_certificate'
	/usr/local/share/lua/5.1/kong/runloop/certificate.lua:210: in function 'execute'
	/usr/local/share/lua/5.1/kong/runloop/handler.lua:1044: in function 'before'
	/usr/local/share/lua/5.1/kong/init.lua:617: in function 'ssl_certificate'
	ssl_certificate_by_lua:2: in main chunk, context: ssl_certificate_by_lua*, client: <IP_ADDRESS>, server: <IP_ADDRESS>:443
2020/04/08 05:56:37 [crit] 27#0: *1086 SSL_do_handshake() failed (SSL: error:1417A179:SSL routines:tls_post_process_client_hello:cert cb error) while SSL handshaking, client: <IP_ADDRESS>, server: <IP_ADDRESS>:443

I've attached the luajit traces below: out-bug.log is the filtered traces that related to the mentioned for loop in mlcache while trace-bug.log is the full trace for kong. out.log and trace.log is the dump where no such error was observed. i added 3 lines of code in mlcache.lua to dump so line numbers has been increased by 3.
arm64.zip
cc @javierguerragiraldez

@fffonion The scripts was provider by my coworker, that is another similar bug. The only workaround is restart kong when in such situation. However, there are still some requests will return ssl error before restart. Also if use static SSL cert(Kong default cert) will reduce the chance to get buggy.

https://github.com/thibaultcha/lua-resty-mlcache/blob/master/lib/resty/mlcache.lua#L978
@Guojian How about hot patch this line, keep the i is not < 1,  copy code from issue #5042
        -- make sure i is initialized with 1
        if i < 1 then
          i = 1
        end

Hello @Guojian, we just pushed a fix for this issue (#5797). It should be published on the next version of Kong. You should be able to manually test if it fixes the issue. I am closing it for now, please reopen if the problem persists.

@kikito  Thank you very much! I will test it.

An update here - the issue has been fixed in OpenResty's fork of LuaJIT already, which will be bundled in OpenResty's <IP_ADDRESS> release. See https://github.com/LuaJIT/LuaJIT/issues/579#issuecomment-623803502.

@thibaultcha Oh, thanks. Will test asap.

@thibaultcha It seems kong 1.4.3 is using openresty <IP_ADDRESS>.  And the kong-build-tools is also using <IP_ADDRESS>. Is any way to patch kong 1.4.3 with this fix?


TODO: Choose language to code in

More and more people are talking about making a web app, so it seems we will choose JS at the end, but this has to be discussed.

+1 for something that can run in a browser, ideally without even needing a server. This could also include Rust or any other language that supports emscripten (which compiles other languages into asm.js or WebAssembly)

We are finally going for a web app, using JS as our frontend for all the processing,


raidemulator: Endwalker fixes

WIP PR for EW fixes.
Current fixes:

Fix wrong ID reference in LineEvent0x17.ts
Fix missing job icons for SGE/RPR

Known issues pending fix:

Missing Reaper/Sage abilities for job detection

I'm not sure if there's a dump of RPR/SGE ability IDs and effect IDs available currently to reference for the CombatantJobSearch.ts file?

I'm not sure if there's a dump of RPR/SGE ability IDs and effect IDs available currently to reference for the CombatantJobSearch.ts file?

Offhand, I don't know of any other than looking through action/status tables.
Can we get the jobs from the added combatant line instead?

Jobs are assigned based on this code in CombatantTracker.ts:
    if (isLineEventJobLevel(line)) {
      combatant.job = this.combatants[line.id]?.job ?? line.job;
      combatant.level = this.combatants[line.id]?.level ?? line.level;
    }

    if (isLineEventAbility(line)) {
      if (!combatant.job && !line.id.startsWith('4') && line.abilityId !== undefined)
        combatant.job = CombatantJobSearch.getJob(line.abilityId);
    }

This covers all cases where we have an entire pull, but will not cover e.g.

Zone in
Start ACT
Pull

Unless that's changed at some point since emulator was first written and on ACT start it always prints all combatants.

This covers all cases where we have an entire pull, but will not cover e.g.

Zone in
Start ACT
Pull

Unless that's changed at some point since emulator was first written and on ACT start it always prints all combatants.

No, that has not changed.  However, I could argue that it's an edge case that we don't have to support, either?

I'd argue that we don't need to support it, but it should probably be handled more gracefully than what happens now, e.g. player detection and job detection is visibly broken but otherwise it continues to run?

I'd argue that we don't need to support it, but it should probably be handled more gracefully than what happens now, e.g. player detection and job detection is visibly broken but otherwise it continues to run?

Maybe those encounters are just dropped when importing? (With a console warning for debugging?)


Implement Passport Middleware

Is there an existing issue for this?

[X] I have searched the existing issues

Current behavior
We have a middleware service where we do add services that can be used dynamically by the developer during the application development like so:
@provide(App)
export class App extends AppExpress {
    private middleware: IMiddleware;
    private provider: IProvider;

    constructor() {
        super();
        this.middleware = container.get<IMiddleware>(Middleware);
        this.provider = container.get<IProvider>(Provider);
    }

    protected configureServices(): void {
        this.middleware.addBodyParser();
        this.middleware.setErrorHandler();
    }

    protected postServerInitialization(): void {
        if (this.isDevelopment()) {
            this.provider.envValidator.checkAll();
        }
    }

    protected serverShutdown(): void {}
}

The middleware are added in the middleware service as mentioned above as well as it's interfaces implemented here.
The interfaces are the options that can be optionally passed to the middleware.
This task has the objective of implementing the middleware Passport embedded in the ExpressoTS platform as the other middlewares.
More information here: https://github.com/jaredhanson/passport
Steps to reproduce
N/A
Expected behavior
Implemented passport middleware and make it available as an option in the application provider class
Package version
2.2.1
Node.js version

18

In which operating systems have you tested?

[X] macOS
[X] Windows
[X] Linux

Other
No response

Could you please allocate this to me? I'm interested in taking it on. Are there any specific timelines for its completion or release?

Could you please allocate this to me? I'm interested in taking it on. Are there any specific timelines for its completion or release?

Hi Hoda, yes, its assigned to you. Regarding the timelines, as fast as you can complete would be great. As we do have many people working in the project we want to avoid stale issues. As it is assigned to you, nobody will touch in this task except yourself.
Looking forward in hearing updates from this task.

hey @rsaz ,is the issue completed or i can also be assigned to this task?

hey @rsaz ,is the issue completed or i can also be assigned to this task?

Hi @pnkjbee2 this issue is already assigned to @HodaSalim .
I can assign this middleware to you instead #113 , let me know.

guess , that one is also gone.

@rsaz can I give it a try ?

Hi @AkhileshJyotishi and @pnkjbee2 this task is assigned to you all. Whoever finishes first and the code is correctly implemented, it will be merged and get the issue to completion, remaining the assignee that completed the task only.

guess , that one is also gone.

Assigned to you, good luck!

@rsaz thanks

@rsaz  can you review the changes!

@rsaz  Can you review the changes please !

@rsaz Can you review the changes please !

Hi @AkhileshJyotishi I will be able to review this PR by Friday or Saturday. You will receive an update soon about it. Thank you


Tutorial slidedeck

It will be great to have a link for the tutorial ppt on the front page.

Do we have it posted online anywhere?

Yes, but possibly buried. Will take a look


Update directory-structure.md

Fixes #2205
Added a pair of entries for Razor View precompilation files.

Hi @GuardRex, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
TTYL, DNFBOT;


Update the version of next.js 14

https://nextjs.org/blog/next-14
https://nextjs.org/docs/pages/building-your-application/upgrading/version-14

Close here #23


Button API improvements

Roughly what was suggested in #63.

This is pretty slick, thank you- really shows how much crusty boilerplate you can cut out. I'm a little apprehensive to merge this one until I'm fully up to speed, but I think it needs to be done sooner rather than later- suspect it might be a good idea to tag a release afterwards so there's somewhere to communicate that the button API has changed.

It shouldn't break anything...
Probably need a release anyway... there's some big stuff already


CI: Compile openpilot on macOS

resolves: #32885
depends on: https://github.com/commaai/opendbc/pull/1059

enabled build in CI
added gcc@13
fixed typo in replay/util.c

@maxime-desroches updated. Also probably need to fix the permission issue for the new build doc

Nice! Can you add a scons cache to make the build faster? You can look how it is done here for our custom ubuntu20.04 cache: https://github.com/commaai/openpilot/blob/master/.github/workflows/tools_tests.yaml#L65

You also need to save the cache: https://github.com/commaai/openpilot/blob/master/.github/workflows/tools_tests.yaml#L76

It's redundant I believe, @cache already automatically saves the cache already.

Feel free to open a pr to clean up the caching in CI. The caching is normally done in setup --> auto-cache when using the docker image, but not when doing these non docker builds like ubuntu20.04 and macOS


Fix incomplete sentence

I try to debug the failing travis-ci, and found this: https://github.com/bundler/bundler/issues/3558. Could you please update latest bundler version in CI??

Please take reference from : https://github.com/robertomiranda/has_secure_token/blob/master/.travis.yml, https://github.com/bundler/bundler/issues/3558...to fix failing travis-ci

@przbadu thanks! you saved a lot of my time!

Now will be waiting for @robertomiranda merge

thanks you guys :metal:

@MaximAbramchuck: you are welcome,
@MaximAbramchuck and @robertomiranda : I am stuck in my PR. It would be great if there is nice contribution guide for new feature request in this gem. I am stuck on how to make or where to make PR in rails?? Any Idea??
Reference: [PR-17] (https://github.com/robertomiranda/has_secure_token/pull/17)


Release the new version of crate with new serde version

A lot of projects have already moved to updated serde and updated their crates. There is such situation that each crate is capable of working with serde 1.0 but your crate does not (0.2.0 still needs old serde). Could you release new version of the crate quicker please? At the very least release 0.3 with only serde changes and continue work on the crate for the 0.4 version.

Thanks for your advice!
I've just published v0.3.0 to crates.io.


'StandardizedConv2D' object has no attribute '_convolution_op'

Trying to run bit_tf2.py training code..hitting below error when trying to run BiT-S training with below dataset
datasets, datasets_info = tfds.load('imagenette/160px', shuffle_files=True, as_supervised=True, with_info=True,
read_config=tfds.ReadConfig(shuffle_seed=0))
python ./bit_tf2/basic_quantization.py --name quant --model BiT-M-R50x1 --logdir .
Pointers on what could be the issue...
Error Logs:
File "/home/psakhamo/opensource/big_transfer/big_transfer/./bit_tf2/basic_quantization.py", line 150, in
main(parser.parse_args())
File "/home/psakhamo/opensource/big_transfer/big_transfer/./bit_tf2/basic_quantization.py", line 116, in main
tf_model.build((None, None, None, 3))
File "/home/psakhamo/anaconda3/envs/BiTOV22.3/lib/python3.9/site-packages/keras/engine/training.py", line 513, in build
self.call(x, **kwargs)
File "/home/psakhamo/opensource/big_transfer/big_transfer/./bit_tf2/../bit_tf2/models.py", line 262, in call
x = block(x)
File "/home/psakhamo/anaconda3/envs/BiTOV22.3/lib/python3.9/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/tmp/autograph_generated_filezfnshkiw.py", line 28, in tf__call
x = ag.converted_call(ag__.ld(self).unit_a_conv, (ag_.ld(x),), None, fscope)
File "/home/psakhamo/opensource/big_transfer/big_transfer/./bit_tf2/../bit_tf2/models.py", line 75, in build
default_conv_op = self._convolution_op
AttributeError: Exception encountered when calling layer 'unit01' (type BottleneckV2Unit).
in user code:
File "/home/psakhamo/opensource/big_transfer/big_transfer/./bit_tf2/../bit_tf2/models.py", line 172, in call  *
    x = self._unit_a_conv(x)
File "/home/psakhamo/anaconda3/envs/BiTOV22.3/lib/python3.9/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler  **
    raise e.with_traceback(filtered_tb) from None
File "/home/psakhamo/opensource/big_transfer/big_transfer/./bit_tf2/../bit_tf2/models.py", line 75, in build
    default_conv_op = self._convolution_op

AttributeError: ### 'StandardizedConv2D' object has no attribute '_convolution_op'

The same issue seen with bit_tf2/train.py when ran with cifar10 dataset

Found the issue - Need to revert back to older tensorflow==2.2.0


Promise To Wait For Download + Wait For never end and file is not downloaded

Describe the bug
File is not downloaded in Chromium, what happens is that the link is clicked and results in an error: "Failed - Download error". Then the Wait For runs indefinitely.
The details of the error refer to this url:
https://support.google.com/chrome/answer/2898334?p=ui_download_errors&hl=en&ctx=1&visit_id=637539003918699721-3843374094&rd=1
which contains no relevant information
To Reproduce
I have created a testcase similar to the test file @ atest/test/02_Content_Keywords/files.robot, so like:
Wait For Download
${dl_promise}    Promise To Wait for Download
Sleep    0.5
Click    #file_download
${file_object} =    Wait For    ${dl_promise}
Expected behavior
The file should be downloaded correctly and the Wait For ${dl_promise} should finish.
Desktop (please complete the following information):

Windows 8
Chromium
browser library 4.3.0

Additional context

This testcase works perfectly when using Seleniumlibrary on Chrome browser
In the output.xml there is no entry for keywords Promise To Wait For Download, Click and Wait For even though the Click is performed
In the playwright debug log there is no relevant information included
With the import I have added option enable_playwright_debug
In keyword New Browser I have added downloadsPath=c:/temp  (which exists). I have also tried with adding this folder to keyword Promise To Wait for Download as well, which did not help
In keyword New Context I have added acceptDownloads=True

Adding not just the folder to Promise To Wait For Download but also the filename was the solution.
case #closed


add JSON_SUCCESSFUL and JSON_FAILED

#define JSON_SUCCESSFUL (0)
#define JSON_FAILED (-1)
or something like that

I'm not sure the benefit of this request?  It is very common for C libraries to return 0 on success, non-zero on failure.


Multiple nic (communication) card causes disconnections for gateway type devices

Current Behavior
When a device with multiple nic cards runs the device agent.  It seems as if it causes network issues on the device and the device then starts to try to switch between communications.
Device issues can be elevated when one of the communication cards is disabled.
We have been working with robustel and have access to a device where we can reduplicate.  Please reach to go @gdziuba for details on how to connect to the device.
Expected Behavior
Device agent to maintain connection to the platform.
Steps To Reproduce
In this case we leverage an EG5120 from robustel.  Running device agent with a sim card and wifi will cause the device to start disconnecting and reconnecting.
Environment

FlowFuse version:
Node.js version:
npm version:
Platform/OS:
Browser:

Linked Customers

Customer name and/or link to HubSpot contact

This customer seems to be having similar issues with a different product:

https://app-eu1.hubspot.com/contacts/26586079/record/0-2/7790198479

@joepavitt, @knolleary.  This is the issue that I raised concern for in the #dept-engineering channel.

@gdziuba  It would be useful to have more context on this - we don't have much to go on here. It feels like this is going to be a very device-specific thing and we haven't had any other reports of this type of behaviour.
The EG5120 was mentioned in a support ticket earlier this week regarding IPv6 connectivity. I wonder if that is related at all here.

@knolleary That is a fair statement.
The customer was incorrect above and will be updated: https://app-eu1.hubspot.com/contacts/26586079/record/0-2/7790198479
Customer notes:
Compulab IoT gateway
Debian
IOT-GATE-IMX8PLUS - Industrial IoT Gateway
Cellular Communication
Bandwidth issues
Agent Version is 2.3.2 (Updated to 2.4.1 and still had issues)
Had to restart the service
Not Docker
TCP and UDP issues on device agents
Reduplicate the issue:

Clean device
Install device agent
Start
Pulls Node-RED down
Deploy a flow
Try to reopen editor and it doesn't connect
Restart device agent service
Typically, opening editor is fine until another deploy.

Resolution for EG5120

Connect to Ethernet
Disable other communication cards (wifi, cellular)

We will need to know how the network is configured on both interfaces and what routes are configured with what weights
Also how else does the network change when the interface changes, e.g. does the ethernet network need a proxy, where as the cellular network does not?

I have a device we can troubleshoot the issue with provide by a partner.

The devices we can test are OEM devices, where it is my understanding it is a clean installation with only 1 active in-use network card.

@gdziuba Can you let me know where we are with a device that we can investigate this on please?
This is the sort of thing that it will be useful to have access to the device while it changes network, so if it has 2 network interfaces then maybe having a serial console attached would be useful.
Give me a shout when you have time for a chat about this.

@hardillb sent an email to you. It is in the thread with Russell.

We were able to replicate the issue with a customer.  Here is a video: https://flowforgeworkspace.slack.com/archives/C032Q63FGG1/p1723493785229809
Update on this. There is only 1 nic card on these device.  He was switching from a local physical connection to a Sim card solution then back.  Though, when he wanted to connect back to physical, it could never recover.  Service had to be restarted.   Do we have a way that we would have a self recovery mechanism?  AKA, network configuration change, try to reconnect?
4:48
The last error it had was this:
/etc/systemd/system/flowfuse-device-agent.service:3: Assignment outside of section. Ignoring.
Though I think it is unrelated.
I suspect that the other issue I am seeing from former people testing out FlowFuse is that when they were doing network changes the device never could reconnect for FlowFuse.

@gdziuba We need to know how the network fail over is triggered, and exactly how the network is configured.
e.g.

When the cellular connection is active, is the ethernet interface still up?
How are they moving back to the ethernet connection? Does it drop the cellular interface?

I may be able to reproduce something similar (not confirmed until I see the network config).
Upgrading to the latest mqtt.js libraray allows connections to drop cleanly (after keepalive timeout) when current interface is brought down and new connection is established.
The new mqtt.js library does require at least NodeJS v16 so will only be available as part of #263


⚠ Bofrost.de has degraded performance

In cb9b404, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 2129 ms

Resolved: Bofrost.de performance has improved in 2f6c035 after 18 minutes.


polarity of A and B wires

Hi,
I am far from an expert on the matter but I found 2 versions of terminating A and B.

The sample hardware in the readme does as in the top diagram, pull B to VCC and A to GND and then in the sdm630 sample ino, the serial port is initialized with the invert parameter true.
All cheapish prefabricated ttl-rs485 converters I found use the bottom diagram with A pulled to VCC and B to GND, with an 120ohm resistor between A and B, but then the invert parameter must be set to false.
I think it would be good if you spend a few words on the invert parameter in readme.MD to avoid confusion (and a failing setup) for new users.
nogmaals bedankt.

You're right. I forgot about this after testing my initial setup (which didn't work because of counterfeit max3485 chips that couldn't handle the 3V3). It's mixed up right now. thanks for the pointer.