router, observer: move BackendObserver from package router to observer

What problem does this PR solve?

Issue Number: close #501
Problem Summary:
Health check, backend observer, and backend fetcher are independent of the router. Multiple router implementations can reuse the same backend observer.
What is changed and how it works:

Move HealthCheck, BackendObserver, and BackendFetcher from package router to observer.
NamespaceMgr creates BackendObserver and passes it to ScoreBasedRouter.
Move mocked objects to mock_test.go.
Move some common functions to common packages.

Check List
Tests

[x] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Notable changes

[ ] Has configuration change
[ ] Has HTTP API interfaces change
[ ] Has tiproxyctl change
[ ] Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.
None

Codecov Report
Attention: Patch coverage is 59.61538% with 42 lines in your changes are missing coverage. Please review.

:exclamation: No coverage uploaded for pull request base (main@7316949). Click here to learn what that means.

Files
Patch %
Lines

pkg/manager/observer/health_check.go
66.66%
8 Missing and 4 partials :warning:

pkg/manager/observer/backend_health.go
21.42%
10 Missing and 1 partial :warning:

pkg/proxy/net/error.go
0.00%
10 Missing :warning:

pkg/manager/metricsreader/metrics_reader.go
40.00%
2 Missing and 1 partial :warning:

pkg/manager/observer/metrics.go
80.00%
2 Missing and 1 partial :warning:

pkg/manager/router/router_score.go
80.00%
2 Missing :warning:

pkg/manager/observer/backend_observer.go
90.90%
1 Missing :warning:

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #502   +/-   ##
=======================================
  Coverage        ?   64.73%
=======================================
  Files           ?       65
  Lines           ?     6035
  Branches        ?        0
=======================================
  Hits            ?     3907
  Misses          ?     1824
  Partials        ?      304

Flag
Coverage Δ

unit
64.73% <59.61%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


how to use with async

hi dear.
i tried the Quick Start Guide with sync and that recorded wonderfully.
now i wanted to try it with async. but im not sure if im doing this right.
i tried various combinations:
this one gives: async def function and nog plugin installed
and an file test_something_else.yaml but with only {} in it
@pytest.mark.scrapli_replay
async def test_something_else():
async with AsyncIOSXEDriver(**device) as conn:
result = await conn.send_command("show run | i hostname")
this version gives back:  async def cuntion and no async plugin installed (i have pytest-asyncio installed)
@pytest.mark.async_scrapli_replay
async def test_something_else():
async with AsyncIOSXEDriver(**device) as conn:
result = await conn.send_command("show run | i hostname")
This one runs but gives no file back.
@pytest.mark.asyncio
@pytest.mark.async_scrapli_replay
async def test_something_else():
async with AsyncIOSXEDriver(**device) as conn:
result = await conn.send_command("show run | i hostname")
i couldnt really distill from the docs what im doing wrong so hoping for some feedback.
kind regards,

import pytest

from scrapli.driver.core import AsyncIOSXEDriver

MY_DEVICE = {
    "host": "somehost",
    "transport": "asyncssh"
}

@pytest.mark.scrapli_replay
async def test_something_else():
    async with AsyncIOSXEDriver(**MY_DEVICE) as conn:
        result = await conn.send_command("show run | i hostname")

With the following in pyrpoject.toml to tell pytest to use auto async mode:
[tool.pytest.ini_options]
asyncio_mode = "auto"

Works as expected for me.

Dear,
ill close this issue.
the pyproject part made it work for me :)
thanks!


Datepicker offset by one day?

Today's date is Thursday April 7, 2016. The datepicker is showing it's Friday 7th.

Code:
<DatePicker
            minDate={moment()}
            selected={startDate}
            startDate={startDate}
            endDate={endDate}
            onChange={this.handleChangeStart}
            placeholderText="From date"
            dateFormat="MM/DD/YYYY"
            className="form-control margin-md-left"
            isClearable />

I should also mention this is coming from server-side rendering

Seems like the problem was around selected props, so I replaced startDate with moment(). In some cases it works and others it does not (where I have the weird offset of dates)

Also throws this error when i open the datepicker:
Deprecation warning: use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale

What version of the date picker are you using?
This is possibly the same issue as #203, which we have had a lot of trouble tracking down.

"react-datepicker": "^0.21.0",

What version is actually installed? Look at the package.json pulled into node_modules/react-datepicker

@rafeememon   "version": "0.21.0"

Yep, try with the latest version, v0.25

yep, fixed it!

I'm having the issue until now... ^1.6.0

