IndexError: index 1 is out of bounds for axis 0 with size 1

Hello
I'm running the Demo for 100 cells with time and its working for ODE part and I could get the plots however for SDE part I got this error
Model being initialized...
IndexError                                Traceback (most recent call last)
 in
1 # in order to constant diffusion, lengthscale of the diffusion process (ellg0) must be big
2 npde = npde_fit(sess, t, Y, model='sde', sf0=1.0, ell0=np.ones(2), ellg0=[1e5], W=6,
----> 3                 ktype="id", Nw=50, num_iter=500, print_int=100, eta=0.02, plot_=True)
~/Downloads/npde-master/npde_helper.py in npde_fit(sess, t, Y, model, sf0, ell0, sfg0, ellg0, W, ktype, whiten, Nw, fix_ell, fix_sf, fix_Z, fix_U, fix_sn, fix_ellg, fix_sfg, fix_Zg, fix_Ug, num_iter, print_int, eta, dec_step, dec_rate, plot_)
150                   fix_sn=fix_sn)
151         with tf.name_scope("cost"):
--> 152             Xs = npde.forward(Nw=Nw)
153             ll = 0
154             for i in range(len(Y)):
~/Downloads/npde-master/npde.py in forward(self, Nw, x0, ts)
212
213     def forward(self,Nw=1,x0=None,ts=None):
--> 214         return self.integrator.forward(Nw=Nw,x0=x0,ts=ts)
215
216     def sample(self,Nw,x0,t):
~/Downloads/npde-master/integrators.py in forward(self, Nw, x0, ts)
92             time_grid = ops.convert_to_tensor(t, preferred_dtype=float_type, name='t')
93             time_delta_grid = time_grid[1:] - time_grid[:-1]
---> 94             y0 = np.repeat(x0[i,:].reshape((1,-1)),Nw,axis=0)
95             y0 = ops.convert_to_tensor(y0, name='y0')
96             scan_func = self._make_scan_func(self.model.f,self.model.diffus.g)
IndexError: index 1 is out of bounds for axis 0 with size 1
Predictions¶
I really appreciate if you could help me to fix this error.
Thank you

Hi, could your x0 be a 1D tensor? It should be of shape [N,n] where N is the number of initial values and n is the state dimensionality.


Map / get Licence labels from URIs

For license URIs like http://creativecommons.org/publicdomain/zero/1.0/, get the label for display (here it would be CC0 1.0 Universal (CC0 1.0) Public Domain Dedication)

URI
Label

https://creativecommons.org/publicdomain/zero/1.0/
CC0 1.0 Universal (CC0 1.0) Public Domain Dedication

https://creativecommons.org/licenses/by/3.0/
Attribution 3.0 Unported (CC BY 3.0)

https://creativecommons.org/licenses/by/3.0/au/
Attribution 3.0 Australia (CC BY 3.0 AU)

https://creativecommons.org/licenses/by/4.0/
Attribution 4.0 International (CC BY 4.0)

https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
GNU General Public License, version 2

https://www.gnu.org/licenses/gpl-3.0.en.html
GNU General Public License

https://creativecommons.org/publicdomain/mark/1.0/
Public Domain Mark 1.0

https://opensource.org/licenses/MIT
The MIT License

https://opensource.org/licenses/Apache-2.0
Apache License, Version 2.0

https://opensource.org/licenses/BSD-3-Clause
The 3-Clause BSD License

https://opensource.org/licenses/BSD-2-Clause
The 2-Clause BSD License

https://opensource.org/licenses/gpl-license
GNU General Public License

https://opensource.org/licenses/MPL-2.0
Mozilla Public License 2.0 (MPL-2.0)

https://opensource.org/licenses/LGPL-3.0
GNU Lesser General Public License version 3

https://opensource.org/licenses/LGPL-2.1
GNU Lesser General Public License version 2.1

https://opensource.org/licenses/LGPL-2.0
GNU Library General Public License version 2

https://spdx.org/licenses/AGPL-3.0-only.html
GNU Affero General Public License v3.0 only

https://opensource.org/licenses/AGPL-3.0
GNU Affero General Public License v3.0 only

https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
W3C Software and Document Notice and License


Set default SSL certificate store in Ruby 1.8.

Problem
IdpMetadataParser#get_idp_metadata ends up failing in Ruby 1.8 because Net::HTTP in Ruby 1.8 does not set the default SSL certificate store automatically when VERIFY_PEER is specified. Because of this, the method always fails with the following error because it is not able the verify that the SSL certificate is valid:
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

Repro Steps
The quickest way to see the difference in behavior is to run the following snippet in Ruby 1.8.7 vs. any later version of Ruby:
http = Net::HTTP.new('example.com', 443)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
get = Net::HTTP::Get.new('/')
response = http.request(get)

In Ruby 1.8.7, this results in the aforementioned error, whereas all later Ruby versions behave as expected and succeed:
 => #<Net::HTTPOK 200 OK readbody=true>

Cause
It looks like this is because in Ruby 1.9, Net::HTTP began using OpenSSL::SSL::SSLContext#set_params to set SSL parameters in the Net::HTTP object. The #set_params method automatically sets the default certificate store when it sees that #verify_mode is set to VERIFY_PEER. Net::HTTP in Ruby 1.8.7 did not call #set_params; rather it ended up directly using the SSLContext object that was created when #use_ssl was called.
Fix
This fix sets the default SSL certificate store in Ruby 1.8 in the same manner OpenSSL::SSL::SSLContext#set_params tries to do when validate_cert is true in IdpMetadataParser#get_idp_metadata.

@pitbulk @luisvm @cgthornt can you review please? This looks sane to me :+1:

:+1: looks sane to me, too

:fish:


dump of the running php deamon

We can make dump active process as an alternative to the output from php.ini, any suggestions?
If there's more than one php file settings stdout:
# curl site.com/phpinfo-api.json | ./vendor/bin/iniscan scan --format=json
$ php -r 'print(json_encode(ini_get_all(null, false), JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES|JSON_BIGINT_AS_STRING));'
$ php -r 'var_export(ini_get_all(null, false));'

By "dump active process" I assume you're meaning the results from the phpinfo() page here? It's a bit hard to tell from your examples.


Triangles don't fit exactly inside square after rotation

Steps to reproduce

Copy source code:

class Pythagoras(Scene):
    def construct(self):
        title = TextMobject("Pythagorean Theorem")
        title.to_edge(UL)

        pre_square = Polygon(
            [-2, 2, 0],
            [2, 2, 0],
            [2, -2, 0],
            [-2, -2, 0],
            color=WHITE
        )

        self.wait()

        square2 = Polygon(
            [-1.41, 1.41, 0],
            [1.41, 1.41, 0],
            [1.41, -1.41, 0],
            [-1.41, -1.41, 0]

        )
        square2.rotate(PI/6)

        triangle1 = Polygon(
            [-2, 2, 0],
            [-2 + math.sqrt(6), 2, 0],
            [-2, 2 - math.sqrt(2), 0],
            color=YELLOW
        )

        triangle2 = Polygon(
            [2, 2, 0],
            [-2 + math.sqrt(6), 2, 0],
            [2, 2 - math.sqrt(6), 0],
            color=YELLOW
        )

        triangle3 = Polygon(
            [2, 2 - math.sqrt(6), 0],
            [2, -2, 0],
            [2 - math.sqrt(6), -2, 0],
            color=YELLOW
        )

        triangle4 = Polygon(
            [-2, 2 - math.sqrt(2), 0],
            [-2, -2, 0],
            [2 - math.sqrt(6), -2, 0],
            color=YELLOW
        )

        triangles = [triangle1, triangle2, triangle3, triangle4]
        for triangle in triangles:
            triangle.set_fill(YELLOW, 0.6)

        self.play(Write(title), ShowCreation(pre_square), ShowCreation(triangle1), ShowCreation(triangle2), ShowCreation(triangle3), ShowCreation(triangle4))

        self.wait()

        group = VGroup(pre_square, triangle1, triangle2, triangle3, triangle4)

        self.play(ApplyMethod(group.to_edge, LEFT, {"buff": 1.6}))
        self.wait()

        square3 = pre_square.copy()

        self.play(ApplyMethod(square3.shift, RIGHT * 7))

        triangle2.generate_target()
        triangle2.target.shift(RIGHT * (7- math.sqrt(6)))

        triangle1.generate_target()
        triangle1.target = triangle2.target.copy().rotate(PI)

        triangle3.generate_target()
        triangle3.target.shift(RIGHT * 7)

        triangle4.generate_target()
        triangle4.target = triangle3.target.copy().rotate(PI)

        self.play(MoveToTarget(triangle1.copy()), MoveToTarget(triangle2.copy()), MoveToTarget(triangle3.copy()), MoveToTarget(triangle4.copy()))

        self.wait()

run manim on this scene with -ps.

Unexpected behaviour
See https://stackoverflow.com/questions/57467134/when-rotating-shapes-vertices-are-just-slightly-off
Environment
OS: Windows 10
Python: 3.7.3
manim: 9 August 2019

The problem is the thickness of the VMobjects, by default it is 4, if you change it to 2 or 1 (in the solution that I give is 1) those corners are removed. Add this in your for:
        for triangle in triangles:
            triangle.set_fill(YELLOW, 0.6)
            triangle.set_stroke(None,2)


feat: b3 single header support

Which problem is this PR solving?

Fixes #1542

Short description of the changes
Per the spec a B3 propagator should extract context in both single and multi-header formats, and inject context in the single header format (with the option to change the format to multi header).

