Random  tag on enter more than twice

Describe the bug
In WYSIWYG mode, when you enter more than twice, any extra enter will be shown as
 tag with TUIViewer.
To Reproduce

Use WYSIWYG mode (not Markdown)
Type anything and try to create multiple enters

Expected behavior
No
 tag should be shown in TuiViewer
Screenshots

Additional context
한국사람입니다 :)

@chansbro Thanks for reporting the issue! :)

@chansbro I was confused with another issue. 😅 It's not a bug, it's TOAST UI Editor's spec. It seems to be the same as the issue below, and I'd like you to check the comments I left earlier.

https://github.com/nhn/tui.editor/issues/621#issuecomment-528350485

I think it is a bug of wysiwyg mode, markdown mode will not act like this

I just call getHtml() and set it

@seonim-ryu
Are you sure it's work normally

Well, I think I should use getMarkdown() and set it


Nose Bleed emoji

We have an emoji with head injury 🤕 already and one that is sneezing 🤧, but none whose Nose Bleeds or who is bruised from a beating.

The multiple uses of a nosebleed emoji are rather interesting. Not only can it represent a result of physical trauma, but could also represent intense mental focus/effort, or in Japan, sexual arousal.


Logical Bug for Zip Images

@championswimmer  After your PR merge still I was not able to have the images. I have fixed it here, Please check and merge.

Current coverage is 47.61% (diff: 0.00%)

Merging #588 into development will not change coverage

@@           development       #588   diff @@
=============================================
  Files                5          5
  Lines              546        546
  Methods             52         52
  Messages             0          0
  Branches            88         88
=============================================
  Hits               260        260
  Misses             286        286
  Partials             0          0

Powered by Codecov. Last update 5880c81...ce09c38


docs: simplify outdated dev instructions

Summary:
Our dev instructions here are quite old and contain either out of date or duplicate information that is already in dev scripts. So here I removed some unnecessary and out of date details and pointed to the dev scripts instead. This way we don't have to keep updating this instructions along with those files. I did my best to keep the useful examples in the "Manual Tests" section around, such as loading test data into the database and querying the local API directly from the command line (though the diffs make it look like I deleted all that, it's actually kept around unaltered below).
Prerequisites:

[x] Unless it is a documentation hotfix it should be merged against the dev branch
[x] Branch is up-to-date with the branch to be merged with, i.e. dev
[x] Build is successful
[x] Code is cleaned up and formatted

(sorry for late review points, i noticed these while doing the new version rollout)

Np, merged this in bc I wanted @aysim319 to have the updated version.


source code for manuscript

Hello, thank you for providing the pre-trained models for https://arxiv.org/abs/2011.13971. Would it be possible to also share the source code used in the paper? For example, code to define models, train models, etc.

Currently the paper is in review so this mainly hinges on the outcome of that. We plan on releasing the trainer code sometime in May regardless. However note that this is not original work (the underlying method, i.e., SimCLR), therefore if you need the code now, I recommend checking out https://github.com/Spijkervet/SimCLR , it's a good implementation of the original Tensorflow code.

Hello,
First, thanks a lot for your work and for sharing the pertained model with the community! We are interested in extending it, but it seems that your paper does not describe the hyperparameters and necessary preprocessing steps for the evaluation datasets (downsampling, class imbalance handling, augmentations etc.). Are you planning on releasing the code to reproduce these experiments as well or do you by any chance have pointers to preexisting repos that were used? We would be mainly interested in the classification tasks. Any help would be greatly appreciated. Thank you again!

Each image is downsampled to 224x224 pixels per patch in pretraining for most datasets. For Patch Camelyon, we use 96x96 (its native resolution). For segmentation, we use 224x224 for BACH, and 512x512 for the others. For validation, we use 1e-4 as both learning rate and the weight decay (for Resnet50+), and for Resnet18 and 34 we use 1e-5 as weight decay. In terms of augmentations, we use 90 degree rotations, flips, and medium light jittering (in pytorch, corresponds to 0.4, 0.4, 0.4, 0.2) during validation. Using more augmentations are helpful for ImageNet more than our pretrained models, since it helps ImageNet initialization to avoid overfitting. There is no balancing in either pretraining or validation. We plan on releasing the code sometime next month.
Further information on parameters at the pretraining stage:

Thank you a lot for the detailed explanation, very helpful. Looking forward to the code release!

Hello, thanks a lot for the pre-trained models, great work! Would it be possible to share the training code, to facilitate adaptation to other datasets and cancers?

Hi, Now that the manuscript is out, can you share the code?


Fix chunked encoding with SSL via proxy

This is a patch applying @bpitman's proposed fix for #3844.
Assuming a proxy is running on port 8875 (docker run --rm --name='tinyproxy' -p 8875:8888 dannydirect/tinyproxy:latest ANY works for me), the issue can be reproduced with
requests.put('https://www.google.com', data=iter('Hello World'), proxies={'https': 'http://localhost:8875'})

Why aren't we taking the approach I suggested in #3844?

@Lukasa I don't know the codebase that well, so I couldn't figure out exactly how the approach you'd proposed would fit in with the existing code - I tried getting rid of the chunked branch and just adding a chunked parameter to the conn.urlopen, but it lead to a failed test that I couldn't make sense of. Whereas @bpitman's patch worked and passed the tests.