moment(myDate).toISOString(true) Only this works for me :(


(Suggestion) knowledge management

(Suggestion) Currently, knowledge management only allows one uploaded file per title. Will there be an update in the future to allow multiple uploaded files under a single title?

Hey, the current version of Page Assist has the ability to increase the file limit in the knowledge base. You can upload multiple files.

Thanks for your reply!
Could you add a feature that allows additional files to be appended to an existing knowledge title? Many scenarios require continuously adding files to the same knowledge title. Thanks

yes

After I uplod the files to the knowledge mamt, how could I use the files'content in the chat?


use toDateURL lose some img

Please make sure you are testing with the latest release of html2canvas.
Old versions are not supported and issues reported for them will be closed.
Please follow the general troubleshooting steps first:

[x] You are using the latest version
[x] You are testing using the non-minified version of html2canvas and checked any potential issues reported in the console

Bug reports:
Please replace this line with a brief summary of your issue AND if possible an example on jsfiddle.
Specifications:

html2canvas version tested with:
Browser & version:
Operating system:

当页面有多张图片，转化为base64格式时丢失了最后几张图片，前面的图片能够显示。

怎么解决的呢？我也遇到同样的问题


'make' results in error.

gcc -Wall -O2 -o scream-alsa scream-alsa.c -lasound
scream-alsa.c:4:10: fatal error: alsa/asoundlib.h: No such file or directory
#include <alsa/asoundlib.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:5: recipe for target 'scream-alsa' failed
make: *** [scream-alsa] Error 1
_____________-
gcc -Wall -o scream-pulse scream-pulse.c -lpulse-simple -lpulse
scream-pulse.c:4:10: fatal error: pulse/simple.h: No such file or directory
#include <pulse/simple.h>
^~~~~~~~~~~~~~~~
compilation terminated.
Makefile:5: recipe for target 'scream-pulse' failed
make: *** [scream-pulse] Error 1

EDIT: in order to 'make' you will need the dev pulseaudio (or alsa?) packages.
for ubuntu:
sudo apt install libpulse-dev
Thanks.

This is written up in e.g. https://github.com/duncanthrax/scream/blob/master/Receivers/alsa/README.md for the ALSA receiver, but the root README https://github.com/duncanthrax/scream says that just make would work, which should probably be changed.

That's why i didnt see it then haha. Thanks for your response! :+1:


[New Game]:Infernal Throne #2492

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes:  #2492

Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Checklist:

[X ] I have made this from my own
[ X] I have taken help from some online resourses
[ X] My code follows the style guidelines of this project
[X ] I have performed a self-review of my own code
[X ] I have commented my code, particularly in hard-to-understand areas
[ X] I have made corresponding changes to the documentation
[ X] My changes generate no new warnings

ATTACH SCREEN-SHOTS / DEPLOYMENT LINK

Reduced the levels after checking the code files/difficulty


Support to report errors to git provider as issues

Codecov Report

Merging #45 (1fe5f0b) into master (7b3960b) will increase coverage by 0.15%.
The diff coverage is 20.58%.

@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
+ Coverage   21.28%   21.43%   +0.15%
==========================================
  Files          14       15       +1
  Lines         559      653      +94
==========================================
+ Hits          119      140      +21
- Misses        440      512      +72
- Partials        0        1       +1

Flag
Coverage Δ

unittests
21.43% <20.58%> (+0.15%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

api/v1alpha1/releaser_types.go
81.48% <0.00%> (-18.52%)
:arrow_down:

api/v1alpha1/zz_generated.deepcopy.go
0.00% <0.00%> (ø)

controllers/git.go
16.66% <0.00%> (-0.78%)
:arrow_down:

controllers/internal_scm/factory.go
22.22% <ø> (ø)

controllers/internal_scm/gitea.go
36.36% <0.00%> (-3.64%)
:arrow_down:

controllers/internal_scm/github.go
10.71% <0.00%> (-22.62%)
:arrow_down:

controllers/internal_scm/gitlab.go
30.00% <0.00%> (-3.34%)
:arrow_down:

controllers/releaser_controller.go
0.00% <0.00%> (ø)

controllers/status_controller.go
35.59% <35.59%> (ø)

Continue to review full report at Codecov.

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


USB host has difficulty detecting connections (IDFGH-6251)

Environment

Module or chip used:  ESP32S2
IDF version v5.0-dev-346-g7af719e426
Build System:      idf.py
Compiler version xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2) 8.4.0
Operating System:     Linux
Power Supply:         USB

Problem Description
I have some difficulty with the esp32s2 usb host being able to detect when a usb device is connected. There are two parts to the problem. First, it sometimes has difficulty detecting the initial connection of a device. Experimentally I found that applying a pull-down before initializing the usb host seems to fix that problem. Second, after the device is disconnected and reconnected it seems even less likely to detect the reconnection (although sometimes it does). My solution for that is to do an esp_restart whenever the device is disconnected.
Code to reproduce this issue
   gpio_config_t gpio_conf = {
      .pin_bit_mask = 3 << 19,
      .pull_down_en = GPIO_PULLDOWN_ENABLE
   };
   gpio_config(&gpio_conf);

   usb_host_init(); // usb_host_install, etc.

   while(1) {
      if (usb_device_disconnected())
          esp_restart()
   }

I dont seem to have this problem. Here is full test code:
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "usb/usb_host.h"

usb_host_client_handle_t client_hdl;
uint8_t dev_addr = 2;
usb_device_handle_t dev_hdl;
TaskHandle_t async_task_handle;

void client_event_callback(const usb_host_client_event_msg_t *event_msg, void *arg)
{
    if (event_msg->event == USB_HOST_CLIENT_EVENT_NEW_DEV)
    {
        ESP_LOGI("", "client event: %d, address: %d", event_msg->event, event_msg->new_dev.address);
    } else {
        ESP_LOGI("", "USB_HOST_CLIENT_EVENT_DEV_GONE");
        usb_host_device_close(client_hdl, dev_hdl);
    }
}

void app_main(void)
{
    do{

        const usb_host_config_t config = {
            .intr_flags = ESP_INTR_FLAG_LEVEL1,
        };
        esp_err_t err = usb_host_install(&config);
        ESP_LOGI("", "install status: %d", err);

        const usb_host_client_config_t client_config = {
            .async = {
                .client_event_callback = client_event_callback,
                .callback_arg = NULL,
            },
            .max_num_event_msg = 5
        };

        err = usb_host_client_register(&client_config, &client_hdl);
        ESP_LOGI("", "client register status: %d", err);

        while (1)
        {
            uint32_t event_flags;
            if (ESP_OK == usb_host_lib_handle_events(1, &event_flags))
            {
                printf("usb_host_lib_handle_events event_flags: %d\n", event_flags & 0xff);
                usb_host_client_handle_events(client_hdl, 0);
                if (event_flags & USB_HOST_LIB_EVENT_FLAGS_NO_CLIENTS)
                {
                    printf("No more clients\n");
                    do{
                        if(usb_host_device_free_all() != ESP_ERR_NOT_FINISHED) break;
                    }while(1);
                    break;
                }
                if (event_flags & USB_HOST_LIB_EVENT_FLAGS_ALL_FREE)
                {
                    printf("USB_HOST_LIB_EVENT_FLAGS_ALL_FREE\n");
                    usb_host_client_deregister(client_hdl);
                }
            }

        }
        usb_host_uninstall();
    }while(1);
}

My problem may be specific just to certain usb devices. Part of my inspiration for a pull down was here: https://www.beyondlogic.org/usbnutshell/usb2.shtml
Maybe my device expects a pull down in order to get through its initialization.

@leemagnusson The ESP32-S2 internal USB PHY should have already applied those pull downs so there shouldn't be a need to call gpio_config() if everything is working correctly. Any chance you get capture the bus on an oscilloscope to give us a better idea about what's happening?

Please try the latest USB Host update (d95b15c55740b417d1a935ac006dba4cfaeef3cf) and see if the issue is resolved?

@leemagnusson Thanks for reporting, would you please help share if any updates for the issue? Thanks.

@leemagnusson Fixes should be in both master and v4.4. Closing this issue. If the errors persist, please feel free to reopen.


Unity Editor App Engine default service account doesn't have permission for rule "auth.uid" == $uid

Windows 10
Unity 2017.2.f3
Steps

Login via Unity Editor using service account and .p12 file with email/password as service account email and "notasecret"
Try to get a value from a route at any valid userId (from my Authentication tab in the Firebase console) with rule "$uid": { ".read": "auth.uid == $uid", ".write": "auth.uid == $uid"}

What is the expected result?
Be able to get the values. (this seems possible via the simulator)
What happens instead of that?
Fail to get value and instead get warning
"11/18/2017 12:24:36 AM [Warn] SyncTree: Listen at /path/[userID] failed: DatabaseError: Permission denied"
As you can see, I'm using the correct kind of service account and it has Editor authority. I'm not sure what else I would need to access that information.

Hi there,
One thing that stands out to me is that the path it is trying to listen at is /path/[userID], which seems incorrect.  Just to confirm, have you set the Auth User Id the editor should be impersonating with the extension method FirebaseApp.SetEditorAuthUserId(string uid) ?
The code should look something along the lines of:
FirebaseApp.DefaultInstance.SetEditorDatabaseUrl("https://YOUR-FIREBASE-APP.firebaseio.com/");
FirebaseApp.DefaultInstance.SetEditorP12FileName("YOUR-FIREBASE-APP-P12.p12");
FirebaseApp.DefaultInstance.SetEditorServiceAccountEmail("SERVICE-ACCOUNT-ID@YOUR-FIREBASE-APP.iam.gserviceaccount.com");
FirebaseApp.DefaultInstance.SetEditorP12Password("notasecret");
FirebaseApp.DefaultInstance.SetEditorAuthUserId("myUserId");
var reference = FirebaseDatabase.DefaultInstance.GetReference("myUserId");
Hopefully that helps!

@a-maurice  Thank you!

My problem was two-fold: I didn't realize the SetEditorAuthUserId(userId) function existed
I was also using FirebaseAuth to login via email & password which I suppose overwrote this Editor functionality.


Use correct MPI CXX libraries for MPI parcelport

Proposed Changes

Use MPI_CXX_LIB_NAMES instead of MPI_C_LIB_NAMES to identify MPI parcelport link libraries

Any background context you want to provide?

This fixes compilation with HPX_WITH_PARCELPORT_MPI=ON on stock Ubuntu 18.04 (OpenMPI 2.1.1 and CMake 3.10.2).

Upon further investigation it turns out that the Ubuntu 18.04 OpenMPI package is configured with "--enable-mpi-cxx". Including <mpi.h> in C++ code (but not actually using C++ bindings) creates a dependency on libmpi_cxx, which leads to missing symbols during link.
Rebuilding the package without "--enable-mpi-cxx" solves this for me, as does defining "-DOMPI_SKIP_MPICXX" in CFLAGS.

Out of curiosity - if you did
extern "C" {
#include <mpi.h>
}

would that stop mpi from adding cxx linkage?

No, it does not, or rather, it produces (many) other errors. Relevant part from my mpi.h:
 * Conditional MPI 2 C++ bindings support.  Include if:
 *   - The user does not explicitly request us to skip it (when a C++ compiler
 *       is used to compile C code).
 *   - We want C++ bindings support
 *   - We are not building OMPI itself
 *   - We are using a C++ compiler
 */
#if !defined(OMPI_SKIP_MPICXX) && OMPI_BUILD_CXX_BINDINGS && !OMPI_BUILDING
#if defined(c_plusplus) || defined(__cplusplus)
#include "openmpi/ompi/mpi/cxx/mpicxx.h"
#endif
#endif

Apparently, __cplusplus is still defined under extern "C", which leads to "conflicting declaration" errors.
In case it helps, here's a minimal test case wrapped in a Dockerfile:
FROM ubuntu:18.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update      \
 && apt-get install -y  \
        g++		\
        libopenmpi-dev

WORKDIR /root

RUN /bin/echo -e 'extern "C" {\n#include <mpi.h>\n}' > mpitest.cpp
RUN g++ $(mpicc --showme:compile) mpitest.cpp -o mpitest $(mpicc --showme:link)

If the standard Ubuntu package leads to a link failure, then that's bad. We should have that fixed. What would be the best way? Add the macro or the libraries?

More info: CMake (>= 3.10.3) allows to handle this situation through an option MPI_CXX_SKIP_MPICXX, which in the above setup produces
MPI_CXX_COMPILE_FLAGS: -pthread -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX -D_MPICC_H

and thus disables C++ support in OpenMPI's <mpi.h>.
However, these flags are not propagated in plugins/parcelport/mpi/CMakeLists.txt. They get passed to hpx_add_compile_flag(), but are not used in the actual compilation.

Oops. I didn't realize there was a patch applied here too. I submitted another one elsewhere.

The status of this PR is that if #3458 is accepted, then we can close this one. If it is rejected, then we should pursue this one further. They both solve the issue, but via slightly different approaches.

Can we close this now?

This can be closed now as #3458 has been merged.


little rat found a hidden extension, how can i delete it?

hi there-
little rat found a strange hidden extension (much appreciated), but how can I delete this extension? it's not in the extensions directory of any chrome profile?

unfortunately, the extension is gone, seemed like some kind of malicious behavior. i went to the chrome store and was able to remove it through there (but not from my chrome profile folder directly). very strange.


Cut a new release please? 🙏🙏

Feature Request
Hello @bvaughn @wuweiweiwu @TrySound so I saw that the changelog got updated recently and seems ready for a release to be cut. Could we get a release cut please 🥺

https://github.com/bvaughn/react-virtualized/pull/1740#issuecomment-1369136122

Version 9.22.4 has been published with peer dependencies updated to include React 17 and 18. (No other changes from 9.22.3)
https://github.com/bvaughn/react-virtualized/releases/tag/v9.22.4


how to find the camera location in world coordinates??

hi there
I am trying to find the camera location in world coordinates?
I find the vehicle's coordinates by
    print('vehicle at ',
          ego_vehicle.get_location().x,
          ego_vehicle.get_location().y,
          ego_vehicle.get_location().z)

this yields -85.21098327636719 , -126.87291717529297 , -0.05492006242275238
camera attached to this vehicle ,s relative position (x=2.5 y=0 z=0.7)
can I just add the camera's relative position and Vehicle coordinates to find the camera's location in real world?

Hi @snowbrood
Yes, in order to have the world position of the camera you just need to add its relative position with the world position of its parent, in your case, the vehicle world location.


Figure out site (hoster) of pipelines

Or whatever flavor of CI/CD we choose

Some of this can be done by github actions, got this rolling, right now it is only when main runs. But this will be updated to make sure that we automate our testing and building verification.

To be clear I think we need more than just this, but this is a good starting place for very basic CI/CD


Clarify how to handle the HtmlInputType 'textarea'

It looks like textarea is not defined as html input type
https://www.w3schools.com/html/html_form_input_types.asp
Therefore we streamlined which HtmlInputType's are supported through #254 and #255. Other types should be provided through Spring Hateoas itself.


Fix wrong return code check in test_delete_volume_on_existing_vm

Changes
1.Fix wrong status code check after deleting volume
Verification

[!NOTE]
Verified on both local iPXE and ECM lab environment.

Tested the execution on local v1.2-head Harvester.

Close this wrong implementation and will send another later.


Configure granularity for dates and times

Feature Request
Description of Problem:
Currently temporal fields do not have configurable granularity (fixed to milliseconds).
Potential Solutions:
Make temporal fields default to extremely low granularity (eg, thousandth of a millisecond). Add the ability to specify temporal granularity, through some duration-encoding convention such as Java's ChromnoUnit enum. A set of ChronoUnits we might support is:

MILLIS
SECONDS
MINUTES
HOURS
DAYS
MONTHS
YEARS
DECADES
CENTURIES
MILLENIA

each of which requires a multiplication factor, e.g. 10 millis.
Other units within enum for consideration are:

HALF_DAYS
WEEKS

Units within the enum not currently allowed by our datetime ranges or precision are:

MICROS
NANOS
ERAS
FOREVER

It would make sense that the operand for granularTo has the same shape regardless of the data type for the field.
Therefore you might need something like:
{ "field": "foo", "is": "ofType", "temporal" }
{ "field": "foo", "is": "granularTo", "value": { "10 seconds" } }
                                                           ^ ChronoUnit enum

Also to consider: what values do we consider valid for multipliers? Does it differ depending on the unit? For decimal granularity we only allow powers of 10 between 1 and 1e-20.
Additional Context
This ticket has been heavily edited/updated from its original form so that it is more readable and up to date. Useful information from discussion in the comments has been moved up to the body of the ticket.

Priority: Low-Medium

The permitted values for granularTo with different data types need to be considered.

data type
granularTo value
meaning
notes

integer
>= 1, whole numbers
emit integers that are divisible by this value
e.g. 2 = even numbers

decimal
> 0 & < 1
emit decimals that are divisible by this value
e.g. 0.01 = pence, 0.5 = halfs

temporal/datetime
unit and precision
emit datetimes that are divisible by this chronounit
see examples below

ChronoUnits are:

NANOS
MILLIS
SECONDS
MINUTES
HOURS
DAYS
WEEKS
MONTHS
YEARS
DECADES
CENTURIES
MILLENIA

each of which requires a multiplication factor, e.g. 10 millis.
It would make sense that the operand for granularTo has the same shape regardless of the data type for the field.
Therefore you might need something like
temporals
{ "field": "foo", "is": "ofType", "temporal" }
{ "field": "foo", "is": "granularTo", "value": { "unit": "days", "precision": 1 } }
                                                           ^ ChronoUnit enum

decimals
{ "field": "foo", "is": "ofType", "decimal" }
{ "field": "foo", "is": "granularTo", "value": { "precision": 0.01 } }

integers
{ "field": "foo", "is": "ofType", "integer" }
{ "field": "foo", "is": "granularTo", "value": { "precision": 1 } }

In future this could (if deemed appropriate) support this syntactic sugar, which would imply granularTo 0.01
{ "field": "foo", "is": "ofType", "decimal" }
{ "field": "foo", "is": "granularTo", "value": { "decimalPlaces": 2 } }

{ "field": "foo", "is": "granularTo", "value": { "decimalPlaces": 2 } }

I'd personally vote against this - I think we need to be careful to keep the concepts of decimal places (a text formatting concern) and granularity separate. No big objection to something like "decimal precision", though.
{ "field": "foo", "is": "granularTo", "value": { "unit": "days", "precision": 1 } }

Is that preferable to the below?
{ "field": "foo", "is": "granularTo", "value": "1d" }
OR
{ "field": "foo", "is": "granularTo", "value": "1 day" }

General premise would be to 'parse' and map the unit (e.g. 'day') in the profile into the ChronoUnit enum in java, allowing for pluralisation and abbreviation (e.g. ms for millisecond)

I have edited the body of the ticket so that information from comments are now in the body. The ticket has also been updated as parts were outdated.


Question about input normalization

Hi,
First of all, thanks for the nice implementation. Could you explain why you normalized inputs like here?
The normalized results seems different from below.
# mean and var for ImageNet
mean = (0.485, 0.456, 0.406)
std = (0.229, 0.224, 0.225)

transform = transforms.Compose([
                    transforms.ToTensor(),
                    transforms.Normalize(mean=mean, std=std)])

Best,
Yunjey

Hi,
thank you for spotting this. This is indeed a bug.
I initially copied the normalization code from the Pytorch implementation (https://github.com/pytorch/vision/blob/f87a896f170a34502a60cdc358c19d8b55e72f54/torchvision/models/inception.py#L73-L76), naively assuming that it normalizes the input to the format the pretrained network expects.
But looking into it more, what this really does is transform from inputs that have been normalized using
mean = (0.485, 0.456, 0.406)
std = (0.229, 0.224, 0.225)

transform = transforms.Compose([
                    transforms.ToTensor(),
                    transforms.Normalize(mean=mean, std=std)])

to inputs in range [-1, 1], which is what Tensorflow's pretrained Inception network expects. So it reverses the zero mean, unit variance normalization.
I will submit a fix for this shortly. In the meantime, you could scale your images to range [-1, 1] from range [0, 1] using 2 * x - 1 and run with transform_input=false.
Best.
Max

I still has a question about normalization. As you said, the Tensorflow's pretrained Inception network expects input in [-1,1], but if you load pretrained pytorch models, it sees like it expects inputs that are in [0,1] and then normalized in a specific way. Quote from pytorch official site:

All pre-trained models expect input images normalized in the same way, i.e. mini-batches of 3-channel RGB images of shape (3 x H x W), where H and W are expected to be at least 224. The images have to be loaded in to a range of [0, 1] and then normalized using mean = [0.485, 0.456, 0.406] and std = [0.229, 0.224, 0.225].

So if you are using the pretrained pytorch model, you should normalize the imgae in this way, rather than to [-1,1] right?

As I said above, Inception expects inputs to be in [-1, 1]. This is true for Pytorch's Inception as well, as they just ported Tensorflow's weights to Pytorch. So what the Pytorch implementation internally does is it transforms the input from mean/std normalized images to [-1, 1]. This is so that all torchvision models take the same input format, namely mean/std normalized images, as you quoted above.

Hi, I noticed you used [0,1] image scale in the code
        images = np.array([imread(str(f)).astype(np.float32)
                           for f in files[start:end]])

        # Reshape to (n_images, 3, height, width)
        images = images.transpose((0, 3, 1, 2))
        images /= 255

while TF's version is using [-1, 1] image scale. Is this a bug?

Scaling to range [-1, 1] happens inside the model:
https://github.com/mseitzer/pytorch-fid/blob/4e366b2fc9fb933bec9f6f24c5e87c3bd9452eda/inception.py#L131

@mseitzer hi, I know it's late, but I'm trying to implement a more flexible FID version based on your code. I knew that you scale the input from [0,1] to [-1,1] but as I know, the Inception model expects the input image is scaled by ImageNet normalized factor which are mean = [0.485, 0.456, 0.406] and std = [0.229, 0.224, 0.225]. Therefore, it will be better if we modify the transform when we read data. Am I right?

@mseitzer hi, I know it's late, but I'm trying to implement a more flexible FID version based on your code. I knew that you scale the input from [0,1] to [-1,1] but as I know, the Inception model expects the input image is scaled by ImageNet normalized factor which are mean = [0.485, 0.456, 0.406] and std = [0.229, 0.224, 0.225]. Therefore, it will be better if we modify the transform when we read data. Am I right?

any answer to this?

I reviewed the original TTUR repository, and it appears that the Inception model used in their code is derived from the Inception score repository. You can download the Inception model from the following link: http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz.
Based on the graph analysis, it seems that the model expects an input range of x ~ [0, 255] and applies preprocessing with the formula: x = (x-128) / 128.


/about/companies/

was: write some docs for companies looking to give
Now that we've got some interest from companies to be patrons (thanks @heroku for starting the craze and everyone for getting involved!), we should write up a doc on this to point people to.
What
Invest money in open source software development via Gittip.
Why

Marketing, if you sell to devs.
Recruiting.
Keep FOSS vibrant and independent.

How

Register with Gittip using the company Twitter account.
Fill out a profile.

Statement is optional, though you probably want to select "We are" under Statement > Edit.
You probably also want to select "We're here as a patron, and politely decline to receive gifts."

Add a company credit card.
Set up tips!

Limitations

"I am ..." instead of "We are ..." #502
Patrons can still receive money #893
Can't connect GitHub org account, only a Twitter account (answer: a) considering it #871, b) start a dedicated Twitter account for your engineering team).
Twitter accounts have poor avatars (answer: Gravatar, #648).
Can only give in $24 increments, mostly to individuals (answer: funds). #1041
Can only give weekly recurring (answer: manual lump sums).

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Closing in light of our decision to shut down Gratipay.
Thank you all for a great run, and I'm sorry it didn't work out! 😞  💃


Feat: Added pre-commit hooks and Django template

Added Django template files. The server can now be started at port
8000 by running python manage.py runserver.
Added pre-commit hooks for checking code quality before commiting.

I can confirm that this setup works on all three systems that I have tested: Linux, Windows 10 and MacOS

This is safe to merge now. Thank you.

I'm not familiar with the .toml? Would you mind explaining?

Yeah sorry about that,  I should have made it clearer. So there is this tool that runs everytime you commit called "black", it is a code formatter: https://github.com/psf/black. And it requires a configuration that lives in the pyproject.toml file. Hope this helps !

Looks fantastic! I'll post the link on our Discord. Otherwise, no issues to declare.

Thanks for doing the review !


build as function, not on import. closes #310

Working on Jenkins, ready for code review.

Working on Jenkins, ready for code review.

This is a test of jenkins

I'm going to use this pull request to test a couple of thins with jenkins

test this please

A Jenkins build has been triggered

Testing... hold your breath...

All test pass!
No test results found.

Nice! Would we be told which tests failed if any had?

I'm not sure. You can create a dummy pull request like @whoburg did before with and intentional error somewhere in the testing and we can see what happens. It would give me a pull request that I can use just to tweak these settings as well.

Created as #324

looks good, merging


Moving custom domain between different AWS Amplify accounts deployments

Issue/question
We currently have an app deployed under AWS Amplify, using an account "Account-A", and using a custom subdomain, "foo.bar.com".
We'd like to move/redeploy the app using AWS Amplify, but using a different account, "Account-B", and using the same subdomain, "foo.bar.com".
I found a similar issue https://github.com/aws-amplify/amplify-console/issues/22
and would just like to confirm with you that this would still be an appropriate set of steps to follow?

@0luftballoons . This is the right steps for now.


Rationalise sizing of HoistInputs and FormField

This branch includes some changes that will hopefully make sizing HoistInputs and FormFields more intuitive:

HoistInputs can be split into two categories: "sized" and "unsized".
Sized HoistInputs are now all exclusively sized using LayoutSupport. We previously had some sized inputs that were sized using named width & height props, and others using css.
All sized inputs use defaultProps for reasonable, out-of-the-box widths. TextArea and JsonInput also have a default height. This means that all sized inputs always have an explicit size for their pertinent dimensions, which should mitigate unexpected sizes.
When a sized input is inside a FormField, FormField unsets the width and flexes HoistInputs within it. It will also unset the height if the FormField has a specified height (but only if specified, allowing TextArea and JsonInput to use their default heights).
Unsized HoistInputs (Checkbox, SwitchInput, RadioInput) do not have LayoutSupport, and do not expand to fill the dimensions of the FormField. Instead, these take their natural size from their content.

See issues #938 & #327
See Toolbox PR: https://github.com/exhi/toolbox/pull/149

Already discussed with Tom, but adding here so we have a note on it and can pick it up again next week.  Saw some sizing irregularities on textarea and selects when switching between the various modes:


[Feature] Freeze from mixing, not from spending

As a way to control UTXO size we could allow to manually freeze some UTXO size for coinjinging but still use them for spending.

This is already the case.
"excluding coins" only applies to coinjoin.
The exclusion does not apply to sending.


Other search engines

I have recently replaced Google.com with Qwant.com to search the Internet, and suddenly seriously miss uBlacklist again. How easy is it to make uBlacklist compatible with other search engines - I see it isn't easy with Baidu. Looking forward to hearing your thoughts.
Thanks, Sheridan

I have no motivation to add support for Qwant because it is not available in Japan, where I live.
However, you (or others) can always create pull requests. In most cases, it is not so difficult to add support for other search engines. (Baidu is an exception because it does not show real URLs. Ecosia is another exception because it uses Nuxt so modifying DOM leads to unintended behavior.)


Add VirusMapper data to example data

Done =)
Simply do...
from nanopyx.data.download import ExampleDataManager
z = downloader.get_ZipTiffIterator("VirusMapper_ViralParticles_Channel1", as_ndarray = True)

Confirm it works on your end?

Works good on my end!


Linux Manual Installation $LD_LIBRARY_PATH

Please add some documentation for setting the $LD_LIBRARY_PATH
It has caused me issues in the past.
I'd suggest a solution like :
/etc/profile.d/local.sh
to read something like
if [ -z "${LD_LIBRARY_PATH}" ]; then
    LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64
else
    LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH
fi

export PATH LD_LIBRARY_PATH

and if the cuda option is enabled,
/etc/profile.d/cuda.sh
something like
if [ -z "${LD_LIBRARY_PATH}" ]; then
    LD_LIBRARY_PATH=/usr/local/cuda/lib:/usr/local/cuda/lib64
else
    LD_LIBRARY_PATH=/usr/local/cuda/lib:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
fi

export PATH LD_LIBRARY_PATH

and then sudo ldconfig needs to be run

Hi @3dsf   Thank you very much for your documentation change suggestions, and your previous one in October 2020 at https://github.com/IntelRealSense/librealsense/issues/7683 - I have marked this case with the Documentation tag so that your requested changes can be considered by the RealSense team at a future date.  This case should be kept open in the meantime.


Azure Stack Hub Capacity Planner (Feature Enhancement)

Would it be possible to include the GPU specs as a part of the Solution Partner Values? Depending on the application these calculations would be just as important.

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

ID: 091e58ac-42db-d8ba-8bd9-31635f4af131
Version Independent ID: e61fe9a3-e6d3-134e-40fe-b038240452a6
Content: Capacity planning overview - Azure Stack Hub
Content Source: azure-stack/operator/azure-stack-capacity-planning-overview.md
Service: azure-stack
GitHub Login: @IngridAtMicrosoft
Microsoft Alias: inhenkel

@Marauder1568 Thanks for the question! We will review and get back to you!

@Marauder1568 Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.

#in-progress

Program management has registered the feature enhancement.
#please-close


Typo in JSON docs

https://docs.influxdata.com/telegraf/v1.10/data_formats/input/json/
This page has a typo. Search for "string_fields". Third appearance should be "json_string_fields".
This page confirms this:
https://github.com/influxdata/telegraf/tree/master/plugins/parsers/json

Page has another typo. Search for "name_key". Second appearance should be "json_name_key".
Using typo resulted in this error:
$ telegraf -config /etc/telegraf/telegraf.conf -test
2019-03-21T15:35:11Z I! Starting Telegraf 1.10.0
2019-03-21T15:35:11Z E! [telegraf] Error running agent: Error parsing /etc/telegraf/telegraf.conf, line 4668: field corresponding to `name_key' is not defined in `*mqtt_consumer.MQTTConsumer'

No error after typo fix.


Create a Conanfile.txt and add all dependencies of the entity-system.

It's not a good practise to add all current dependencies manually to the 'dependencies' folders. Let's use Conan Package Manager for this as usual in Inexor.
The following dependencies need to be downloaded and added to the 'dependencies' folder by conan when running the conan file:

Dependency
Version
Explanation
License

gtest
v1.8.1
Google Testing Framework
BSD 3-Clause

stduuid
v1.0
UUID generator
MIT

glm
<IP_ADDRESS>
OpenGL Mathmatics
MIT

hayai
v1.0.2
C++ Benchmarking Framework
zlib

JSON
3.4.0
JSON library
MIT

Maybe we should use stduuid instead of boost uuid since it's licensed under MIT license.

Maybe we should use stduuid instead of boost uuid since it's licensed under MIT license.

Both licenses are fine.

I added a JSON library.

For now I added stduuid manually in the dependency folder.


Fixing broken Gcm token validation.

This is to resolve this issue:
https://github.com/Ph3nol/NotificationPusher/issues/64

According to me, OK this could fix the problem, but for me it's not enough restrictive.
Is it possible to allow an exhaustive list of patterns, an adapted regex or other king of things like this?
Don't forget to adapt tests assertions to your changes.
Thank you so much for your PR.

@Ph3nol I've looked into this a bit more, and have not been able to find a documented pattern. There is also this answer on SO: http://stackoverflow.com/a/12502351/663058
My original idea was to make a regex that matched current and past pattern. Something like this:
  /^([0-9a-zA-Z\-\_]+:)?[0-9a-zA-Z\-\_]+$/i
... but without knowing what it could be next, it could break in the future.
So I'm going make another commit to adapt your tests, and then change the line to ensure it's a string, instead of just not null:
return is_string($token) && $token!= '';

@Ph3nol Made a change to how the token is validated: no numbers, objects, arrays. Only not empty strings. Updated tests to match, ran them. And here we are now! Let me know if you need anything else.

Please, merge is as soon as possible, I also have this issue.

Hello,
please, merge is as soon as possible, I also have this issue.
Thank

Hi,
I'll merge it after @centerorbit last coding standards update (see my comments about its last commit).
Wait and see! ;)

Cmom @centerorbit, people are hardcoding stuff here! :P

I've adjusted as requested.

Perfect, thank you so much! :smile: :+1:

Hey @centerorbit, @thbsolutions, @ckopnio, @akimapilot,
I've just merged this PR and tagged a v2.2.10 release.
Enjoy! :smile:

We are getting this message.  Went and checked the supports($token) function in GCM.php and sure enough that function is only validating that the token is not empty.  If we are getting this error message and the function is only checking for not empty string is it safe to assume that we are getting the message because the token is, indeed, empty?


view retailer mien search wala option daalna hai for one retailer

Search by retailer name
search by retailer ID

done ozz done


better integration with istio service observability

our project is using spring cloud and the service mesh tool is istio.
we found it when using spring-cloud-starter-kubernetes-ribbon component, there turns out no edges in kiali graph tab between pods or services.
I think the reason is that istio only collects data or metrics which just goes through k8s service, while ribbon flows to pod directly.
any instructions or suggestions will be of great appreciation.

You can tell ribbon to use services
https://cloud.spring.io/spring-cloud-static/spring-cloud-kubernetes/1.1.2.RELEASE/reference/html/#ribbon-discovery-in-kubernetes


Do not delete AgentTablesQueryConfigurationTable if table was deleted

Description
Eng runner card: https://github.com/dust-tt/tasks/issues/1295
From what I understood: When we update a spreadsheet and the structure is invalid because a user is currently playing the data, we remove the table. The table is then re-created, potentially with the same id as before.
Problem is when we delete the table, we also delete the associated AgentTablesQueryConfigurationTable objects which means all agents using this table are loosing their configuration.
This PR removes this destroy.
I checked and the Assistant Builder handles this case and displays an error in the action chip if invalid:

The assistant will also properly yield an error if this happens: https://github.com/dust-tt/dust/blob/main/front/lib/api/assistant/actions/tables_query.ts#L277
Risk
Can be rolled back.
Deploy Plan
Deploy front.

What happens when the assistant is run?

It was specified on the PR description! It yields an error, then the user can see the error properly in the builder.
This is not great but better than removing silently their config for sometimes no good reason.

@flvndvd I think it does since when the config is empty actionConfiguration.tables is empty and so tables.length === 0 so we enter exactly this case!

Merging already but if I misunderstood something let me know I'll open a followup PR


Debian package build is broken

running sdist_dsc
running egg_info
writing adsbcot.egg-info/PKG-INFO
writing dependency_links to adsbcot.egg-info/dependency_links.txt
writing entry points to adsbcot.egg-info/entry_points.txt
writing requirements to adsbcot.egg-info/requires.txt
writing top-level names to adsbcot.egg-info/top_level.txt
adding license file 'LICENSE' (matched pattern 'LICENSE')
reading manifest file 'adsbcot.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'requirements.txt'
writing manifest file 'adsbcot.egg-info/SOURCES.txt'
running sdist
running check
creating adsbcot-6.2.0b4
creating adsbcot-6.2.0b4/adsbcot.egg-info
copying files to adsbcot-6.2.0b4...
copying LICENSE -> adsbcot-6.2.0b4
copying MANIFEST.in -> adsbcot-6.2.0b4
copying README.rst -> adsbcot-6.2.0b4
copying setup.cfg -> adsbcot-6.2.0b4
copying setup.py -> adsbcot-6.2.0b4
copying adsbcot.egg-info/PKG-INFO -> adsbcot-6.2.0b4/adsbcot.egg-info
copying adsbcot.egg-info/SOURCES.txt -> adsbcot-6.2.0b4/adsbcot.egg-info
copying adsbcot.egg-info/dependency_links.txt -> adsbcot-6.2.0b4/adsbcot.egg-info
copying adsbcot.egg-info/entry_points.txt -> adsbcot-6.2.0b4/adsbcot.egg-info
copying adsbcot.egg-info/requires.txt -> adsbcot-6.2.0b4/adsbcot.egg-info
copying adsbcot.egg-info/top_level.txt -> adsbcot-6.2.0b4/adsbcot.egg-info
Writing adsbcot-6.2.0b4/setup.cfg
Creating tar archive
removing 'adsbcot-6.2.0b4' (and everything under it)
dpkg-buildpackage: info: source package adsbcot
dpkg-buildpackage: info: source version 6.2.0b4-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Greg Albrecht<EMAIL_ADDRESS><EMAIL_ADDRESS> dpkg-source --before-build .
dpkg-source: info: using options from adsbcot-6.2.0b4/debian/source/options: --extend-diff-ignore=\.egg-info$
 fakeroot debian/rules clean
dh clean --with python3 --buildsystem=python_distutils
dh: warning: Compatibility levels before 10 are deprecated (level 9 in use)
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/gba/src/SNS/adsbcot/deb_dist/adsbcot-6.2.0b4'
python3 setup.py clean -a
Traceback (most recent call last):
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/setuptools/config.py", line 387, in _parse_attr
    return getattr(StaticModule(module_name), attr_name)
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/setuptools/config.py", line 25, in __init__
    with open(spec.origin) as strm:
AttributeError: 'NoneType' object has no attribute 'origin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/gba/src/SNS/adsbcot/deb_dist/adsbcot-6.2.0b4/setup.py", line 25, in <module>
    setup()
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/home/gba/.pyenv/versions/3.9.6/lib/python3.9/distutils/core.py", line 121, in setup
    dist.parse_config_files()
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/setuptools/dist.py", line 715, in parse_config_files
    parse_configuration(self, self.command_options,
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/setuptools/config.py", line 157, in parse_configuration
    meta.parse()
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/setuptools/config.py", line 463, in parse
    section_parser_method(section_options)
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/setuptools/config.py", line 436, in parse_section
    self[name] = value
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/setuptools/config.py", line 220, in __setitem__
    value = parser(value)
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/setuptools/config.py", line 552, in _parse_version
    version = self._parse_attr(value, self.package_dir)
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/setuptools/config.py", line 390, in _parse_attr
    module = importlib.import_module(module_name)
  File "/home/gba/.pyenv/versions/3.9.6/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'adsbcot'
make[1]: *** [debian/rules:10: override_dh_auto_clean] Error 1
make[1]: Leaving directory '/home/gba/src/SNS/adsbcot/deb_dist/adsbcot-6.2.0b4'
make: *** [debian/rules:7: clean] Error 2
dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2
Traceback (most recent call last):
  File "/home/gba/src/SNS/adsbcot/setup.py", line 25, in <module>
    setup()
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/home/gba/.pyenv/versions/3.9.6/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/gba/.pyenv/versions/3.9.6/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/gba/.pyenv/versions/3.9.6/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/stdeb/command/sdist_dsc.py", line 137, in run
    build_dsc(debinfo,
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/stdeb/util.py", line 1569, in build_dsc
    dpkg_buildpackage(*args, cwd=fullpath_repackaged_dirname)
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/stdeb/util.py", line 585, in dpkg_buildpackage
    process_command(args, cwd=cwd)
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/stdeb/util.py", line 226, in process_command
    check_call(args, cwd=cwd)
  File "/home/gba/.pyenv/versions/tak/lib/python3.9/site-packages/stdeb/util.py", line 59, in check_call
    raise CalledProcessError(retcode)
stdeb.util.CalledProcessError: 2

Fixed in v7.0.0


Set up CI with Azure Pipelines

This adds CI on Azure Pipelines. The nuget packages are available for download, but not from a NuGet feed. A release pipeline can be used to publish them to MyGet.org or NuGet.org. This PR does not get deterministic builds working. That requires a bunch more work.


Handling HTML in feed titles

First, thanks very much for the great software.
A handful of the feeds that I follow use HTML tags and entities in the title of an article. In order to decode the HTML, in my config I've added a decoding function and modified a couple of elfeed functions (elfeed-search-print-entry--default and elfeed-show-refresh--mail-style) to make use of the decoding function. I've never written elisp, so there is probably a better way to do this. In any case, maybe someone out there will find this information useful.
(defun decode-entities/libxml (html)
   (unless (fboundp 'libxml-parse-html-region)
     (error "This function requires Emacs to be compiled with libxml2"))
   (with-temp-buffer
     (insert html)
     (let* ((document (libxml-parse-html-region (point-min) (point-max)))
            (decoded-string (dom-texts document)))
       decoded-string)))

HTML in titles is one place where Elfeed falls short. However, in my
observations, most instances of feeds using HTML in titles is invalid or
unambiguous, so adding this feature wouldn't help. For example, RSS
never allows HTML in titles, though many feeds try anyway.
Atom does allow it if the type attribute is set to "html or "xhtml", and
Elfeed could check for this attribute and process the title accordingly.
As you noticed in your code, this is complicated by the fact that no
HTML parser may be available, and so Elfeed may not always be able to
parse it. So I'd prefer to just use a simple routine that reliably
decodes entities and strips all HTML tags, since titles can't be
meaningfully styled in Elfeed's interface anyway.
The proper place to do this would be in elfeed-entries-from-atom.

Thanks for the pointer to elfeed-entries-from-atom.
Here's an implementation that neither requires libxml nor creates thousands of dom representations and temporary buffers. On the other hand, my regexs are probably incomplete or just plain wrong. 😄
(defun ah/decode-html/compose (&rest funs)
  "Return function composed of FUNS. Source: https://nullprogram.com/blog/2010/11/15/"
  (lexical-let ((lex-funs funs))
    (lambda (&rest args)
      (reduce 'funcall (butlast lex-funs)
              :from-end t
              :initial-value (apply (car (last lex-funs)) args)))))

(defun ah/decode-html/entity->character (entity)
  (gethash entity ah/decode-html/entities-hash entity))

(defun ah/decode-html/strip-html-tags (html)
  (replace-regexp-in-string "\\(<[^>]+>\\)" "" html))

(defun ah/decode-html/decode-html-entities (html)
  (replace-regexp-in-string "\\(&[^;]+;\\)" 'ah/decode-html/entity->character html))

(defun ah/decode-html (html)
  (funcall (ah/decode-html/compose 'ah/decode-html/decode-html-entities 'ah/decode-html/strip-html-tags) html))

entities-hash is a hash table with a few hundred entity->character mappings.

Would you consider accepting a PR for a fix that strips tags and decodes entities on titles with the html/xhtml type?


Dev: Remove the Format and Honeypot ignore errors.

Description
See #7731
Checklist:

[x]  Securely signed commits
[ ]  Component(s) with PHPDoc blocks, only if necessary or adds value
[ ]  Unit testing, with >80% coverage
[ ]  User guide updated
[x]  Conforms to style guide

Honeypot already change in PR #7770


Consider additional build validation checks

A few issues have been introduced into recent PRs

Locally defined versions in poms - should all be captured in top level via dependencyManagement (and potentially properties)
Additional exclusions from validation checks without sufficient review (used incorrectly)
Malformed POMs (errors occur at top so can be missed as WARNINGS)

We should consider if any of these should be made hard checks (and whether they can reasonably be) to maintain our code quality
The potential impact of these errors can vary from compile problems (as maven moves on), to bigger jars with unnnecessary dependencies, through to incompatable/breaking versions or security vulnarabilities being introduced
Opening for discussion/experimentation
original source: https://github.com/odpi/egeria/issues/1697

Reviewed current build logs for errors/warnings & opened up #1708 #1710 #1711 #1712 #1713 #1714 #1715 #1716
This is a first step to be able to better detect new errors/warnings introduced into the build as a regression & to set a level from where additional checks, linting etc can be done.

Also relates to https://github.com/odpi/egeria/issues/1417

still valid

No plan to action any changes here at this point -- the gradle build may offer more flexible options. so closing for now


Wrong number of channels

Hi, thanks a lot for this repo! I just noticed a small inconsistency. In the loaded checkpoint,  the layer Mixed_6b/branch7x7dbl_5 has 192 channels whereas in the code it has self.channels_7x7 many channels, which is 128.
I don't think it's an issue in practice, because I assume the shapes in the code don't matter when loading in external weights, but thought I'd still point it out in case it's helpful.

Hi @danijar, thank you for pointing this out!
This should fix it https://github.com/matthias-wright/jax-fid/commit/d0d7b92697cdec5fbc23a87561da36bd072499af

I think the varying self.channels_7x7 was correct, just the last layer in the 7x7 branch is always 192 channels. I wrote it like this in my code and the checkpoint shapes ended up matching.

I see, thanks! I got it now.


How to make the links data take effect in

Hello, David.
Thanks for your nice tree.
i want to make more than one link for leaf nodes in  component.
for example, b is a leaf node . root node a links b , root node c links b too.
i tried to add links in data.json like:
links:[
{
"source": a.id,
"target": b.id,
"value": 1
},
{
"source": c.id,
"target": b.id,
"value": 1
}
]
but it didn't work, can you help me ? thanks for any suggestion

Which component? the tree? If so this is not supported by the component.
You will have to fork the project and check how you can achieve what you want with D3.js.

thank you


Add support for golang-vcs eclass

golang-vcs.eclass is an eclass for live ebuilds written in the go programming language. Please add support for it.

I don't know go or its tooling, so it's a no go unless somebody writes a patch.


Different colours for the same metrics

When I refresh page with dashboard in browser, I can see different colours for the same metrics

helm chart version: 0.10.8
superset version: 3.0.0
python version: 3.10

There is no such problem In the previous version superset 2.1.0
The error is reproduced on all types of charts.

Can confirm with v3.0.2

The problem reproduced in 3.0.2 (((

Are you still seeing this in 3.1/4.0? CC @geido for context, who is looking at some of these color consistency issues.

Can only test 3.1 for now, there I can still reproduce the issue. Opening an existing dashboard and just refreshing the page changes the colors of the metrics

I'll track this here https://github.com/apache/superset/pull/27439

After a little bit more investigation there seems to be a different problem here in addition to the labels changing color. In the bar chart the label is emitted as COUNT(*). There is no specific label emitted for which makes making label colors consistent impossible. This requires a separate fix.


Add a fee estimation helper

Overview
Add a helper to estimate gas cost:
# For mutable methods (currently supported)
estimated_fee = contract.methodToCall.estimate_fee(1, sender=accounts.load("me"))

# For immutable methods (not currently supported)
estimated_fee = contract.immutableMethodToCall.estimate_fee(1, sender=accounts.load("me"))

Specification
The current API to get fee estimation is as follow:
txn = contract_a.methodToCall.as_transaction(1, sender=accounts.load("me"))
estimated_fees = provider.estimate_gas_cost(txn)

Note: it doesn't support immutable methods.
For mutable methods, the helper would look like:
class ContractTransactionHandler:
    def estimate_fee(self, *args, **kwargs) -> int:
        txn = self.as_transaction(*args, **kwargs)
        return self.provider.client.estimate_gas_cost(txn)

And for immutable methods:
class ContractCallHandler:
    def as_transaction(self: ContractCallHandler, *args, **kwargs):
        args = self._convert_tuple(args)
        selected_abi = _select_method_abi(self.abis, args)

        contract_transaction = ContractTransaction(  # type: ignore
            abi=selected_abi,
            address=self.contract.address,
        )

        transaction = contract_transaction.serialize_transaction(*args, **kwargs)
        self.provider.prepare_transaction(transaction)
        return transaction

    def estimate_fee(self, *args, **kwargs) -> int:
        txn = self.as_transaction(*args, **kwargs)
        return self.provider.client.estimate_gas_cost(txn)

This is a rought implementation, and a refactoring may be suitable.
Dependencies
None.

I approve of this design. Output would be in native token units? (e.g. Wei for ethereum)

I approve of this design. Output would be in native token units? (e.g. Wei for ethereum)

Exactly.


Download Maven over HTTPS

Fixes #81.

The Travis failure is unrelated to this PR, but due to PRs from forks not having access to Travis secure environment variables. See also:
heroku/heroku-buildpack-clojure#52
heroku/heroku-buildpack-jvm-common#28

Thanks


feat: CTA Banner component

Harness Developer Pull Request
Thanks for helping us make the Developer Hub better. The PR will be looked at
by the maintainers.
What Type of PR is This?

[ ] Issue
[x] Feature
[ ] Maintenance/Chore

If tied to an Issue, list the Issue(s) here:

Issue(s)

House Keeping
Some items to keep track of. Screen shots of changes are optional but would help the maintainers review quicker.

[x] Tested Locally
[x] Optional Screen Shoot.

Looks good! Heads up @wei-harness the merge conflict. Updated the UTMs on the CI page, can grab from the latest MD in main. Thanks for the quick change.

Preview environment: https://ci.pr.harness.io/pr-226


[BKR-1653] Fix boot time race condition

In some cases, the initial check for the boot time appears to happen
before the system can correctly respond.
This adds the timeout check to the intial boot time check.

Yep, no issues here.


T265: A question to the experts

Required Info

Camera Model
T265

Firmware Version
<IP_ADDRESS>9

Operating System & Version
Ubuntu 16.04

Kernel Version (Linux Only)

Platform

SDK Version
<IP_ADDRESS>

Language

Segment
others

As subject says: Not an issue, but a question. Given I would have a Linux box with a T265 plugged and a little script which maps and detects AprilTags. Given too, that I would - where ever I detect an AprilTag - store a set_static_node with some information in the map. Would I be able on a later run using the same map but maybe on another device to get_static_node in order to retrieve position and information while mapping/walking?

Hi @neilyoung
In theory - yes. In practice - the new firmware in #5169 is promising to improve that - making maps more device agnostic. I have personally not tested it yet, but @bfulkers-i and @radfordi may comment on this features maturity.

Hi Sergey, thanks. I will give it a try.

@dorodnic Trying to figure out, how to update the firmware. I suppose I have to use rs-fw-update for it, but I can't find the firmware image. Could you please give me a pointer? TIA

Oh, I see, I have to clone the 'development` branch

Hmm. Having now latest development branch on my laptop, but still no trace of the new firmware. Could somebody please explain the process of firmware update on T265?

@neilyoung if you build the development branch with an internet connection, it will download the latest firmware (<IP_ADDRESS>7 on #5169 ). You may have to unplug and replug your device once to make sure it gets booted into the new firmware, but on a fresh startup librealsense will always load the latest T265 firmware onto the device automatically.

@bfulkers-i Well, I did that. On my Linux box. Internet on (of course). Build and setup. No new firmware on the device.

Repeating it right now. Could be that I have forgotten to uninstall the previous build before. Will post

Confirmed. After doing it right, it works :) Firmware updated, SDK 2.30.0 running

BTW: Is this issue tracker also supposed to discuss/open issues with the development branch?
Let me know please, I have one :)

Would I be able on a later run using the same map but maybe on another device

Yes, this is a feature of the 2.30.0 release.  What you describe should work.
Also, this is the correct place for issues with the development branch.

@radfordi Thanks. I had some minor problem with python and the dev branch (just some "invalid stream 0xc" traces), but I cannot reproduce now.


refactor(variables): const,let,varの順番で書き直し

fix #806

Deploy preview for js-primer ready!
Built with commit b2b4a32f26f67b5003d8fd09d4676864be6cf92f
https://deploy-preview-823--js-primer.netlify.com


No Improvement in Pong Scores after 18M+ Steps

[Edited to update to 18M steps; images below are from 12M]
Starting a new thread with more relevant detail here. Please feel free to close if you don't think it's appropriate.
We've now trained several instances to at least 10M+ steps with no improvement in Pong scores. This is using the default Pong settings on V100 machines in Colab Pro.
All training settings are the default in the repo, no modifications have been made to the code base as this was a first "test run" of dreamer.
Below are performance graphs. Happy to provide Colab copy or log files if it would be helpful. Would appreciate any insight, even if it's that we need to allow longer training (though the chart in Appendix F appears to show Pong improving by this point in training?).
Will keep training in the meantime and update if anything changes.
Thank you.
[Below images are from 12M steps. However issue persists beyond 18M+ steps]

Update: no improvement in scores at 18M+ steps.

You're right, it should have improved by now. Let's dig into this:

Are you using the latest commit of the repository? If not, which commit are you using?
Are you running the command line from the README or are you adding any additional flags?
Are you training in mixed precision (--precision 16)? If so, could you try --precision 32?
Could you give atari_name_this_game a try? Similar to Pong, it should learn pretty quickly.

Great!

Should be. Importing via !git clone https://github.com/danijar/dreamerv2.git
Yes I'm running via !python3 dreamerv2/train.py --logdir '/content/drive/MyDrive/logdir/atari_pong/dreamerv2/1' --configs defaults atari --task atari_pong
I noticed that as well. I suspect that that was when I switched to a V100 instance on Colab, but I can't be positive. Given that I'm training in Colab (Pro), there were several times when I had to reconnect and resume training from the cache/log files. (Perhaps something in that process caused some issues with the model?)
Sure I will try today
Yes will also attempt that

If it's helpful, here's a copy of the notebook (very straightforward): https://colab.research.google.com/drive/1iB9G5fNnrxfWZfplynU70RMkjbKxSv_k?usp=sharing

Sounds good, let me know how it goes. I didn't see anything suspicious in your colab except that the section for the train_openl image summary shows no images for me.
Looking at the episode length plot, it seems like the agent is learning something. Maybe it's really just taking a while to start making progress on Pong. Of course Pong can be solved much faster, but the hyper parameters were tuned to work well across all games at 200M steps, without focus on data-efficiency or easy games.
If the above ideas don't help find the problem, the next idea would be to train an agent at the first commit of the repository rather than after the refactoring. That said, I've tested the refactoring on Google machines and everything works fine there.

Early results (~2M steps) appear to be that the system is behaving more stably with --precision 32 flag. Will report back.

Update at 8M steps: despite some promising early behavior the agent has now settled into a zero-score, zero-hit behavior for the past ~4M steps:

Here is what I'm getting when training DreamerV2 on Pong 10 times (this uses mixed precision, so all flags at their defaults):

Yeah so there's definitely something going on. None of our training runs in Colab (up to 18M+ steps) achieved returns greater than about -19...

If you have a MuJoCo license, you could try running on a simple DMC task, e.g. dmc_walker_walk to see if the general algorithm works for you in Colab.

I probably have the same problem when running on my own computer:
Latest commit from git. Running python3 dreamerv2/train.py --logdir logdir/atari_pong/dreamerv2/3 --configs defaults atari --task atari_pong => single run to 10M steps with eval/train_return -21; 2 runs to 2M also with return -21.
Initial commit from git. Running python3 dreamer.py --logdir logdir/atari_pong/dreamerv2/04_initial_commit --configs defaults atari --task atari_pong and so far single run to 1M steps with return -7, short run but considering that from the latest commit returns never went
Quite few runs, but it would seem that for some reason the latest commit (after the refactoring) won't train. The conda environment changed between those commits (because other one had tf 2.3 and the other 2.5). I might run some more trials next week.

Ok I at least made some progress here. I don't know if it's the full answer, but my agent is at least finally training (albeit slowly). Note this is Colab-specific:
Don't pip install anything except ruamel.yaml and elements. For everything else use the Colab default installs. (You'll have to install the Atari ROMS too).
The issue appears to be noted here: Tensorflow versions in Colab. It looks like Colab uses a custom-compiled version of tensorflow, so doing !pip3 install tensorflow can lead to poor-performing or non-functioning tf in Colab.
As noted above, my model is still training much slower than the results @danijar posted above (I've now trained to 10M frames with mean eval return of about -16). But this is the first time I've gotten the agent to escape -21 after many, many attempts. This suggests that the Colab tensorflow issue is a real one.
Again, this is still a far cry from positive Pong scores by 4M steps as shown in your plots above @danijar, but by using the built-in Colab installs my model finally at least appears to be learning.

@holli That's good to know, thanks! If you could, it'd be great to know if the commit right before the refactoring commit still works for you.

@danijar yep that commit just before refactoring works well, trains to +15 after 4M steps. So before refactoring everything trains like in your https://github.com/danijar/dreamerv2/issues/8#issuecomment-849887724 example, but after refactoring nothing seems to train in my computer. Either the refactoring or some library change. All the stats in tensorboard seemed to start from similar points so not sure if those help.

Okay, interesting. I diffed the newest commit in the repo here to the code I ran on Google's datacenter to get the successful runs I posted above. There is virtually any difference. I will run on my local GPU now to see if I can verify the problem.

I think I found the reason. Could you both retry with the current commit, please?

Yay, after a quick test it seems to train now.
What was the problem/fix?

Sorry for the slow reply @danijar. I have also tested and verified that the new codebase works in Colab as well and learns as expected!
(note this was using Colab versions of tensorflow, etc, as noted above).
Thank you for your help!


cifar10: Failed to find file

Traceback (most recent call last):
File "/opt/modules/spark-2.1.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/worker.py", line 174, in main
process()
File "/opt/modules/spark-2.1.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/worker.py", line 169, in process
serializer.dump_stream(func(split_index, iterator), outfile)
File "/opt/modules/spark-2.1.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/rdd.py", line 2407, in pipeline_func
File "/opt/modules/spark-2.1.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/rdd.py", line 2407, in pipeline_func
File "/opt/modules/spark-2.1.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/rdd.py", line 2407, in pipeline_func
File "/opt/modules/spark-2.1.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/rdd.py", line 2407, in pipeline_func
File "/opt/modules/spark-2.1.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/rdd.py", line 346, in func
File "/opt/modules/spark-2.1.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/rdd.py", line 794, in func
File "/opt/modules/TensorFlowOnSpark/tfspark.zip/tensorflowonspark/TFSparkNode.py", line 421, in _mapfn
File "/opt/modules/TensorFlowOnSpark/examples/cifar10/cifar10_multi_gpu_train.py", line 273, in main_fun
train()
File "/opt/modules/TensorFlowOnSpark/examples/cifar10/cifar10_multi_gpu_train.py", line 180, in train
loss = tower_loss(scope)
File "/opt/modules/TensorFlowOnSpark/examples/cifar10/cifar10_multi_gpu_train.py", line 83, in tower_loss
images, labels = cifar10.distorted_inputs()
File "./cifar10.zip/cifar10.py", line 156, in distorted_inputs
batch_size=FLAGS.batch_size)
File "./cifar10.zip/cifar10_input.py", line 155, in distorted_inputs
raise ValueError('Failed to find file: ' + f)
ValueError: Failed to find file: hdfs://XXXX/examples/cifar-10/cifar-10-batches-bin/data_batch_1.bin
However, HDFS does have this file,

Not sure if this is the root cause, but please ensure that you add the path to libhdfs.so to your spark.executorEnv.LD_LIBRARY_PATH.

Closing due to inactivity.  Please feel free to re-open if you're still seeing issues.


The slide-out panel inside Ghost's admin on mobile lacks intuitive close triggers

Issue Summary
This is a user-interface design issue. It's less than a bug but neither is it a new feature request.
There's not an intuitive way to close the slide-out panel inside Ghost's admin on mobile. For instance, if you open the panel by clicking the [More] button in the bottom panel while the [Dashboard] section is loaded, the only way to close the slide-out panel is to click one of the remaining buttons in the bottom panel, in this case [Posts] or [Members].
My first instinct, if I open the slide-out panel by clicking the [More] button, is to close the slide-out panel by clicking the [More] button again. (B) My second instinct, if I want to go back to the [Dashboard] section loaded underneath, is to click the [Dashboard] button. (A) Neither action closes the slide-out panel.
(A third close-point could be a close icon added at the top-right corner of the slide-out panel.)

Ghost Version
6.101.1
Node.js Version
18.20.4
How did you install Ghost?
Docker ghost:5-alpine
Database type
MySQL 8
Code of Conduct

[X] I agree to be friendly and polite to people in this repository

Thank you for flagging this, @alexgmathews — a solution is in the works. We'll update you here once it's out.

A fix for this has merged and will be included in our next release. With this change, you can now also tap the 'More' button or any other menu item to have the menu close itself again. You can also tap outside of the menu (on the background) to dismiss it.
https://github.com/user-attachments/assets/f0508ecf-9f38-4ba5-8fb5-8fab2d53743a


ESP8266 Arduino Mega

Hello,
Will this code work with an Arduino Mega that has ESP8266 built-in ?
Here is a link for the board
https://www.aliexpress.com/store/product/Mega-WiFi-R3-ATmega2560-ESP8266-32Mb-memory-USB-TTL-CH340G-Compatible-for-Arduino-Mega-NodeMCU-WeMos/1950989_32806021806.html?spm=2114.120106<IP_ADDRESS>ff36377CukE0n

From description it seems that you can flash ESP8266, but according to schematic almost no GPIO pins are exposed, so it kind of useless.. Unless you flash Arduino with some kind of serial communication protocol that will allow ESP8266 control pins through some serial protocol.

@maximkulkin I see, so this board only combines the ESP8266 with an Arduino and I have to manually connect the wires between the two.
Thank you for the reply.

No, the board does allow to connect ESP8266 to Arduino, but it seems that you can not debug Arduino with WiFi (because that switch allows you to connect Arduino either to USB or to ESP8266, but not to both).

@maximkulkin Oh I think I understand, they hardwired the tx rx traces and put a mode selection pin to chose. I thought this could replace the multiplexer easily, but looks like it will need lots of effort to get it to function with your esp-homekit examples, specifically the dynamic relays.

Yes, seems like it. It's mostly meant to provide wifi communication to Mega chip.


2nd non-default deploy command defined in devfile causes odo to report error

/kind bug

What versions of software are you using?
Operating System:
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

Output of odo version:
$ odo version
odo v2.5.0 (724f16e68)

How did you run odo exactly?
$ odo deploy
with the following two deploy commands defined in the devfile:
  - id: deploy
    composite:
        commands:
          - build-image-stack-provided
          - outerloop-deploy
        group:
          kind: deploy
          isDefault: true
  - id: deploy-app-image
    composite:
       commands:
         - build-image-app-provided
         - outerloop-deploy
       group:
         kind: deploy
         isDefault: false

id: deploy is the default commands for the devfile and
id: deploy-app-image is a second non-default command.
Actual behavior
odo deply reports an error:
$ odo deploy
 ✗  more than one default deploy command found in devfile, should not happen

Expected behavior
i expect to be able to call either:
$ odo deploy
or
$odo deploy-app-image
to have two slightly different build strategies occur as part of deploy.
Any logs, error output, etc?

This has two parts.
The first one is clearly a bug
/kind bug
If there is only one kind: deploy command that is set as isDefault: true all other kind: deploy commands are marked as isDefault: false, or don't set isDefault (default is false) than odo deploy should not error out.
The second part

$odo deploy-app-image
to have two slightly different build strategies occur as part of deploy.

is more a new feature. I've created a separate issue to cover this #5454

The bug is fixed in v3 as part of https://github.com/redhat-developer/odo/pull/5460

The bug is fixed in v3 as part of #5460

This is something that we should backport into v2

The bug is fixed in v3 as part of #5460

This is something that we should backport into v2

just noticed https://github.com/redhat-developer/odo/pull/5481 :+1:  thank you @feloy

Closing this issue as it has been fixed in v3 (via #5460) and backported to v2 (via #5481).
/close
The other part of the issue (#5454) will be addressed after v3 GA.


adjust display width

we should allow one to adjust display width (at least at the CLI config side) since sometimes the commands usage doc can be too long.
the other way is to print the usage doc beyond the doc string, e.g
foo [options...] <arg1> <arg2::Float64>
       some docstrings.....

now one can adjust this by customize the IO via terminal_width


Windows phone display in lab

Ionic serve --lab displaying only iOS and Android.
If the project is Ionic 2 it should display windows phone too.

Hello all! This feature is in the latest version of the ionic cli. Thanks for using Ionic!


Piper/functional expression shape checking utilities

PR is meant to be demonstrative of an idea I had.  Working my way through the codebase I've found a lot of sections like this:
https://github.com/ethereum/vyper/blob/e83d4b6d0b2c74d4dead2b0c402677f9d200cd6f/vyper/parser/stmt.py#L377-L381
Repeated isinstance checks that incrementally validate the structure of an AST node.
The problem that I see is that these checks are verbose, and often require checking 3+ things, often in a nested manner such that you can't check the later ones until you've validated the earlier ones because you might end up accessing invalid properties if the AST is malformed for some reason (like accessing the func.id for an AST node that doesn't have this property.
So I thought, can we bake these concepts into composable primatives.  Here's a branch that tries to demonstrate these.  I tried applying them to the if/elif/else that handles for ... in range(...) but realized that I still don't quite know enough about the intended behavior to muck with the actual functionality.
The basics
Lots of primitives written in the form of small functions that do one thing such as:

check if something is an instance of ast.Name
check is something equals some value A
check if something has a length of X

Then, some primatives that allow for you to apply these to data structures.  For some check_fn like the ones above:

return the result of applying the check_fn to the attribute denoted by attr.

check_attr('iter', is_ast_call)(value) is equivalent to is_ast_call(value.iter)

return the result of applying the check_fn to the value an index in a sequence denoted by index.

check_at_index(0, is_ast_call)(args) is equivalent to is_ast_call(args[0])

Then, some primitives that allow you to combine these checks using logical and or or concepts.

return whether all of the check functions fn1, fn2, fn3 pass.

check_all(is_ast_call, check_attr('args', check_length(1))) is equivalent to is_ast_call(value) and check_length(1)(value.args)

Why might this be good?
Well, I'm not 100% sure it is, but I think it could be.  Here's my attempt at an objective assessment
The good

functional approach usually results in it being easier to reason about (once you're familiar with the tools).
composable: allowing us to write each check we need to do once and re-use it in many places.
expressive: allows concise expression of complex validation rules.  Code using this validation should be cleaner to read and understand.
readability: because these make it easy to bundle complex logic into a single statement the code for the various parsers should shrink, resulting in the code being more delineated into high level and low level bits, which should result in better readability if used correctly.

The downside
The primary downside I see is it being harder to debug when something is broken.
When one of these composed check functions is not doing what it is intended, it is very opaque as to why.  This can be mitigated but by the nature of this approach, we would be hiding the complexity inside of these utilities and it can be harder introspect because of this.
We can mitigate the opaquness of failures by embedding logging statements into this API to allow verbose dumps of what logic was applied and what passed and failed.  There are alternate ways to do this other than logging, but they will all likely take a similar form of making introspection of the individual logic functions easier to dig into.

cc @davesque @fubuloubu @jacqueswww and @charles-cooper

Another big downside with the above approach is that it's a very very thin layer on existing constructs, which is a non standard dialect one would have to learn and maintain and onboard new devs on.
The existing statements are very verbose but use know python constructs.
Having written a large part of those statements I think we should instead look into creating 2 to 3 handy util functions :
So a check_all and check_any like above that evaluates in a lazy fashion like an actual 'and' and 'or', the existing and would be considerably more readible if we had that. The 3rd would a clever recursive getattr/hasattr derivative whereby one can do something like if gett(item, 'decorator_list.0.id') == 'public'.
Then there is the case for better type checking, we are much better than when we started but we should really move this into it's own parsing layer, this will make a large part of that go away (we all have talked about this, I have started some basics somewhere and I really want to do this). Having that occur on it's stage will make all those current statements and inline typechecks infinitely more readable.
Hope that makes sense?

copying over comments from gitter

Charles Cooper @charles-cooper 15:59
it looks like this is the start of moving type-checking into its own pass? that is something i am generally on board with. having stuff like is_ast_binop_add should help readability.
although, while i see the appeal of having 'validation combinators', decomposing checks all the way down into check_attr type functions might be a case of too much abstraction. also, it's worth mentioning that stuff like https://github.com/pipermerriam/vyper/pull/1/files#diff-675c942b6cfa6ce8d2018118e9d82213R155 performs repeated compilations to LLL, which could have unintended side effects.
Piper Merriam @pipermerriam 15:59
@charles-cooper yeah, the inneficiencies of repeated compilation are something I'd want to figure out how to mitigate/eliminate.
Charles Cooper @charles-cooper 16:06
i think having a separate type-checking pass would eliminate this issue. you would have AST -> Tagged AST -> LLL, and perform validations on the Tagged AST. (because LLL generation is side effecting, multiple compilations of an AST may - and not necessarily in this specific case - do weird things, like increment the free memory pointer, leading to inefficient or incorrect bytecode output. generally the effect should be benign but it's something to watch out for.)

Type checking stageeeeeee, yes!


Installation & configuration instructions for tti-lw-cli

Summary
Closes #342
Changes

[x] installation instructions
[ ] configuration instructions

Checklist

[x] Scope: The referenced issue is addressed, there are no unrelated changes.
[x] Run Locally: Verified that the docs build using make server, posted screenshots, verified external links. Test with HUGO_PARAMS_SEARCH_ENABLED=true if style changes will affect the search bar.
[ ] New Features Marked: Documentation for new features is marked using the new-in-version shortcode, according to the guidelines in CONTRIBUTING.
[x] Style Guidelines: Documentation obeys style guidelines in CONTRIBUTING.
[ ] Commits: Commit messages follow guidelines in CONTRIBUTING, there are no fixup commits left.

@neoaggelos @johanstokking I provided instructions for installing, but I have troubles with configuring CLI on localhost, so I still need to test that. It's something with self signed certificates again. I'll let you know when this is ready for a review.


test: verify ignoreHTTPSErrors works with puppeteer.connect

closes  #466

This guy is getting stuck in AppVeyor @Meir017

I'm not sure which test is causing the run to hang, any ideas?

Maybe because we’re not closing originalBrowser?

@kblok Done


Error: asset-map helper not found

Using same syntax as in your usage example:
model=e
<img src={{ asset-map (concat "assets/images/" e.photoFilename)}} />
e.photoFilename = "photo.jpg"
How do I access the helper, or write my own?

Hey @Hucxley, can you give a bit more info about this? What you are trying to achieve? Have you configured your fingerprinting, etc.?
asset-map helper is accessible in the code, after this addon is added.

Yep, followed your setup on the readme exactly. The only thing I changed is
adding "images/" to the (concat "assets/..." e.photoFilename) instruction
since I have images in a subfolder by themselves
If I look at the html generated after building, it has e.photoFilename as
the exact string in the model. Basically, it's not accessing the helper to
return the mapped asset. The asset key-value pair is correct in the map,
it's just not going out to get it since the helper isn't working.
I didn't build the service on the readme, though, because I thought that
was intended if you wanted to use it as a more complex service and not
helper. Is that where I've gone wrong?
On May 8, 2017 1:30 PM, "Ruslan Zavacky"<EMAIL_ADDRESS>wrote:

Hey @Hucxley https://github.com/Hucxley, can you give a bit more info
about this? What you are trying to achieve? Have you configured your
fingerprinting, etc.?
asset-map helper is accessible in the code, after this addon is added.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RuslanZavacky/ember-cli-ifa/issues/16#issuecomment-299951251,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGwgnFpJcLzihl2k9zVjxyzFU-8r6uTkks5r319KgaJpZM4NUUf7
.

@Hucxley you did everything right, show me your fingerprinting configuration, it will give more context. Fingerprinting (and these helpers) only for in most cases for production builds, not local ones.

In config/environment:
ENV:{ ifa: { enabled: true}, ...
In ember-cli-build:
if(environment == "development"){
fingerprint : {
enabled: true,
generateAssetMap: true,
fingerprintAssetMap: true
},...
}
I'm trying to figure this out in development environment since I already
got burned by fingerprinting in a production deployment. So, I'm building a
dev environment and looking at the dist files to see what is happening
locally until I figure out a solution, instead of pushing more broken stuff
into production.
On May 8, 2017 1:45 PM, "Ruslan Zavacky"<EMAIL_ADDRESS>wrote:

@Hucxley https://github.com/Hucxley you did everything right, show me
your fingerprinting configuration, it will give more context.
Fingerprinting (and these helpers) only for in most cases for production
builds, not local ones.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RuslanZavacky/ember-cli-ifa/issues/16#issuecomment-299955372,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGwgnCshy8d5aNuWmeFsY8f3wpf8-MrRks5r32LJgaJpZM4NUUf7
.

@Hucxley everything looks legit, can you also verify several things then:
[ ] check index.html, find var __assetMapPlaceholder__ and write here, what's the value
[ ] check your dist/ folder, find assetMap.json, and validate, that it is actually fingerprinted.
[ ] check your network tab, to see if there is a failed (or succeeded) request to get assetMap.json (fingerprinted I assume)

1 - don't know (will report back in a couple of hours when I get home from
the office)
2 - Yes
3 - Assume Yes (static assets are being fingerprinted and loaded correctly,
dynamic are not).
I can send you the URL in an IM, and you can look at the same asset in two
different locations to see what's happening, if you want. One is loaded
from the model, the other is currently hard-coded. The hard-coded link
loads the fingerprinted asset, the dynamic does not.
On May 8, 2017 2:36 PM, "Ruslan Zavacky"<EMAIL_ADDRESS>wrote:
@Hucxley https://github.com/Hucxley everything looks legit, can you also
verify several things then:
[ ] check index.html, find var assetMapPlaceholder and write here,
what's the value
[ ] check your dist/ folder, find assetMap.json, and validate, that it is
actually fingerprinted.
[ ] check your network tab, to see if there is a failed (or succeeded)
request to get assetMap.json (fingerprinted I assume)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RuslanZavacky/ember-cli-ifa/issues/16#issuecomment-299968375,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGwgnPGWjmIW_yjlYkV_17ko236DMmfnks5r327FgaJpZM4NUUf7
.

@Hucxley send me a message in Ember community slack :)

added excluded: ["images"] since these are going to be static assets anyway.


Add erblint-github dependency

This PR adds erblint-github as a development dependency. This contains several accessibility-focused rules for ERB.

can I bump   spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0") to 2.6?
related:
erblint-github-0.0.7 requires ruby version >= 2.6.0, which is incompatible with
the current version, ruby 2.5.9p229

bump this question: https://github.com/primer/view_components/pull/1203#issuecomment-1171609491

@khiga8 I'm gonna say that's fine 😄

hmmm
Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    Ruby
    primer_view_components was resolved to 0.0.82, which depends on
      Ruby (>= 2.6.0)
Ruby (>= 2.6.0), which is required by gem 'primer_view_components', is not
available in the local ruby installation

what am I missing?

@khiga8 what version of Ruby are you using to run bundle?

@camertron yep!!! took me a bit to figure out what was going on 😅


[UI improvement] Citizen card - Show citizen status by filter on photo

Describe the feature
Display citizen status:

arrested (set when the officer makes an arrest)
BOLO (set when the officer creates a BOLO record)
died (set manually by a police officer or a medic - add button to citizen card)

Setting statuses unavailable for a citizen

Additional Context
No response

@pp2amd6 is this still wanted? I'm not sure if this realistic?
Sorry for taking so long to get back to this issue 😅!


Version <IP_ADDRESS> crashes on startup

To update the app I uninstalled the old version and installed the new one.
When the app starts it displays the splash screen and then crashes.
I'm using Android 6.0.1 on a Fairphone 2.
I tried deleting the cache and the app data uninstalled and reinstalled the app and it still crashes when I try to launch the app.

Is there any message while crashing?

No, just the standard Android message when an app stops working that "HODLER Core" was closed.

Is this reproducable on another devices with similar specs?


wip: avm token contract - posting with issues

Please read contributing guidelines and remove this line.

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

#4815  👈
#4814
#4673
#4527
#4526
#4457
master

This stack of pull requests is managed by Graphite.


Semantic versioning

Add to the documentation the reasoning behind the version numbers, probably in the contribute section.
See semantic versioning.

/cib


add .save() and .load() functions to Program class to (de)serialize partially executed programs

Is your feature request related to a problem? Please describe.
For non-executed programs storing and loading from text files works fine. But for partially executed programs with custom variables an ugly workaround was necessary. Otherwise I would get the error
Error in program:  Can't set a property of a non-existing variable: conversation[-1].user_text

when trying to continue the chat after loading the text file and converting it to a program.
Describe the solution you'd like
Ideally we can just program.save(filename) and program.load(filename) and it just works without worrying about storing and loading the program.variables() separately.
Describe alternatives you've considered
I was trying to do this:
import guidance
guidance.llm = guidance.llms.OpenAI('gpt-3.5-turbo')
guidance.llm.cache.clear()

prompt = guidance(
'''{{#system~}}
You are a helpful assistant
{{~/system}}
{{~#geneach 'conversation' stop=False~}}
{{#user~}}
{{set 'this.user_text' (await 'user_text')}}
{{~/user}}
{{#assistant~}}
{{gen 'this.ai_text' temperature=0 max_tokens=300}}
{{~/assistant}}
{{~/geneach}}''', stream=False, silent=True)

prompt = prompt(user_text ='Hello there :)')

with open('prompt.txt', 'w') as f:
    f.write(str(prompt))

with open('prompt.txt', 'r') as f:
    prompt = f.read()

prompt = guidance(prompt)

prompt = prompt(user_text ='I want to travel to the moon')

But got the error mentioned above.
My solution was:

def save_prompt(prompt, filename):
    variables = prompt.variables()
    del variables['llm']
    to_store = {'text': str(prompt), 'variables': variables}
    with open(filename, 'w') as f:
        json.dump(to_store, f)

def load_prompt(filename):
    with open(filename, 'r') as f:
        loaded = json.load(f)
    prompt = guidance(loaded['text'], **loaded['variables'])
    return prompt

Note that the  del variables['llm'] is necessary because the llm object is not serializable.

Thanks for noting this. I agree we should have direct support for serializing not just the template but the variable state as well. I can think of two approaches here:

Create a new format like a JSON format to store both the program string and the variables.
Extend the template for a little bit so that we can include the variables into the template. Then we just have one string format type.

I lean towards number 2 because we can already use the set command like {{set 'var_name' literal_value}}. But I think the grammar might need a bit of enhancing to ensure complex literal values work (they might I just have not tried).
Anyone have more thoughts?

I'm evaluating Guidance at the moment for a project, and persistence of prompt-with-state is something that would be very helpful to me. My preference here is option 1 for the following reasons:

It would make it easier to 'hack' the persisted state in code to, for example, filter out certain data as part of a data loading pipeline in something like Azure Synapse Pipelines.
It would open the door to querying the state using a standard JSON toolchain. This would be useful for automating safety evaluations as you productionize a prompt.

I'm not entirely sure how typical my requirements are though! (And I could always implement my own persistence if the chosen approach is option 2).

I think having a single string representation is simpler and more elegant, in fact I intuitively thought option 2 was already implemented. Also introducing a JSON format might open the door to gradual increase in bloatedness and unnecessary complexity over time. On the contrary expressing everything in the template forces a simple feature design.

This has not had much activity in months, and I am a bit stuck on this. Any word on approaches here? I am going to have to figure out a hack soon.

f.write(str(prompt))

Your solution works.
Please note when calling the prompt again and passing the input, you will need to also add the argument await_missing=True
That made it work for me.

Great to know it helped. Its surprising that after all these months they have not merged a solution for this feature.

Hey, sorry it took us so long (please see this announcement). The new version works a little differently, we have immutable objects, and it's easy to take partial completions and do whatever you want with them.


Using lazy.nvim to update plugins gives an error

Problem

Maybe you need to add doc/Screenkey.nvim.txt to gitignore
Steps to reproduce
No response
Expected behavior
No response
Terminal name/version
Kitty

Oops, classic typo. Thanks for catching this. It should be fixed now, if it keeps happening I'll reopen this issue.


Update xml-documentation.md

Summary
Give more precise information on XML doc comments and include information from https://github.com/dotnet/fsharp/pull/10118
Some of the text is taken form the C# documentation comment pages
cc @cartermp

There are also detailed-message pages started in the docs/fsharp/language-reference/compiler-messages directory of this repo that tooling can use to provide examples for specific warning and errors. Would it make sense to progressively add to those in situations like this where new messages are added?

There are also detailed-message pages started in the docs/fsharp/language-reference/compiler-messages directory of this repo that tooling can use to provide examples for specific warning and errors. Would it make sense to progressively add to those in situations like this where new messages are added?

I personally think we should move to a content driven approach for these, where FSComp.txt contains the detailed explanations, so they are authored and correlated in-repo
Though if opinion differs or this is too hard then I guess we can do it by hand, or at least register these as a backlog for that doc debt

All review comments incorporated thanks