Refactored AsyncQueryForwardingServletTest to Reduce Code Duplication

Fixes Topics we discuss in Draft PR
Description
Refactored AsyncQueryForwardingServletTest to Reduce Code Duplication
In an effort to enhance code maintainability and readability, I have refactored the AsyncQueryForwardingServletTest class by introducing a new private method named getArgumentCaptor. This method centralizes the duplicated logic previously spread across six different test cases, reducing code repetition and improving test clarity.
getArgumentCaptor Like the following.
 private ArgumentCaptor<Exception> getArgumentCaptor(ServerConfig serverConfig,String errorMessage,boolean haverequest) throws IOException {
    ObjectMapper mockMapper = Mockito.mock(ObjectMapper.class);
    HttpServletResponse response = Mockito.mock(HttpServletResponse.class);
    ServletOutputStream outputStream = Mockito.mock(ServletOutputStream.class);
    Mockito.when(response.getOutputStream()).thenReturn(outputStream);
    final AsyncQueryForwardingServlet servlet = new AsyncQueryForwardingServlet(
            new MapQueryToolChestWarehouse(ImmutableMap.of()),
            mockMapper,
            TestHelper.makeSmileMapper(),
            null,
            null,
            null,
            new NoopServiceEmitter(),
            new NoopRequestLogger(),
            new DefaultGenericQueryMetricsFactory(),
            new AuthenticatorMapper(ImmutableMap.of()),
            new Properties(),
            serverConfig
    );
    Exception testException = new IllegalStateException(errorMessage);

    if(haverequest){
      HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
      Mockito.when(request.getAttribute(AuthConfig.DRUID_AUTHENTICATION_RESULT)).thenReturn(new AuthenticationResult("userA", "basic", "basic", null));
      IOException testException2 = new IOException(errorMessage);
      servlet.handleQueryParseException(request, response, mockMapper, testException2, false);
    }
    else {
      servlet.handleException(response, mockMapper, testException);
    }

    ArgumentCaptor<Exception> captor = ArgumentCaptor.forClass(Exception.class);
    Mockito.verify(mockMapper).writeValue(ArgumentMatchers.eq(outputStream), captor.capture());

    return captor;
  }

This way we only have to focus on whether or not the request was created.
Before calling this method, the test case looks like this.
 @Test
  public void testHandleQueryParseExceptionWithFilterDisabled() throws Exception
  {
    String errorMessage = "test exception message";
    ObjectMapper mockMapper = Mockito.mock(ObjectMapper.class);
    HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
    HttpServletResponse response = Mockito.mock(HttpServletResponse.class);
    ServletOutputStream outputStream = Mockito.mock(ServletOutputStream.class);
    Mockito.when(response.getOutputStream()).thenReturn(outputStream);
    final AsyncQueryForwardingServlet servlet = new AsyncQueryForwardingServlet(
        new MapQueryToolChestWarehouse(ImmutableMap.of()),
        mockMapper,
        TestHelper.makeSmileMapper(),
        null,
        null,
        null,
        new NoopServiceEmitter(),
        new NoopRequestLogger(),
        new DefaultGenericQueryMetricsFactory(),
        new AuthenticatorMapper(ImmutableMap.of()),
        new Properties(),
        new ServerConfig()
    );
    Mockito.when(request.getAttribute(AuthConfig.DRUID_AUTHENTICATION_RESULT)).thenReturn(new AuthenticationResult("userA", "basic", "basic", null));
    IOException testException = new IOException(errorMessage);
    servlet.handleQueryParseException(request, response, mockMapper, testException, false);
    ArgumentCaptor<Exception> captor = ArgumentCaptor.forClass(Exception.class);
    Mockito.verify(mockMapper).writeValue(ArgumentMatchers.eq(outputStream), captor.capture());
    Assert.assertTrue(captor.getValue() instanceof QueryException);
    Assert.assertEquals("Unknown exception", ((QueryException) captor.getValue()).getErrorCode());
    Assert.assertEquals(errorMessage, captor.getValue().getMessage());
    Assert.assertEquals(IOException.class.getName(), ((QueryException) captor.getValue()).getErrorClass());
  }

With modifications, the test looks like this.
  @Test
  public void testHandleQueryParseExceptionWithFilterDisabled() throws Exception
  {
    String errorMessage = "test exception message";
    boolean haveRequest=true;
    ServerConfig serverConfig= new ServerConfig();
    ArgumentCaptor<Exception> captor=getArgumentCaptor(serverConfig,errorMessage,haveRequest);
    Assert.assertTrue(captor.getValue() instanceof QueryException);
    Assert.assertEquals("Unknown exception", ((QueryException) captor.getValue()).getErrorCode());
    Assert.assertEquals(errorMessage, captor.getValue().getMessage());
    Assert.assertEquals(IOException.class.getName(), ((QueryException) captor.getValue()).getErrorClass());
  }

This change appears in six test cases, which can make each test case more concise and easy to read.

@kfaraz Thank you very much for the advice you gave earlier, I have created PR here. if you could start the process I would be very appreciative. Please feel free to let me know if there are any changes that need to be made.

@kfaraz Hi, I have changed to using lambda style, please review.

All looks good, left a couple of final comments to simplify further.

Thank you very much for your suggestion, I have revised it, please check it out.

@gzhao9 , left some suggestions for line breaks.
Also, please run the following on your local machine to ensure that there are no checkstyle issues. If there are, please address them.
mvn checkstyle:checkstyle

If all looks good, I will go ahead and merge the PR.

@gzhao9 , left some suggestions for line breaks. Also, please run the following on your local machine to ensure that there are no checkstyle issues. If there are, please address them.
mvn checkstyle:checkstyle

If all looks good, I will go ahead and merge the PR.

I I think it has passed the
mvn checkstyle:checkstyle

Please check it again. Thank you very much.

Congrats on getting your first commit in apache/druid, @gzhao9 !!


System.write doesnt work in wren.io/try

outputs nothing
outputs very stange
for good measure I tested on Firefox and Edge.
my guess is that it only outputs when presented with a newline

yea this is a stdout flush related thing. Good find, should be easy to fix.


Can't install on Google Colab