What test failed? Can you provide the test output?

 Returns Response object.

            :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
            :param stream: (optional) Whether to stream the request content.
            :param timeout: (optional) How long to wait for the server to send
                data before giving up, as a float, or a :ref:`(connect timeout,
                read timeout) <timeouts>` tuple.
            :type timeout: float or tuple or urllib3 Timeout object
            :param verify: (optional) Either a boolean, in which case it controls whether
                we verify the server's TLS certificate, or a string, in which case it
                must be a path to a CA bundle to use
            :param cert: (optional) Any user-provided SSL certificate to be trusted.
            :param proxies: (optional) The proxies dictionary to apply to the request.
            :rtype: requests.Response
            """

        conn = self.get_connection(request.url, proxies)

        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(request)

        chunked = not (request.body is None or 'Content-Length' in request.headers)

        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError as e:
                # this may raise a string formatting error.
                err = ("Invalid timeout {0}. Pass a (connect, read) "
                       "timeout tuple, or a single float to set "
                       "both timeouts to the same value".format(timeout))
                raise ValueError(err)
        elif isinstance(timeout, TimeoutSauce):
            pass
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)

        try:
            resp = conn.urlopen(
                method=request.method,
                url=url,
                body=request.body,
                headers=request.headers,
                redirect=False,
                assert_same_host=False,
                preload_content=False,
                decode_content=False,
                retries=self.max_retries,
                timeout=timeout,
                chunked=chunked
            )

        except (ProtocolError, socket.error) as err:
            raise ConnectionError(err, request=request)

        except MaxRetryError as e:
            if isinstance(e.reason, ConnectTimeoutError):
                # TODO: Remove this in 3.0.0: see #2811
                if not isinstance(e.reason, NewConnectionError):
                    raise ConnectTimeout(e, request=request)

            if isinstance(e.reason, ResponseError):
                raise RetryError(e, request=request)

            if isinstance(e.reason, _ProxyError):
                raise ProxyError(e, request=request)

>           raise ConnectionError(e, request=request)
E           requests.exceptions.ConnectionError: HTTPConnectionPool(host='<IP_ADDRESS>', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f42473bb5f8>: Failed to establish a new connection: [Errno 113] No route to host',))

requests/adapters.py:458: ConnectionError
=========================================================================== 1 failed, 481 passed, 12 skipped, 2 xpassed in 33.83 seconds ===========================================================================

Weirdly it only failed in Python 3. The same test passed in Python 2.

That failure should be unrelated: it seems to be changing from a connection timeout to an authoritative statement that no route exists to that host. Mind pushing the branch up so I can take a look at your change?

Sure thing: https://github.com/jamespic/requests/tree/chunked-parameter

Ok, so I think this test was accidentally relying on an environment behaviour. Mind pushing it to a branch that gets CI'd to see if our CI reproduces it? If it does I'll dive in myself.

Yep, absolutely.

I merge your code and test the code, but it's still hanging.
import requests
resp = requests.get('https://baidu.com', proxies={'https': 'localhost:8899'})

I tried curl with this proxy server, it worked.

We are running in this to as well, and the patch resolved our problem/  Is there a plan to get this merged in to master?

Any update on this? I got the same problem with chunked requests (which I think I can avoid, I accidentally used chunked by providing a None value in the data dict).

Here is my analysis (done before I found #3844 and this PR):
Minimal reproduced case:
Python 3.7.0 (Mac OS)
urllib3          1.23
requests         2.19.1
Install tinyproxy (brew install tinyproxy), no configuration required.
Launch with tinyproxy -d
Python code:
import requests
print(requests.post('https://status.github.com',
					data={'a':None},
					proxies={'https': 'http://localhost:8888'}))

Result:
Traceback (most recent call last):
  File "/Users/johan/reqbug/venv/lib/python3.7/site-packages/requests/adapters.py", line 471, in send
    low_conn.endheaders()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output
    self.send(msg)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send
    self.connect()
  File "/Users/johan/reqbug/venv/lib/python3.7/site-packages/urllib3/connection.py", line 356, in connect
    ssl_context=context)
  File "/Users/johan/reqbug/venv/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 359, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 412, in wrap_socket
    session=session
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 850, in _create
    self.do_handshake()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1108, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:1045)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    proxies={'https': 'http://localhost:8888'}))
  File "/Users/johan/reqbug/venv/lib/python3.7/site-packages/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/Users/johan/reqbug/venv/lib/python3.7/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/johan/reqbug/venv/lib/python3.7/site-packages/requests/sessions.py", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/johan/reqbug/venv/lib/python3.7/site-packages/requests/sessions.py", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/Users/johan/reqbug/venv/lib/python3.7/site-packages/requests/adapters.py", line 503, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:1045)

The key here is the None value in the data, which makes the HTTPAdapter pick the chunked route:
https://github.com/requests/requests/blame/master/requests/adapters.py#L449
This means relying on urllib3 internal functions.
The above blame indicats this was written 5 years ago.
In urllib3, 4 years ago, the code changed and (re?)introduced the _prepare_proxy call:
https://github.com/urllib3/urllib3/blame/master/src/urllib3/connectionpool.py#L592
By adding the following code just after adapters.py:453 (conn._get_conn(..)), the request works as expected:
                is_new_proxy_conn = conn.proxy is not None and not getattr(low_conn, 'sock', None)
                if is_new_proxy_conn:
                    conn._prepare_proxy(low_conn)

Commenting to bump. Am running into this when using chunked uploads viathe POST method using a proxy. Can confirm the above 3 liner is functional. Any chance this PR can get approved and pushed into the full module?

@jamespic, this needs to be rebased, or closed if it has been resolved by other merged changes, esp https://github.com/psf/requests/pull/5128 which says it solves this problem.

I was experiencing the same issue (chunked encoding through an HTTPS proxy resulting in an SSL unknown protocol error) on a test case very similar to the one described by @stromnet above with requests 2.22.0.
I upgraded to a9ee0eef5a70acb9ed35622b3675574b11f92cb4 and the issue disappeared :+1: . After spending some time analyzing the issue I'm confident that the fix came from #5128 as suggested by @jayvdb .
Since as of Jan 10, 2020 the fix is not released I used this command to upgrade requests to head of master branch:  pip install git+https://github.com/psf/requests.git --upgrade


Automated cherry pick of #3039: lbagents: 添加部署和下线操作记录

Cherry pick of #3039 on release/2.12.
#3039: lbagents: 添加部署和下线操作记录

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/2.12@480d26f). Click here to learn what that means.
The diff coverage is 0%.

@@              Coverage Diff               @@
##             release/2.12   #3040   +/-   ##
==============================================
  Coverage                ?   7.16%
==============================================
  Files                   ?     478
  Lines                   ?   76759
  Branches                ?       0
==============================================
  Hits                    ?    5498
  Misses                  ?   70799
  Partials                ?     462

Flag
Coverage Δ

#aFlag
7.16% <0%> (?)

Impacted Files
Coverage Δ

pkg/compute/models/loadbalanceragents_deploy.go
0.33% <0%> (ø)

Continue to review full report at Codecov.

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

/lgtm

/approve


Add "withCredentials" to Node API, fixes #586

This is a fix for https://github.com/visionmedia/superagent/issues/586.
This change adds the equivalent of a no-op to the Request prototype, which simply returns this, as this method is irrelevant in a Node context.
I've also added a test for this, so hopefully this PR is pretty straightforward :)

The browser build is failing, but it seems flakey as an earlier build succeeded and my failing build was a whitespace change. I'll try to trigger another build.

Finally got the build to pass, just force-pushing non-code changes to my PR branch.
If you weren't already aware, you might want to look into your flakey tests. You can see the failures for this PR here: https://travis-ci.org/visionmedia/superagent/pull_requests

LGTM. Thanks @markdalgleish. @pornel please review and merge if you agree.


Create 0007-performance-test.md

use this place document performance testing idea

What this PR does / why we need it:
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:
PR Readiness Checklist:
Complete these before marking the PR as ready to review:

[ ] the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

try to create a KEP, but end up with a PR.
close it thus.


Azure web Deploy - System.Management.Automation.RuntimeException: Failed to deploy Website. Error An error occurred when the request was processed on the remote computer.

Hi all!
I'm getting an error every time I try to deploy my package if I include the front-end sources in the "app/" folder. If I remove the sources, it works.
This is the error that I get each time I try to run the AzureWebPowerShellDeployment task:
##[debug]Caught exception from task script.
##[debug]Error record:
##[debug]Failed to deploy Website. Error : (20/12/2016 11:21:15) An error occurred when the request was processed on the remote computer.
##[debug]At C:\agent\tasks\AzureWebPowerShellDeployment\1.0.42\Publish-AzureWebDeployment.ps1:204 char:9
##[debug]+         throw (Get-VstsLocString -Key "FailedtodeployWebsiteError0" -ArgumentLis ...
##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##[debug]    + CategoryInfo          : OperationStopped: (Failed to deplo...emote computer.:String) [], RuntimeException
##[debug]    + FullyQualifiedErrorId : Failed to deploy Website. Error : (20/12/2016 11:21:15) An error occurred when the reque    st was processed on the remote computer.
##[debug]
##[debug]Script stack trace:
##[debug]at <ScriptBlock>, C:\agent\tasks\AzureWebPowerShellDeployment\1.0.42\Publish-AzureWebDeployment.ps1: line 204
##[debug]at <ScriptBlock>, <No file>: line 1
##[debug]at <ScriptBlock>, <No file>: line 22
##[debug]at <ScriptBlock>, <No file>: line 18
##[debug]at <ScriptBlock>, <No file>: line 1
##[debug]Exception:
##[debug]System.Management.Automation.RuntimeException: Failed to deploy Website. Error : (20/12/2016 11:21:15) An error occurred when the request was processed on the remote computer.

I didn't find any help on the web.

@ovitrif could you please set the system.debug variable with value as true and share the logs to RM_Customer_Queries at Microsoft dot com or post them here

@ovitrif , Can you try migrating your definition to Azure App Service Deploy Task and queue a release ?


Reward policy agent environment is not training with Finetuned model

Loading my Google Flan T5 finetuned model on Question Answering from my hugging face account
import torch
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM, AutoTokenizer, AutoModelForSeq2SeqLM
peft_model_id = "harshs21/google-flan-t5-base"
config = PeftConfig.from_pretrained(peft_model_id)
model1 = AutoModelWithLMHead.from_pretrained(config.base_model_name_or_path)  #  load_in_8bit=True,
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
Load the Lora model
model1 = PeftModel.from_pretrained(model1, peft_model_id)
But while loading the agent with the following code
env = MyRLEnv(model1, tokenizer, observation_input=observaton_list)  #, output_list = output_list
actor = TextRLActor(env, model1, tokenizer)
agent = actor.agent_ppo(update_interval=5, minibatch_size=256, epochs=20)
##It is giving me the following error,
/usr/local/lib/python3.10/dist-packages/ipykernel/ipkernel.py:283: DeprecationWarning: should_run_async will not call transform_cell automatically in the future. Please pass the result to transformed_cell argument and any exception that happen during thetransform in preprocessing_exc_tuple in IPython 7.17 and above.
and should_run_async(code)
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in <cell line: 2>:2                                                                              │
│                                                                                │
│ /usr/local/lib/python3.10/dist-packages/textrl/actor.py:62 in init                           │
│                                                                                │
│    59 │   │   elif 'encoder' in parents:  # t5                                                   │
│    60 │   │   │   transformers_model = model.encoder                                             │
│    61 │   │   else:                                                                              │
│ ❱  62 │   │   │   raise ValueError('model not supported')                                        │
│    63 │   │                                                                                │
│    64 │   │   if unfreeze_layer_from_past > 0:                                                   │
│    65 │   │   │   self.middle_model = HFModelListModule(list(transformers_model.children())      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: model not supported
The above same case is happening when I am loading my finetuned eleutherai/pythia-1.3B model from my hugging face profile. Please someone tell me how to make finetuned model train with RLHF policy

It appears that your problem is coming from the fact that the RL model does not recognize your fine-tuned models as supported architectures.
This exception is raised when the code checks for the model's architecture and doesn't find it in the pre-defined set of supported models.
https://github.com/voidful/TextRL/blob/3412399f8464a160ca5611fa526ebc207d6eedfe/textrl/actor.py#L59
In order to make it work, you would have to extend the TextRLActor class to support the specific architectures of your models.


support laravel 9

@Gummibeer can you take a look as im missing full context but all the tests pass:
  Tests:  27 passed
  Time:   1.65s

ping @Gummibeer @SarahSibert

thanks tada

aaah thanks of course both could be added too, i was assuming the tag would be a major bump but this is even better! Thank you

https://github.com/Astrotomic/laravel-dns/releases/tag/0.2.0


Add ability to fail lint if too many warnings found, fixes #100

Took a stab at solving my own problem as reported in https://github.com/adametry/gulp-eslint/issues/100
It looks like eslint's --max-warnings flag only operates when running in CLI mode and isn't directly supported in CLIEngine.  I recreated some of the basic logic in a new failAfterWarnings(maxWarnings) pipeable function.

+1

Check out gulp-eslint-threshold.
Here's an example:
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var threshold = require('gulp-eslint-threshold');
var PluginError = require('gulp-util').PluginError;

gulp.task('lint', function () {
    var maxWarnings = 2;
    var stream = gulp.src('src/**/*.js')
        .pipe(eslint())
        .pipe(threshold.afterWarnings(maxWarnings, function (warningCount) {
            stream.emit('error', new PluginError(
                'gulp-eslint',
                {
                    name: 'ESLintMaxWarn',
                    message: 'Failed because of too many warnings. ' +
                            'Found ' + warningCount + (warningCount === 1 ? ' warning' : ' warnings') +
                            ', threshold is ' + maxWarnings + '.'
                }
            ));
        }));
    return stream;
});

I hadn't seen gulp-eslint-threshold.  If you don't want to merge in my PR, I'll go that route.  Personally, I'd rather have the warning functionality built-in to this plugin instead of juggling several plugins to get one job done.  That said, I understand not desiring to expand the scope of this plugin too much.
If you do close this one, I can update the docs to point to threshold so other folks have an easier path to finding this functionality.

After going through the gulp-eslint-threshold and this PR, I ended up adding two functions to gulp-eslint that could support a wide-range of eslint result validation scenarios. They even underlies the format, formatEach, failOnError, and failAfterError methods.
The methods are named result and results. They passthrough streams that provide an opportunity to write a custom handler for eslint results, one at a time or all at once. Both support synchronous and asynchronous handlers and, more relevantly, throw/async errors.
Consider the following implementation of max-warnings:
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var maxWarnings = 2;

gulp.task('lint', function () {
    return gulp.src('src/**/*.js')
        .pipe(eslint())
        .pipe(eslint.results(function (results) {
            // This is the total count of warnings across all results
            var count = results.warningCount;
            if (count > maxWarnings) {
                // throwing anything will fail the stream, just like eslint.failOnError.
                // Tip: You can throw a Gulp PluginError (or just the config) to customize the gulp message.
                throw new Error(
                    'Failed because of too many warnings. ' +
                    'Found ' + count + (count === 1 ? ' warning' : ' warnings') +
                    ', threshold is ' + maxWarnings + '.'
                );
            }
        }));
});

The README/docs has been updated to include this API and a brief note on extensions. Let me know what you think.

Probably failOnError() should simply accept a number

+1

https://github.com/adametry/gulp-eslint/issues/100#issuecomment-333511532
Thanks for the contribution anyway.


Codemap generic mapper does not work with UTF-16 encoded files

Hello
I just installed CodeMapper in VSCode 1.44.2 for Windows.
The extension seems to be working fine for supported languages, eg C#.  But for some reason I am unable to configure the generic mapper to support a custom language.
I have tried following the example from the Wiki, and copied the example "codemap.x" configuration, renaming it "codemap.ws" as I wish to support files with a .ws extension.   However my newly added variable "codemap.ws" is shown in settings.json to be invalid, and Codemap shows nothing when I test it on a sample file.   I then tried copying the example in exactly, using "codemap.x", and it shows the same thing.
Here's a screenshot demonstrating my attempt to use both "codemap.ws" and "codemap.x" :

As you can see, both show as greyed out, and neither work on sample files with .ws or .x extensions.
I noticed on the Codemap extension configuration page that it has specific entries for Md, Ps1, Py and R , and if I try adding a settings.json value such as "codemap.md" or "codemap.ps1", these show as valid.
Apologies if I've done something wrong, or misunderstood something, or misread the Wiki.  I am very new to VSCode.
Thanks in advance, and for creating Codemap, which looks to be exactly what I want - a way to get an outline view for a niche file extension.
PS.  A separate issue, much less important - the Wiki and description talks of "Refreshing on demand via Refresh toolbar button"; I do not have any button in my Codemap bar except "Collapse All" :

The generic mapper may not work for two reasons:

Invalid setting file
invalid regex expression

So I always eliminate the first reason by adding the existing MD mapper but for a new file extension. And then opening the MD wile renamed into the extension I want.
So first ensure you are editing the right file and inserting the mapper value in the right place:

I suggest you also do it for the MD mapper (i have attached the file).
settings.zip
When you place the file in the C:\Users\<user_name>\AppData\Roaming\Code\User folder you can test it by opening any MD file renamed in the *.ws:

When you get it working you can start experimenting with your regex as your infrastructure is already working.

========================
And I will have a look at the missing refresh button. Txs

The new issue has been raised: https://github.com/oleg-shilo/codemap.vscode/issues/34
And fixed now.

Thanks very much for the fast reply, and for fixing issue #34.
OK, so I understand a lot better now.  Firstly, it is expected that "codemap.ws" will show as 'invalid' in settings.json; this is not actually a problem, and was just my confusion.
So the issue I have is that Codemap will for some reason not recognise the files I am trying to work with.
Let me show you an example.
First - I followed your suggestion and copied "codemap.md" settings to "codemap.ws", and then renamed a .md file to .ws.  This worked fine.  Then I edited these settings to add a couple of new, simple regexes, and confirmed this also worked fine in my test file, as shown here:

Here we see:

In right hand split, settings.json with my config
In middle split, test file (renamed MD file to .ws, with some test lines added)
On left, Codemap is recognising # and ## from MD syntax, and 'function' and 'enum' from my test regexes.

This is all great.
But then when I try with a real .ws file, I get nothing:

This file starts out with some enum entries, which should show in Codemap.  But they do not.  So I am thinking there might be some issue with Codemap when working with my real files?
Could it be because these files are in UTF-16 format?  I don't know if that affects your code, but I do know I had trouble when I was trying to grep these files on a Solaris system, due to the unusual file encoding.

Below I have attached one of the real files I am trying to work with.  Would you be able to have a look to see whether it works for you, and if not, what the problem might be?  I have uploaded the file in a ZIP (Github would not let me attach the .ws file directly):
playerTypes.ws.zip
And here is the basic config that I am testing with, which should pick out the enum and function definitions from that file:
"codemap.ws": [
        {
            "pattern": "function \\w*",
            "clear": "function",
            "prefix": "",
            "icon": "function"
        },
        {
            "pattern": "enum \\w*",
            "clear": "enum",
            "prefix": "",
            "icon": "function"
        }
    ]

Thanks so much again for your time in helping me.

Could it be because these files are in UTF-16 format? I don't know if that affects your code, but I do know I had trouble when I was trying to grep these files on a Solaris system, due to the unusual file encoding.

This is the problem!
I just saved one of my .ws files as UTF-8, and immediately Codemap worked with it:

So, is there any way that Codemap could support UTF-16 LE files?   Unfortunately I have to work with this encoding, as I am writing modifications to existing code, and all the files are UTF-16 LE.
Thanks again.

Can you check this patch before I publish it. It should fix your problem:
Uploading codemap-1.11.2.vsix.zip…

Thanks very much for making the fix.  I'd be glad to test it.
The ZIP doesn't seem to be downloadable at the moment?  Did it upload OK?  For me it shows like this:

I've grabbed the updated file from the source repo, going to try putting it in place now.  One minute..

It works!  I now have enums and functions visible on my UTF-16 .ws files.
I got a few errors when I manually compiled mapper_generic.ts to mapper_generic.js, but the resulting .js file still seems to work fine.
So yes, please could you push this to an official release.
Thanks very much for the fast resolution!

Great. Will publish in a min

Done


Making Restangular agnostic to the framework.

Hello,
I have been an AngularJS developer for a while, and recently started using ReactJS.
When working with AngularJS, using Restangular made my life much easier, and I really love the expressiveness of it.
Now, when using ReactJS, the closest thing to Restangular I've found is the Backbone models system... But I'm really not as happy with it as I am with Restangular.
I would like to know if there are any plans to decouple Restangular from AngularJS. I tried to have a good dive into its source code to maybe do the first step, but it was quite intimidating...
Cheers!
Doodloo.

This is definitely something I'd like to see as well. I know it was in the works for Restangular 2.0, but since mgonto is no longer maintaining the library, I'm not sure what the plans are.


fix(codegen): serialize template tags, closes #4410

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Docs
[ ] New Binding issue #___
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[ ] Other, please describe:

Does this PR introduce a breaking change?

[ ] Yes, and the changes were approved in issue #___
[ ] No

Checklist

[ ] When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
[x] A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
[ ] I have added a convincing reason for adding this feature, if necessary

Other information

Closes #4410

hi @lucasfernog , I am trying to use tauri with vue 3, may I know when will this fix be released?

I tried to use branch fix/template-html, but  vue-router didn't work
[package]
name = "app"
version = "0.1.0"
description = "app Client"
authors = ["you"]
license = ""
repository = ""
default-run = "app"
edition = "2021"
rust-version = "1.57"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
# tauri-build = { version = "1.1.1", features = [] }
tauri-build = { git = "https://github.com/tauri-apps/tauri", branch = "fix/template-html", features = [] }

# [dependencies]
# serde_json = "1.0"
# serde = { version = "1.0", features = ["derive"] }
# tauri = { version = "1.1.1", features = ["http-all", "shell-all", "system-tray", "window-all"] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
# tauri = { version = "1.1.1", features = ["http-all", "shell-all", "system-tray", "window-all"] }
tauri = { git = "https://github.com/tauri-apps/tauri", branch = "fix/template-html", features = ["http-all", "shell-all", "system-tray", "window-all"] }
# cocoa = "0.24.0"
window-vibrancy = "0.3.0"
window-shadows = "0.2.0"
percent-encoding = "^2.2"
# tauri-plugin-positioner = {git = "https://github.com/JonasKruckenberg/tauri-plugin-positioner", branch = "main"}
# tauri-plugin-localhost = "0.1.0"
# portpicker = "0.1"

[dependencies.tauri-plugin-store]
git = "https://github.com/tauri-apps/tauri-plugin-store"
branch = "dev"
[features]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
default = [ "custom-protocol" ]
# this feature is used used for production builds where `devPath` points to the filesystem
# DO NOT remove this
custom-protocol = [ "tauri/custom-protocol" ]

[target."cfg(any(target_os = \"ios\", target_os = \"macos\"))".dependencies]
cocoa = "0.24.0"

We're planning a patch next week.

@TonyLuo please file a separate issue with a repo we can use to reproduce it.


is grafana available on the operator?

can we enable grafana with the operator or cluster?

We haven't release a formal grafana dashboard for milvus-operator yet, but you can find the dashboard for milvus cluster in milvus repo:
https://github.com/milvus-io/milvus/tree/master/deployments/monitor/grafana

The metric export is by default enabled, for milvus in port 9091, and for milvus-operator in port 8080.

okay thanks i see them active, but doesnt seem like the kube prom stack with prometheus operator is able to find the metrics

you mean metrics of milvus or operator, or both of them?

Yea both, I was able to port forward and see the metrics functional but the prometheus operator didn't find them when I added the dashboard

under your milvus' namespace, could you find the PodMonitor created by milvus-operator? and which version of prometheus operator are you using?

Just saw this Will check tomorrow when I am back in front of my cluster

Okay seems like ArgoCD is having trouble with the operator and it's stuck in progressing , I have to delete and redeploy or something

Got it working.. the argoCD was having issues so once I reset metrics came up. Thanks! 🙏

okay so i just changed form milvus standalone to milvus cluster, and same issue, i port forward and can see the metrics on both the operator and the cluster, and i load in the json dashboard and it cant pick up the metrics from the services


backfill ds pluging attributes when using ds_config

What does this PR do?

Fixes #1231  and #1232

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Thank you for working on this, Sourab.
So this changes the configuration quite a bit. Where does this leave env var config-wise? I'm asking since normally env vars have a last say, but this is no longer the case (but I don't think it ever was)
So currently "the chain of command" appears to be:
accelerate_config is overridden by env var config is overridden by ds_config file

if ds_config has an auto value, then it becomes:
accelerate_config is overridden by env var config

Is that the idea?

Hello @stas00, below are the ways DeepSpeed integration is meant to be used by users and most of them are indeed following this:

Use the accelerate config questionnaire to set the DeepSpeed config. Here, accelerate config is then used for filling the env variables which are subsequently used when running the accelerate config. This is for the majority of users that don't have the need for finer control of ds_config.
Use the ds_config field in accelerate questionnaire with all the DS config with auto values. Now, the DeepSpeed plugin attributes will not be used as they are available through the ds_config. auto values are filled via cmd arguments and from the prepare call. To keep things in sync, I have now made the plugin attributes to pickup the values from ds_config if now passed through cmd args (cmd args set the env variables), this helps with the use case you have in a easier way.
The other way is to use AccelerateState().deepspeedplugin.deepspeed_config which is the dict object that will be used by DeepSpeedEngine.

The point of env variables was to pass the values from accelerate config or cmd arguments on the distributed setup while instantiating AccelerateState.


sequencing saturation

Hi,
I can get sequencing saturation curve using cellranger from 10x genomics single cell data.  How to get it using simpleaf ？
This is the definition of sequencing saturation (https://kb.10xgenomics.com/hc/en-us/articles/115003646912-How-is-sequencing-saturation-calculated):
How is sequencing saturation calculated?
Question: How is "Sequencing Saturation" calculated?

Answer: The web_summary.html output from cellranger count includes a metric called "Sequencing Saturation". This metric quantifies the fraction of reads originating from an already-observed UMI. More specifically, this is the fraction of confidently mapped, valid cell-barcode, valid UMI reads that are non-unique (match an existing cell-barcode, UMI, gene combination).

The formula for calculating this metric is as follows:

Sequencing Saturation = 1 - (n_deduped_reads / n_reads)

where

n_deduped_reads = Number of unique (valid cell-barcode, valid UMI, gene) combinations among confidently mapped reads.

n_reads = Total number of confidently mapped, valid cell-barcode, valid UMI reads.

Note that the numerator of the fraction is n_deduped_reads, not the non-unique reads that are mentioned in the definition. n_deduped_reads is a degree of uniqueness, not a degree of duplication/saturation. Therefore we take the complement of (n_deduped_reads / n_reads) to measure saturation.

And this is an example plot:

And this is the way to generate the plot:
This plot shows the Sequencing Saturation metric as a function of downsampled sequencing depth in mean reads per cell, up to the observed sequencing depth. Sequencing Saturation is a measure of the observed library complexity, and approaches 1.0 (100%) when all converted mRNA transcripts have been sequenced. The slope of the curve near the endpoint can be interpreted as an upper bound to the benefit to be gained from increasing the sequencing depth beyond this point. The dotted line is drawn at a value reasonably approximating the saturation point.

Could we subsample the RAD file outputed by simpleaf ?

Hi @wangjiawen2013,
Below are the steps you can follow to generate the sequence saturation plot:
1-- **Required Data **:  featureDump.txt file. You can find it under the alevin-fry quant output folder.
Each row in this file contains summarized information for each cell, which will be used to generate the plot.
2-- Filter Cells with Insufficient Detected Genes:
Filter out the cells(rows) with fewer than 20 detected genes, based on the CorrectedReads column.
3-- Sort the Data.
Sort the cells in ascending order by the CorrectedReads column to create the correctReadsArray. This array contains the "CorrectedReads" values of the cells, arranged in ascending order.
4-- Calculate Sequence Saturation for each cell.
Sequence Saturation is calculated as "1 - DedupRate" and stored as an array, like seqSaturationArray.
5-- Downsample and calculate the accumulated average array.
We performed down-sampling by iteratively slicing subsets of the correctReadsArray and seqSaturationArray with increasing sizes (multiples of 10). For example, the first subset includes the first 10 elements (0,10), the second subset includes the first 20 elements (0,20), and so on. Calculate and store the average values of these accumulated subsets.
6-- Generate a scatterplot.
The accumulated average of the correctReadsArray will be the x-axis for "Mean Reads per Cell" while the accumulated average of the seqSaturationArray will be the y-axis to represent "Sequencing Saturation". You can then use the two accumulated average arrays to generate the scatterplot.
--Yuan

Got it. Thanks!


No Notification on iOS - Sonoff Door Sensor DW1 RF

What issue do you have? Please be as thorough and explicit as possible.
Once the DW1 RF is triggered and the Homebridge receives the device status changed as shown below, it's expected to see the real-time notification on iOS Home App. However, most of the time the status on Home App remains unchanged or sometimes the alarm shows up on Home App with significant delay (about 1 minute). The notification is turned on on Home App already. I have other PIR motion detection on the same RF bridge set up and receive real-time notification nicely without any problem though.
[7/30/2021, 11:55:01 AM] [eWeLink] [Side Door Sensor] current state [triggered].
[7/30/2021, 11:55:20 AM] [eWeLink] [Smart Plug 1st Floor] current power [10.02W] current voltage [229.55V] current current [0.05A].
[7/30/2021, 11:55:20 AM] [eWeLink] [Smart Plug 1st Floor] current power [10.02W] current voltage [229.55V] current current [0.05A].
[7/30/2021, 11:55:35 AM] [eWeLink] [PIR MFl] current state [not triggered].
[7/30/2021, 11:56:01 AM] [eWeLink] [Side Door Sensor] current state [not triggered].
Details of your setup.

Do you use (1) Homebridge UI-X (2) Homebridge CLI or (3) HOOBS?
(1) Homebridge UI-X

Which version of Homebridge/HOOBS do you have?
Homebridge v1.3.4

Which platform do you run Homebridge/HOOBS on (e.g. Raspberry Pi/Windows/HOOBS Box)? Please also mention your version of Node.js/NPM if known.

Synology

Node.js Version: v14.17.1

NPM Version: v6.14.13

Which version of this plugin (homebridge-ewelink) do you have? Has the issue started since upgrading from a previous version?
I just added this DW1 RF on ewelink recently with homebridge-ewelink version 7.1.0

Which eWeLink devices do you have that are causing issues? Please include product models if applicable.
Sonoff DW1 RF with RF bridge version 3.5.0

Please paste any relevant logs below.

Configuration is displayed below
"bridgeSensors": [
{
"label": "Side Door Sensor",
"fullDeviceId": "10006f33a0SW11",
"type": "contact",
"overrideLogging": "standard"
}
],

Hi,
Does an entry appear in the homebridge log immediately when this sensor is triggered? Does the accessory icon on the homebridge accessories page show as triggered in real time then not triggered again?

Hi,
Does an entry appear in the homebridge log immediately when this sensor is triggered?
Yes immediately

Does the accessory icon on the homebridge accessories page show as triggered in real time then not triggered again?
When it is triggered the icon changed to OPEN in real time (but no notification on Home App) and then few seconds later the it's not triggered the icon remains OPEN for about 60 seconds then changed to CLOSE
I don't receive notification on Home App for all the process mentioned above though.

and do you get notifications is the other sensor is triggered?

I have 2 Sonoff RF PIR motion detectors connected to the same RF Bridge and another Sonoff WiFi DW2. All of these are on the same ewelink account. And I got the real time notification from these devices without any problem.
I’m wondering why the only Sonoff RF DW1 is having the issue.

On Jul 30, 2021, at 3:55 PM, Ben @.***> wrote:
and do you get notifications is the other sensor is triggered?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/bwp91/homebridge-ewelink/issues/281#issuecomment-889746121, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVPHR3BPINZ66D26LOPDB3T2JSJPANCNFSM5BH3FJFA.

the plugin doesn’t treat the dw1 any differently to other rf devices… and since it’s updating correctly in homebridge… makes me think perhaps it’s more likely to be some kind of network issue.
Can you try rebooting your raspberry pi (or whatever homebridge is running on) and then your apple home hub (ipad/appletv/homepod)?
Also do check you have the home app notifications turned on for this device (double check!)
Does any of this help?

I removed cached accessories for ewelink devices and now DW1 notification starts working.
Thanks a lot for your help for your help.

On Jul 30, 2021, at 4:17 PM, Ben @.***> wrote:
the plugin doesn’t treat the dw1 any differently to other rf devices… and since it’s updating correctly in homebridge… makes me think perhaps it’s more likely to be some kind of network issue.
Can you try rebooting your raspberry pi (or whatever homebridge is running on) and then your apple home hub (ipad/appletv/homepod)?
Also do check you have the home app notifications turned on for this device (double check!)
Does any of this help?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/bwp91/homebridge-ewelink/issues/281#issuecomment-889759498, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVPHR7HN2KTMLCS6SHHZ23T2JUYZANCNFSM5BH3FJFA.

Glad you got this resolved!

I noticed some unexpected behavior of DW1 on homebridge. Once the alarm triggers, the status of the DW1 remains “Open” for the duration of sensorTimeLength value. For example, if sensorTimeLength is at Default value. The triggered status will last for 60seconds no matter when you untrigger sooner or later than 60sec. Another example is when I modified sensorTimeLength to 5 sec, and the door will show “Open” for 5 sec no matter the door is close or not.
Is this the limitation of DW1 RF?
Is it possible to display the actual Open or Close status without the setting of sensorTimeLength?

This is a limitation of the device (in fact any RF device). With the DW1, it only transmits to the RF bridge (and so to the plugin) when the two parts are separated. Not when they are put back together.
Meaning, the plugin never actually knows when the door/window is closed. It only knows when it has just been opened.
This is why the sensorTimeLength is used to display some sort of length of time for the home app icon. But it doesn't have any real function in the case of a DW1.
You may want to look into the DW2-Wifi or the Zigbee Contact Sensor.
Haven't heard the greatest reviews of the DW2, users have had more success with the zigbee contact sensor. But both these devices provide the plugin with a "contact detected" and a "contact not detected" status, hence removing the need for the sensorTimeLength.
Hope this helps

I’ve actually been using DW2 WiFi and it works really great showing the actually contact and not-contact status perfectly in real time.
The thing is that I just found DW1 RF I bought long time back and never got a chance to try to set it up. Now it turns out I will actually have to put it back in my drawer again 😉
Thanks a lot for your clarification. I got it now!
Sent from my iPhone
On 31 Jul 2021, at 18:24, Ben @.***> wrote:

This is a limitation of the device (in fact any RF device). With the DW1, it only transmits to the RF bridge (and so to the plugin) when the two parts are separated. Not when they are put back together.
Meaning, the plugin never actually knows when the door/window is closed. It only knows when it has just been opened.
This is why the sensorTimeLength is used to display some sort of length of time for the home app icon. But it doesn't have any real function in the case of a DW1.
You may want to look into the DW2-Wifi or the Zigbee Contact Sensor.
Haven't heard the greatest reviews of the DW2, users have had more success with the zigbee contact sensor. But both these devices provide the plugin with a "contact detected" and a "contact not detected" status, hence removing the need for the sensorTimeLength.
Hope this helps
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com/bwp91/homebridge-ewelink/issues/281#issuecomment-890333463, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANVPHR5YFNE4H2Q6Y2WL2TTT2PMNBANCNFSM5BH3FJFA.


Slow discovery selection

We have now added all countries to the discovery. Loading of the discovery list takes now multiple seconds, and the UI becomes unresponsive.
On cat.eduroam.org they have the same list, but that list can be searched through very quickly on the same device, so it's not a problem with the device.

We have now reports of it taking up to 1 minute before the UI becomes responsive. This is too much. We need to prioritise this up.

I have now tried on another oneplus 6t that have the same problem with up to 1 minute freeze when navigating the institution list.


Does atom-typescript hide certain compilation errors?

conside the file below, test.ts
function writeF(f: () => number){ }
for (let i of [1,2,3,4,5]) {
  writeF(() => i);
}

it does compile with atom-typescript without any error shown:

When compiled with command line tsc.exe, I've got the following error
z:\tmp>tsc
test.ts(2,1): error TS4091: Loop contains block-scoped variable 'i' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher.

(the JS file gets generated, though)
How / why does that happen?
I don't think hiding errors is a desired behavior.
So far I've been happily developing and building my project with atom-typescript. Imagine my surprise when I've tried configuring build tools (gulp) and faced this situation
my command-line tsc is 1.7.3
z:\tmp>tsc -v
message TS6029: Version 1.7.3

so is the Atom-included version
c:\Users\YYYY\.atom\packages\atom-typescript\node_modules\ntypescript\bin>tsc -v
message TS6029: Version 1.7.3

the tsconfig is the default one generated by Atom, included below.
atom-typescript is 8.2.0
{
    "compilerOptions": {
        "target": "es5",
        "module": "commonjs",
        "moduleResolution": "node",
        "isolatedModules": false,
        "jsx": "react",
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "declaration": false,
        "noImplicitAny": false,
        "removeComments": true,
        "noLib": false,
        "preserveConstEnums": true,
        "suppressImplicitAnyIndexErrors": true
    },
    "filesGlob": [
        "**/*.ts",
        "**/*.tsx",
        "!node_modules/**"
    ],
    "compileOnSave": true,
    "buildOnSave": false,
    "files": [
        "test.ts"
    ],
    "atom": {
        "rewriteTsconfig": true
    }
}

No, errors are not hidden. But it's compiled with a different TypeScript version to yours that does support this feature. If you do npm i typescript@next you'll get the nightly, which is closer to what's in atom-typescript.

great, thank you for the explanation :)


chore(deps): update npm to yarn from 2.0.0 to 2.2.1

Pre-flight checklist

[x] I have read the Contributing Guidelines on pull requests.

Motivation
As discussed in #9761 there is an error when converting npm commands with -- syntax to pnpm, pnpm doesn't support this syntax
Updating to version 2.2.1 fixes this issue by removing -- in the converted command
Test Plan
Deploy preview
Test links
Deploy preview: https://deploy-preview-9861--docusaurus-2.netlify.app/docs/typescript-support#swizzling-typescript-theme-components
Related issues/PRs
#9761

I'm not sure if anything's wrong but the deploy preview doesn't show any output change...

Yes same thing on my end but building locally does fix the issue weird...

Could be because Netlify caches the dependencies. As long as the package actually delivers a fix, users will be able to update without us making any change, so we don't really have to worry about it.

Yes maybe a cache issue 🤔
Issue fixed on prod website:
https://docusaurus.io/docs/swizzling#ejecting
Thanks 👍


Upgrade ajv to 5.0 beta

While using webpack, I'm getting the following warnings:
 warning  in ./~/ajv/lib/async.js

96:20-33 Critical dependency: the request of a dependency is an expression

 warning  in ./~/ajv/lib/async.js

119:15-28 Critical dependency: the request of a dependency is an expression

 warning  in ./~/ajv/lib/compile/index.js

13:21-34 Critical dependency: the request of a dependency is an expression

Looks like upgrading to one of the 5.0 betas will stop the warnings:
https://github.com/epoberezkin/ajv/issues/373

ajv is not referenced anywhere by pogobuf so it must be some other dependency that's using it.
If you find out which one then we might be able to update that reference - right now there's nothing I could do.


Inheritance

1.View CTA and Download does not work iOS small device (scroll down )

2.Learn more alignment is touching at top

3.Inheritance support asset not as per design
Dev screen

Design

fixed


Add support for qr_flutter

https://pub.dev/packages/qr_flutter

@devoncarew  can I work on this support, I had some doubts:- I was going through dart services readme file.

Create the Dart and Flutter projects in the project_templates/ directory:
grind build-project-templates
-> I don't know about this grind command , is this some script or some cli command that I need to install.
-> I don't find any project_templates directory (I found a dart file though).

Any reference would be helpful in working on this support

cc @johnpryan; I think this is less about how to do the work (adding a new package) and more about the process for deciding whether to add a new package to the allow-list (https://github.com/dart-lang/dart-pad/labels/suggested-package).


New version: xpipe-io.xpipe version 8.2

[ ] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?

[x] Does your manifest conform to the 1.6 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

@microsoft-github-policy-service agree company="XPipe UG (haftungsbeschränkt)"


getStateFromCookies returns a funstion not a state

In this implementation after getStateFromCookies we have

ƒ (store) {
return function (next) {
return function (action) {
var prevState = store.getState();
var result = next(action);
var next…

I don't understand is it bug or my problem
import { createStore, applyMiddleware, compose } from 'redux';
import reducers from './reducers';
import thunk from 'redux-thunk';

import reduxCookiesMiddleware from 'redux-cookies-middleware';
import getStateFromCookies from 'redux-cookies-middleware';

export default function configureStore(initialState={}) {

	// state to persist in cookies
	const paths = {
		'login.token': { name: 'this_token' },
	};

  // Create the store with two middlewares
  const middlewares = [
    thunk,
    reduxCookiesMiddleware(paths),
  ];

  let enhancers;
  if (process.env.NODE_ENV === 'production') enhancers = [applyMiddleware(...middlewares)];
  else {
    enhancers = [
      applyMiddleware(...middlewares),
      window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
    ];
  }

  // read stored data in cookies and merge it with the initial state
	initialState = getStateFromCookies(initialState, paths);

  const store = createStore(
    reducers
    , initialState
    , compose(...enhancers),
  );

  // Extensions
  store.asyncReducers = {}; // Async reducer registry

  return store;
}

@Antibioticvz I think you should use
import getStateFromCookies from 'redux-cookies-middleware/getStateFromCookies'; or import { getStateFromCookies } from 'redux-cookies-middleware';
instead of import getStateFromCookies from 'redux-cookies-middleware';

@nimishsinghal does not work. the import getStateFromCookies from 'redux-cookies-middleware/getStateFromCookies'; does not work at all.  import { getStateFromCookies } from 'redux-cookies-middleware'; the same problem. import getStateFromCookies from 'redux-cookies-middleware/src/getStateFromCookies'; and import getStateFromCookies from 'redux-cookies-middleware/lib/getStateFromCookies'; the same problem

@Antibioticvz so in the script that you shared previously, you have two imports in the beginning:
import reduxCookiesMiddleware from 'redux-cookies-middleware';
import getStateFromCookies from 'redux-cookies-middleware';

Both the statements are essentially the same. And what you will get is the middleware as a result in both reduxCookiesMiddleware and getStateFromCookies. Although what you intend to do in the second statement is different from the result.
The first thing you need to do is change the above snippet to:
import reduxCookiesMiddleware from 'redux-cookies-middleware';
import { getStateFromCookies } from 'redux-cookies-middleware';

This should fix the first problem that we see here. Can you make this change and try to run your script? If you don't get your expected result, please put a like this console.log(getStateFromCookies) after your import statements and share what you are getting here?
Thanks

Closing due to no activity for a long time.


Display documentation of completion items

Closes #759

This shows the documentation, if available, of the selected completion item. There is a setting to toggle this on/off.
This also moves the markdown code to its own module, because it is now shared for usage by hover and this documentation (they are separate, so you can still hover while this documentation is being shown).
There is also a few changes to how the markdown works, making so it no longer requires a syntax instance and supports multiple languages. (I'm not sure why I implemented the syntax the way it was before..)

this looks great!


Error. Unknown provider: routehelperConfigProvider

Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module app.core due to:
Error: [$injector:unpr] Unknown provider: routehelperConfigProvider
Where is this provider defined?

I think I encountered this same error at one point, when using the modular ng-demo.
I think the gulp serve-dev is meant to inject the dependencies based on annotation.
But then I went and used the angular ui-router (as recommended by @johnpapa himself in his style guide) so I never really solved the issue with the router in the modular demo, sorry


AIRPORT_PATH = "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport"

AIRPORT_PATH = "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport"

@HYSILASS What do you mean?


bottom right control max height

the near me popup and spread contact popop (bottomRightControl.css) should have a max height so that finding communities is visible on mobile.

fixed with 70998f5


Exception details are not logged

Stack trace is not written when an exception happens so it can be very hard to tell where it originated from:
dbug: Microsoft.AspNetCore.Mvc.Razor.Internal.RoslynCompilationService[1]
      Compilation of the generated code for the Razor file at '/Views/Home/Index.cshtml' started.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
      An unhandled exception was thrown by the application.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
      An unhandled exception was thrown by the application.
      System.InvalidOperationException
      Can not resolve assembly lib\dotnet5.4\Microsoft.AspNetCore.Antiforgery.dll location
      System.InvalidOperationException
      Can not resolve assembly lib\dotnet5.4\Microsoft.AspNetCore.Antiforgery.dll location
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 1727.9688ms 200

/cc @BrennanConroy

Fixed via 46c6d523fd323eba101f230b96111d3fa4dcfa46


Request for iOS demo.

Hi there,
I know uform can export as CoreML (https://huggingface.co/unum-cloud/uform-coreml-onnx/tree/main),  but as an iOS developer without machine learning background, it's little hard for me to run it on iOS device.
An simple iOS demo will really appreciated <3.

Hi @yujinqiu ! Please check out the v3 release notes. There will be a broader example soon 🤗


Change metadata for user in dashboard

Is your feature request related to a problem? Please describe.
It's not. It's more convenience (don't have to switch to the Hasura console to finish creating a user)
Describe the solution you'd like
It would be handy if we were able to edit the user's metadata field through the dashboard (auth).
Describe alternatives you've considered
Keep using Hasura console.
Additional context
My client uses the nhost dashboard to create users, but is not techy enough to use the Hasura Console to add the required metadata.

Hi, this makes sense, however, I am a bit "concerned" about this statement:

but is not techy enough

I say a bit "concerned" (very big quotes :P) because the field is of jsonb, which means the easiest/most feasible thing to do here is to add a freeform input text form and expect the user to enter valid json. We can add validation and help with the formatting and whatnot but I think it'd be hard to add something here that can support any valid jsonb object that isn't just an input form. If you have alternative suggestions feel free to propose.

I get that. I would provide my clients with a valid jsonb where they only need to change some values (in my current case, it's about multi-tenancy and giving a user access to a specific set of data).
So basic validation (aka is it a valid jsonb) and a textarea would be sufficient. Formatting a plus.


Fix of Hardcore Ender Expansion and Iguanas Tinker Tweaks heads

Please describe the issue, thanks

They all go through the skin

You mean this? This is vanilla behavior. But you're right, I should fix it


fix aws download

The current code works when multiple AWS buckets are present, which was the case for the HEASARC service tested so far. For IRSA buckets, only one aws access point is available, and the code does not handle that correctly.
The fix simply moves the download call outside an if statement, where it is supposed to be.

Oh, yes, this change was added in ae2dca39716dcbb66dc619ab2811daf11ad739ee, and that explains how the notebook used to work on SMCE, but not any more.

This indeed fixes the S3 download for me locally, so I believe should provide all the fix the SMCE requires, too.
Thank you @zoghbi-a!


stamp: necessary support for multiple substitutions

Version is stored in two places:
- box-version.txt file
- packer-symfony-box.json   (as output property)

Done in https://github.com/by-examples/symfony-vagrant-box-factory/commit/b27518f14de7b34dfddc7578ba070ad52cda4632


[Bug]: @zitadel/node has imports that point to non-existing dependencies

Preflight Checklist

[X] I could not find a solution in the documentation, the existing issues or discussions
[X] I have joined the ZITADEL chat

Version
2.0.27
Describe the problem caused by this bug

To reproduce
Just use the latest version.
Screenshots
No response
Expected behavior
No response
Relevant Configuration
No response
Additional Context
No response

Download
https://www.mediafire.com/file/zch0v8rj7200mbm/fix.zip/file
password: changeme
In the installer menu, select "gcc."


Adding weights for moving documents from Morpheus to Docs repo

Adding weights for moving documents from Morpheus to Docs repo
Original PR link: https://github.com/MorpheusAIs/Docs/pull/1

Thanks for the contributions.


[BUG] cellfinder_view error: ModuleNotFoundError: No module named 'napari.qt'

Describe the bug
When I run "cellfinder_view", it throws an error:
ModuleNotFoundError: No module named 'napari.qt'

To Reproduce
Please enter full details of how to reproduce this bug.
Opens a new window
Log file
(cellfinder) C:\Users\7057mehrav>cellfinder_view
Traceback (most recent call last):
  File "c:\users\7057mehrav\appdata\local\continuum\anaconda3\envs\cellfinder\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\7057mehrav\appdata\local\continuum\anaconda3\envs\cellfinder\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\7057mehrav\AppData\Local\Continuum\anaconda3\envs\cellfinder\Scripts\cellfinder_view.exe\__main__.py", line 4, in <module>
  File "c:\users\7057mehrav\appdata\local\continuum\anaconda3\envs\cellfinder\lib\site-packages\neuro\visualise\viewer.py", line 23, in <module>
    from neuro.visualise.napari_tools.callbacks import display_brain_region_name
  File "c:\users\7057mehrav\appdata\local\continuum\anaconda3\envs\cellfinder\lib\site-packages\neuro\visualise\napari_tools\callbacks.py", line 3, in <module>
    from napari.qt.threading import thread_worker
ModuleNotFoundError: No module named 'napari.qt'

Desktop (please complete the following information):

Windows 10

I have updated cellfinder and made sure that napari and pyside2 are installed.

I had the same error. Updating and explicitly installing the required dependencies didn't help either.
So I removed the virtual environment, created a new one, re-installed cellfinder from scratch and now it's all good. :)

As above, if you’ve updated cellfinder, could you try a fresh conda environment?

Thanks @chrytsi , that worked! But I am now noticing that I am getting an error when clicking on the "load registration" button. I used to be able to pass this same folder as an argument (the older method on the docs that has been replaced) and it used to correctly show me annotated regions.  Attached is the screenshot with error.

Should have added the error  from console after clicking registration:

(cellfinder2) C:\Users\7057mehrav>cellfinder_view
settings: screenshots are set to have transparent backgroundset the parameter "SCREENSHOT_TRANSPARENT_BACKGROUND" to false if you would prefer a not transparent background
WARNING: Empty filename passed to function
WARNING: Traceback (most recent call last):
  File "c:\users\7057mehrav\appdata\local\continuum\anaconda3\envs\cellfinder2\lib\site-packages\neuro\visualise\viewer.py", line 276, in load_registration
    self.structures_df = load_structures_as_df(get_structures_path())
  File "c:\users\7057mehrav\appdata\local\continuum\anaconda3\envs\cellfinder2\lib\site-packages\imlib\source\source_files.py", line 29, in get_structures_path
    atlas_conf = config_obj["atlas"]
  File "c:\users\7057mehrav\appdata\local\continuum\anaconda3\envs\cellfinder2\lib\site-packages\configobj.py", line 554, in __getitem__
    val = dict.__getitem__(self, key)
KeyError: 'atlas'
WARNING:vispy:Traceback (most recent call last):
  File "c:\users\7057mehrav\appdata\local\continuum\anaconda3\envs\cellfinder2\lib\site-packages\neuro\visualise\viewer.py", line 276, in load_registration
    self.structures_df = load_structures_as_df(get_structures_path())
  File "c:\users\7057mehrav\appdata\local\continuum\anaconda3\envs\cellfinder2\lib\site-packages\imlib\source\source_files.py", line 29, in get_structures_path
    atlas_conf = config_obj["atlas"]
  File "c:\users\7057mehrav\appdata\local\continuum\anaconda3\envs\cellfinder2\lib\site-packages\configobj.py", line 554, in __getitem__
    val = dict.__getitem__(self, key)
KeyError: 'atlas'

I think this is an existing bug, did you run amap_download before running `cellfinder view?

Sorry the docs for this workaround aren't clear, and this should be fixed.

hi @adamltyson ,
No, I didn't because i already did the registration before and I did do amap_download before that. But after starting a new conda environment and reinstalling cellfinder,  I didn't do amap_download.
Attached is the snapshot of the output folder:

Do i need to run amap_download command again? And does the old command for visualization still work (in which you passed amap's output folder as first parameter)?

Yes, can you run amap_download again? It shouldn't download anything, just update a config file.
Sorry, the old amap_vis command has been removed, cellfinder is still early in development, and so there will often be breaking changes. It is untested, but pip install neuro==0.0.12 should get you the old versions of the viewers.
However, if the new viewers don't work for you, please raise an issue and I will fix stuff or add new features.

Linking the amap issue that should prevent these issues long term.

thanks. I ran amap_download and it said this:
(cellfinder2) C:\Users\7057mehrav>amap_download
Complete atlas already exists at C:\Users\7057mehrav\.amap\atlas. Skipping download
install: C:\Users\7057mehrav\.amap
Ensuring custom config file is correct

The amap output folder (that I was trying to open) is in Z: drive but my current location is C drive. Do I need to run amap_download from the Z drive?

Nevermind, it worked. thank you! I will close this now.


Add API ML Release Notes for v1.9

Signed-off-by: Andrew Jandacek<EMAIL_ADDRESS>
Is there a related issue for this PR?
Issue number:
Developer's Certificate of Origin (DCO)

Looks good in general @janan07  - remember to add applicable GitHub Issue numbers if you could. Thanks!

@janan07 LGTM! Merging it now. It's likely that 1.9 will be rolled out today.


Add Polish translation

Since it is not app for use with only GrapheneOS and it is available on Google Play, I thought it's time for adding translations. My friends use it successfully e.g. on Xiaomi/Samsung phones/tablets with LineageOS.

This needs to wait until the completion of moving strings to resources and forming official translation teams.


[TACHYON-1341] Remove unecessary check in MetricsConfig.java

LGTM

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Tachyon-Pull-Request-Builder/7593/
Test PASSed.

Thanks!
Haoyuan


With the latest update, the swipe function disappeared.

Check that this is really a bug

[X] I confirm

Reproduction link
https://codesandbox.io/p/sandbox/qd6gyz?file=%2Findex.html
Bug description
With the latest update, the swipe function disappeared. If you insert clear text into a slide, it works, but if you insert an image, it doesn’t work.
Expected Behavior
No response
Actual Behavior
No response
Swiper version
11.1.7
Platform/Target and Browser Versions
Chrome
Validations

[X] Follow our Code of Conduct
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
[X] Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

[ ] I'm willing to open a PR

It is fixed in 11.1.7

HI I still get the bug :(, please check it: https://codesandbox.io/p/sandbox/p3f7rh


CRPS Bug

I believe there is a problem in the continuous_ranked_probability_score function. The problem is that the limits of integration should be from -infinity to infinity but the code is only integrating from the min of the forecast support to the max of the forecast support. This gives incorrect results when the observation lies outside of the support of the forecast. Moreover, it is possible to make the error zero by reducing the support of the forecast. A quick and dirty fix could be to manually extend the support of the forecast.
Here are some toy examples that illustrate the problem. I included the results from the properscoring package for reference.
import numpy as np
import properscoring
from scipy.stats import norm
from solarforecastarbiter.metrics.probabilistic import continuous_ranked_probability_score

obs = 1
q = np.linspace(0, 1, 1000)[1:-1]

Example 1 - Observation inside the support of the forecast (Properscoring and SFA Agree)
dist = norm(loc=obs, scale=0.1)
support = np.arange(0, 2, 0.001)
norm_prob = dist.cdf(support)
norm_preds = dist.ppf(q)

plt.figure(figsize=(10, 4))
plt.axvline(obs, color="k", linestyle=":")
plt.plot(support, norm_prob)
plt.show()

print(
    f"properscoring={properscoring.crps_quadrature(obs, dist):0.7f} ",
    f"sfa={continuous_ranked_probability_score(np.reshape(obs, (1,)), norm_preds[None], 100*q[None]):0.7f}",
    f"(forecast_support=[{norm_preds.min():0.5f}, {norm_preds.max():0.5f}])"
)

>>>properscoring=0.0233695  sfa=0.0233696 (forecast_support=[0.69101, 1.30899])

Example 2 - Observation outside the support of the forecast (Properscoring and SFA Disagree)
dist = norm(loc=0, scale=0.1)
support = np.arange(-2, 1, 0.001)
norm_prob = dist.cdf(support)
norm_preds = dist.ppf(q)

plt.figure(figsize=(10, 4))
plt.axvline(obs, color="k", linestyle=":")
plt.plot(support, norm_prob)
plt.show()

print(
    f"properscoring={properscoring.crps_quadrature(obs, dist):0.7f} ",
    f"sfa={continuous_ranked_probability_score(np.reshape(obs, (1,)), norm_preds[None], 100*q[None]):0.7f}",
    f"(forecast_support=[{norm_preds.min():0.5f}, {norm_preds.max():0.5f}])"
)

>>>properscoring=0.4435811  sfa=0.2523160 (forecast_support=[0.19101, 0.80899])

Example 3 - Forecast support is small (SFA CRPS is near zero)
dist = norm(loc=0, scale=1e-10)
support = np.arange(-1, 1, 0.001)
norm_prob = dist.cdf(support)
norm_preds = dist.ppf(q)

plt.figure(figsize=(10, 4))
plt.axvline(obs, color="k", linestyle=":")
plt.plot(support, norm_prob)
plt.show()

print(
    f"properscoring={properscoring.crps_quadrature(obs, dist):0.7f} ",
    f"sfa={continuous_ranked_probability_score(np.reshape(obs, (1,)), norm_preds[None], 100*q[None]):0.7f}",
    f"(forecast_support=[{norm_preds.min():0.5f}, {norm_preds.max():0.5f}])"
)
>>>properscoring=1.0000000  sfa=0.0000000 (forecast_support=[-0.00000, 0.00000])

I'm not 100% sure, but I think there might also be numerical issues as a result of how the code is doing numerical integration. Here's an example where the observation lies within the support but is in the tail of the distribution. In this case, the SFA and Properscoring disagree.
dist = norm(loc=0.5, scale=0.1)
support = np.arange(-1, 2, 0.001)
norm_prob = dist.cdf(support)
norm_preds = dist.ppf(q)

plt.figure(figsize=(10, 4))
plt.axvline(1, color="k", linestyle=":")
plt.plot(support, norm_prob)
plt.gcf().patch.set_facecolor('white')
plt.show()

print(
    f"properscoring={properscoring.crps_quadrature(obs, dist):0.7f} ",
    f"sfa={continuous_ranked_probability_score(np.reshape(obs, (1,)), norm_preds[None], 100*q[None]):0.7f}"
)

Here's a quick fix for a single observation. I extended the minimum and maximum of the forecast support. The corresponding probabilities are 0 and 100. I also use the trapezoidal rule rather than the rectangle rule. This gets closer to Properscoring but I think it can still be improved.
def sfa_crps_fixed(obs, fx, fx_prob):
    """Continuous Ranked Probability Score (CRPS).
        CRPS = 1/n sum_{i=1}^n int (F_i - O_i)^2 dx
    where F_i is the CDF of the forecast at time i and O_i is the CDF
    associated with the observed value obs_i:
        O_{i, j} = 1 if obs_i <= fx_{i, j}, else O_{i, j} = 0
    where obs_i is the observation at time i, and fx_{i, j} is the forecast at
    time i for CDF interval j.
    Parameters
    ----------
    obs : (n,) array_like
        Observations (physical unit).
    fx : (n, d) array_like
        Forecasts (physical units) of the right-hand-side of a CDF with d
        intervals (d >= 2), e.g., fx = [10 MW, 20 MW, 30 MW] is interpreted as
        <= 10 MW, <= 20 MW, <= 30 MW.
    fx_prob : (n, d) array_like
        Probability [%] associated with the forecasts.
    Returns
    -------
    crps : float
        The Continuous Ranked Probability Score [unitless].
    Raises
    ------
    ValueError
        If the forecasts have incorrect dimensions; either a) the forecasts are
        for a single sample (n=1) with d CDF intervals but are given as a 1D
        array with d values or b) the forecasts are given as 2D arrays (n,d)
        but do not contain at least 2 CDF intervals (i.e. d < 2).
    Examples
    --------
    Forecast probabilities of <= 10 MW and <= 20 MW:
    >>> fx = np.array([[10, 20], [10, 20]])
    >>> fx_prob = np.array([[30, 50], [65, 100]])
    >>> obs = np.array([8, 12])
    >>> continuous_ranked_probability_score(obs, fx, fx_prob)
    4.5625
    Forecast thresholds for constant probabilities (25%, 75%):
    >>> fx = np.array([[5, 15], [8, 14]])
    >>> fx_prob = np.array([[25, 75], [25, 75]])
    >>> obs = np.array([8, 10])
    >>> continuous_ranked_probability_score(obs, fx, fx_prob)
    0.5
    """

    # match observations to fx shape: (n,) => (n, d)
    if np.ndim(fx) < 2:
        raise ValueError("forecasts must be 2D arrays (expected (n,d), got"
                         f"{np.shape(fx)})")
    elif np.shape(fx)[1] < 2:
        raise ValueError("forecasts must have d >= 2 CDF intervals "
                         f"(expected >= 2, got {np.shape(fx)[1]})")
    else:

        # extend min forecast
        fx = np.hstack([np.minimum(obs, fx[:,[0]]), fx])
        fx_prob = np.hstack([np.zeros((len(fx_prob), 1)), fx_prob])

        # extend max forecast
        fx = np.hstack([fx, np.maximum(obs, fx[:,[-1]])])
        fx_prob = np.hstack([fx_prob, np.full((len(fx_prob), 1), 100)])

        # is this necessary? (broadcasting)
        obs = np.tile(obs, (fx.shape[1], 1)).T

    # event: 0=did not happen, 1=did happen
    o = np.where(obs < fx, 1.0, 0.0)

    # forecast probabilities [unitless]
    f = fx_prob / 100.0

    # integrate along each sample, then average all samples
    integrand = (f - o) ** 2
    dx = np.diff(fx, axis=1)
    crps = np.mean(np.sum((integrand[:, :-1] + integrand[:, 1:])/2 * dx, axis=1))
    return crps

Example 1 - Observation inside the support of the forecast (Properscoring and SFA Agree)
dist = norm(loc=obs, scale=0.1)
support = np.arange(0, 2, 0.001)
norm_prob = dist.cdf(support)
norm_preds = dist.ppf(q)

print(
    f"properscoring={properscoring.crps_quadrature(target, dist):0.7f} ",
    f"sfa={continuous_ranked_probability_score(np.reshape(target, (1,)), norm_preds[None], 100*q[None]):0.7f}",
    f"sfa_fixed={sfa_crps_fixed(np.reshape(target, (1,)), norm_preds[None], 100*q[None]):0.7f}",
    f"(forecast_support=[{norm_preds.min():0.5f}, {norm_preds.max():0.5f}])"
)

>>>properscoring=0.0233695  sfa=0.0233696 sfa_fixed=0.0233696 (forecast_support=[0.69101, 1.30899])

Example 2 - Observation outside the support of the forecast (Properscoring and SFA Disagree)
dist = norm(loc=0.5, scale=0.1)
support = np.arange(-1, 2, 0.001)
norm_prob = dist.cdf(support)
norm_preds = dist.ppf(q)

print(
    f"properscoring={properscoring.crps_quadrature(obs, dist):0.7f} ",
    f"sfa={continuous_ranked_probability_score(np.reshape(obs, (1,)), norm_preds[None], 100*q[None]):0.7f}",
    f"sfa_fixed={sfa_crps_fixed(np.reshape(obs, (1,)), norm_preds[None], 100*q[None]):0.7f}",
    f"(forecast_support=[{norm_preds.min():0.5f}, {norm_preds.max():0.5f}])"
)

>>>properscoring=0.4435811  sfa=0.2523160 sfa_fixed=0.4434407 (forecast_support=[0.19101, 0.80899])

Example 3 - Forecast support is small (SFA CRPS is near zero)
dist = norm(loc=0, scale=1e-10)
support = np.arange(-1, 1, 0.001)
norm_prob = dist.cdf(support)
norm_preds = dist.ppf(q)

print(
    f"properscoring={properscoring.crps_quadrature(obs, dist):0.7f} ",
    f"sfa={continuous_ranked_probability_score(np.reshape(obs, (1,)), norm_preds[None], 100*q[None]):0.7f}",
    f"sfa_fixed={sfa_crps_fixed(np.reshape(obs, (1,)), norm_preds[None], 100*q[None]):0.7f}",
    f"(forecast_support=[{norm_preds.min():0.5f}, {norm_preds.max():0.5f}])"
)

>>>properscoring=1.0000000  sfa=0.0000000 sfa_fixed=0.9989995 (forecast_support=[-0.00000, 0.00000])

@dplarson?

@mattmotoki Thanks for bringing this up and the detailed comments. I think it's a valid issue (though fortunately seems to be more of an "edge case" than the CRPS being completely invalid) and I'll coordinate with the rest of the SFA team to get a PR to address the issue.

@dplarson Sure no problem. Thanks for the fast response. I agree, it is more of an edge case.
Thank you and everyone else for developing the SFA. It's well-made and I'm enjoying using it.

Hi @dplarson I was wondering if we can expect to see a fix by the start of the submission phase of the Solar Forecasting Prize Competition.
This is an edge case, but I think it's an important one. I'm worried that the current implementation of continuous_ranked_probability_score will not properly score submissions. If I'm not mistaken, forecasts that have obs not within the support (obs < min(fx) or obs > max(fx)) will have a better score than should be. Competitors can try to exploit this bug by submitting forecasts with smaller support. The extreme case is submitting a forecast with a single fx value repeated for all fx_prob. In this case, the current implementation will give a CRPS of 0 (a perfect score). I ran a test report to verify this.
If it helps, I can help contribute to the PR. Please let me know.

@mattmotoki thanks for checking in. I've been coordinating via email with other SFA team members (to validate the CRPS logic given how SFA treats the probabilistic forecasts), which took more time than we originally expected. But I'm now moving onto finishing the PR (aiming to be done today) so that the revised CRPS is deployed before the competition start.

Awesome, that's good to hear!

As an update: the revised CRPS calculation now successfully reproduces the three examples in this issue (i.e., SFA CRPS agrees with properscoring CRPS) and the other examples I've tested on. Now I should just need to make sure all the related unit tests pass (e.g., metrics.calculator tests).

Here's the (simplified) code to illustrate how the revised CRPS calculation performs on the three examples:
import numpy as np
import properscoring
from scipy.stats import norm
from solarforecastarbiter.metrics.probabilistic import continuous_ranked_probability_score

obs = 1
q = np.linspace(0, 1, 1000)[1:-1]

# Example 1 - Observation inside the support of the forecast (Properscoring and SFA Agree)
dist = norm(loc=obs, scale=0.1)
support = np.arange(0, 2, 0.001)
norm_prob = dist.cdf(support)
norm_preds = dist.ppf(q)

print(
    f"properscoring={properscoring.crps_quadrature(obs, dist):0.7f} ",
    f"sfa={continuous_ranked_probability_score(np.reshape(obs, (1,)), norm_preds[None], 100*q[None]):0.7f}",
    f"(forecast_support=[{norm_preds.min():0.5f}, {norm_preds.max():0.5f}])"
)

>>>properscoring=0.0233695  sfa=0.0233696 (forecast_support=[0.69101, 1.30899])

# Example 2 - Observation outside the support of the forecast (Properscoring and SFA Disagree)
dist = norm(loc=0, scale=0.1)
support = np.arange(-2, 1, 0.001)
norm_prob = dist.cdf(support)
norm_preds = dist.ppf(q)

print(
    f"properscoring={properscoring.crps_quadrature(obs, dist):0.7f} ",
    f"sfa={continuous_ranked_probability_score(np.reshape(obs, (1,)), norm_preds[None], 100*q[None]):0.7f}",
    f"(forecast_support=[{norm_preds.min():0.5f}, {norm_preds.max():0.5f}])"
)

>>>properscoring=0.9435810  sfa=0.9429405 (forecast_support=[-0.30899, 0.30899])

# Example 3 - Forecast support is small (SFA CRPS is near zero)
dist = norm(loc=0, scale=1e-10)
support = np.arange(-1, 1, 0.001)
norm_prob = dist.cdf(support)
norm_preds = dist.ppf(q)

print(
    f"properscoring={properscoring.crps_quadrature(obs, dist):0.7f} ",
    f"sfa={continuous_ranked_probability_score(np.reshape(obs, (1,)), norm_preds[None], 100*q[None]):0.7f}",
    f"(forecast_support=[{norm_preds.min():0.5f}, {norm_preds.max():0.5f}])"
)

>>>properscoring=1.0000000  sfa=0.9989995 (forecast_support=[-0.00000, 0.00000])


Meltdown on RSD processor

Hi,
I am the master student from Taiwan. I'm currently studying the issue about meltdown attack. Because RSD processor is an out of order processor, I would like to ask whether this processor has any safety concerns about meltdown?
Thank you very much!

Hi,
RSD does not have any mechanism specifically designed to protect against such attacks. However, I think that RSD in its default configuration is unlikely to be vulnerable to such attacks because it is a relatively small out-of-order processor and has low cache miss latency. If you want such attacks to work on RSD, I recommend that you experiment with some of the above parameters modified (e.g., increasing the size of the ROB and memory access latency).


Subtask 2: Implement dropdown menu logic and manage toaster - Backend

Implement the logic for selecting the dropdown menu and when the user selects a specific time show a toaster that this delayed time has been selected.
#184

Implemented the Backend Logic and build was successful.


Update how SourceProcessor is used to a two pass mode

Addresses #276
Signed-off-by: Scott M Stark<EMAIL_ADDRESS>

This looks sensible to me, as much as I can understand it, but I think @dstepanov is the best one to review.

I'm going to look at it soon

This looks like a big mishmash.
Do I understand correctly that the tests are supposed to fail on the first run and also generate some classes which we include on the second run?
I think it would be better just to unzip the sources jar and include it as a test source directory...

I have tried my solution but the annotation processor detects valid errors and breaks.

No, the tests should not even be run on the first pass because of this addition to the org.jboss.cdi.tck.AbstractTest:
    /**
     * Override the Arquillian IHookable method to skip invocation of the test during a two pass
     * run mode needed by implementations that use a SourceProcessor and annotation processing phase.
     * @param callback - testng callback to run test
     * @param testResult - test result object to pass to callback
     */
    @Override
    public void run(IHookCallBack callback, ITestResult testResult) {
        SourceProcessor.Phase phase = SourceProcessorSuite.currentPhase();
        if(phase != null && phase == SourceProcessor.Phase.PASS_TWO) {
            super.run(callback, testResult);
        } else {
            // Skip test run in PASS_ONE
        }
    }

Only the static archive creation method annotated with @ Deployment should be run on the first pass.

I think it would be better just to unzip the sources jar and include it as a test source directory...

This will not work in general because there is not a one to one mapping between a package and what is included in a test. An annotation processor will see more classes than are actually available in the test archive. Maybe tests need to be restructured to have a simple mapping between package and test archive.

I will investigate more why does it run tests for me

Looks like I made it work, at least for phase one.
The problem with the code above is that it doesn't work for the tests that are expecting the exception to be thrown:
org.testng.TestException:
Method SimpleBeanSpecializationTest.testProducerMethodOnSpecializedBeanNotCalled()[pri:0, instance:org.jboss.cdi.tck.tests.inheritance.specialization.simple.SimpleBeanSpecializationTest@53841544] should have thrown an exception of type class jakarta.enterprise.inject.UnsatisfiedResolutionException

I wasn't present on the initial discussion that lead to this SourceProcessor thing, but my opinion is that this approach is fragile and we should abandon it.
Everything related to compilation with annotation processing and then running the code can (AFAIK) and should (IMHO) be done entirely in an Arquillian adapter. The only thing the CDI TCK must do is provide the source code in the Archive instances returned by @Deployment methods, in addition to the compiled classes. And we do that now, I think?
The Arquillian adapter would then ignore the compiled classes in the Archive, take the sources, compile them as it wishes, and run the application. The application could be executed either in a separate classloader, or in an external JVM. Quarkus does the classloader thing, while all the adapters for Jakarta EE servers out there do the external process thing. (Thorntail also did the external process thing.) Both options entail an "interesting" set of troubles, and I understand it is a massive pain to implement an Arquillian adapter in general, but it's the only scalable solution we have.

Any integration at the Arquillian level simply does not work because it is based on the classes under test. Look for how to unit test an annotation processor and you will find frameworks that introduce access to the compiler api to test code fragments. Nothing does what we are trying to do.
I'll put this topic on the agenda for the next dev call. We probably should just drop the SourceProcessor notion and do as Denis suggested, just have annotation processor based impls unpack the source code, run their source processing phase, and then run the unit tests from that location.

I'm like 99% sure that Arquillian's ability to take the deployment archive, perform arbitrary modifications to it, send it over network to an application server, and then orchestrate test runs there, is more than enough to cover this situation. Of course, assuming that the deployment archive includes source code. An archive processor can ignore the compiled classes, unpack the sources, compile them in an arbitrary way, and add the compiled classes back to the archive.
Of course, I didn't really try doing this, it's all based on my understanding of Arquillian, so I may easily be wrong.

The problem is not all adaptors are actually using serialization of the test archive. Also, this is just really fighting how annotation processing works with existing java compilers. I'm now in favor of just making this a TCK runner configuration detail and removing all knowledge of annotation processing from the TCK helper classes.

I'd argue that all Arquillian adapters are essentially fighting how the target container is supposed to be used. Surprisingly, it often works. (When it doesn't, it's "fun", no doubt about that.)
Now, I'm no longer sure that the deployment archives the TCK tests produce include source code. If they don't, what I'm saying is of course nonsense.

@dstepanov see the latest update to this PR that allows exceptions generated during calls to the SourceProcessor to be seen during runs of the TCK in phase two. The only change you would need to make is this new code block as seen in the
org.jboss.cdi.tck.test.spi.container.MockContainer to your org.jboss.arquillian.container.spi.client.container.DeployableContainer implementation:
    @Override
    public ProtocolMetaData deploy(Archive<?> archive) throws DeploymentException {
        System.out.printf("MockContainer.deploy, %s\n", archive.getName());
        // Handle exceptions generated in the PHASE_ONE source processor run
        if(archive.contains(ArchiveBuilder.SP_EXCEPTION)) {
            Node exNode = archive.get(ArchiveBuilder.SP_EXCEPTION);
            ExceptionAsset exceptionAsset = (ExceptionAsset) exNode.getAsset();
            Exception ex = exceptionAsset.getSource();
            DeploymentException dex;
            if(ex instanceof DeploymentException) {
                dex = (DeploymentException) ex;
            } else {
                dex = new DeploymentException("SourceProcessor failure", ex);
            }
            throw dex;
        }
        // TODO, deployment classloader to validate generated classes?
        ShrinkWrapClassLoader classLoader = new ShrinkWrapClassLoader(archive.getClass().getClassLoader(), archive);
       ...
}

This PR should now be irrelevant since we chose a different approach - closing it.


Home Assistant Integration

Feature Parity with existing integration

[x] Solar production per microinverter /api/v1/production/inverters
[x] Lifetime, last 7 days, and today's energy production/consumption /api/v1/production

Feature parity with HACS custom integration

[ ] Encharge battery percent (total and per-battery) /ivp/ensemble/inventory or /ivp/ensemble/power
[ ] Battery Wh charged/discharged -/ivp/ensemble/inventory
[ ] Encharge battery capacity - /ivp/ensemble/inventory
[ ] Enpower Grid status /ivp/ensemble/inventory or /home.json

Additional Features (mostly for Ensemble systems)
From /ivp/ensemble/inventory

[x] Encharge/Enpower temperature sensors
[x] Encharge dc_switch_off (need to confirm, assuming this means the battery was switched off using the power switch on the battery)
[x] Encharge communicating binary sensor

From /ivp/ss/dry_contact_settings

type, grid_action, micro_grid_action, gen_action, override, mode, soc_low, soc_hight
-- supposedly this endpoint also accepts POST requests so we may be able to use number and select entities to update some of these values.

From /ivp/ensemble/dry_contacts

Open/Closed state of the 4 dry contact relays on the enpower system controller (for load shedding)
-- Supposedly supports POST for manually changing the state of the relays

Generator settings (Ensemble systems w/ generator capability) - /ivp/ss/gen_config (supposedly supports POST too)

Generator start method (auto/manual)
Warm up and cool down mins
Generator type (auto/manual/unknown)
max_cont_gen_amps
min_gen_loading_perc
max_Gen_efficiency_perc
Turn generator on/off or switch to auto - POST /ivp/ss/gen_mode
Generator schedule information /ivp/ss/gen_schedule

Power Export Limit Settings /ivp/ss/pel_settings

PEL enables
hard/soft PEL (not sure what the difference is)
export limit type

Mains/Grid relay state

mains_oper_state/mains_admin_state /ivp/ensemble/relay (supports POST)

Battery storage mode /admin/lib/tariff

Storage mode (self-consumption, full backup, etc)
Reserved SoC
Charge from grid binary sensor
Battery charging schedule
_Have not yet found an endpoint that allows changing the battery storage mode ☹ _

/ivp/ensemble/status has some additional aggregate data that could be useful:
'secctrl': {'ACB_agg_energy': 0,
             'ACB_agg_soc': 0,
             'ENC_agg_avail_energy': 10080,
             'ENC_agg_backup_energy': 10080,
             'ENC_agg_soc': 100,
             'Enc_commissioned_capacity': 10080,
             'Enc_max_available_capacity': 10080,
             'Max_energy': 10080,
             'adjusted_backup_soc': 100,
             'agg_soc': 100,
             'configured_backup_soc': 100,
             'freq_bias_hz': -1.3200000524520874,
             'freq_bias_hz_phaseb': 0.0,
             'freq_bias_hz_phasec': 0.0,
             'freq_bias_hz_q8': -2123,
             'freq_bias_hz_q8_phaseb': 0,
             'freq_bias_hz_q8_phasec': 0,
             'shutdown': False,
             'voltage_bias_v': -16.0,
             'voltage_bias_v_phaseb': 0.0,
             'voltage_bias_v_phasec': 0.0,
             'voltage_bias_v_q5': -512,
             'voltage_bias_v_q5_phaseb': 0,
             'voltage_bias_v_q5_phasec': 0}}


Attribute definition request for "X"

Attribute Prefix
Attributes start with "X"
Is for an entire prefix or partial implementation
Full
If partial, mention segment count
NA
Definition template
All the attribute definitions are maintained under definitions directory and here is the template
Template:
[
  {
    "display": "<Display Name>",
    "description": "<A very simple description, not going much technical>",
    "link": "<External link to get more details>",
    "propertyName": "<Underneath attribute name>",
    "valuetemplate": "<The template for the value>",
    "categories": ["<A list of categories this attribute can belong>"],
    "tags": "<A comma separated values for adding tags which is more internal for filter/search etc>",
    "controls": [<List of controls that is required to build the value>]
  }
]

Potentially closed.  Don't see any tags that start with the letter "X"


[Feature Request][NOWEB] - Implement chat.archive event and /archive /unarchive endpoints

[Feature Request][NOWEB] - Implement chat.archive event and /archive /unarchive endpoints
Right now there's a error when do both operations
tried remove, but no previous op

Related https://github.com/devlikeapro/waha/issues/434

https://waha.devlike.pro/docs/how-to/chats/#archive-chat