Moved the existing B3Propagator to B3MultiPropagator (the diff isn't completely clear on this point, unfortunately)
Added a new B3SinglePropagator
Introduced a new B3Propagator that delegates injection and extraction to B3MultiPropagator and B3SinglePropagator instances

Note this was not suitable to implement as a composite propagator due to asymmetry in injection and extraction formats

Removed propagation of parent span id

It's not necessary, the existing implementation incorrect, and it's not currently possible to fix because a span's parent id is not readable outside of the export pipeline: see https://github.com/open-telemetry/opentelemetry-specification/issues/1004, specifically: https://github.com/open-telemetry/opentelemetry-specification/issues/1004#issuecomment-700910486.

As a followup I intend to move the B3 propagator to the contrib repo per the spec requirement

What will happen if the user chooses Multi Header Propagator but the Single Header variant is present only, and also the opposite situation ?.

If I understand correctly, the multi and single propagator is not intended to be used directly. They are delegated from the B3 propagator. On extract, the single is called before the multi. On inject, only one of them is called (single by default, but multi is configurable).

What will happen if booth of the headers are available

The single takes precedence.

What will happen if the user chooses Multi Header Propagator but the Single Header variant is present only, and also the opposite situation ?.

If I understand correctly, the multi and single propagator is not intended to be used directly. They are delegated from the B3 propagator. On extract, the single is called before the multi. On inject, only one of them is called (single by default, but multi is configurable).

What will happen if booth of the headers are available

The single takes precedence.

I'm interested in situation when backend sends multi client use single and sends to a different backend which is then using single or multi. Would that have any impact ?

There is a long discussion about the various scenarios on the spec PR: https://github.com/open-telemetry/opentelemetry-specification/pull/961. Ulitmately, we arrived at the recommendation to extract single and multi formats, but inject single by default.
The way this is implemented users wouldn't be limited to the default and could tailor B3 to their needs. I don't see any reason why they couldn't use a Composite propagator in conjunction with the b3 single and mutli propagators to inject and extract both formats, for example.

@mwear unless I'm not aware of something then please correct me if I'm wrong but  I'm missing here the TEST case when you will be switching multiple times between 2 different formats.
Imagine we have a couple services that talk to each other and you want to test scenario when they send request between each other and every time extracting and injecting headers in different format
single -> multi -> single -> multi -> .....  etc.

Can any information be lost during such flow ?
Can this be easily covered with tests to verify all works fine ?

@mwear unless I'm not aware of something then please correct me if I'm wrong but I'm missing here the TEST case when you will be switching multiple times between 2 different formats.
Imagine we have a couple services that talk to each other and you want to test scenario when they send request between each other and every time extracting and injecting headers in different format
single -> multi -> single -> multi -> .....  etc.
1. Can any information be lost during such flow ?

2. Can this be easily covered with tests to verify all works fine ?

There are absolutely situations where alternating these formats will break the trace. The only to be ensure that context is not lost in this scenario would be to inject and extract both B3 multi and B3 single for every request. This is possible by using a composite propagator configured with the B3 single and B3 multi propagators, it's just not the default.
What is implemented in the PR is what is specified here: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/context/api-propagators.md#b3-requirements. We are not trying to cover all possible scenarios out of the box, but we do allow enough configurability that users would be able to tailor B3 to the needs of their system.


Drawing Polygon reports error and cannot close  the Polygon

I use<EMAIL_ADDRESS>the following error occurs when drawing polyon.

      this.map.pm.enableDraw('Polygon', {
        tooltips: false,
        snappable: true
      })

details

I'm sorry I can't reproduce it every time, but it happens.

Can you please try if you can reproduce it on this fiddle: https://jsfiddle.net/3mhcsn2e/


Support Optional VPC Peering for Cluster VPC

As a Cluster Operator on AWS Cloud Provider infrastructure, I want to be able to have k2 support, as an option, peering with an existing VPC.
The primary use case for this is to be able to launch Kubernetes cluster that can connect to an existing VPC cluster that can facilitate any number of functions including, but not limited to, corporate network access via VPN to Customer Gateway access, existing database infrastructure, existing monitoring and log collection infrastructure.

I think it would be a valid option to be able to peer the VPC post cluster creation.  Maybe as an option to update.  The obvious benefit to update is that it can be applied to an existing cluster, rather than spinning the cluster again or re-upping it.
If would be nice to have the option to configure at either cluster up or via update, but I would by happy to have either option as a first pass at this.

what would it look like to add this type of functionality for GKE as well.


Get DCGM_FI_DEV_PCIE_TX_THROUGHPUT metric failed

I Builded from Source and run dcgm-exporter on host.
$ git clone https://github.com/NVIDIA/dcgm-exporter.git
$ cd dcgm-exporter
$ make binary
$ sudo make install
...
$ dcgm-exporter &
$ curl localhost:9400/metrics

But I can not find DCGM_FI_DEV_PCIE_TX_THROUGHPUT metrics and DCGM_FI_DEV_PCIE_RX_THROUGHPUT.
Condition:
GPU: T4
dcgm-exporter version: 3.1.8-3.1.5
nv-hostengine: 3.1.8

@Lzhang-hub,
Are those options enabled in the .csv configuration file for dcgm-exporter that you're using? The default-counter.csv files in the repository have them enabled, but dcp-metrics-included.csv disables them by default.

I use the .csv configuration file in the repository.

And I find Not collecting switch metrics: no switches to monitor in start log, Is it because can't find Nvswitch on the host?
INFO[0000] Starting dcgm-exporter
INFO[0000] DCGM successfully initialized!
INFO[0000] Collecting DCP Metrics
INFO[0000] No configmap data specified, falling back to metric file ./etc/default-counters.csv
INFO[0000] Initializing system entities of type: GPU
INFO[0000] Initializing system entities of type: NvSwitch
INFO[0000] Not collecting switch metrics: no switches to monitor
INFO[0000] Initializing system entities of type: NvLink
INFO[0000] Not collecting link metrics: no switches to monitor
INFO[0000] Pipeline starting
INFO[0000] Starting webserver

Beside, I try to get PCIE metrics through dcgmi command accord filed id https://docs.nvidia.com/datacenter/dcgm/latest/dcgm-api/dcgm-api-field-ids.html:
dcgmi dmon -d 100 -e 200
Result is N/A

@nikkon-dev Can you give me some advices, Thanks very much!

I'm having the same issue with a server with 8xA100 SXM and CentOS 7.9

@zabiziz If you want to collect metrics DCGM_FI_DEV_PCIE_RX_THROUGHPUT ,you can use DCGM_FI_PROF_PCIE_TX_BYTES1009 instead  DCGM_FI_DEV_PCIE_RX_THROUGHPUT, you can find the document in https://docs.nvidia.com/datacenter/dcgm/latest/dcgm-api/dcgm-api-field-ids.html

@zabiziz If you want to collect metrics DCGM_FI_DEV_PCIE_RX_THROUGHPUT ,you can use DCGM_FI_PROF_PCIE_TX_BYTES1009 instead DCGM_FI_DEV_PCIE_RX_THROUGHPUT, you can find the document in https://docs.nvidia.com/datacenter/dcgm/latest/dcgm-api/dcgm-api-field-ids.html

Thank you.
It worked!

I have the same question , i found the metrics DCGM_FI_PROF_PIPE_TENSOR_ACTIVE in my docker's file /etc/dcgm-exporter/dcp-metrics-included.csv , but i cann't get the value in the prometheus

@yule-sun,
dcgm-exporter does not use the dcp-metrics-included.csv by default. Its usage should be specified via the command line argument: -f /etc/dcgm-exporter/dcp-metrics-included.csv. If the command line argument -f is not provided and no ConfigMap (in k8s environment) is used, the /etc/dcgm-exporter/default-counters.csv file is used by default.
Also, the DCP metrics are not available for all GPUs, only datacenter grade (Tesla) Volta or newer arch GPUs.
For not-supported GPUs, the DCP metrics are not reported even if enabled.


Adding additional condition for rhel7stig_grub2_user_cfg for task

Overall Review of Changes:
Adds an additional condition to be satisfied in order for tasks to run for grub2 handlers
Issue Fixes:
https://github.com/ansible-lockdown/RHEL7-STIG/issues/440
Enhancements:
N/A
How has this been tested?:
Tested against current version of RHEL7

hi @layluke
Good catch in the PR, happy to merge but we do need to have the PR gpg signed. If you could add that to your commit happy to accept.
Thank you for taking the time to help improve ansible-lockdown.
many thanks
uk-bolly

hi @layluke
Good catch in the PR, happy to merge but we do need to have the PR gpg signed. If you could add that to your commit happy to accept. Thank you for taking the time to help improve ansible-lockdown.
many thanks
uk-bolly

Sorry about that,  still getting the hang of git hub. I think it's good now. Let me know if there are any other issues.


AWS-SD region error

I was just trying out the newly released aws-sd provider, but I could not get it working. This is the error I am getting:
MissingRegion: could not find region configuration
Nothing more. My guess is that the AWS SDK requires the region to be set. I searched through the code in this repo but I could not find a way to set the region. Any thoughts?

I fixed it myself! Obviously you can just add this to the yaml:
      env:
        - name: AWS_REGION
          value: eu-west-1```

Anyway, I think it would be nice to mention this in the docs. Cheers!

@DiederikvandenB maybe you can prepare a PR and amend the tutorial for aws-sd accordingly?

Is there a way to add region to the args of the external-dns deployment or does it have to be env variable?


Add Wasm implementation

This PR adds a hand-written Wasm FizzBuzz implementation. It uses WASI fd_write for writing to standard out, so it should work for any WASI-compliant runtimes (such as Wasmtime or Wasmer). I tried hard to add descriptive comments explaining what is going on.
Alternatively, you can run this with JavaScript. Here is a sample host implementation that runs with Node.js. Note that using with the JavaScript WebAssembly interface requires byte-encoded Wasm, so something like wat2wasm fizzbuzz.wat needs to be done first in order to generate a Wasm binary module.
host.js
const assert = require("assert");
const fs = require("fs").promises;
const path = require("path");

const le = true;
const decoder = new TextDecoder("utf-8");

async function main() {
  const filename = path.join(__dirname, "fizzbuzz.wasm");
  const wasm = await fs.readFile(filename);
  const { instance } = await WebAssembly.instantiate(wasm, {
    wasi_snapshot_preview1: {
      fd_write: (fd, iovs, iovs_len, nwritten) => {
        assert(fd === 1, "only stdout supported");

        const buffer = instance.exports.memory.buffer;
        const view = new DataView(buffer);

        let out = "";
        let n = 0;
        for (let i = 0; i < iovs_len; i++) {
          const iov = iovs + 8*i;
          const base = view.getUint32(iov, le);
          const len = view.getUint32(iov + 4, le);

          out += decoder.decode(new Uint8Array(buffer, base, len));
          n += len;
        }

        console.log(out.trim());
        view.setUint32(nwritten, n, le);

        return 0;
      },
    },
  });

  instance.exports._start();
}

main().catch((err) => console.error(err));

Awesome! Thank you :D
I'm reevaluating the Top 5 solutions in the readme.
May I feature your solution?

May I feature your solution?

That would be awesome! :smile:
Also, on a side note, I noticed how many PR submissions you get and how you take the time to answer them all. I tip my hat to you, sir.

That would be awesome! smile
Perfect! Added it :)

Also, on a side note, I noticed how many PR submissions you get and how you take the time to answer them all. I tip my hat to you, sir.
Well, I didn't expect so many PR's to be honest :')
Thank you :'D


Cannot set CA cert on Android

Confirm by changing [ ] to [x] below:

[x] I've gone though Developer Guide and API reference
[x] I've searched for previous similar issues and didn't find any solution

Platform/OS/Hardware/Device
x86_64 Android Emulator
Describe the question
Has anyone had a filesystem access limitation within Android?
I'm trying to make an https request on Android and it seems to be failing due to an SSL error.
I've set a cacert path via ClientConfiguration and there seems to be an issue accessing the file. Using the adb shell I'm able to cat the begining of the file proving it's existence:
130|generic_x86_64:/ # head /data/data/com.**********/files/cacert.pem
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Tue Jan 19 04:12:04 2021 GMT
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt).  This file can be found in the mozilla source tree:
## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
##

[TRACE] 2021-04-06 20:56:33.471 CurlHttpClient [131694353956176] Making request to https://************************
[TRACE] 2021-04-06 20:56:33.471 CurlHttpClient [131694353956176] Including headers:
[TRACE] 2021-04-06 20:56:33.471 CurlHttpClient [131694353956176] accept: application/json
[TRACE] 2021-04-06 20:56:33.471 CurlHttpClient [131694353956176] accept-version: v2
[TRACE] 2021-04-06 20:56:33.471 CurlHttpClient [131694353956176] authorization: Bearer ****************
[TRACE] 2021-04-06 20:56:33.471 CurlHttpClient [131694353956176] content-type: application/json
[TRACE] 2021-04-06 20:56:33.472 CurlHttpClient [131694353956176] host: ****************
[TRACE] 2021-04-06 20:56:33.472 CurlHttpClient [131694353956176] user-agent:
[DEBUG] 2021-04-06 20:56:33.472 CurlHandleContainer [131694353956176] Attempting to acquire curl connection.
[INFO] 2021-04-06 20:56:33.472 CurlHandleContainer [131694353956176] Connection has been released. Continuing.
[DEBUG] 2021-04-06 20:56:33.473 CurlHandleContainer [131694353956176] Returning connection handle 0x77c6c5505540
[DEBUG] 2021-04-06 20:56:33.473 CurlHttpClient [131694353956176] Obtained connection handle 0x77c6c5505540
[DEBUG] 2021-04-06 20:56:33.488 CURL [131694353956176] (Text)   Trying ***.***.***.***...

[DEBUG] 2021-04-06 20:56:33.488 CURL [131694353956176] (Text) TCP_NODELAY set

[DEBUG] 2021-04-06 20:56:33.524 CURL [131694353956176] (Text) Connected to **************** (***.***.***.***) port 443 (#0)

[DEBUG] 2021-04-06 20:56:33.525 CURL [131694353956176] (Text) ALPN, offering http/1.1

[DEBUG] 2021-04-06 20:56:33.526 CURL [131694353956176] (Text) Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH

[DEBUG] 2021-04-06 20:56:33.526 CURL [131694353956176] (Text) error setting certificate verify locations:
  CAfile: /data/data/com.***********/files/cacert.pem
  CApath: none

[DEBUG] 2021-04-06 20:56:33.527 CURL [131694353956176] (Text) Curl_http_done: called premature == 0

[DEBUG] 2021-04-06 20:56:33.527 CURL [131694353956176] (Text) Closing connection 0

[ERROR] 2021-04-06 20:56:33.528 CurlHttpClient [131694353956176] Curl returned error code 77 - Problem with the SSL CA cert (path? access rights?)
[DEBUG] 2021-04-06 20:56:33.528 CurlHandleContainer [131694353956176] Destroy curl handle: 0x77c6c5505540
[DEBUG] 2021-04-06 20:56:33.528 CurlHandleContainer [131694353956176] Created replacement handle and released to pool: 0x77c6c5505540

Hi @DominicCabral ,
it could be a permission thing...
Could you show me some sample code on what you're trying to do ?

Hi @DominicCabral ,
it could be a permission thing...
Could you show me some sample code on what you're trying to do ?

I had the incorrect directory set, you were correct @KaibaLopez, it was a permissions thing. The directory the app has access to was /data/user/0/**********/files not /data/data/com.***********/files.
Issue resolved, thank you!


Some questions about AS indicators

@Huaxingweichen
Hello, I have some questions about the calculation of AS in formula 5 in your paper 4.1. Datasets and Implementation Details:

What does this "2" mean? Thanks.

@Huaxingweichen
So the function of "2" is only to limit the range of AS to [1, 2]. If you use "1" instead of "2", then the range of AS becomes [0,1], then It is repeated with the "0" of otherwise below, so in order to avoid this duplication, the value range is changed to [1,2], which is the actual effect of this "2". Can this be understood?

Actually, we follow the Alibaba contest setting.
https://tianchi.aliyun.com/competition/entrance/531806/introduction

A reasonable explanation, thanks!


feat(spacelift-policy): add support for file paths

what

Adds support for using a local file path as the source of a Spacelift Rego policy
Adds an example and supporting tests

why

Policies are not always on a public URL.
Having a lot of inline policies makes the file hard to manage, plus the code editor won't recognize the syntax because it's not in a .rego file
Although this can be done on a case by case basis at the root module level, when there is a lot of policies, especially when certain policies uses an URL while others is inline and some uses local file path, it becomes messy. It's cleaner to have it at the module.

/terratest

/terratest

/terratest

/terratest

LGTM to me @oycyc -- Well done! I've asked others on the contributor team to review since we're biased 😄

This looks great! Thanks for adding tests!

Thanks @milldr ! Follow up in the components repo to support and utilize this! https://github.com/cloudposse/terraform-aws-components/pull/1091


Bug with table tests

My current environment
$ go version
go version go1.6.2 linux/amd64

$ godog -version
Godog version is: v0.5.0

I have created a feature with a scenario outline, I have added 2 examples sucessfully but when I try to add a third example I get an "index out of range" runtime error
Seems to be an issue with the output printer, as it continues to execute the test cases.
You can re-created with the following
I have re-created with this file (Failing with the 3rd example), note I have no _test.go file as not needed to re-created the error
sample.feature
Feature: demo
  Background:
    Given Something
  Scenario Outline: making http call
    When I make "<method>" on "<path>"
    Then I should get status code <status-code>
    Examples:
      | description                    | method    | path         | status-code |
      | Fails for post on /health 1    | POST      | /health      | 405         |
      | Fails for post on /health 2    | POST      | /health      | 405         |
      | Fails for post on /health 3    | POST      | /health      | 405         |

When I run
cd go/src/datadoginv
godog .

I get this
Feature: demo

  Background:
    Given Something

  Scenario Outline: making http call            # sample.feature:4
    When I make "<method>" on "<path>"
    Then I should get status code <status-code>

    Examples:
      | description                 | method | path    | status-code |
      | Fails for post on /health 1 | POST   | /health | 405         |
      | Fails for post on /health 2 | POST   | /health | 405         |
      | Fails for post on /health 3 | POST   | /health | 405         |
panic: runtime error: index out of range

goroutine 1 [running]:
panic(0x6774a0, 0xc82000e0b0)
	/usr/local/go-versions/go1.6.2/src/runtime/panic.go:481 +0x3e6
github.com/DATA-DOG/godog.(*pretty).printOutlineExample(0xc820076fc0, 0xc820120000)
	/home/pmcgrath/go/src/github.com/DATA-DOG/godog/fmt_pretty.go:187 +0x19a2
github.com/DATA-DOG/godog.(*pretty).printStepKind(0xc820076fc0, 0xc8200bf0c0)
	/home/pmcgrath/go/src/github.com/DATA-DOG/godog/fmt_pretty.go:295 +0x15a7
github.com/DATA-DOG/godog.(*pretty).Undefined(0xc820076fc0, 0xc820012cd0)
	/home/pmcgrath/go/src/github.com/DATA-DOG/godog/fmt_pretty.go:335 +0x200
github.com/DATA-DOG/godog.(*Suite).runStep(0xc8200ac2a0, 0xc820012cd0, 0x7f328f1e3028, 0xc82000f8c0, 0x0, 0x0)
	/home/pmcgrath/go/src/github.com/DATA-DOG/godog/suite.go:202 +0xa6
github.com/DATA-DOG/godog.(*Suite).runSteps(0xc8200ac2a0, 0xc82011f090, 0x2, 0x2, 0x7f328f1e3028, 0xc82000f8c0, 0x7f328f1e3028, 0xc82000f8c0)
	/home/pmcgrath/go/src/github.com/DATA-DOG/godog/suite.go:246 +0xba
github.com/DATA-DOG/godog.(*Suite).runOutline(0xc8200ac2a0, 0xc820120000, 0xc82005a720, 0x0, 0x0)
	/home/pmcgrath/go/src/github.com/DATA-DOG/godog/suite.go:310 +0x81c
github.com/DATA-DOG/godog.(*Suite).runFeature(0xc8200ac2a0, 0xc820122000)
	/home/pmcgrath/go/src/github.com/DATA-DOG/godog/suite.go:336 +0x34a
github.com/DATA-DOG/godog.(*Suite).run(0xc8200ac2a0)
	/home/pmcgrath/go/src/github.com/DATA-DOG/godog/suite.go:170 +0xdf
github.com/DATA-DOG/godog.(*runner).run(0xc8200bed00, 0xc8200bed00)
	/home/pmcgrath/go/src/github.com/DATA-DOG/godog/run.go:58 +0xe6
github.com/DATA-DOG/godog.Run(0x738cf0, 0xc820000180)
	/home/pmcgrath/go/src/github.com/DATA-DOG/godog/run.go:118 +0x5c2
main.main()
	/tmp/godog-1468325360368887697/_testmain.go:10 +0x23

app.go
package main

import "fmt"

func main() {
	fmt.Print("Dummy app")
}

thanks for the details, will have a look ;)


Swift += operator inserts extra ARC traffic and breaks uniqueness checks

Description
This thread describes the issue: https://twitter.com/cpatrascudev/status/1661340099190161409. Swift chooses to insert an extra retain/release pair in the loop and this causes the in-place append fast path to not get hit because the uniqueness check fails.
Steps to reproduce
var result = ""

/*
for _ in 1...1000000 {
	result += "abc"
}
*/

for _ in 1...1000000 {
	result = result + "abc"
}

Expected behavior
This should append in-place.
Screenshots

Environment

swift-driver version: 1.75.2 Apple Swift version 5.8 (swiftlang-<IP_ADDRESS>.2 clang-14<IP_ADDRESS>.100)
Target: arm64-apple-macosx13.0
Xcode 14.3
Build version 14E222b
macOS 13.0

Additional context
Built with -O.

CC: @meg-gupta

There seems to be a more fundamental issue optimizing this pattern:
public struct Foo {
  @_optimize(none)
  mutating func doIt() {}
}

public func test(f1: Foo) -> Foo {
  var f = f1

  for _ in 1...1000000 {
    // alloc_stack & dealloc_stack inside the loop
    //var copy = f
    //copy.doIt()
    //f = copy

    // alloc_stack & dealloc_stack once
    f.doIt()
  }

  return f
}

Revision update: Swift 5.9-dev (c1d5118c21d).


filter trajectory collection based on duration

I have a trajectory collection. I would like to keep the trajectories that have a duration (time at end location minus time at start location) greater than X. Is there a way to do that in movingpandas?
For example I would like to keep trajectories that last longer than three minutes. In the example below the expected outcome would be a collection of one trajectory (trajectory_id 2).
from shapely.geometry import Point
import geopandas as gpd
import movingpandas as mpd
import pandas as pd

df = pd.DataFrame(
    {
        "t": pd.date_range("2020-01-01", periods=5, freq="min"),
        "trajectory_id": [1, 1, 2, 2, 2],
        "geometry": [Point(0, 0), Point(0, 1), Point(0, 2), Point(0, 3), Point(0, 4)],
    }
)
gdf = gpd.GeoDataFrame(df, crs=31256)
trajc = mpd.TrajectoryCollection(gdf, traj_id_col='trajectory_id', t='t')

So far, the TrajectoryCollection constructor only has a min_length parameter https://movingpandas.readthedocs.io/en/master/trajectorycollection.html but you are right that a min_duration parameter would make sense as well.

min_duration = timedelta(minutes=1)
trajc.trajectories = [traj for traj in trajc if traj.get_duration() > min_duration]
trajc

Thanks for the work around. Closing then and continue to the convo in https://github.com/anitagraser/movingpandas/issues/148


Pixelated camera

What
The image is simply pixelated, it's not an Autofocus thing like other people have, it's just completely pixelated
Steps to reproduce the behavior
Well it just kinda happened upon installation and hasn't been going away so far 😅
Expected behavior
A clear image that the app can actually scan from
Screenshot

Smartphone model

Device: OnePlus 7Pro
OS: Android 13 (custom ROM, I know you can't guarantee compatibility with that but no other app ever had this issue so idk)
App Version: 4.3.0

Heyy @MKCOOL142 that is sad to hear. Sadly, we don't have much impact on the low level camera implementation, we use the official flutter camera package (https://pub.dev/packages/camera). You could create an issue in there  (I think all issues are tracked in the main repository)

@M123-dev Are you aware of any testing tools ECT. i could use to debug this or at least be certain that it's caused by flutter?

If you have flutter installed, you could try the official example app
https://github.com/flutter/plugins/tree/main/packages/camera/camera/example
If not, I can build the APK for you

I mean I could try to get it working but I'm not that experienced with android studio so if you want to do that it'd probably make more sense

app-release.zip
this should work

Thanks, it appears to be the exact same issue tho

Thank you for your answer @MKCOOL142! It confirms my analysis.
A solution would be to use a native barcode scanner, which I'm currently integrating in the app.


Deploy docs-stage to S3 instead of swarm

This PR changes the pipeline how to deploy master branch to docs-stage.docker.com
It removes the stage in Jenkins pipeline and activates the S3 upload in the GitHub action workflow.

I've cleaned up this PR, a previous build that ran in this PR branch was green https://github.com/docker/docker.github.io/runs/519863202 and the docs-stage.docker.com website looks good (redirects, ...).

This red status is not related, it's still our problem with the netlify cli.
The relevant build was green https://github.com/docker/docker.github.io/runs/519863202 yesterday.
PTAL @thaJeztah this is to move from docs-test to docs-stage replacing the nginx service for stage.

OK, let's go and merge this.


scale support

Hi, I think this line should be:
        UIImage *image = [UIImage imageWithCGImage:imageRef
                                             scale:scale
                                       orientation:UIImageOrientationUp];

You're absolutely correct. Thanks for pointing this out, @rickytan. This is fixed in fad66d7.


'Not' statements in WQL queries

When working on the integration of Askar with Aries Framework JavaScript, I noticed that Askar behaves slightly different from Indy when managing WQL queries.
In the test I'm writing, we are inserting 3 records with the following tags:

{ myTag: 'foo' }
{ anotherTag: 'bar' }
{ myTag: 'notfoobar' }

The query is for $not: { myTag: 'notfoobar' }, which expects to return the first two records. However, it only returns the first one. Experimenting a little bit more, I found that it only considers those records that do have a myTag: those who do not include any myTag are ignored in the query. In other words, my test interprets the query as "Give me all the records that are not tagged as myTag = 'notfoobar'", while Askar interprets it as "Give me all the records tagged with myTag that are not equal to 'foobar'".
Not sure if it's something related at Rust or JS-wrapper level, but before investigating further I would like to know if this behaviour is incorrect or my test (based on Indy behaviour) should be rewritten.

@andrewwhitehead any thoughts on the above issue? Should we write the query differently?


Detect encoding to allow for BOM.

This fixes an issue where a file starts with a BOM. Further, it also detects other character encodings in files.

I had to add chardet as a requirement here. Not sure how to make Travis happy about that.

Hi @sampattuzzi merged and fixed for Travis to work. Thanks!

Sweet!


Update PHPUnit to 4.8

4.8 was the last version with PHP 5.3 support

Still fails to install on PHP 5.3, so this can wait for the 3.0 branch


Download not working

other than 360p and music, no other version cannot be downloaded

other

How many videos have you tested for this issue?

One video
I tried from 360p to 1080p

One video
I tried from 360p to 1080p

Youtube DL does not work with some videos


Error reporting on wrong format

Currently the extension expects a structure with the following format:
{"MyStepFunctions":
  "definition": {
    "StartAt": "MyStartingState",
    "States": ...
}}

but no error is given for a wrong structure, nor are direct structures supported (just the "StartAt" and "States" keys in the main dictionary).

Direct structures should be supported now
Back then it was mainly focused on serverless format, but not anymore


Not all versions returned in available_releases have a corresponding binary

Describe the bug
For aarch64+mac (mac m2 devices), there is no release of feature version 8, which results in an inconsistency between the binary api and the available_releases api

Maybe add some filters to the available_releases api?
To Reproduce
Steps to reproduce the behavior:

Fetch the available releases from the available_releases api
Use the version 8 returned to construct a new request for binary
Make the request
Get the 404 error

Expected behavior
Either build the version or add filters to the available releases api
Device (please complete the following information):

OS: MacOS

The same issue. Please, fix that

IIRC - There is no Java 8 binary for Mac OS X (Silicon) that we release, so this is a bug in our API filtering.

IIRC - There is no Java 8 binary for Mac OS X (Silicon) that we release, so this is a bug in our API filtering.

It is not a bug, the available_releases accurately returns the union of all release feature versions, with lts, most recent, and tip info. It doesn't take any parameters to specify the platform, or return any platform information - so you cannot assume all releases are available on all platforms (they are not).
Platform specific release information can be retrieved from, for example, the release_names request, e.g. for architecture=aarch64 and os=mac you can find the names for GA releases of a JDK via
curl -X 'GET' 'https://api.adoptium.net/v3/info/release_names?architecture=aarch64&os=mac&image_type=jdk&release_type=ga'

Calculating this page for an arbitrary set of user supplied filters would be potentially a comparatively expensive operation, and I am not sure if it offers an increase in functionality that other endpoints don't already make available, such as the release_names endpoint

Calculating this page for an arbitrary set of user supplied filters would be potentially a comparatively expensive operation, and I am not sure if it offers a significant increase in functionality that other endpoints don't already make available, such as the /v3/info/release_names, /v3/info/release_versions or /v3/assets/feature_releases which can be used to determine if a version is available for a specific feature version.

An update to our API docs then?


Add shop=insurance to deprecations

See https://wiki.openstreetmap.org/wiki/Tag:shop%3Dinsurance
It has never been approved. There was an abandoned proposal.
shop=insurance is used 430 times. office=insurance is used 40440 times.
It is documented to be synonymous to office=insurance. The wiki recommends since 14 July 2013 to use the more widespread office=insurance instead.

https://taghistory.raifer.tech/#***/shop/insurance&***/office/insurance

@westnordost Thanks for including the background info on these, makes them easy to evaluate!

...and later to understand why a decision was made in case someone complains... :-)


Command-line configuration

Would you consider adding CLI support? A scenario I'm thinking of would work very nicely if you could override most/all of the config from CLI input, and it seems redundant to use clap to find the config file, get the contents of the config file, and then clobber those values with CLI inputs where they exist.
In the C# world, I'd add the https://www.nuget.org/packages/Microsoft.Extensions.Configuration.CommandLine/ package, which would then allow inputs in a number of forms, which would then override the config file settings depending on precedence.

A close integration with clap would definitely be a neat thing to have.

If possible, it'd be great to reuse the names of fields in the struct, or allow them to be set via macros, so they can be used directly as flags (e.g. --key=value). Otherwise, yeah, --conf "key=value".

sure will figure out how to do it through macros, still new to rust :)
did initial version with multiple --conf parameter, let me know ur thoughts
https://github.com/tanujitghosh/config-rs/blob/issue-64/src/config.rs . - merge_args()
https://github.com/tanujitghosh/config-rs/blob/issue-64/tests/file_toml.rs . - test case here

An integration with Clap will be the way to go in my opinion too. Did you start working on that? Otherwise, I might give it a shot.

It seems to me clap integration could be implemented by providing a derive macro allowing a user to convert a struct into a Config value, which could then be merged with other sources in the usual way.
This would also allow the programmer to declare a single static struct with all of the default values, and convert that into the base Config for merger with other sources.
It should be possible to do a poor man's version of this already by implementing Serialize for the struct produced by clap and then deserializing the result into a Config.

It seems to me clap integration could be implemented by providing a derive macro allowing a user to convert a struct into a Config value, which could then be merged with other sources in the usual way.
This would also allow the programmer to declare a single static struct with all of the default values, and convert that into the base Config for merger with other sources.
It should be possible to do a poor man's version of this already by implementing Serialize for the struct produced by clap and then deserializing the result into a Config.

Are there any updates on this?

This project presently has no active maintainer AFAIK. I would be reluctant to adopt a crate for a new project when maintenance / development is halted.
I may eventually have time to assist with review and merging of contributions, but I'm not able to commit to a proper maintainer role here, nor do I have the ability to publish a new release I think even if I assist with PRs in future.
Despite the crates popularity, it's unclear when/if a new maintainer will arrive. You may want to look into other alternatives?

I rigged something up that supports jq syntax.
see: https://github.com/rust-cli/config-rs/issues/325#issuecomment-2480416225
https://github.com/blueforesticarus/goontunes2/blob/b73a4a9d90322aee223046893fddbc4bac73c719/src/config.rs


Update deps and fix of source compatibility issues

./
v1.16.11     ⇒ v1.30.3     	github.com/aws/aws-sdk-go-v2
v1.17.1      ⇒ v1.27.27    	github.com/aws/aws-sdk-go-v2/config
v1.54.0      ⇒ v1.173.0    	github.com/aws/aws-sdk-go-v2/service/ec2
v1.14.14     ⇒ v1.27.5     	github.com/aws/aws-sdk-go-v2/service/pi
v1.24.0      ⇒ v1.82.0     	github.com/aws/aws-sdk-go-v2/service/rds
v0.6.6       ⇒ v0.7.1      	github.com/montanaflynn/stats
v3.13.1      ⇒ v3.14.6     	github.com/schollz/progressbar/v3
v1.2.1       ⇒ v1.8.1      	github.com/spf13/cobra
v0.2.0       ⇒ v0.4.0      	go.uber.org/mock

👍

:+1:

👍

👍

./
v1.30.3      ⇒ v1.30.5     	github.com/aws/aws-sdk-go-v2
v1.27.27     ⇒ v1.27.33    	github.com/aws/aws-sdk-go-v2/config
v1.173.0     ⇒ v1.177.3    	github.com/aws/aws-sdk-go-v2/service/ec2
v1.27.5      ⇒ v1.27.9     	github.com/aws/aws-sdk-go-v2/service/pi
v1.82.0      ⇒ v1.82.5     	github.com/aws/aws-sdk-go-v2/service/rds
v3.14.6      ⇒ v3.15.0     	github.com/schollz/progressbar/v3

👍

@larry-dalmeida Please review it again with thumb up! Apparently, PR has to be touched before zappr accepts changes.

👍

@pioneerit @tcondeixa @remychantenay Could you please check this one?

👍

Thank you @tcondeixa !


Cannot load rails secrets in workers

Apparently I need a connection config per worker otherwise it takes the default config.
So that is working but i cant load secrets from rails here...
from_queue 'sync-rental', durable: true, amqp: '...'
What is the work around?
Is there an example of setting the conf with runner_config_file

I'm afraid that's not enough information to suggest much. I'm not a Rails user so I cannot how Sneakers can affect secret loading but we'd need to have some evidence (a reproducible example) of that.


Sort by data attribute

Is it possible to sort a list by data attributes of its elements?
I could write a custom sort function, but is there a simpler recommended way?

Sorting by data attributes would be a great feature.

This I'll (finally!) be added in the next version that is coming out soon!
Duplicate of #35.


[BUG] Incorrect JAVA_HOME in Dockerfile

Context:

Playwright Version: 1.27
Operating System: Linux
Browser: Chromium
Extra: ARM64 arch

JAVA_HOME was not updated after the JDK version was updated to 17.
Link to the issue

We can easily override the ENV while running the image, but it looks like the change was missed out.

Yeah, we should update that to point to jdk 17 instead. It turns out that maven 3.6.4 that comes with ubuntu 22.04 will fail with jre 17 and if we only ship jdk 17 we'll have to also install new version of Maven  (3.8.6) from Apache downloads. It may be easier to just switch to ubuntu 22.04 as bas image.


Integration tests: run in parallel

Updates integration tests to run in parallel. This reduces the runtime on my machine from ~4.50m to ~ 30s- a significant speed up!
Integration tests are always run in parallel by default, but can be run serial by setting --integration-parallel=false when running the tests. CI runs tests in parallel.
Free port has been made more protective over claimed ports to prevent port claim conflicts now processes are being Setup in parallel.
The SentryTokenFile field has been added to the Security Options to enable the placement/quorum/jwks test as t.Setenv is not available when running tests in parallel.
--webhook-server-port is now exposed on the operator binary so that it can be given a random port in integration tests, preventing port conflict errors when running in parallel.
Removes placement from non-dependant daprd metrics tests.

/test-version-skew


Enable clippy's uninlined_format_args linter

This PR enables the uninlined_format_args linter and fixes its findings.

Sorry again, didn't realize it would touch so many files. I wasn't running the fully command (like in the CI workflow) so I didn't notice a lot of the findings. This PR is pretty nit-picky. You're welcome to close without merging if it's too much.

Sorry again, didn't realize it would touch so many files. I wasn't running the full command (like in the CI workflow) so I didn't notice a lot of the findings. This PR is pretty nit-picky. You're welcome to close without merging if it's too much.

love this one, good lint


A usage of the right context.

Hi Alex. I noticed that in your plugin you are using a deprecated method CreateRenderer. It causes problems with the right context when you are using more than one activity. Can you merge my changes and prepere new nuget?
Best regards,
Błażej Kosmowski

I have been working on a big update. This is one of the changes i am including.

Have you any information about release date?

Merged.


feat!: initial version of template for templates

Description

initial version of template for templates

Let me know if I should rather split it into multiple commits, if this is actually going to help, or better just add some more description here?
This is the result you get when using this template with
ag https://bit.ly/asyncapi-dummy https://github.com/derberg/template-for-generator-templates-1/#init -o output
open output/index.html
#or
ag https://bit.ly/asyncapi-dummy https://github.com/derberg/template-for-generator-templates-1/#init -o output -p pdf=true
open output/index.pdf

Resolves https://github.com/asyncapi/generator/issues/402

@Tenischev yo, you might want to look at one new thing I added to this PR, it is a readme template that was initially missing. Have a look at _README.md

@derberg, Barbara made a great review, nothing to add 😃

@bszwarc I applied some changes, not sure if you want to check before I merge


how to hide actions column ?

I use ng2-smart-table for display purpose. Actions column is auto-generated even if it's not mentioned in column list. How to hide it ?

Please, take a look https://github.com/akveo/ng2-smart-table/issues/137.

Please, take a look & try it. It's work for me.(https://stackoverflow.com/questions/50817642/angular-5-ng2-smart-table-hide-disable-actions-column-conditionally/52781288#52781288)


feat: per-server quotapoints

for now, with the ts-ignore calls, it works with the old data (i think, i had to delete it to make it work) (does not)

Fix ESLINT code scan

lmao perfect. Thanks, I'll continue looking.
@nyapat one more thing -- can you bump the version to 1.3.1? Might as well do that in this PR since it's open


Fix specs with VCRs recorded on previous versions

Previous versions of this gem requested /config/ to avoid redundant redirects (added in https://github.com/ansible/ansible_tower_client_ruby/pull/124).  Now it is requesting /config which is causing vcr breakages after https://github.com/ansible/ansible_tower_client_ruby/pull/137 changed this
Failure on manageiq hammer on first run after v0.21.0 was released https://travis-ci.org/ManageIQ/manageiq/builds/651202354#L1149

FYI... The trailing / avoids unnecessary redirects.  https://github.com/ansible/ansible_tower_client_ruby/pull/124

@bdunne yup

Previous versions of this gem requested /config/ to avoid redundant redirects (added in #124).

:smile:


LLama 3.2 Vision Support

Llama 3.2 introduced a new layer/arch for the vision model that uses non-uniform layer format where every 4th layer is cross-attention layer that is very different from normal models. We will investigate gptq integration for this.
If you want to contribute, please add your ideas to this post or create a PR. Thank you!
Work in progress: https://github.com/ModelCloud/GPTQModel/pull/401

Text (layers responsible for text generation) quantization complete in pr #401. We will merge this first then complete the vision layer quantization which may require some api changes since we need a visual/image dataset to be passed in.

Note: This PR is PARTIAL MLamma support. Only text layers (layers repsonsible for text generation) are quantized. The Cross-attention layers are not yet quantized. As result, 4bit quant of 11B vision model results in 50% reduction and not ~1/4 as expected.
We will work on the vision layers quantization tomorrow.

Closing as completed for now. Quantization/calibration of non-text modal layers will need a generic fix since many new models are now multi-modal. We need to test the quantization/calibration of these layers.


Add primary information in monitor info class

When I was working on a project using WinUIEx, I found that the MonitorInfo class could not provide parameters related to the primary monitor.
So, I went online to search and complete this commit.
Hopefully I'll get this update in the Nuget package soon!

I have edited my codes with your advice.

Add support to get the display monitor closest to a given window.

Add support for relative coordinates.


did not get postman challange points

Discussed in https://github.com/orgs/GSSoC24/discussions/1026

Originally posted by vishantrathi November  1, 2024
Hi, I completed challenge adding the relevant links and proofs
Canvas Badges: https://api.badgr.io/public/assertions/6niGQm__To-7rhH-U2SuFw?identity__email=vishantrathigurjar%40gmail.com
Email<EMAIL_ADDRESS>Screenshot of Mail received from Postman

@sanjay-kv, @priyanshukumar397, @PRATHAMU200, @shreyash3087, @Jisha-tr please help resolve this

Hi @vishantrathi please create a PR for this, then we will merge your PR after 12hrs your points will be reflected in the leaderboard.


iOS TextField thumbs are not using ThemeData.textSelectionHandleColor

Steps to reproduce:
use themedata
ThemeData(
 textSelectionHandleColor: Colors.amber,
)

use a textwidget somewhere.
TextField();

Flutter Doctor:
[✓] Flutter (Channel stable, 1.22.1, on Mac OS X 10.15.7 19H2, locale en-BE)
    • Flutter version 1.22.1 at /Users/vanlooverenkoen/fvm/versions/stable
    • Framework revision f30b7f4db9 (7 days ago), 2020-10-08 10:06:30 -0700
    • Engine revision 75bef9f6c8
    • Dart version 2.10.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/vanlooverenkoen/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 50.0.1
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[!] VS Code (version 1.50.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

Hi @vanlooverenkoen
I see there's an open issue addressing the case you described. https://github.com/flutter/flutter/issues/43887
Please follow up on that issue, I'm closing the current one as a duplicate.
If you disagree, please write in the comments and I will reopen it.
Thank you


Fix: #37 Fix the typo of bug

How does this PR do?

Fixes the module import error by correcting the path for getGameStats in api/state.get.ts
Adds a mock getGameStats function in database/index.ts to simulate game data retrieval.
Refactors the API handler to compute game ratings based on fetched statistics.
Provides a basic TypeScript configuration (tsconfig.json) to handle module resolution and type checking (if applicable).

Fixes #37
What type of changes?

Bug Fix: Corrected the module import path in api/handler.ts.
New Feature: Added mock getGameStats function in database/index.ts to simulate game data.
Refactor: Improved the API handler logic for fetching stats and computing ratings.

##How should be this tested

Run the API and verify game stats are fetched correctly.
Confirm accurate rating calculations from the fetched stats.
Check for import errors in api/state.get.ts.

Can you please explain the motivation behind this PR.

The motivation behind this PR is to enhance functionality and reliability by updating "h3" to version ^1.12.0, providing new features, bug fixes, improved security, better compatibility, and enhanced performance for a smoother user experience.

Thank you for your initiative, but I am going to close this PR because it's impact isn't clear to me.

Thank you for your initiative, but I am going to close this PR because it's impact isn't clear to me.

okay, sorry for that


GetExtendedContactDetails.Attributes should be map[string]interface{} according to docs, but is not in code

type GetExtendedContactDetails struct {
        [...snip...]
        Attributes *interface{}                         `json:"attributes"`
        Statistics *GetExtendedContactDetailsStatistics `json:"statistics"`
}

Found the same problem in all APIs.

I second that. Broken in lots of cases.
Codebase sample - Params defined as *interface{}. How should that be used at all this way?
type SendSmtpEmail struct {
	...
	Params *interface{} `json:"params,omitempty"`
	...
}

Docs sample (https://developers.brevo.com/reference/sendtransacemail)
Params: = map[string]interface{}{
      "parameter":"My param value",
      "subject":"New Subject",
    }


Remove console warnings of deprecated dependencies

highlight is deprecated:
marked(): highlight and langPrefix parameters are deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-highlight.

I tried switching to marked-highlight by deleting https://github.com/fumiX/fuBlog/blob/1c23e7ba3ede0021c253d5e0c4fdd9c442ff37de/common/src/markdown-converter-common.ts#L119-L121 in favour of adding
import { markedHighlight } from "marked-highlight";
…
marked.use(
  markedHighlight({
    highlight: function (code, lang) {
      return highlightjs.highlightAuto(code).value;
    },
  }),
);

after this line https://github.com/fumiX/fuBlog/blob/1c23e7ba3ede0021c253d5e0c4fdd9c442ff37de/common/src/markdown-converter-common.ts#L110
But I always get this error:
 ../node_modules/marked-highlight/src/index.d.ts(68,82): error TS2694: Namespace '"/home/username/path-to-project/node_modules/@types/marked/index"' has no exported member 'MarkedExtension'.
       ../node_modules/marked-highlight/src/index.d.ts(76,83): error TS2694: Namespace '"/home/username/path-to-project/node_modules/@types/marked/index"' has no exported member 'MarkedExtension'.
       ../node_modules/marked-highlight/src/index.d.ts(86,23): error TS2694: Namespace '"/home/username/path-to-project/node_modules/@types/marked/index"' has no exported member 'MarkedExtension'.


Check DEP00XX and REPLACEME tags for PRs

See e.g. https://github.com/nodejs/node/pull/18990#discussion_r170592279 , I'm not sure where this is documented, although there is something here:
https://github.com/nodejs/node/blob/61e3e6d56feefcd88f2baeb59c31c327835a8d90/doc/releases.md#step-3-update-any-replaceme-and-dep00xx-tags-in-the-docs
PRs that add new deprecations should have DEP00XX, which should be replaced with an actual number (e.g. DEP0100 when it lands).
PRs that add new APIs should have REPLACEME tags, that are updated with the correct version when they land in a Current release (which is then backported to LTS versions).
Things we could do:
Basic:

Warn if there is a DEP00XX tag.
Autoreplace DEP00XX with the next deprecation number.

Complicated:

Check for newly added DEP???? tags (where the PR erroneously contains an already-assigned deprecation number) and warn.

Also autoreplace with the correct number

Check for added: v?.?.? tags in the diff and warn.
Check for new APIs that don't have the added: option (should maybe be a node lint instead).

cc/ @nodejs/release @nodejs/lts as the groups perhaps most likely to know about these things.

For, checking if a DEP00XX is included in PR we need to make a call to github v3 api. I'd avoid making useless calls so how about we check if deprecation tag is checked if commit msg includes deprecate or deprecation?
(This is temporary until near future, since github api v4 team is already planning to implement this)

For, checking if a DEP00XX is included in PR we need to make a call to github v3 api. I'd avoid making useless calls so how about we check if deprecation tag is checked if commit msg includes deprecate or deprecation?

If this is done as part of git-node-land you should already have the commits on disk right?

I feel like this should be done in the linter somehow? Or a pre-commit git hook. It feels a bit too late to warn about that during landing

I was thinking this to be done before landing the PR and let the reviewer know that this PR has a dep tag (correct/incorrect update), But if this was to be done locally or pre commit-hook how do we validate the DEP Tag AFAICT it should be only be DEP00XX  regardless of the number of DEPS right?

I guess we can grab the diff of a commit with message containing "deprecate"/"deprecation", and look for lines that add DEP\w+ - if there are no equivalent lines that remove the same code, that means this is a new deprecation, then we can go check if it's DEP00XX. Although there are still other things that we need to take care of...like for example we only need to check commits that land on the master branch.
OK so now this sounds more like the job of core-validate-commit? Or we can add another tool that does this during git-node-land --final

I feel like this should be done in the linter somehow? Or a pre-commit git hook. It feels a bit too late to warn about that during landing

Which thing specifically? The "replace DEP00XX tags" needs to be done as part of the landing process (at the same time as you modify the commit message to add the metadata), so it can't be done as a lint.
I think it probably makes sense as part of git node land --amend.

@gibfahn I see, I thought you were talking about something like "warning against DEP100 code assigned on master branch because it should not be done there", but IIUC you were actually talking about landing commits on release branches. I have not used git node land on a release branch before but I think it is possible to run some extra stuff there (just need to ncu-config branch v8.x-staging and it'll know it's landing commits on a release branch).

I thought you were talking about something like "warning against DEP100 code assigned on master branch because it should not be done there",

That is what I called the Complicated part. Both the Complicated and the Basic checks need to be done on landing, because the linter can't tell whether it's being run on a commit that has landed on master. It should be easy enough to do, just run any checks as part of the git node land --amend.

but IIUC you were actually talking about landing commits on release branches.

The REPLACEME tags need to be done when landing commits on release branches, the DEP00XX tags need to be done when landing commits on master. We should probably deal with them separately.

(just need to ncu-config set branch v8.x-staging and it'll know it's landing commits on a release branch).

Couldn't we figure that out from the PR base branch?

OK so now this sounds more like the job of core-validate-commit? Or we can add another tool that does this during git-node-land --final

Could be done in either I guess. Is there a plan to pull core-validate-commit into this repo?

See https://github.com/nodejs/node/pull/18990 for a good example of something with both.
The DEP00XX will be replaced on landing by whoever lands the PR on master. The REPLACEME will be replaced on backporting by whoever backports the PR to v9.x.

https://github.com/nodejs/node-core-utils/pull/420 implemented this for DEP00XX, we just need to do the same for REPLACEME now.

REPLACEME tags should only be set in the release commits. This is already done in https://github.com/nodejs/node-core-utils/blob/498d600a4382d731f40327a5ce0bd4738961926b/lib/prepare_release.js#L115-L118.

Oh cool, we can close then


Scan and parse test files only once

This PR implements scanning and parsing the test files only once instead of every e2e_test run.
closes #1651

I wonder if we should just not rely on ctest, but directly run e2e_test binary?

Yes, we can directly run e2e_test binary by passing the test file or directory. We use ctest utility to organize what tests to run and provide a nice output. If we are going to run e2e_test directly, we will have to create a minimal utility to organize what tests to run, perform e2e_test passing the file, capture the output, summarize and print the results. We can have more control. It might be a good alternative.


Add scala.Singleton trait to synthesized definitions

Closes #1496

Thanks for the review @xeno-by, I've addressed your comments.


Throw CommandSyntaxExceptions when ListArgument input is wrong

Adding one last change to the ListArgument I forgot for #319, this PR enforces the ListArgument's syntax by throwing CommandSyntaxExceptions. Previously, the ListArgument would ignore items that weren't in its list and move on. If the list didn't allow duplicates, it would also just add one of each item. Now, a CommandSyntaxException will be thrown in those cases.
I think the changes to the test cases best explain this:
server.dispatchCommand(sender, "list cat, wolf, axolotl"); // normal list
server.dispatchCommand(sender, "list cat, wolf, axolotl, wolf"); // don't allow duplicates
server.dispatchCommand(sender, "list axolotl, wolf, chicken, cat"); // don't allow unknown items

This list command does not allow duplicates. The first command works. The second command complains that wolf is in the list twice. The third command complains that chicken is not a known argument.
I think this way of handling incorrect items in the list is better than the previous method. Before, if a player sent the command list cat, wolf, axolotl, wolf and didn't get any errors, they would expect that whatever the command did, it used wolf twice. No one would know that the second wolf was cut out of the list behind the scenes. Now, that player would get a command error saying wolf <- Duplicate arguments are not allowed and understand why the command isn't doing what they thought it should.
I did have to modify the ListArgument tests, and I'm not sure if I did that correctly. When an invalid command is sent I made it check that nothing got through using assertNull(type.get());. If there's a better way to check for a command error, you can put that in.

I've tested the main code (i.e. not the automated tests) and it works nicely. The one minor issue I have with it is I don't like the error message "Incorrect argument for command" - I think a more specific error message would be better, for example "List item  is not a valid list entry".

Awesome, thanks very much! I clearly had no idea how to put that error message into reasonable English, but you managed to do so with no issues :)


QUAD_CACHE: Question

Just a general question about the code here. Why is QUAD_CACHE only applied for gcc? Wouldn't you want to limit to fit in cache with clang as well? Does some sort of llvm optimization manage to work around cache issues?
#if !defined cmp && !defined __clang__ // cache limit workaround for gcc
	if (left > QUAD_CACHE)

The main issue is that branchless executions are ineffective on uncached memory.
So the code is switching from a complex branchless merge in gcc, to the simpler merge that is the default in clang.

I see, so these merges in clang don't actually optimize to branchless:
#define head_branchless_merge(ptd, x, ptl, ptr, cmp)  \
	*ptd++ = cmp(ptl, ptr) <= 0 ? *ptl++ : *ptr++;

#define tail_branchless_merge(tpd, x, tpl, tpr, cmp)  \
	*tpd-- = cmp(tpl, tpr) > 0 ? *tpl-- : *tpr--;

How much does that end up hurting perf?

Clang uses a compiler hack that makes most ternary operations branchless, including the merges used by quadsort.
It gives around a 30% performance boost when sorting random data.

That nice. I don't quite fully follow though. If clang still makes this branchless, why doesn't it need QUAD_CACHE?
Shouldn't it still hit issues with:

The main issue is that branchless executions are ineffective on uncached memory.

Gcc uses these instructions for branchless merging:
 x = cmp(ptl, ptr) <= 0;  *ptd = *ptl;  ptl += x;  ptd[x] = *ptr;   ptr += !x;  ptd++;

Clang uses this:
        *ptd++ = cmp(ptl, ptr) <= 0 ? *ptl++ : *ptr++;

So clang doesn't need QUAD_CACHE, because it's already using a simpler merge routine.

That makes sense. Thanks!


[SPARK-19168][Structured Streaming] Improvement: filter late data using watermark for Append mode

What changes were proposed in this pull request?
Currently we're filtering late data using watermark for Update mode; maybe we should do the same for Append mode.
Please note this is an improvement rather than correctness fix, because the current behavior of Append mode is quite correct even without this.
How was this patch tested?
the first commit (https://github.com/apache/spark/pull/16547/commits/81b1734d0fb8df082d41f1ec73bae9713c1c8387) of this patch added numRowsUpdated checks in EventTimeWatermarkSuite.scala:
line 139:  AddData(inputData, 10),
line 140:  CheckLastBatch(),
line 141:  assertNumStateRows(2, 1)  // We also processed the data 10, which is less than watermark

the second commit(https://github.com/apache/spark/pull/16547/commits/caf7b3400b626a5266579f04288eb6e2504b9895) of this patch introduced filtering late data to append, as well as changed the numRowsUpdated checks to:
line 139:  AddData(inputData, 10),
line 140:  CheckLastBatch(),
line 141:  assertNumStateRows(2, 0)  // We processed nothing in this batch

Also the changes should be covered by existing watermark test cases.

Test build #71193 has started for PR 16547 at commit c9f62c1.

Test build #71193 has finished for PR 16547 at commit c9f62c1.

This patch fails Scala style tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71193/
Test FAILed.

Test build #71195 has started for PR 16547 at commit f24aeb1.

Test build #71195 has finished for PR 16547 at commit f24aeb1.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71195/
Test FAILed.

Test build #71203 has started for PR 16547 at commit caf7b34.

Test build #71203 has finished for PR 16547 at commit caf7b34.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71203/
Test PASSed.

Merged build finished. Test PASSed.

@tdas @zsxwing would you take a look, thanks!

@lw-lin I noticed a potential issue in update mode. It may not consume the whole Iterator when the downstream operator is take, which will make the state store not commit. Could you also fix it? The code should be similar to append mode.

@zsxwing thanks for the comments. I'll update this.

Test build #71248 has started for PR 16547 at commit 07a020e.

Jenkins retest this please

Test build #71266 has started for PR 16547 at commit 07a020e.

Test build #71266 has finished for PR 16547 at commit 07a020e.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71266/
Test PASSed.

@zsxwing updated as per your comments; would you take another look?

Discussed with @tdas offline. Regarding the changes to the append mode, it's unknown that if adding the filter is better because it will apply the filter on all rows but there are usually only few rows out of watermark. It's better to just leave it as it it.
For aborting StateStore, could you use TaskContext.addTaskCompletionListener instead? So that if the error doesn't happen in hasNext or next method, we can still abort it. You can add a flag to indicate if the StateStore is committed or not.

Could you also update the JIRA and the PR description after your changes?

Thanks for the feedback! Ah, sure, let me update accordingly.

Test build #71512 has started for PR 16547 at commit cf24fad.

Test build #71512 has finished for PR 16547 at commit cf24fad.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71512/
Test PASSed.

Test build #71565 has started for PR 16547 at commit 0f9e54d.

Test build #71565 has finished for PR 16547 at commit 0f9e54d.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71565/
Test PASSed.

LGTM. Merging to master and 2.1. Thanks!


Some links on api.dartlang.org don't work since 1.24.3

On the Dart core page there is at least one link in the body of the page for dart:collection -> https://api.dartlang.org/stable/1.24.3/#dart-collection
Found on this line: For other kinds of collections, check out the dart:collection library.
I don't know know of any other broken links on this page or any of the other pages. Suggest some kind of link validator is executed.

Note: I used this page to check the website: https://error404.atomseo.com/SeoCheck/Report/api.dartlang.org/2017-12-14/free?from=
When it was done it found:

96 Broken links on your site (internal)
1 Broken link from your site to external resources
7 Broken anchor on your web pages

Duplicate of https://github.com/dart-lang/sdk/issues/31246


Vue resource in async validation

Hi,
I use vue-resource in an async validation field, but Vue.http or this.$http.post always return a resolved promise, the partials code is following:
The template markup is like this:
 <input id="sms" type="text"
          detect-change="off" v-validate:sms="{
          required: { rule: true},
          smsVerify: { rule: true, initial: 'off' }
        }" />

Javascript is like this:
export default {
  data () {
    return {
      ...
    }
  },
  validators: {
    smsVerify (val) {
      let promise = this.vm.$http.post(API_CONTEXT.SMS_VALIDATE.resource,..)
      console.log(promise)
      // the promise here is always resolved,
      // even if my rest api return http code 403
      ...
    }
  },
  methods: {
    smsVerifyInMethods () {
      let promise = this.$http.post(API_CONTEXT.SMS_VALIDATE.resource,...)
      console.log(promise)
      // the promise here returns the expectation resolved or rejected
      ...
    }
    ...
  }
}

You need to implement custom validation that return a promise.
http://vuejs.github.io/vue-validator/en/async.html
In the above partials code, You don't return a promise.
In real code, You return a promise, don't you?

@kazupon Thanks
In real code like following, it really works well
  validators: {
    smsVerify (val) {
      return this.vm.$http.post(API_CONTEXT.SMS_VALIDATE.resource,..)
          .then((response) => Promise.resolve(response))
          .catch((error) => Promise.reject(error))
    }
  }

At the beginning, my code is just
  validators: {
    smsVerify (val) {
      return this.vm.$http.post(API_CONTEXT.SMS_VALIDATE.resource,..)
    }
  }

From my understanding,
this.vm.$http.post

should return a promise with status 'resolved' when response.status >= 200 && response.status < 300, otherwise should be rejected. But It can't work, after some debug, i found this.vm.$http.post(API_CONTEXT.SMS_VALIDATE.resource,...) always return a resolved promise whatever the response.status is.
After this i wrote a testing snippet
  methods: {
    smsVerifyInMethods () {
      let promise = this.$http.post(API_CONTEXT.SMS_VALIDATE.resource,...)
      console.log(promise)
      // the promise here returns the expectation resolved or rejected
    }
  }

In the above code, it printed the expected promise status 'resolved' or 'rejected'.
My questions is:
Why the ```Vue.http`` return different result between validators and methods.
Thanks again.

Thank you for your feedback!!

Why the `Vue.http return different result between validators and methods.

Hmm, These difference is context.

fucntion of validators: validator context
function of methods: Vue instance context

However, I think that these difference don't effect to async validation.
I change async example with vie-resource, and tried to and tried to reproduce, but I could confirmed this issues.
Can you reproduce the minimum codes (not real application codes)?
If it is possible, I hope that you provide the it with gist.

@kazupon Thanks a lot
After further reading the code of due-resource (Promise adapter), things are clear, it's really not a bug of Vue-validator, and sorry for interruption. Details are:
this.$http.post  doesn't return an ES6 style promise, the thenable chain  always return the first promise, not return a new one as ES6 does. i think the purpose is to bind the Vue component context.
Such as the following code:
 validators: {
    smsVerify (val) {
      let promise = this.$http.post(API_CONTEXT.SMS_VALIDATE.resource,...)
      // promise.promise is the really ES6 style promise
      // and with the expected status 'pending'
      ...
    }
  }

And meanwhile, my testing method is unreliable, as above comment  said, promise.promise will execute the thenable chain in right way.

Thank you for your feedback.
I'll try to consider improvement of validator context.
Also, I'll try to update async validation section of the documentation.


not responding state after upgrading MacOS to 14.2

Since I updated my machine to 14.2, the Scroll-Reverser not worked, and in the activity monitor, I see it is in the not responding state
Machine: MBP 16" M2 Pro
OS: MacOS 14.2

What remedial steps have you already tried?
If not already, try force quitting it and launch again.

Remove, then install again
check the console log to find a probable clue
Restart the machine :D

Ah! weird issue!!
With unpair/pair mouse again, Fixed!
thanks


Split base of go-ipfs/routing/routing.go into go-libp2p-routing

As discussed in libp2p/go-libp2p-kad-dht#5 this moves the base structs of ipfs' routing into a separate package.
@whyrusleeping better ideas always welcome :)

@whyrusleeping this update also includes notification from go-ipfs as per the same discussion.


Waypoints created during bounce from iOS scroll are always triggered

If the previous scrollTop is negative and the next scrollTop is 0, any Waypoints created at that moment will automatically trigger regardless of their triggerPoint. This may be possible in other environments, but #488 uncovered this on iOS by creating a new Waypoint on every scroll event and bouncing the scroll past the top of the document.
I've tracked down the cause and fix:

new Waypoint calls Context.prototype.add
add calls refresh
refresh calls handleScroll to ensure pending triggers happen before any potential triggers from refreshing.
handleScroll, when looping through waypoints, gets to our fresh waypoint with null triggerPoint. wasBeforeTriggerPointl is true because -number < null is true, and nowAfterTriggerPoint is true because 0 >= null is true.

Need to make these statements false or otherwise ignore fresh waypoints in the handleScroll checks. The refresh check that comes later handles the fresh waypoint case.

Fixed in the 4.0.1 release.


Error inject when not have head tag

if write this pug file
doctype html
html
    body
        h1 it's is test

We receive
doctype html
html
        link(rel="shortcut icon" href="favicon.ico")
        link(href="assets/stylesheet/styles-9ed63bb4501055c2f69667b5f8a55330.css" rel="stylesheet")
    body
        h1 it's lol
        script(type="text/javascript" src="assets/js/bundle-8e2548b8ea19ef9df105.js")

I released a new version.


APLIC ithreshold description typo

In ithreshold section, it says interrupt sources with priority numbers P and higher do not contribute to signaling interrupts to the hart. I believe that higher should be corrected to lower, just likes the threshold definition in original PLIC spec.

According to spec.
Interrupt priorities are encoded as integers, with smaller numbers denoting higher priority, to match the encoding of priorities by IMSICs.

Sorry for the misunderstanding


LaTeX.gitignore adding extensions

Add more extensions to ignore *.pdf, and *.tex~, *.tex.backup which may be
produced from working with a rich text editor

I think adding pdf may be a little too bold. some people might not expect that gitignore is going to ignore the final product of their work...

I have ignored it as it produces some conflicts when compiled the tex file.
Also the ps and dvi files are ignored, and they are considered tex output.

I do not understand your message? pdfs interfere with tex compilation?
I never never use ps and dvi so I missed them. Thanks for pointing that out. It does not make a lot of sense to me...

I mean that if someone has compiled the tex file on his machine and pushed the pdf to the repo, it may lead to conflict will pulling it by another user, and that's what happened to me.
Also dvi and ps files are considered outputs to the tex, and they are ignored in the file.


Flutter show list of permission under dependencies

Use case
I have an issue on my apps got rejected several times on Google play store due to not compliant with Google Play policies because of some plugins that I used do have some permission which required some work for me to declare why do I need those permission.
I believe that the policies are beyond developer controls, but what I am trying to say is it is hard for me to trace each of plugins permission on their respective AndroidManifest.xml because some of the permission might not be needed on the apps.

Proposal
A command like flutter pub deps will shows each dependencies on the apps. How about there is another command to shows list of permission under the dependencies as well?

This is a duplicate of https://github.com/flutter/flutter/issues/39444.


Feat: Scraping Dictionary.com for the Word of the Day

Describe the feature
Users can view the word of the day on Dictionary.com along with the definition, examples, and pronunciation.
Add ScreenShots

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a Hacktoberfest'23 contributor
[X] I want to work on this issue

Go ahead @swetha3456
Note

Create a separate module for this, as per the folder and project structure
Do not use the `selenium web driver as it is incompatible with all devices and cloud platforms.
Before making any changes, please check whether the module you want to add exists. If yes, then you can just add your functionality as a method only make a separate module and class for it.

All the best 👨💻

are you still working on this issue @swetha3456? if not i will pick it up

@samejima-san Yes, I'm working on it, but maybe you could work on other methods for scraping Dictionary.com, such as getting the definition of a word or finding synonyms?


occm: implement an optional atomic routes update

What this PR does / why we need it:
An extra improvement for the route reconciliation logic. This PR allows to use a single API call to add or remove routes instead of fetching existing routes and combining them with new or removing old routes with a further update. This change allows concurrent calls without consistency issues.
Which issue this PR fixes(if applicable):
fixes #2089
based on #2090
Special notes for reviewers:

Release note:

Implement an optional `extraroute-atomic` boolean flag for more efficient routes updates.

/ok-to-test

please rebase this after that another PR is merged

This is still WIP. I'm in contact with out neutron team. I'd like to remove the manual config toggle, based on extensions API. So there should be no need for an extra option.
I'll also remove the required mark from the struct member.

@kayrus if you have time could you explain why this routes feature is needed? Our architecture has always been that we have router in network with dhcp and router will handle the traffic automatically, no need to add routes.

@zetaab @jichenjc ready for review

@zetaab @jichenjc kindly ping
see also #2150 and #2152.


BUG poisson GLM, offset and weighted versions, give wrong result

When using R, weighted Poisson GLM and unweighted Poisson GLM with offset are equivalent (as theory states):
x <- c(1, 1.5, 2, 3)
N <- c(0, 1, 2, 2)
w <- c(1, 1, 2, 2)
y <- N / w
df1 <- data.frame(x = x, y = y)
df2 <- data.frame(x = x, N = N)

glm1 <- glm(y ~ x, weights = w, data = df1, family = quasipoisson(link = "log"))
glm2 <- glm(N ~ x, offset = log(w), data = df2, family = quasipoisson(link = "log"))

glm1$coefficients  # -1.0845508   0.4114909
glm2$coefficients  # -1.0845508   0.4114909

predict(glm1, df1, type = "response")  # 0.5101451 0.6266829 0.7698427 1.1617433

The same with glum:
from glum import GeneralizedLinearRegressor
import numpy as np

X = np.array([1, 1.5, 2, 3])[:, None]
N = np.array([0, 1, 2, 2])
w = np.array([1, 1, 2, 2])
y = N / w

glm1 = GeneralizedLinearRegressor(family = "poisson", gradient_tol=1e-8).fit(X, y, sample_weight=w)
# Note: Not so clear form the doc whether it should be offset=log(w) or offset=w.
glm2 = GeneralizedLinearRegressor(family = "poisson", gradient_tol=1e-8).fit(X, N, offset = np.log(w))

(glm1.intercept_, glm1.coef_[0])  # (-0.4467399573763529, 0.12491826951196758)
(glm2.intercept_, glm2.coef_[0])  # (-0.5277422998238235, 0.16241784558814493)

glm1.predict(X)  # array([0.72482742, 0.77154325, 0.82126995, 0.93054472])

Check that R's solution is the right one, i.e. has minimal poisson deviance.
from sklearn.metrics import mean_poisson_deviance

mean_poisson_deviance(y, [0.5101451, 0.6266829, 0.7698427, 1.1617433], sample_weight=w)  # 0.23020310191091486
mean_poisson_deviance(y, glm1.predict(X), sample_weight=w)  # 0.2657132292275806

Conclusion
Either I made a stupid mistake, or both glum models are incorrect.

When I set alpha=0, i.e. when I fit an unregularized GLM in glum, I'm getting:
print(glm1.intercept_, glm1.coef_[0])
# -1.084550847152717 0.4114908582661602
print(glm2.intercept_, glm2.coef_[0])
# -1.084550847152717 0.41149085826616033

The fact that alpha=None defaults to alpha=1 is not a great default (https://github.com/Quantco/glum/pull/630).

I see. Mistake on my side.
I don't think that the default value itself is unfortunate. For me, None has a different meaning: literally none / no penalty.
BTW, this equivalence of offsets and weights might be a good unit test.

BTW, this equivalence of offsets and weights might be a good unit test.

Already implemented here :):


Implement transparent key prefixing

Hi, I noticed that you have this feature on the roadmap, and I'd like to help implement it. Do you have any ideas about how it will work?

That will be great. We can give user an option to specify a key prefix:
var redis = new Redis({ keyPrefix: 'app1:' });

and then the keys of every command sent by this instance should get a prefix of 'app1:'. For instance:

redis.set('foo', 'bar') will actually send SET app1:foo bar;
redis.blpop('key1', 'key2', 'key3', 0) will actually send BLPOP app1:key1 app1:key2 app1:key3 0;

We already have a method Command#getKeys for getting keys in a command(https://github.com/luin/ioredis/blob/master/lib/command.js#L85).

Sounds good. What's your opinion on giving the user flexibility for commands that have multiple keys? So something like:
var redis = new Redis({keyPrefix: ['app1:', 'app2:', 'app3:']});
redis.blpop('key1', 'key2', 'key3', 0);  // BLPOP app1:key1 app2:key2 app3:key3 0

Or maybe even allow the user to dynamically set the prefix?
var redis = new Redis({keyPrefix: 'foo:'});
redis.blpop({keyPrefix: ['app1:', 'app2:', 'app3:']}, 'key1', 'key2', 'key3', 0);

I'm not sure how useful this would be.

I prefer to keeping this option simple. My intention to add keyPrefix option is to allow multiple apps using one Redis server.keyPrefix is used as a namespace, so a single string is enough.

Ok, that's reasonable. I'll get to work on it.

scanstream match option does not use this prefix

@Delagen This has already been discussed. Refer to https://github.com/luin/ioredis/issues/239 for more information.


LRULinkedHashMap does not work as an LRU Cache

master:
LRULinkedHashMap.java.
LinkedHashMap is used incorrectly.
To make LinkedHashMap an LRU cache, a true boolean should be provided for the param accessOrder of the constructor.

I want to do this issue.


Unable to install on Ubuntu 20.04

Hi, this project looks really interesting and I would love to try it out. However, I can't install it on 64-bit Ubuntu 20.04 under various Python versions (3.8, 3.9, and 3.10). The error message is just:

ERROR: Could not find a version that satisfies the requirement PiML
ERROR: No matching distribution found for PiML

Is this expected? Are there only some operating systems supported?

Hi @Love-R,
PiML currently supports various os platforms and python versions, including [py37, py38, py39] * [Win, Linux, and Macos].
It is supposed to work on 64-bit Ubuntu 20.04 + py38 ~ py39.
Could you try "pip install https://files.pythonhosted.org/packages/44/97/03c0da48efb1b80b23b74b4d34c714bb7aafc7cf9e817d2db6d22a105e52/PiML-0.3.3.post0-cp38-none-manylinux_2_17_x86_64.whl" on py3.8 again?

Hi @ZebinYang ,
pip install https://files.pythonhosted.org/packages/44/97/03c0da48efb1b80b23b74b4d34c714bb7aafc7cf9e817d2db6d22a105e52/PiML-
0.3.3.post0-cp38-none-manylinux_2_17_x86_64.whl

Initially yielded
ERROR: PiML-0.3.3.post0-cp38-none-manylinux_2_17_x86_64.whl is not a supported wheel on this platform.
WARNING: You are using pip version 19.2.3, however version 22.3 is available.

on Python3.8. When I upgraded my pip version to 22.3, the installation worked - thank you!

@Love-R,
I see.
Thanks for your interest in PiML.


Devhub Issue: About the Design System [short description here]

path: (do not delete) https://github.com/bcgov/design-system/blob/master/components/about/about.md
(do not delete) devhub page: undefined

Devhub Content Issue

Closing as a duplicate of #281


FastAPI endpoint that contains IO bound and CPU bound tasks. better with or without async??

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
I don't really have code to share

Description
Hello,
I'm trying to move from Flask to FastAPI because it seems better prepared to work concurrently. But the API that I'm trying to build have several endpoints with the same pattern.
When they get a request, they connect to a DynamoDB and do a query. After getting that information they do some CPU intensive task (a few seconds) and then it saves the new data in the DB and returns that data.
I'm not sure what the best way is in that case. Could the async def syntax help me in this case? What is the current best approach to handle this issue?
Thanks,
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.68.0
Python Version
3.8.8
Additional Context
I also did  a benchmarking test to compare the two options to define the endpoint. I used JMeter to send 150 requests in 5 seconds to the endpoint. First I launched the API service with the async def syntax and then without the async.
The test with the async def syntax was 10 seconds faster to complete. I also noticed that the CPU load during the test was 50% for the async def syntax and 100% for the one without async.

Here is some technical details about FastAPI and how it's handling async/sync operations (see: https://fastapi.tiangolo.com/async/?h=technical#very-technical-details):

If you define an endpoint with async, it'll run in the event loop; even if there are blocking calls inside (like a blocking call to your database). It means that it can block the server thread and prevent it to answer other requests meanwhile. That's why it's preferable to use async-compatible libraries for I/O operations.
If you define an endpoint without async, as a standard function, FastAPI will automatically send it in a separate thread to avoid the blocking of the event loop. In a sense, it "mimics" an asynchronous behavior.

Having to send the task to a separate thread implies a small overhead; so unless you are really doing heavy blocking I/O, it's not worth it.

Concerning your case, here are my advices:

Use an async-compatible client for DynamoDB (https://aioboto3.readthedocs.io/en/latest/index.html). This way, you can define every endpoints as async and benefit from async I/O goodness.
You say that CPU operations take a few seconds. Async I/O won't help you in this context. If you can live with API endpoints that take a few seconds to answer, well, that should do it.

If you really need your API to answer faster, you should consider use a worker process. Basically, it's a separate process which role is to handle slow background operations. Your API will just send messages in a task queue and respond immediately.
On the other side, the worker will handle those tasks as they come. The only pitfall is that your API can't return the result synchronously. You just know that the operation will be handled at some point. Thus, you'll have to implement separate endpoints to check for the completion and results of those tasks.
Libraries like Celery are designed to do this.

Thank you very much for this deep explanation. I helps me to understand the whole process.
Actually, I have tried your suggestion to add the aioboto3 library so my endpoint can be a real async endpoint. I even added  await run_in_threadpool for the method that runs the CPU expensive task to make it fully async. But I was surprised to see its performance. Because I did an stress test by sending 150 requests to the endpoint in 5 seconds. This test I also run it for the code versions where there was just the difference of the async def syntax in the endpoint definition. Now, with the new endpoint fully async I also run the test and I see these results:
~4min when the endoint is defined as def or just async def but using boto3
~4min 30s when the endpoint uses the full async capacity with aioboto3 and run_in_threadpool
So it seems is better to leave it without async syntax or even just the async syntax without any await works better.
I just wanted to comment it here, maybe it is normal but I didn't expect that.

Have you tried with aioboto3 but keep your computation in the main process (without run_in_threadpool)? I would be curious to see the results. As mentioned, sending a task to a threadpool adds some overhead, so it may not worth it in your case.
Once again, if you really need high scalability and reliability, you'll have to go for the worker model; but it obviously makes the architecture of your system more complex.

Yes, I first tested it with run_in_threadpool and then without  and the runtime of the test was very similar (few seconds difference).
I'm not worried if the endpoint takes a few seconds to answer but I'm trying to take as much as possible advantage of the concurrency so the server can answer the most possible requests. That's why I was trying FastAPI to compare with Flask, but with this special case I see very similar performance in both of them.

@oriolcmp look this -> https://github.com/encode/starlette/issues/1094
You can very probably close the issue , thank you

@frankie567 I'm in a similar situation. First I'm doing non-async I/O (postgres query), then I'm doing some processing on each result. The processing I s just a series of maps, so if there were a way to parallelize it, it would speed up my responses considerably.
I have a very poor understanding of processes/threads, but is there a way to create multiple processes from inside a def endpoint? (Or would it be created once, by the app, and not on each request?)
I saw a SO response on this, but I couldn't get this working -- my uvicorn server just kept rebooting. https://stackoverflow.com/a/63171013

@anguspmitchell Generally speaking, I would avoid spawning processes/threads inside a web request. A request should consist of quick operations (a read/write I/O, JSON serialization, template rendering...).

First I'm doing non-async I/O (postgres query), then I'm doing some processing on each result. The processing is just a series of maps, so if there were a way to parallelize it, it would speed up my responses considerably.

If that's the case, it probably means that you're trying to handle too much data in one request. My advice would be to implement a pagination mechanism so you can lookup for only a limited number of rows that can be processed in a reasonable time.
If you really need to handle all the data at once, a better solution would be to have a separate worker as I described here: https://github.com/tiangolo/fastapi/issues/3725#issuecomment-902629033


webhook-service enhancement: serviceUpgrade: support docker registry notifications

From @mnzaki:
The serviceUpgrade driver currently supports Docker Hub webhooks. It would be immensely useful to also support notification events from the docker registry, for people hosting their own private registries.
Example payloads: https://docs.docker.com/registry/notifications/#envelope

any updates on this?
I just ran into the issue when creating a continuous deployment pipeline with gitlab and a private registry. My workaround for now is doing the http call at the end of the script (after the image has been pushed). But it would be much cleaner if rancher webhooks were compatible with private registries.