Hi! Please, how can DeepPipe be installed on Colab?
I tried pip install deeppipe_api but resulted in error. Thanks!
Collecting deeppipe_api
  Downloading deeppipe_api-0.1.1-py3-none-any.whl (51.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.3/51.3 MB 7.0 MB/s eta 0:00:00
Collecting gpytorch==1.4.2 (from deeppipe_api)
  Downloading gpytorch-1.4.2-py2.py3-none-any.whl (492 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 492.5/492.5 kB 46.8 MB/s eta 0:00:00
Collecting numpy==1.20.3 (from deeppipe_api)
  Downloading numpy-1.20.3.zip (7.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.8/7.8 MB 75.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting openml==0.12.2 (from deeppipe_api)
  Downloading openml-0.12.2.tar.gz (119 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 119.9/119.9 kB 13.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting pandas==1.2.4 (from deeppipe_api)
  Downloading pandas-1.2.4.tar.gz (5.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.5/5.5 MB 72.7 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting protobuf==3.17.3 (from deeppipe_api)
  Downloading protobuf-3.17.3-py2.py3-none-any.whl (173 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 173.9/173.9 kB 17.5 MB/s eta 0:00:00
Requirement already satisfied: scikit-learn==1.2.2 in /usr/local/lib/python3.10/dist-packages (from deeppipe_api) (1.2.2)
Collecting tensorboard==2.5.0 (from deeppipe_api)
  Downloading tensorboard-2.5.0-py3-none-any.whl (6.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.0/6.0 MB 123.7 MB/s eta 0:00:00
Collecting tensorly==0.7.0 (from deeppipe_api)
  Downloading tensorly-0.7.0-py3-none-any.whl (198 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 198.1/198.1 kB 22.4 MB/s eta 0:00:00
INFO: pip is looking at multiple versions of deeppipe-api to determine which version is compatible with other requirements. This could take a while.
Collecting deeppipe_api
  Downloading deeppipe_api-0.1.0-py3-none-any.whl (51.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.3/51.3 MB 6.9 MB/s eta 0:00:00
  Downloading deeppipe_api-0.0.14-py3-none-any.whl (51.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.3/51.3 MB 6.8 MB/s eta 0:00:00
  Downloading deeppipe_api-0.0.12-py3-none-any.whl (107 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 107.5/107.5 kB 13.1 MB/s eta 0:00:00
  Downloading deeppipe_api-0.0.11-py3-none-any.whl (107 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 107.5/107.5 kB 12.6 MB/s eta 0:00:00
  Downloading deeppipe_api-0.0.10-py3-none-any.whl (107 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 107.4/107.4 kB 13.9 MB/s eta 0:00:00
  Downloading deeppipe_api-0.0.9-py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.9/106.9 kB 15.1 MB/s eta 0:00:00
  Downloading deeppipe_api-0.0.8-py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.8/106.8 kB 14.8 MB/s eta 0:00:00
INFO: pip is looking at multiple versions of deeppipe-api to determine which version is compatible with other requirements. This could take a while.
  Downloading deeppipe_api-0.0.7-py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.8/106.8 kB 13.6 MB/s eta 0:00:00
  Downloading deeppipe_api-0.0.6-py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.5/96.5 kB 13.3 MB/s eta 0:00:00
  Downloading deeppipe_api-0.0.5-py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.5/96.5 kB 14.0 MB/s eta 0:00:00
  Downloading deeppipe_api-0.0.4-py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.3/96.3 kB 11.7 MB/s eta 0:00:00

ERROR: Cannot install deeppipe-api==0.0.10, deeppipe-api==0.0.11, deeppipe-api==0.0.12, deeppipe-api==0.0.14, deeppipe-api==0.0.4, deeppipe-api==0.0.5, deeppipe-api==0.0.6, deeppipe-api==0.0.7, deeppipe-api==0.0.8, deeppipe-api==0.0.9, deeppipe-api==0.1.0 and deeppipe-api==0.1.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    deeppipe-api 0.1.1 depends on torch==1.8.1
    deeppipe-api 0.1.0 depends on torch==1.8.1
    deeppipe-api 0.0.14 depends on torch==1.8.1
    deeppipe-api 0.0.12 depends on torch==1.8.1
    deeppipe-api 0.0.11 depends on torch==1.8.1
    deeppipe-api 0.0.10 depends on torch==1.8.1
    deeppipe-api 0.0.9 depends on torch==1.8.1
    deeppipe-api 0.0.8 depends on torch==1.8.1
    deeppipe-api 0.0.7 depends on torch==1.8.1
    deeppipe-api 0.0.6 depends on torch==1.8.1
    deeppipe-api 0.0.5 depends on torch==1.8.1
    deeppipe-api 0.0.4 depends on torch==1.8.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Hi!
Thanks for pointing this out! Indeed it happens because the package was developed and tested for python 3.9, whereas collab offers python 3.10. Relaxing the dependencies might ocassionally create unusual behaviour.
However, if you want to try it in collab on python 3.10, you still can do it! I created a collab notebook with an example that you and anyone else can test easily here. It already downloads the dependencies, the code base and necessary meta-data.
We welcome your interested and curiosity! Please let us know how it works for you.
Best,
Sebastian

Thank you, @sebastianpinedaar !


[Obsidian] search nog working. after entering search criteria and pressing enter, this error occurs

Extension
https://www.raycast.com/KevinBatdorf/obsidian
Description
Error:
Error: Cannot get default application for file at /Users/alex/Library/Mobile Documents/iCloud~md~obsidian/Documents/Alex vault/Projects/Teamcoach opleiding/Reflectieverslagen/Opleidingsdagen/Reflectieverslag TC06 - Coachen bij stagnerende en regressieve teams.md

Steps To Reproduce
Lastest version van Mac OS and Obsidian version 1.4.16 of raycast  version 1.61.2
I will get an error when I search in raycast for search note.
I enter search criteria in the search box and press enter
'something went wrong' is all I see.
Current Behaviour

Expected Behaviour
search results.

Opening a PR with a fix now. Thanks for reporting it.

Thnx, works like a charm now :-D


zindex proepry remove the element.

Hi,
I have issue with zIndex.
I have button that show some overlay for post.
When i click on share button i see the overlay button, but when i click on it again the element post is remove from the screen.
In found the zindex as the bug when i tried to remove this property and everything worked well without the zIndex.
The problem is that the overlay is behind the image

#8968 ?

yes

But there is no any fix for that?

Not yet, but there's a workaround:

in Android, reduce the height and borders to 0.
in iOS, return null

Don't try Android's solution for iOS, as it won't work. The same for iOS's solution in Android.


Question about using the plain gigaword dataset

I understand that you assume the use of annotated gigaword. but you also unparse the data in your preprocessing script. I wonder if I can use the 5th edition gigaword directly. Is there any gotcha's I need to watch for?

Since we do not actually use any annotations from the corpus, I don't anticipate any issue with using the 5th edition.

thanks! i will come back with a link to my forked repo once I get that to work

btw @supchop is the trained model posted anywhere? i am sure it will be useful for many people.

For those interested in using the plain 5th edition gigaword dataset (https://catalog.ldc.upenn.edu/LDC2011T07). you can try my commit here: https://github.com/falcondai/NAMAS/commit/15427a48b414ca71b0b5fa3b45174d080c2556ef
The modification I made:

I used NLTK word_tokenize to tokenize the text (which may result in different tokenization from the annotated gigaword)
I dropped article-title pairs that contains non-ASCII characters because it will cause errors in the tokenizer and it is known that gigaword contains some articles in non-English (Spanish). it would be better to remove these using the official list though.

After 20 epochs (default), I got similar validation perplexity (27.740008) as the number quoted in the paper, so i think these minor modifications do not affect the trained model significantly.

@falcondai Sorry for the late response. Unfortunately we are not able to post the trained model anywhere due to certain legal issues. Sorry.
Thanks for creating a fork which tokenizes the 5th edition of the gigaword dataset.

@supchop one followup to the legal issue posting trained models: can we, users of your repo, post our trained models (trained using some modified version of your code)? If that is okay, I am more than happy to post mine, especially after seeing some interest from other people here.

Yes. I believe you are free to post your trained model. There should not be
any problem with that. Thanks.
On Mon, Apr 25, 2016 at 10:30 PM, Falcon Dai<EMAIL_ADDRESS>wrote:

@supchop https://github.com/supchop one followup to the legal issue
posting trained models: can we, users of your repo, post our trained models
(trained using some modified version of your code)? If that is okay, I am
more than happy to post mine, especially after seeing some interest from
other people here.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/facebook/NAMAS/issues/6#issuecomment-214588724

here, posted: https://github.com/falcondai/trained-ABS-model


Fix postgres URI in README.md

This fixes a typo and uses the default postgres port number.

Thanks so much!


Don't apply blur for custom style

Because it removes bg, supports only light & dark styles and thus brakes semi-transparent custom background

Why is there a "revert" commit in the PR?

It was my investigation how to apply semi-transparency to blur. So I reverted my commit, not some from upstream


[Terminology] Should the Rendezvous Server be renamed to Mailbox Server in the documentation ?

Hi. If I understand correctly, the Rendezvous Server refers to the bonjour protocol. The Rendezvous was renamed Bonjour due to a law dispute. Therefore, should we rename it to Mailbox Server in the documentation ?
Other possibility: Zeroconf server

Your suggestion of "Zeroconf server" as a name lets me think that you are confusing things. "Rendezvous server" is just a technical term and thus not subject to any trademark rights.
At the moment, the documentation indeed uses both "rendezvous" and "mailbox" server (and sometimes even "relay server", which is plain wrong), we should choose one and only use that.

Rendezvous is most often used to designate this specific protocol. It’s not about trademarks, it’s about making it clear.

Right, so the Rendezvous term does not relate to the Bonjour protocol. As @afranke points out, this could be confused with the latter.
May I suggest the term "Junction server" or "Central server" ?

I started using "mailbox server" and "mailbox protocol" because:

1: While it does help the clients "rendezvous" with each other, it has nothing to do with Apple's Rendezvous / Bonjour protocol (wormhole uses "rendezvous" as a common noun, not a proper noun), and given how widely known the Rendezvous/Bonjour names are, it was causing confusion. Also, #48 is about using the actual Rendezvous/Bonjour technologies to locate/augment/supplant the wormhole Mailbox server, and it would become doubly confusing to have to say things like "we sometimes use Rendezvous to reach the rendezvous server"
2: While it does help clients "relay" encrypted messages with each other, it is only providing the low-rate store-and-forward portion of the protocol (the PAKE setup phase, and the PAKE-encrypted payload exchange), not the high-rate bulk-transfer portion. That high-rate portion either goes directly from one client to the other (if one of them has a public address, or we figure out NAT hole punching), or through a different sort of relay, the "transit relay". I stopped talking about the mailbox server being a "relay" so I could reserve that word for the high-rate transit relay.

I'm pretty happy with "mailbox server" / "mailbox protocol" for the low-rate store-and-forward thing, and "transit relay" for the helper that is sometimes used on the high-rate bulk-transfer protocol.
So yeah, I think we should try to consolidate on "Mailbox Server" in the documentation.
One complication is the CLI arguments. Currently wormhole help says:
Options:
  --appid APPID                   appid to use
  --relay-url URL                 rendezvous relay to use
  --transit-helper tcp:HOST:PORT  transit relay to use

The description field is trivial to update, but --relay-url would need to become something like --mailbox-url or --mailbox-server-url. Maybe we could continue to accept --relay-url as a non-documented backwards-compatibility thing.

Thank you for the extensive clarification.

"mailbox server" / "mailbox protocol"

I was slightly surprised to see mailbox. Non-native speaker here, but I find the reference to "mail" confusing :  perhaps consider a more generic "inbox server"/"inbox protocol" ?
The nice thing with "rendezvous server" is that it is self understandable and defines directly what it does, hence my suggestions in the first post. Here is a list of candidates you might like :
Junction server, Central server, Link server, Pairing Server, Intermediation server, Authentication server, Exchange server (this one goes nicely with PAKE), Inbox server
Just some thoughts !

and it would become doubly confusing to have to say things like "we sometimes use Rendezvous to reach the rendezvous server"

I think the name "Rendezvous" is outdated anyways. Apple renamed it to "Bonjour" some time ago, and the generic name one should use for this is "ZeroConf"


Exercises 00 - #4: manual_seed called only once?

In this section it says that we have to reset the seed every time a new rand() is called. However it is not the case in the solution of exercise 4. How come? Is it correct?

I was baffled about this also. In the video i had impression like that was important to use manual_seed everytime.
But in reality setting it every time is pointless, because we would get everytime the same tensor when calling torch.rand:

But when we do it only once, we stil have reproducible results. but every new tensor is different :)

Ok thanks! Not clear indeed in the doc...


Cron Job not firing

Hello -
I'm testing using your default docker config
docker run -d
--restart=always
--name vaultwarden_backup
--volumes-from=vaultwarden
--mount type=volume,source=vaultwarden-rclone-data,target=/config/
-e DATA_DIR="/data"
ttionya/vaultwarden-backup:latest
Not running on an arm processor.
Running a Synology DS1019+
I've added the environmental variable for my time zone (America/Chicago) and tried changing the cron values - but when I watch the logs it never even attempts to fire.
It starts up just fine - just never actually fires the backup job.
When I run the manual back up job -
docker run
--rm
--name vaultwarden_backup
--volumes-from=vaultwarden
--mount type=volume,source=vaultwarden-rclone-data,target=/config/
-e DATA_DIR="/data"
ttionya/vaultwarden-backup:latest backup
I get an immediate result - things look good.
Obviously I'd prefer to keep the container running and have the backup kick off on its normal schedule.
Any idea what I can look for? Kind of a newbie at this.
PS - I'm stuck with the manual job - I can schedule this using synologys task scheduler (have tested, as long as I run as root it works) however - where would I pass in environmental variables? I wouldnt want to be stuck with the defaults.

You are the first person to report that cron is not working on the x86 machine, and I am not sure what exactly happened. Could you please help to confirm if the correct time can be obtained in the container?
docker exec -it vaultwarden_backup bash

# Please run the `date` command multiple times inside the container to obtain the current time.
date
date
date

If it is indeed impossible to obtain the correct time, please refer to this guide, which mentions x86 containers and may be able to help you.
Looking forward to your test results.

the date reports correct each and every time.

Here's image of the putty session and the advanced settings.
I intentially have the cron job set to fire every 5 minutes for test purposes - but it has not fired no matter what I put in there.
The only time it fires is when I run manually.
Here's the log - no errors shown but it never updates at the cron job time either

I can't explain why - but now it appears to be running - at 5 minutes after the hour every hour.
I guess that's ok - but did I somehow not put in the Cron values correctly?

How do you recreate the container after stopping it? Do you have to delete it and start over?
Also - the date keeps jumping ahead a day - cant seem to keep it consistant

How do you recreate the container after stopping it? Do you have to delete it and start over?
docker run -d
--restart=always
--name vaultwarden_backup
--volumes-from=vaultwarden
--mount type=volume,source=vaultwarden-rclone-data,target=/config/
-e DATA_DIR="/data"
ttionya/vaultwarden-backup:latest

If you are using docker-compose, you should run docker-compose down and then execute docker-compose up -d again.
If you are running it this way, make sure to clean up any previous containers each time you start up.
If the issue cannot be resolved, please set the CRON environment variable and enter the container to print the value of CRON (echo ${CRON}).

Also - the date keeps jumping ahead a day - cant seem to keep it consistant

Sorry, I didn't quite understand the meaning you were trying to convey.


Provide callback mechanism when calls are made

I would like to see a global call back mechanism to monitor calls to mocks and possibly even modify the behavior.
One use for this would be for logging. In complex cases where the SUT is interacting with multiple mocks it is helpful to debug to see what parameters were passed to the mock and what the mock is returning via logging.
It would also provide a way to handle my request in #20
As I see it at the minimum such a callback interface could look like:
    interface MockCallback {
        fun called(scope: FunctionScope, result: Result<Any>) : Result<Any>
        suspend fun calledSuspend(scope: FunctionScope, result: Result<Any>) : Result<Any> = called(scope, result)
    }

This lets you:

know when a mock is called and can log it
override the return value
add additional behavior such as blocking the return from the function

So it's more of an interceptor mechanism.
Technically, implementing the ability to intercept mock calls is not very complicated on its own. However, doing it in the right place can be challenging and requires careful consideration.
The bigger issue is registering that interceptor globally in tests, because there's no single entry point for doing this in Kotlin Multiplatform. In JVM projects, ServiceLoaders are available and sufficient, but for other targets, it's not as straightforward. There are some tricks, like using the EagerInitialization annotation, but it's marked as deprecated. On the other hand, Ktor uses this trick, so maybe it won't be removed without a replacement.
In general, I should be able to implement intercepting on its own, but initial release might not contain global registering.

Added in 2.5.0


StarBoss demo doesn't work in Firefox

Reference link: https://docs.colyseus.io/colyseus/demo/starboss
Comments: Works in Edge.
Errors:

Hey @rpaladin, which web server are you serving the Unity WebGL export from? Also, which version of Unity are you using?
This forum thread points out this error could be the server not sending the correct headers.

"...I think this problem is more a webhost/CDN issue than a Unity Issue"

Cheers!

I have no idea. I'm not hosting the demo with any localhost - I'm using the demo link at the Colyseus documentation-demos page. Host and software details should be on your team's end, I believe. 🙂

Oh, interesting - that's happening on our live demo. Thanks for sharing and letting us know!


Fullscreen on landsacpe

It would be nice if the player could automatically switch to fullscreen mode when the device is currently in (or when being rotated to) landscape mode.

Thanks for the feedback, I'll look at how each platform handles those rotations and see how I can improve it. Also, please feel free to contribute if this is functionality ya need more immediately! Might be a week or two before I can look at this.

Thank you for the quick response. I already tried to dig into your code (and the video_player plugin) to see how to possibly add that functionality myself but I doubt I am able to do this right now as I am very new to dart/flutter and have never touched java/swift code. But hey maybe with some guidance I might come up with a PR. Let me know if you have an idea how it could be done and I give it a try.

My initial thought was to use an OrientationBuilder and tell the VideoPlayerController or Chewie to go fullscreen. But that does not seem to be possible.

Yah, OrientationBuilder might not quite work for this one. We might need to use something a bit different, such as a WidgetsBindingObserver + didChangeMetrics function, e.g. https://docs.flutter.io/flutter/widgets/WidgetsBindingObserver/didChangeMetrics.html
And yep, by looking at the platforms, I mean studying how iOS handles rotations with video to make sure the behavior "feels natural" for iOS users as well.

@brianegan any news on this?

Heya @cbenhagen -- I gave it a shot but my initial attempt didn't quite work out the way I was hoping. I'll try a couple more ideas this week.

Quickly adding to this conversation that I managed to integrate fullscreen on landscape and leave fullscreen on portrait with a simple Orientation check and some more. I will push it when I have time but here is a little example: https://github.com/bostrot/chewie/blob/master/lib/src/custom_chewie_player.dart

@bostrot Thank you very much! Do you mind adding a pull request on chewie? I think it would be nicer to only have one video player plugin. Maybe you can help @brianegan maintaining? --> https://github.com/brianegan/chewie/issues/39

I'm currently looking into how to make this work via a MethodChannel in iOS so that it will go to landscape in both iOS and Android. It is a requirement for the app I'm working on. If I can get something working (feeling like it is close) I'd be happy to contribute it back.
It may require adding an iOS folder to the plugin though for the MethodChannel implementation (which is where I'm getting stuck at the moment).

Just an update on the above - I ended up doing everything in our app code instead of modifying the plugin - setting up the MethodChannel code and changing orientation in response to the event fired when the app goes fullscreen. The plugin doesn't currently have an iOS folder for adding the MethodChannel code currently. I do believe in general, what I did could live in the plugin instead, but I ran out of time to get it implemented there.

Are there any updates on this?

Is there any updates on iOS landscape when it's in fullscreen did anybody done workaround for that kindly Suggest here.

@Milansu @shangarivivek  I was able to achieve fullscreen on iOS by adding these line to Info.plist
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>

@abilkhaiyr I tried like this,Video player landscape will work in this case,But I want remaining screen to appear only in portrait alone.Is it possible? Please suggest if any.

After several days of messing I was able to reproduce the behavior of YouTube app without modifications to plugin's code:

toggle fullscreen on device rotation (unless locked),
toggle orientation when fullscreen button is pressed.

https://gist.github.com/ihrankouski/0a353a8de649b648b3ceff0d8e97f1d7
Requires other plugin to make Flutter render widgets in specific orientation without locking it: after doing SystemChrome.setPreferredOrientations([..]) I was unable to detect device rotation any more.
Only tested on iOS; at least (1) should not work on Android because of https://github.com/brianegan/chewie/blob/master/lib/src/chewie_player.dart#L131.
I'm a newbie in Flutter so would appreciate any feedback.

Any updates on this issue

Any update for now?


Refactor client.py

Minor changes to imporove readability

@genesluder I have added explanations for each particular change in the PR

Thanks!


added google drive upload capabilities, removed unneeded functions

Overview
Connects ABR with Google Drive.
Test Plan

Changelog
Added modules for google_sheet writing and google_drive uploading
Changed ABR data uploading to check google_sheet for run ids rather than the local csv
Moved ABR files out of hardware testing
Review requests

Risk assessment
ignoring typing errors in google_drive_tool due to issues with google-api-client-typing
ignoring import errors with hardware_testing due to conflicting dependencies with google-api-client-typing

This is actually super cool


Typing Errors on the "new Square(10, 3).width page

Issue Type: Bug
In the readme file of the release notes for update 1.32.1, there are two typos in the spelling of "width ->
widht" is what you have on the dialog box. It is on the "newSquare(10, 3) in the dialog box that is shown on the page.
VS Code version: Code 1.32.1 (05f146c7a8f7f78e80261aa3b2a2e642586f9eb3, 2019-03-08T00:51:49.278Z)
OS version: Windows_NT x64 10.0.17134

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz (4 x 2295)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: enabledsurface_synchronization: enabled_onvideo_decode: enabledwebgl: enabledwebgl2: enabled

Memory (System)
5.92GB (2.06GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions: none

Hi @ManfordDSR The mispelling is intentional in the screenshot to show that of the two possible fixes (correct the spelling or add a new property "widht"), the spelling fix is the "preferred" code action and listed first.


Static assets missing in repo?

Hi!
I'm a Blazor newbie so forgive me if I'm missing something obvious.
I forked the repo and checked out the demo. I had to copy the /lib/ folder from the nuget package to get it to work in order to get a hold of the mermaid.min.js file.
Doing so made it work, but I got two diagrams rendered.
Am I missing something here?

You're not missing anything. It was just poor planning on my part. 😬
The MermaidJS.Blazor project relies on libman to manage the static assets at design time. In hindsight, I should have added this as a pre-build step in the project, but what you'll need to do for now is:
Ensure libman is installed:
dotnet tool install -g Microsoft.Web.LibraryManager.Cli

Run libman restore from the src/MermaidJS.Blazor directory to pull down the library:
libman restore


SMPP Server hangs when receiving more than 1 millions messages

Hello,
I am using cloudhopper to implement an smpp server. However whenever I send 1 million messages from one client to the server it hangs and prevents any other binding and submit_sm.
Can someone help?

Closed waiting for example.


Buttons of the HmIP-BSM are not useable as a trigger

DONT'T DELETE THIS.
Please answer all questions as good as possible.
Make sure you have read the documentation at https://github.com/danielperna84/custom_homematic#custom_homematic.
Make sure you are running the latest version of hahomematic or it's custom_component (and Home Assistant) before reporting an issue.
custom_component/hahomematic version (if applicable):
1.1.4
Home Assistant version (if applicable):
2022.4.7
CCU version:

CCU3
RaspberryMatic
Version: <IP_ADDRESS>20330 (rpi3)

Describe the bug
You can´t use a HmIP-BSM device as a trigger in automations.
To Reproduce
Steps to reproduce the behavior:

Go to Settings > Automations & Scenes > Automations
Create new, empty automation
Select "device" as Trigger
When you select a HmIP-BSM device, you can´t select a trigger.

Screenshots (if applicable)
Selected a HmIP-BSM device:

Selected a HmIP-BDT, HMIP-WRC2 or HmIP-BRC2 device:

Expected behavior
I would expect the same behavior like the other divces with buttons, that I can use/select for example "Taster "1" wurde nach langem Tastendruck los gelassen" as a trigger.
Log-Entry
2022-04-26 12:17:37 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140480635912880] Error handling message: Unknown error (unknown_error) Traceback (most recent call last):   File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response     await func(hass, connection, msg)   File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 292, in with_error_handling     await func(hass, connection, msg)   File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 351, in websocket_device_automation_list_triggers     await async_get_device_automations(   File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 224, in async_get_device_automations     for domain_results in await asyncio.gather(   File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 182, in _async_get_device_automations_from_domain     return await asyncio.gather(   File "/config/custom_components/homematicip_local/device_trigger.py", line 64, in async_get_triggers     control_unit: ControlUnit = hass.data[DOMAIN][entry_id] KeyError: '361ac085b0b9187a8a29ff090a17389c'
Diagnostic Information
config_entry-homematicip_local-fda5bb615969b461658aaf796fc25e43.json.txt

Are you sure that there are no log in HA (click on Full log)?

Better.
Next, add diagnostic Information: "Diagnoseinformationen herunterladen" on the device.

Do you use Switch as X for HmIP-BSM?

Yes

The issue is related to new Switch as X feature.
This will be fixed in 1.2.0.
Thanks for reporting an issue.

1.2.0 is released

1.2.0 solved the problem. Everything is fine now. So you can close this issue. Thanks for your help and the good work!!!


Add config option to automatically generate definitions as interfaces (maybe)

Core CUE generators - like OpenAPI - generally rely on whether a field is a definition or not to decide whether to generate it as a top-level type. Cuetsy has, thus far, decided to go the attribute-driven approach.
There are pros and cons to each approach, but recently i've been noticing that when a given schema is targeted for multiple output languages (as it is in Grafana, TS and Go), having a divergence in how this works can make for some toil and potential for inconsistency.
In general i still want to keep cuetsy attribute-centric, but it does make sense to me that we might add a configurable mode where visited definition fields are treated as being @cuetsy(kind="interface"). (Or, if we're allowing configurability, maybe we allow the default to be either interface or alias 🤷 )
Not actually sure if this is a good idea, but getting it written down in any case.

this becomes really a problem when we want to ask external developers to write schemas for, for example, Plugins.
This stays uncategorised until we decide to pick it up.
Downside of waiting too long is the fact that a bunch of schema will need  re-writing to be sure they comply with the standard way of declaring that something should be part of the interface


Is it possiable using png for decode emoji png?

I am having an issue using swash with WebRender glyph rasterizer. The swash-demo works just fine. So I guess it's that webrender using different gl shader when rendering font glyphs.
Without any changes to swash this is output of emojis using wr_glyph_rasterizer

My fork using png crate's decode

Agreed on this count. swash shouldn't try to re-invent the wheel.

Also resizing the emoji pngs is not necessary in my case. wr_glyph_rasterizer just need to know the scale of the Image


fix false regex on complex types

fix bug in the of complex type matching. add tests.
** (CaseClauseError) no case clause matching: ["complex_another_list.first.dbid": '1', "complex_another_list.first.id": '100']
    (conform) lib/conform/translate.ex:305: Conform.Translate.get_in_complex/3
    (conform) lib/conform/translate.ex:218: anonymous fn/3 in Conform.Translate.get_complex/3
     (elixir) lib/enum.ex:1043: anonymous fn/3 in Enum.map/2
     (elixir) lib/enum.ex:1385: Enum."-reduce/3-lists^foldl/2-0-"/3
     (elixir) lib/enum.ex:1043: Enum.map/2
    (conform) lib/conform/translate.ex:211: anonymous fn/5 in Conform.Translate.get_complex/3
     (elixir) lib/enum.ex:1043: anonymous fn/3 in Enum.map/2
     (elixir) lib/enum.ex:1385: Enum."-reduce/3-lists^foldl/2-0-"/3

@umatomba I'm actually almost done with completely rewriting how the translate from conf -> config is done. I'm going to hold off on merging this for the moment, but I'll leave it open until I merge my changes.

@bitwalker ok

@bitwalker please merge the test part of this commit after your changes will be added

@umatomba Definitely :)

This is fixed in 1.0.0-rc*.


if i want to running hypervisor in the hyper-v virtual machine , i should to do what

Assuming I read this right, you would need to turn on nested virtualization to get Bareflank to run in Hyper-V. To do that, you should ask Microsoft.


Propose API changes

Test failures are genuine, :+1: on fix

Test failures are genuine, 👍 on fix

sure, working on it right now :)

not sure why CI / Scala 2.12.10, Java<EMAIL_ADDRESS>(pull_request) is failing at formatting stage

the failing test org.http4s.client.asynchttpclient.AsyncHttpClientSpec passes locally (using xcompilation +testOnly)

from the formatting job. PrometheusServerMetricsSpec.scala isn't formatted properly!
try using sbt scalafmtAll

ah, i was only doing scalafmt

guys is this going to be merged? or should i do something?

Heh, no worries I understand. I wonder if maybe Middleware could follow
their own lifecycles. Thinking about extracting this into a 3rd party
module for faster improvements. Any thoughts on that?
On Sat, Apr 18, 2020, 19:00 Ross A. Baker<EMAIL_ADDRESS>wrote:

Merged #3271 https://github.com/http4s/http4s/pull/3271 into master.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/http4s/http4s/pull/3271#event-3248044163, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAYMHW3QMVO6EC5XZSQWU3RNHMDXANCNFSM4LSXU6QA
.

We've discussed splitting the repo up along module boundaries, but I haven't considered going all the way to the middleware level.  I'm also aggressively backporting whatever is compatible, but that doesn't help you on this one.
I'd like to start publishing milestones off master for users who can accomodate more churn, which might scratch your itch.  Otherwise, a third-party module for the 0.21 lifecycle is probably the fastest way to start using this.


Added more songs in Openings & OST

Made some additions as per #195
This PR is for [Re:Zero Kara Hajimeru Isekai Seikatsu, Bleach, Detective Conan, One Piece, Inazuma Eleven, Death Note].

[x] This issue is for enhancement/bug fixing.
[x] This issue is an addition to JSON database.

[x] Pull Request Title is of form Added [Re:Zero Kara Hajimeru Isekai Seikatsu, Bleach, Detective Conan, One Piece, Inazuma Eleven, Death Note].

[ ] This addition is already on ongaku.

[ ] This PR is an improvement to current addition.

[x] I have checked my addition locally and it is working and won't break existing entries.
[x] I have gone through Contribution Guidelines.
[ ] This pull request will be closed if I failed to update it even once in a week.

Added more Opening & OST, fixed some bugs.

Sorry for closing the pull request by mistake. My branch has passed all the tests. Please merge it with master branch.

Thanks, @saideepd for the PR.
I'll merge once reviewed. 😄

I am seeing that you're using dropbox links, are you sure the links will stay in place?

Yes. I have hosted them on my personal Dropbox account. And I don't use Dropbox a lot, so I won't be deleting them.

Alright then, I'll merge after you make requested changes. 😄

I have made changes as requested. Please review it now.

@anshumanv Thanks for merging the PR bro 👍

Thanks for the PR @saideepd, you can continue to add more if you wish. 😄

Sure 👍 @anshumanv


add docments to 32_text.models.awdlstm notebook

closes #22

@arampacha - Very nicely done. Made a style suggestion.


C405 fixer causes E231

foo.py:
SKIP = set(('interfaces/restart/auto',))
ruff --fix foo.py causes:
SKIP = {'interfaces/restart/auto',}
which is detected as E231 by flake8:
foo.py:1:34: E231 missing whitespace after ','

I was initially gonna say we shouldn't fix this, but I guess it's like, the specific case of a tuple with a trailing comma (to signify a tuple) that isn't a "magic trailing comma" (from Black's perspective).


[fix] Locale independent model load/save

Hello,
Issue
With the revert of its PR, this issue became again a concern in Java: https://github.com/microsoft/LightGBM/issues/2890.
At the moment LightGBM uses strtod() and C++ streams to read/write floating point the model file numbers.
The issue is that Java breaks the initialization to the standard "C" locale (see https://github.com/microsoft/LightGBM/pull/2891). Current evidence shows this is true for Java providers that use the C API through SWIG (I suspect MMLSpark's LightGBM might be affected by this too), and even for users of the LightGBM Python API that have their code wrapped by JEP.
For production scenarios ensuring the correctness of scores is of paramount importance and right now there are none for LGBM providers that use Java (see issue above).
Request for Change
After assessing alternatives, and seeing that the last fix was reverted, the robust solution would be to change the model read/write of floating numbers through use of process-locale-independent methods.
Implementation proposal
Replace floating point read/writes in model save/load with calls to C++ streams (we already use them anyway for some parameters). We imbue such streams with the "C" locale, to force the same locale for reads and writes. This fixes our bug.
It might be slightly slower to read/write the model but it will be correct everytime independently of process locale settings.
According to the benchmark https://tinodidriksen.com/2011/05/cpp-convert-string-to-double-speed/ it would result in a ~3x slower floating-point conversion (reusing streams). I doubt it's actually 3x slower (see tricks to make it faster http://cplusplus.bordoon.com/speeding_up_string_conversions.html). Besides, we're already using streams for some numbers, thus the model read/write slowdown wouldn't reach that value.
Is that an issue?
Can I get your thoughts on this? Good, bad? Secondary effects I might be missing? Would such PR be welcome? @guolinke @StrikerRUS @imatiach-msft  et al.
Thank you!
Not enough? Future - Alternative libraries
In the future, if needed we can upgrade to use different libraries like Boost.Spirit or David M. Gay's library which is more accurate than glibc (current implementation). If we do so, we can have rounding differences (that in principle are small).
Side note on floating-point conversion precision and David Gay's library
GCC uses glibc to compile LightGBM, and according to these links:

https://www.exploringbinary.com/how-glibc-strtod-works/
https://www.exploringbinary.com/how-strtod-works-and-sometimes-doesnt/

Converting decimal strings to doubles correctly and efficiently is a surprisingly complex task; fortunately, David M. Gay did this for us when he wrote this paper and released this code over 20 years ago. (He maintains this reference copy of strtod() to this day.) His code appears in many places, including in the Python, PHP, and Java programming languages, and in the Firefox, Chrome, and Safari Web browsers.

Many programming environments implement their string to double conversions with David Gay’s strtod(); glibc, the GNU C Library, does not.

David Gay's implementation https://www.ampl.com/netlib/fp/dtoa.c of to/from string/floating point conversion is even more accurate than we're using now. It is a single file that can be compiled and configured through preprocessor flags, in our case to ignore locale processing altogether (resulting in the "C" locale behaviour for reads and writes).

Speaking about float2str conversion in saving models, XGBoost recently adopted Ryū algorithm (https://github.com/dmlc/xgboost/pull/5772) and numpy uses Dragon4 algorithm (https://github.com/numpy/numpy/pull/9941).

Before I commit to working on this, can someone help me direct me to the files where load/save model files code is found?
Searching for the code... (read only if at a loss)
The fix we had posted in the past https://github.com/microsoft/LightGBM/pull/2891/files required changes in: LGBM_BoosterCreateFromModelfile, LGBM_BoosterSaveModel, LGBM_BoosterSaveModelToString and LGBM_BoosterDumpModel in the C API.
This new implementations will need to change the core code, which means fixes must be done in the functions called therein, namely, Booster::Booster (constructor), Booster::SaveModelToFile, Booster::SaveModelToString and Booster::DumpModel.
Reading model files seems to be implemented in:
boosting_->LoadModelFromString(model_str, len) which leads me to GBDT::LoadModelFromString in gbdt_model_text.cpp.
In turn, that uses both ArrayToString and ArrayToStringFast (don't know why we have and use both to save the model - legacy?). In turn Common::DoubleToStr, which uses snprintf (which is not locale-independent) is used.
Conclusion and questions
I got lost on the virtual function pointers, though, I was expecting to see DART and others implement model read/write.
Can I thus assume model text file read/writes are implemented in gbdt_model_text.cpp's:

methods alone?

If I change that file and the required methods in Common like DoubleToStr, everything should work?
 (I can always leave it alone and make a new method)
What about DART, and other boosting modes, all of them still use gbdt_model_text.cpp to implement read and writes?

Thank you so much :)

Gently ping @guolinke for two questions above about the code location.

sorry for missing this thread...
@AlbertoEAF

I remember ArrayToStringFast is only for integer. So for model_to_string, changing DoubleToStr should be enough. For for the string_to_model, there are several functions. like https://github.com/microsoft/LightGBM/blob/adfc9f5c61ad3d11b9768ed0b9104297434ce822/include/LightGBM/utils/common.h#L513-L518 and https://github.com/microsoft/LightGBM/blob/adfc9f5c61ad3d11b9768ed0b9104297434ce822/include/LightGBM/utils/common.h#L566-L574

yeah, all models share the same model input/output codes.

Thanks so much! I will start working on it ;)

By the way @StrikerRUS , regarding such libraries, I think I'll go with Ryü, I've been reading up a bit on it. Both came up after David Gay's implementations and Ryü came after Dragon4. Dragon4 has a fallback algorithm for some numbers which is slower.
I also saw even faster implementations but I don't want to get too close to the edge as this is supposed to be stable.
I was thinking of using this C++ implementation of Ryü https://github.com/expnkx/fast_io as it provides a single-header to include but it requires C++20 when LGBM is only C++11.
This leaves only the original implementation with C interface: https://github.com/ulfjack/ryu. I hope it's easy to add to our build chain, still will have to figure that one out.

@AlbertoEAF BTW, is that possible to have the two-stage solution? like, have a script to locale/de-locale the model?
LightGBM itself could read/write always by current format.
But when users want to read the content of model file, we can locale it.

Hello @guolinke , I'm not sure what you mean. Why would we want to transform the model content to different locales?
It's cleaner to have it store and load always with the same format, we don't need models in different locales.
Also, I believe it would be even trickier as you would have to know precisely the locale with which the model was written to read it correctly, which can be tricky to know in some corner cases.
Finally, as LightGBM itself does not allow "changing locale" during its execution, we would have to create an external tool, and that tool would need to parse the model file structure to read it and then rewrite it with exactly the same structure - lots of code duplication and complexity.

@AlbertoEAF I misunderstood the locale problem.
you are right, the model should be locale-independent.

By the way, maybe there were changes meanwhile because in the v3.0.0 code ArrayToStringFast and ArrayToString both operate on doubles. ArrayToString only operates on doubles, but ArrayToStringFast is a template that processes arrays of any type. I believe there's no reason to have both anymore.
Second point, instead of using Ryu, I was thinking of using fmt https://fmt.dev/latest/index.html, for its integration is much easier, and still 10x faster than the standard libraries (current state). Besides being the foundation to C++20's new format standard library, it is also very well maintained, uses only C++11 features and it has explicit support for gcc 4.8  (https://fmt.dev/latest/index.html). What do you think? Also it seems much easier to use than Ryu.
If I'm mistaken please correct me! :)

Wow, I replaced threshold, leaf_value and leaf_weight's ArrayToString calls by ArrayToStringFast in src/io/tree.cpp's Tree::ToString() and had surprising results. To test I read a reference model file and wrote it back (left=v3.0.0 code, right=modified code):

Whilst ArrayToStringFast produces numbers with less precision which saves space, the tree sizes also changed. Why is that?!

@AlbertoEAF I'm totally OK with using fmt library! It looks quite popular based on number of GitHub stars and we can use it as a git submodule (like boosts' compute).

Hah, just noticed that treelite project is using fmt library. And treelite in turn is used in rapidsai's project for tree models:
https://github.com/dmlc/treelite/blob/1c495c52a6dff8413f1b66f2f0ecc4e390473c5e/cmake/ExternalLibs.cmake#L10-L14
https://github.com/rapidsai/cuml

Yeah @StrikerRUS , even integer to string conversions might benefit from it, not only floating point conversions with shortest representation. LightGBM already has a custom Atoi function built to improve performance I believe, but it seems not even that will beat this:

http://www.zverovich.net/2020/06/13/fast-int-to-string-revisited.html

@guolinke @StrikerRUS I've hit some issue with the LightGBM model (same as the one above with the image) which I don't understand and really need your help. Any ideas of what might be causing this are greatly appreciated!
Issue
When I switch the call that turns floating point parameters to strings in the model write, I get numbers which have sometimes a redundant trailing 0 in the scientific notation which shouldn't matter - just posted a bug at fmtlib: https://github.com/fmtlib/fmt/issues/1873. See it to understand what I mean.
The big issue though is that for each of the two trees where one parameter changed, that tree_size in the model grew by +1 as well! Any ideas?!
Diffs in the output models files produced by LightGBM. Each image reports the line difference with the "unpatched"/normal LightGBM code (in red) and with the patch (in green), followed by the differences in items from such lines also in red/green:

In this case the model written with the patched code results in two trees where one parameter as a trailing 0, which results in this tree size changes:

and that's what I don't understand. Why do the tree sizes change because of the written floating point parameters?
Source code references
If you want to take a look at the difference in the code that led to this issue reported here and in  https://github.com/fmtlib/fmt/issues/1873, the code change is this one: https://github.com/feedzai/LightGBM/pull/2/commits/da3d8f2397d87fcb784c854564a830763a24048d.
The images above were generated with the two commits:

red: The "base" code which works exactly like LightGBM v3.0.0 - https://github.com/feedzai/LightGBM/pull/2/commits/f65512fa9753172cc9e0728c4be67dda8a4f2fa8
green: The patched code - https://github.com/feedzai/LightGBM/pull/2/commits/da3d8f2397d87fcb784c854564a830763a24048d

PR's in progress (still in very early development):

LightGBM PR: https://github.com/feedzai/LightGBM/pull/2
Provider which uses LightGBM and where I have all test resources and functional and integration test code: https://github.com/feedzai/feedzai-openml-java/pull/53

@guolinke The issue described above can be the root cause of our previous issue when maintainers of Julia package had to remove tree_sizes field to load a model created on another machine: #3137.

To further reinforce the "bug" origin, I added code to strip away trailing 0's in the decimal digits of numbers, and it already works properly - i.e., there are no differences in the output models! (This is the temporary hack I proposed on the https://github.com/fmtlib/fmt/issues/1873).
This commit https://github.com/feedzai/LightGBM/pull/2/commits/c34c43da599b1bf60884d3576970103c26cc6204 adds that code (which is not a permanent solution as it's a hack which reduces speed and is not 'pretty').

I was already able to replace all write calls except DoubleToStr again due to divergences in fmt and snprintf. However there's a hack to fix it too until they fix it in the library: truncating the output string to the maximum number of significant digits: https://github.com/fmtlib/fmt/issues/1875

@AlbertoEAF the tree-size is the string size of tree model content. We use it for the multi-threading loading tree models.

Ah! So it's no bug! I get it now, shouldn't be a problem then, thanks!

Hello @guolinke @StrikerRUS I have good news, I've completed the code changes and it's passing all the tests!
Instead of relying on Ryu, actually I used fmt to write values to strings as it provides similar performance and its API is much more inline with the rest of the LightGBM codebase. To do string->double parsing I am using this library: https://github.com/lemire/fast_double_parser which provides maximal floating-point string parsing resolution and matches the standard library parsing outputs bit by bit.
Hence, transforming data to strings and string arrays should now be faster. Parsing strings to doubles with StringToArray should now be significantly faster at parsing doubles.
I'd like to streamline the code more by merging Common's __StringToTHelperFast and __StringToTHelper, however, Common::Atof seems to diverge from standard library's stringstreams and fast_double_parser's resolutions. Those two are equivalent and provide the maximal parsing resolution.
Common::Atof string->double parsing diverges around the 2 last decimal places. See some examples:

And seems to have less resolution:

As such I had to leave both __StringToTHelperFast and __StringToTHelper separate to maintain the current LightGBM behaviour without affecting read/write floating-point resolution.

Common::Atof string->double parsing diverges around the 2 last decimal places. See some examples:

Looks like the difference is in the 18th+ digit in all examples. And according to IEEE 754, double gives only 15-17 first significant digits. So, I believe it is OK to have inconsistent digits after 17th place.

Hmm that's interesting, in that case we could replace Atof and further simplify the codebase :)
Thanks Nikita! I'll run some tests tomorrow and see if the scores don't change.

I remember that atof is used for the precision non-sensitive conversion (it will be faster), like the split_gain.
If the new solution is faster and more precisious, we can switch to it.

Fixed via #3405.
Thanks a lot @AlbertoEAF !

Thanks a lot for all the help @StrikerRUS @jameslamb  ;)


Add support for creating new named types

The named types are currently limited to pre-defined scalar types. It would be interesting to support the addition of new types.

removed milestone

In GitLab by @ksiero on Sep 24, 2018, 10:34
I think this can be closed after !153

closed


Lint fixes

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

Primarily focused on removing the duplicate github section from conda-forge.yml to fix auto-tick bot. While at it, fixes other lint issues.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.


Adapter - Messaging - RabbitMQ

[ ] Create new module adapter-messaging-rabbitmq
[ ] Implement the EventBus interface

I am working on this currently, in-progress. If anybody has already started, please give me a buzz so that we do not do double work :) thanks.


Unable to get Word Level Timestamps in speech to text response data when using speech to text container with web sockets

the response data received doesn't contain any word level timestamps as stated in this api guide https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/rest-speech-to-text
is there something like a request header that needs to be set in order to get word level timestamps besides Pronunciation-Assesment header
connect is established on docker container locally (ws://localhost:5000/speech/recognition/interactive/cognitiveservices/v1?format=detailed)
code used from this stackoverflow thread:
`        public async Task<int?> RegisterJob(string audioFilePath)
{
        string json = $"{{\"ReferenceText\":\"From this lecture,\",\"GradingSystem\":\"HundredMark\",\"Granularity\":\"FullText\",\"Dimension\":\"Comprehensive\"}}";
        var pronParamsBytes = Encoding.UTF8.GetBytes(json);
        var pronHeader = Convert.ToBase64String(pronParamsBytes);

        var cws = new ClientWebSocket();
        var connectionId = Guid.NewGuid().ToString("N");
        var lang = "en-US";
        cws.Options.SetRequestHeader("X-ConnectionId", connectionId);

        var url = $"ws://localhost:5000/speech/recognition/interactive/cognitiveservices/v1?format=detailed";
        await cws.ConnectAsync(new Uri(url), new CancellationToken());
        var receiving = Receiving(cws);

        var sending = Task.Run(async () =>
        {

            dynamic speechConfig = new
            {

            };

            var requestId = Guid.NewGuid().ToString("N");
            var speechConfigJson = JsonConvert.SerializeObject(speechConfig, Formatting.None);
            StringBuilder outputBuilder = new StringBuilder();
            outputBuilder.Append("path:speech.config\r\n"); //Should this be \r\n
            outputBuilder.Append($"Pronunciation-Assessment: {pronHeader}\r\n");
            outputBuilder.Append($"x-timestamp:{DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffK")}\r\n");
            outputBuilder.Append($"content-type:application/json\r\n");
            outputBuilder.Append("\r\n\r\n");
            outputBuilder.Append(speechConfigJson);
            var strh = outputBuilder.ToString();

            var encoded = Encoding.UTF8.GetBytes(outputBuilder.ToString());
            var buffer = new ArraySegment<byte>(encoded, 0, encoded.Length);

            if (cws.State != WebSocketState.Open) return;
            Console.WriteLine("Sending speech.config");
            await cws.SendAsync(buffer, WebSocketMessageType.Text, true, new CancellationToken());
            Console.WriteLine("Sent.");
            /* #endregion*/

            /* #region Send audio parts.  */
            var fileInfo = new FileInfo(audioFilePath);
            var streamReader = fileInfo.OpenRead();

            for (int cursor = 0; cursor < fileInfo.Length; cursor++)
            {

                outputBuilder.Clear();
                outputBuilder.Append("path:audio\r\n");
                outputBuilder.Append($"Pronunciation-Assessment: {pronHeader}\r\n");
                outputBuilder.Append($"x-requestid:{requestId}\r\n");
                outputBuilder.Append($"x-timestamp:{DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffK")}\r\n");
                outputBuilder.Append($"content-type:audio/x-wav");

                var headerBytes = Encoding.ASCII.GetBytes(outputBuilder.ToString());
                var headerbuffer = new ArraySegment<byte>(headerBytes, 0, headerBytes.Length);
                var str = "0x" + (headerBytes.Length).ToString("X");
                var headerHeadBytes = BitConverter.GetBytes((UInt16)headerBytes.Length);
                var isBigEndian = !BitConverter.IsLittleEndian;
                var headerHead = !isBigEndian ? new byte[] { headerHeadBytes[1], headerHeadBytes[0] } : new byte[] { headerHeadBytes[0], headerHeadBytes[1] };

                //Audio should be pcm 16kHz, 16bps mono
                var byteLen = 8192 - headerBytes.Length - 2;
                var fbuff = new byte[byteLen];
                streamReader.Read(fbuff, 0, byteLen);

                var arr = headerHead.Concat(headerBytes).Concat(fbuff).ToArray();
                var arrSeg = new ArraySegment<byte>(arr, 0, arr.Length);

                Console.WriteLine($"Sending data from {cursor}");
                if (cws.State != WebSocketState.Open) return;
                cursor += byteLen;
                var end = cursor >= fileInfo.Length;
                await cws.SendAsync(arrSeg, WebSocketMessageType.Binary, true, new CancellationToken());
                Console.WriteLine("Data sent");

                var dt = Encoding.ASCII.GetString(arr);

            }
            await cws.SendAsync(new ArraySegment<byte>(), WebSocketMessageType.Binary, true, new CancellationToken());
            streamReader.Dispose();
            /* #endregion*/

            {
                var startWait = DateTime.UtcNow;
                while ((DateTime.UtcNow - startWait).TotalSeconds < 30)
                {
                    await Task.Delay(1);
                }
                if (cws.State != WebSocketState.Open) return;
            }
        });
        /* #endregion*/

        /* #region Wait for tasks to complete */
        await Task.WhenAll(sending, receiving);
        if (sending.IsFaulted)
        {
            var err = sending.Exception;
            throw err;
        }
        if (receiving.IsFaulted)
        {
            var err = receiving.Exception;
            throw err;
        }
        /* #endregion*/

        return null;

    }

`
notice the response data doesn't contain word level timestamps
{
"Id": "b11d8599001f44d2a43f588699490cce",
"RecognitionStatus": "Success",
"Offset": 400000,
"Duration": 210500000,
"DisplayText": "From this lecture, we will start a new chapter and the chapter is 4 year transform Fourier transform is an important chapter and in this chapter. The main things are properties. So we will try to understand all the properties and then we will implement them. While the questions so don't forget to watch the lectures related to the questions.",
"NBest": [
{
"Confidence": 0.8737056,
"Lexical": "from this lecture we will start a new chapter and the chapter is four year transform fourier transform is an important chapter and in this chapter the main things are properties so we will try to understand all the properties and then we will implement them while the questions so don't forget to watch the lectures related to the questions",
"ITN": "from this lecture we will start a new chapter and the chapter is 4 year transform fourier transform is an important chapter and in this chapter the main things are properties so we will try to understand all the properties and then we will implement them while the questions so don't forget to watch the lectures related to the questions",
"MaskedITN": "from this lecture we will start a new chapter and the chapter is 4 year transform fourier transform is an important chapter and in this chapter the main things are properties so we will try to understand all the properties and then we will implement them while the questions so don't forget to watch the lectures related to the questions",
"Display": "From this lecture, we will start a new chapter and the chapter is 4 year transform Fourier transform is an important chapter and in this chapter. The main things are properties. So we will try to understand all the properties and then we will implement them. While the questions so don't forget to watch the lectures related to the questions."
}
]
}
any help in the matter is highly appreciated

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

ID: ac742a64-1e66-4c89-6de5-67c7e818f9cc
Version Independent ID: 29714c95-3e4c-f153-0a6f-598a736b4564
Content: Install and run Docker containers for the Speech service APIs - Azure Cognitive Services
Content Source: articles/cognitive-services/Speech-Service/speech-container-howto.md
Service: cognitive-services
Sub-service: speech-service
GitHub Login: @aahill
Microsoft Alias: aahi

@Shak97 The docker container of Azure speech service enables to use the same service settings as the REST API. In your case i am not sure if the wordleveltimestamp is enabled. Please refer to this SDK reference on setting the same on your speechconfig.
speech_config.request_word_level_timestamps()
I think the referred SO thread is quite old and you can refer any of the latest samples from the speech service SDK repo.

Ok, I am not sure if ClientWebSocket option supports enabling timestamps because the container support is designed via the SDK using WS.
Maybe, opening an issue on the SDK page could help find the right product team to provide a workaround. This repo is primarily for documentation purposes only.

Got it working using the SDK, turns out I just needed to delete the obj folder, project is configured on .NET Framework 4.8, Thanks for your prompt response :)


Add log streaming to the created job

When running a job from studio, this adds a log streaming which checks
for the updates from the Studio.
Related PR: https://github.com/iterative/studio/pull/11068

It works, but I wonder if it should be closer to real-time; the following example seems to be buffering the whole output and takes ages to print the logs: 🧐
datachain studio run test.py

import time

for number in range(60 * 60):

  time.sleep(0.1)

  print(number)

Found an possible cause in Studio side. Working on it alongside the test cases for this.


Fixed the particles flight from square to circle

Fix for issue #2
I didn't build the minified version since there is no build script

great, thx for your contribution :+1:


Github Source

I would expect the Github source to validate the event types match the rest of the configuration.
Ideally this would be done in the webhook, but otherwise surfacing failures in the controller would be expected.
What I actually get is as follows...
The resource reports everything is successful 🎉
kubectl get githubsource knative-serving -oyaml
apiVersion: sources.knative.dev/v1alpha1
kind: GitHubSource
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"sources.knative.dev/v1alpha1","kind":"GitHubSource","metadata":{"annotations":{},"name":"knative-serving","namespace":"default"},"spec":{"accessToken":{"secretKeyRef":{"key":"accessToken","name":"github-hook-secret"}},"eventTypes":["check_suite","commit_comment","create","delete","deployment","deployment_status","fork","gollum","installation","integration_installation","issue_comment","issues","label","member","membership","milestone","organization","org_block","page_build","ping","project_card","project_column","project","public","pull_request","pull_request_review","pull_request_review_comment","push","release","repository","status","team","team_add","watch"],"ownerAndRepository":"knative/serving","secretToken":{"secretKeyRef":{"key":"secretToken","name":"github-hook-secret"}},"sink":{"ref":{"apiVersion":"eventing.knative.dev/v1alpha1","kind":"Broker","name":"default"}}}}
  creationTimestamp: "2020-03-06T19:18:01Z"
  finalizers:
  - github-source-controller
  generation: 2
  name: knative-serving
  namespace: default
  resourceVersion: "40585"
  selfLink: /apis/sources.knative.dev/v1alpha1/namespaces/default/githubsources/knative-serving
  uid: 7843c4ce-ffdc-44e2-adb2-6b151f953ee2
spec:
  accessToken:
    secretKeyRef:
      key: accessToken
      name: github-hook-secret
  eventTypes:
  - check_suite
  - commit_comment
  - create
  - delete
  - deployment
  - deployment_status
  - fork
  - gollum
  - installation
  - integration_installation
  - issue_comment
  - issues
  - label
  - member
  - membership
  - milestone
  - organization
  - org_block
  - page_build
  - ping
  - project_card
  - project_column
  - project
  - public
  - pull_request
  - pull_request_review
  - pull_request_review_comment
  - push
  - release
  - repository
  - status
  - team
  - team_add
  - watch
  ownerAndRepository: knative/serving
  secretToken:
    secretKeyRef:
      key: secretToken
      name: github-hook-secret
  sink:
    ref:
      apiVersion: eventing.knative.dev/v1alpha1
      kind: Broker
      name: default
status:
  conditions:
  - lastTransitionTime: "2020-03-06T19:18:01Z"
    status: "True"
    type: Ready
  - lastTransitionTime: "2020-03-06T19:18:01Z"
    status: "True"
    type: SecretsProvided
  - lastTransitionTime: "2020-03-06T19:21:16Z"
    status: "True"
    type: SinkProvided
  observedGeneration: 2
  sinkUri: http://default-broker.default.svc.cluster.local

However, there's no webhook on github (wtf!)
Here are the controller logs:
{"level":"error","ts":"2020-03-06T19:21:17.335Z","logger":"github-controller.github-source-controller","caller":"controller/controller.go:409","msg":"Reconcile error","knative.dev/controller":"github-source-controller","error":"failed to create webhook: failed to create the webhook: POST https://api.github.com/repos/knative/serving/hooks: 422 Validation Failed [{Resource:Hook Field: Code:custom Message:These events are not allowed for this hook: installation, integration_installation, membership, organization, org_block, team}]","stacktrace":"knative.dev/eventing-contrib/vendor/knative.dev/pkg/controller.(*Impl).handleErr\n\tknative.dev/eventing-contrib/vendor/knative.dev/pkg/controller/controller.go:409\nknative.dev/eventing-contrib/vendor/knative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tknative.dev/eventing-contrib/vendor/knative.dev/pkg/controller/controller.go:395\nknative.dev/eventing-contrib/vendor/knative.dev/pkg/controller.(*Impl).Run.func2\n\tknative.dev/eventing-contrib/vendor/knative.dev/pkg/controller/controller.go:343"}

🤦♂
cc @n3wscott @grantr

Does the CR show anything interesting? Like bad status or any events related to this situation?

From an end-user perspective they shouldn't need to look at the controller to get info on what's wrong - they might not have access to it in some envs.

@duglin No, the source reports everything as fine.

Hi! @mattmoor I would like to work on this issue as my first contribution.
I think the type of GitHubSource should have "GitHubSourceConditionWebhookProvided" to manage its condition. Then, adding some functions around type definition and reconciler/githubsource.go:237 to mark the conditions would be work in my thought.
It would be my pleasure if there is problems.
Thanks,

I mean it would be my pleasure to point out if there is problems.

Yeah, I think a new condition that's toggled based on the state of the webhook registration sounds like what's missing, been a little bit since I poked through the code.


Mail UI in external window in Gmail is not themed

Is there an existing issue outlining your problem?

[X] I have searched the existing issues and they do not solve my problem.

What userstyles are you seeing the problem on?
lbl:gmail
Describe your problem.
On Gmail, when opening mail in an external window, the UI is not themed. Only some parts are themed but they're broken as heck
Attach screenshots.

What browser(s) are you seeing the problem on?
Chromium (ungoogled-chromium) 121.0.6167.184, Most likely all browsers are affected
Any additional comments?
No response

So the main section of the email, is intentionally unthemed. But the rest I don't disagree.

alright i changed the issue title and desc so its not confusing


Attack Rate of skill secondary effects

I'm playing with Molten Strike and Frost Blades, and a issue that bothers me is that their secondary effect (Magma Orbs and Icy Blades repectively) Attack Rate is calculated separately from the main skills, e.g. they don't get melee attack speed bonus. I'm nearby sure that not what actually happens, they should fetch attack rate from the main skill (melee portion).

This is the same issues previously reported in #241, so I'll close this one.
Ideally they would get the melee part's attack speed, but due to the way skill parts are handled it isn't currently possible to do.


Rewrite JS getters with more logic in dart

There are a few JS getters like, getting all faucets, or getting remaining endorsment tickets for reputables/bootstrappers, which have not het been transcoded to dart.

[x] endorsements tickets #1566
[x] faucet logic #1579
[x] meetup time https://github.com/encointer/encointer-wallet-flutter/pull/1569
[ ] #1580
[x] Getting meetup data of an account for pending issuance check, #1571

Extracted voucher logic to a separate task, as it is actually unrelated to getters.


chore: make adjustments to build under go 1.17

Checklist

[ ] make test-all (UNIX) passes. CI will also test this
[ ] unit and/or integration tests are included (if applicable)
[ ] documentation is changed or added (if applicable)

Description of change
Simple PR to start generating builds under 1.17, as described in #730.   Some tests pass for me locally, but not make-linux-all yet as there are some issues in that process for me locally that I have not yet had time to tackle.

Thanks @mbainter !


setState callback semantics

The setState callback does not pass previousState as an argument, it passes the current state, and uses it to set the next state.
I brought this up to Dan on twitter and I think we agreed that the rename of the props here is correct in the documentation.
Thank you for the PR! Contributors like you keep React awesome!
Please see the Contribution Guide for guidelines:
https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md
If your PR references an existing issue, please add the issue number below:
NA

@gaearon Here is a fix for what I brought up in the docs today :) . Ill look through the rest of the docs for more uses of it.

@jordanpapaleo Good stuff! I think both #621 and #622 should be within this PR so that all mentions of prevState will be edited to currentState in one commit. In case the commits don't land at the same time, it would be confusing because one place mentions prevState and the other mentions currentState.
Also, the deploy preview failed, you may want to check it out.

Thanks!  So I edited these just from the link in the docs.  Im not sure how I would combine these PRs.  I do see the value of having them all merge together.
As for 622, can someone re run the build.  It looks like a node-gyp thing and I feel like I have fixed these by rerunning the build.  The PR is just text changes and I do not see anything that would cause an error.


building tutorials cannot work on Mac OS Catalina 10.15

building on Mac OS 10.15
while running "make -j4", following error happens
[ 89%] Linking CXX shared library libw2xc.dylib
ld: library not found for -lstdc++fs
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
after comment the line#77 'set(FILE_SYSTEM_LIB "c++fs")' and delete 'c++fs' on the line#365 'target_link_libraries(w2xc ${OPENCV_LIBRARIES} ${CMAKE_DL_LIBS} pthread c++ c++fs)', I found the build is successful

Same issue on Mac OS 10.14.6

See https://github.com/DeadSix27/waifu2x-converter-cpp/pull/207#issuecomment-555483400

I tried this solution. Here is what i got
MacBook-Pro-Maksim:waifu2x-converter-cpp maks-macbook$ make -j4
Scanning dependencies of target conv
[ 14%] Building C object CMakeFiles/conv.dir/conv.c.o
[ 14%] Linking C executable conv
[ 14%] Built target conv
[ 14%] Generating modelHandler_OpenCL.cl.h
[ 14%] Generating modelHandler_CUDA.ptx30.h
[ 14%] Built target gensrcs
Scanning dependencies of target w2xc
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/modelHandler_fma.cpp.o
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/modelHandler_avx.cpp.o
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/modelHandler_sse.cpp.o
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/modelHandler.cpp.o
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/modelHandler_OpenCL.cpp.o
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/convertRoutine.cpp.o
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/threadPool.cpp.o
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/modelHandler_CUDA.cpp.o
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/w2xconv.cpp.o
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/common.cpp.o
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/cvwrap.cpp.o
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/Env.cpp.o
[ 14%] Building CXX object CMakeFiles/w2xc.dir/src/Buffer.cpp.o
[ 14%] Linking CXX shared library libw2xc.dylib
[ 14%] Built target w2xc
Scanning dependencies of target waifu2x-converter-cpp
[ 14%] Building CXX object CMakeFiles/waifu2x-converter-cpp.dir/src/main.cpp.o
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:451:12: error:
      'is_directory' is unavailable: introduced in macOS 10.15
                if (!fs::is_directory(outputFileName))
                         ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:1685:39: note:
      'is_directory' has been explicitly marked unavailable here
inline _LIBCPP_INLINE_VISIBILITY bool is_directory(const path& __p) {
                                      ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:451:25: error: 'path' is
      unavailable: introduced in macOS 10.15
                if (!fs::is_directory(outputFileName))
                                      ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:772:3: note: 'path' has
      been explicitly marked unavailable here
  path(const _Source& __src, format = format::auto_format) {
  ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:451:25: error: '~path' is
      unavailable: introduced in macOS 10.15
                if (!fs::is_directory(outputFileName))
                                      ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:790:3: note: '~path' has
      been explicitly marked unavailable here
  ~path() = default;
  ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:453:8: error:
      'create_directories' is unavailable: introduced in macOS 10.15
                        fs::create_directories(outputFileName);
                            ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:1545:39: note:
      'create_directories' has been explicitly marked unavailable here
inline _LIBCPP_INLINE_VISIBILITY bool create_directories(const path& __p) {
                                      ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:453:27: error: 'path' is
      unavailable: introduced in macOS 10.15
                        fs::create_directories(outputFileName);
                                               ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:772:3: note: 'path' has
      been explicitly marked unavailable here
  path(const _Source& __src, format = format::auto_format) {
  ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:453:27: error: '~path' is
      unavailable: introduced in macOS 10.15
                        fs::create_directories(outputFileName);
                                               ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:790:3: note: '~path' has
      been explicitly marked unavailable here
  ~path() = default;
  ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:484:74: warning: '&&'
      within '||' [-Wlogical-op-parentheses]
  ...|| lastSlashPos != _tstring::npos && lastDotPos < lastSlashPos)
     ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:484:74: note: place
      parentheses around the '&&' expression to silence this warning
  ...|| lastSlashPos != _tstring::npos && lastDotPos < lastSlashPos)
                                       ^
        (                                                          )
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:501:38: error: 'path' is
      unavailable: introduced in macOS 10.15
void convert_file(ConvInfo info, fs::path inputName, fs::path output)
                                     ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:738:24: note: 'path' has
      been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:501:58: error: 'path' is
      unavailable: introduced in macOS 10.15
void convert_file(ConvInfo info, fs::path inputName, fs::path output)
                                                         ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:738:24: note: 'path' has
      been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:505:68: error:
      'absolute' is unavailable: introduced in macOS 10.15
        _tstring outputName = generate_output_location(info.origPath, fs::absolu...
                                                                          ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:1474:39: note: 'absolute'
      has been explicitly marked unavailable here
inline _LIBCPP_INLINE_VISIBILITY path absolute(const path& __p) {
                                      ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:505:64: error: '~path' is
      unavailable: introduced in macOS 10.15
        _tstring outputName = generate_output_location(info.origPath, fs::absolu...
                                                                      ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:790:3: note: '~path' has
      been explicitly marked unavailable here
  ~path() = default;
  ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:505:88: error: 'string'
      is unavailable: introduced in macOS 10.15
  ...= generate_output_location(info.origPath, fs::absolute(inputName).TSTRIN...
                                                                       ^
/Users/maks-macbook/waifu2x-converter-cpp/src/tstring.hpp:41:25: note: expanded
      from macro 'TSTRING_METHOD'
        #define TSTRING_METHOD  string
                                ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:998:41: note: 'string' has
      been explicitly marked unavailable here
  _LIBCPP_INLINE_VISIBILITY std::string string() const { return __pn_; }
                                        ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:505:113: error: 'string'
      is unavailable: introduced in macOS 10.15
  ...fs::absolute(inputName).TSTRING_METHOD(), output.TSTRING_METHOD(), info....
                                                      ^
/Users/maks-macbook/waifu2x-converter-cpp/src/tstring.hpp:41:25: note: expanded
      from macro 'TSTRING_METHOD'
        #define TSTRING_METHOD  string
                                ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:998:41: note: 'string' has
      been explicitly marked unavailable here
  _LIBCPP_INLINE_VISIBILITY std::string string() const { return __pn_; }
                                        ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:521:8: error: 'absolute'
      is unavailable: introduced in macOS 10.15
                        fs::absolute(inputName).TSTRING_METHOD().c_str(),
                            ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:1474:39: note: 'absolute'
      has been explicitly marked unavailable here
inline _LIBCPP_INLINE_VISIBILITY path absolute(const path& __p) {
                                      ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:521:4: error: '~path' is
      unavailable: introduced in macOS 10.15
                        fs::absolute(inputName).TSTRING_METHOD().c_str(),
                        ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:790:3: note: '~path' has
      been explicitly marked unavailable here
  ~path() = default;
  ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:521:28: error: 'string'
      is unavailable: introduced in macOS 10.15
                        fs::absolute(inputName).TSTRING_METHOD().c_str(),
                                                ^
/Users/maks-macbook/waifu2x-converter-cpp/src/tstring.hpp:41:25: note: expanded
      from macro 'TSTRING_METHOD'
        #define TSTRING_METHOD  string
                                ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:998:41: note: 'string' has
      been explicitly marked unavailable here
  _LIBCPP_INLINE_VISIBILITY std::string string() const { return __pn_; }
                                        ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:837:6: error: 'path' is
      unavailable: introduced in macOS 10.15
        fs::path input = cmdInput.getValue();
            ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:738:24: note: 'path' has
      been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:837:11: error: 'path' is
      unavailable: introduced in macOS 10.15
        fs::path input = cmdInput.getValue();
                 ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:772:3: note: 'path' has
      been explicitly marked unavailable here
  path(const _Source& __src, format = format::auto_format) {
  ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:837:19: error: '~path' is
      unavailable: introduced in macOS 10.15
        fs::path input = cmdInput.getValue();
                         ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:790:3: note: '~path' has
      been explicitly marked unavailable here
  ~path() = default;
  ^
/Users/maks-macbook/waifu2x-converter-cpp/src/main.cpp:837:11: error: '~path' is
      unavailable: introduced in macOS 10.15
        fs::path input = cmdInput.getValue();
                 ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:790:3: note: '~path' has
      been explicitly marked unavailable here
  ~path() = default;
  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make[2]: *** [CMakeFiles/waifu2x-converter-cpp.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/waifu2x-converter-cpp.dir/all] Error 2
make: *** [all] Error 2

@fraemos is_directory' is unavailable: introduced in macOS 10.15
Your issue might be that your the paths  set in cmake are not where you have your libc++fs.a file.
Search for it on your system, cmake looks for it in:
-L/usr/local/opt/llvm/lib and can't find it.
Maybe you have something like -L/usr/local/opt/llvm8/lib or so.
I never worked with apple software/hw so I'm just guessing.

Thanks for your reply. Finally it worked. Here is what helped me for Mac OS 10.14.6.

Install llvm@8 - brew install llvm@8
Make some changes to the file CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1668437..6244836 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,10 +70,10 @@ message(STATUS "System is: ${CMAKE_SYSTEM_NAME} (${LOCAL_SYS_TYPE})")

 ### Get binary paths for APPLE users
 if(APPLE)
-	set(CMAKE_C_COMPILER "/usr/local/opt/llvm/bin/clang")
-	set(CMAKE_CXX_COMPILER "/usr/local/opt/llvm/bin/clang++")
-	set(CMAKE_EXE_LINKER_FLAGS "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib")
-	set(CMAKE_SHARED_LINKER_FLAGS "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib")
+	set(CMAKE_C_COMPILER "/usr/local/opt/llvm@8/bin/clang")
+	set(CMAKE_CXX_COMPILER "/usr/local/opt/llvm@8/bin/clang++")
+	set(CMAKE_EXE_LINKER_FLAGS "-L/usr/local/opt/llvm@8/lib -Wl,-rpath,/usr/local/opt/llvm@8/lib")
+	set(CMAKE_SHARED_LINKER_FLAGS "-L/usr/local/opt/llvm@8/lib -Wl,-rpath,/usr/local/opt/llvm@8/lib")
 	set(FILE_SYSTEM_LIB "c++fs")
 elseif(UNIX OR MINGW)
 	set(FILE_SYSTEM_LIB "stdc++fs")


Anchor the VSCode please command

I was frequently getting this triggered in the middle of other commands
I don't think it makes sense to chain this command

I'm opting to simply anchor the current please commands

since jetbrains is already different, I'm not sure which way to go if I were to try and consolidate with the single overrideable helper.
if it is preferable to come up with a single overrideable helper, I'm happy to do so but would like some guidance what to do with jetbrains

I don't see how the JetBrains equivalent behaves any differently to the VSCode one. They both open a command palette and optionally insert some text.

It behaves the same, but the naming is different. I heard that the ask was to make a single talon definition that had overridden implementations in each application. If I do that for jetbrains, users who rely on the "action" usage will not have that anymore. Is that what I should do?

Ok, I think I'll put together a version of this that consolidates on a single overrideable command so we can discuss/decide which works better.

Here is a version of this that does that: https://github.com/talonhub/community/pull/1537

Replaced by #1537


Adding new payment method fix

Thank you for the fix 🖖
It would also nice to express it in this scenario, as it only represents the situation with PayPal already onboarded. We would need one scenario checking do get the error with PayPal seller already onboarded (the one we have) and the other one, checking can we create an offline PM. Do you think you would be able to give it a try?
Also, it would be great if you could squash your commits, as 4 of them for such a small change is definitely too much 🖖 :)
Thank you one more time!

The base of this pull-request was changed, you need fetch and reset your local branch
if you want to add new commits to this pull request. Reset before you pull, else commits
may become messed-up.
Unless you added new commits (to this branch) locally that you did not push yet,
execute git fetch origin && git reset "master" to update your local branch.
Feel free to ask for assistance when you get stuck :+1:

Thanks, @tifed! :tada:


Private ip address returned by the server

fix to return the original host ip address if
one private address is being returned by the server..
Fix #2

@bnix - I'm experiencing a private IP issue with Ruby 2.3 and double-bag-ftps 0.1.3. The remote admin can't make a change due to other user's configurations.
Any chance of approving this PR to avoid having to monkeypatch?

@bnix - I am having same problem as well

I'm experiencing a private IP issue with Ruby 2.3 and double-bag-ftps 0.1.3. The remote admin can't make a change due to other user's configurations.
Any chance of approving this PR to avoid having to monkeypatch?


Please provide better description

Please extend the description: https://github.com/instalator/ioBroker.lgtv-rs/blob/master/io-package.json#L22
This is the new rule, additionally to tests and readme and npm, it is now required to provide good explanation about adapter.
Please write something like: Controls LG TV over RS232 interface.

ОК?

Yes


Support for embeeded browsers (Facebook app)

Hi, here is the user agent if you need it:
Mozilla/5.0 (Linux; U; Android 4.1.2; en-us; GT-S6310 Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 [FB_IAB/FB4A;FBAV/<IP_ADDRESS>.13;]

What kind of classification would you apply to a Facebook app though? The only thing I can think of is to make is_bot=True for this user agent.

but here this is not just a bot, it uses a render engine like the android default browser.


RawClient will try to connect to pd during initialization

>>> from tikv_client.asynchronous import RawClient
>>> client = RawClient('<IP_ADDRESS>:23790')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Exception: [/home/cosven/.cargo/git/checkouts/client-rust-5a1ccd35a54db20f/ac96d14/tikv-client-pd/src/cluster.rs:174]: PD cluster failed to respond

How about add another method for RawClient to initialize the rust-tikv-RawClient.

On the one hand, sending network request during __init__ is not pythonic.
On the other hand, we can't await RawClient(xxx).

It's solved in #2.