amqp-job-queue: don't log the channel when close fails

The channel object is very long and doesn't contain any exported information that has helped in debugging in the past, so let's remove it to make the log messages easier to read.

😻


Restrict destructive routes to POST requests

This pull request converts a few outstanding routes that perform destructive actions to use POST requests only, requiring a valid CSRF token in the posted data. This closes a few unlikely and low-severity CSRF vulnerabilities.
CSRF vulnerabilities
The routes in question are:

/do/admin/enable_posting
/do/admin/enable_registration
/do/admin/require_captchas
/do/admin/deleteannouncement
/do/create_invite

Currently, should a malicious party convince an authenticated user to click a link to any of these, the corresponding action will be performed. For the first four routes, this user has to be an administrator, so this would have to be highly targeted.
While these are destructive in that they cause changes to the state of the application, for the first three routes which act as toggles, the user is redirected to the admin index page and a message is displayed describing the action taken, allowing the user to quickly reverse the action.
The announcement-deleting route also redirects the user to the admin index page, though it may not be so obvious that there is now no announcement set.
And while the final route will create a new invite code from the user’s pool, this is really just an annoyance.
Contents of the pull request
This pull request looks quite large but the vast majority of the additions are in new tests for the routes and some additional helper functions.
Please note that this PR also includes changes to some Sub and SubPost model constraints to disallow null in some fields. This is only the case where such a null field would cause an exception in the application (or, for SubPost.title, cause its own __repr__ to fail). (This came about while writing test helpers, which is why this change is present in this PR.)
I have written a migration to add the not-null constraints in the database, but this is a schema-only migration. I think it’s probably unlikely that nulls exist in these columns in the real world, given the effect on the application, but I would very much appreciate if this could be reviewed carefully. (It, er, also wasn’t clear to me how to perform an appropriate data migration for null fields in all cases.)
Template changes
Most of the template changes are straightforwardly swapping links for forms. On the admin page the buttons display slightly differently than before; I’m not sure what is preferable and I’m not really familiar with the CSS so I’d appreciate some guidance here if it’s not quite right.
Additional dependencies
I’ve added factory-boy and Faker as dependencies, but these are just test dependencies to make creating model instances easier and faster. I think there’s scope to extend the use of these factories, as well as some other helpers that I’ve written for this PR, to other tests. But I haven’t done that here, not least because there will need to be some consideration where the logic of the existing helpers (by, eg, registering a user by making requests to the application) is actually an important part of the behaviour tested and not just incidental complexity.

This would be better as three pull requests (CSRF tokens, the non-null constraint migration, and tests) than as one, since all these commits will be squashed together when merged.  Our future selves will thank us for giving them smaller, single-topic lists of revisions to sort through, if they have to come back to look at one of the changes in this PR.
Making the buttons on the admin page display below their labels as before can probably be solved by wrapping the labels in a <div>.
Flask has a function called flash which can be used to display a message after a redirect, which you could use on the delete announcement route.
The migration to add the non-null constraints looks good.  I checked our production database and there are no nulls in those fields.

Brilliant, thank you very much @happy-river. I’ll split apart this PR and refile, incorporating the points you raised in your comments and also in your reviews.
Thanks again!


Add getForeignKeyData to User Guide

Description
User Guide was missing any mention of getForeignKeyData, this adds it.
Checklist:

[X] Securely signed commits
[X] Component(s) with PHPdocs
[ ] Unit testing, with >80% coverage
[X] User guide updated
[X] Conforms to style guide

Sigh forgot to [ci skip] again. One day.

As we saw the other day - it doesn't seem to work very well anymore so probably no biggie. :(


Added workflow to release csm libs

Description
Added automation to release process.
Issues
List the issues impacted by this PR:

Issue ID

Checklist:

[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] I have added tests that prove my fix is effective or that my feature works

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

[x] Tested by running automation against gobrick library by forking the repo.

Is this something we want to have to trigger manually in each repository? We could have a trigger action that will kick off the release in all the goclient libraries we have. Example of that is here: trigger workflow, target workflow

Is this something we want to have to trigger manually in each repository? We could have a trigger action that will kick off the release in all the goclient libraries we have. Example of that is here: trigger workflow, target workflow

@shaynafinocchiaro @gallacher If we try to release everything in one shot like the above example then we can't provide the versions to be released for different repos. So we can use this approach for only major release as per our discussions.


[Bug] New errors on 0.33.1

The problem
3 new errors
Your device model
RT-AC88U
Firmware type
Merlin
Firmware version
386.14
Integration version with the issue
0.33.1
Method of the integration installation
HACS
What version and type of Home Assistant installation do you use
2024.8.3
Is there anything useful in the logs?
This error originated from a custom integration.

Logger: custom_components.asusrouter.router
Source: helpers/update_coordinator.py:354
integration: AsusRouter (documentation, issues)
First occurred: 21:12:58 (1 occurrences)
Last logged: 21:12:58

Unexpected error fetching firmware data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/asusrouter/bridge.py", line 350, in _get_data_firmware
    data = await self._get_data_modern(AsusData.FIRMWARE)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/asusrouter/bridge.py", line 312, in _get_data_modern
    raw = await self.api.async_get_data(datatype, force=force)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/asusrouter/asusrouter.py", line 705, in async_get_data
    processed = process(
                ^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/asusrouter/modules/endpoint/__init__.py", line 149, in process
    return submodule.process(data)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/asusrouter/modules/endpoint/firmware.py", line 27, in process
    _available = Firmware(data.get("webs_state_info", "")).safe()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/asusrouter/modules/firmware.py", line 86, in __init__
    self.from_string(version)
  File "/usr/local/lib/python3.12/site-packages/asusrouter/modules/firmware.py", line 169, in from_string
    beta = major[0] == "9"
           ~~~~~^^^
TypeError: 'NoneType' object is not subscriptable

Logger: homeassistant.components.device_tracker
Source: helpers/entity_platform.py:775
integration: Device Tracker (documentation, issues)
First occurred: 21:12:58 (8 occurrences)
Last logged: 21:12:58

asusrouter: Not adding entity with invalid device info: Invalid device info {'connections': {('mac', 'XX:XX:XX:XX:XX:XX')}, 'default_name': 'XX', 'identifiers': {('asusrouter', 'XX:XX:XX:XX:XX:XX')}, 'via_device': ('asusrouter', 'XX:XX:XX:XX:XX:XX')} for 'asusrouter' config entry: device info needs to either describe a device, link to existing device or provide extra information.
asusrouter: Not adding entity with invalid device info: Invalid device info {'connections': {('mac', 'XX:XX:XX:XX:XX:XX')}, 'default_name': 'XX', 'identifiers': {('asusrouter', 'XX:XX:XX:XX:XX:XX')}, 'via_device': ('asusrouter', 'XX:XX:XX:XX:XX:XX')} for 'asusrouter' config entry: device info needs to either describe a device, link to existing device or provide extra information.
asusrouter: Not adding entity with invalid device info: Invalid device info {'connections': {('mac', 'XX:XX:XX:XX:XX:XX')}, 'default_name': 'XX', 'identifiers': {('asusrouter', 'XX:XX:XX:XX:XX:XX')}, 'via_device': ('asusrouter', 'XX:XX:XX:XX:XX:XX')} for 'asusrouter' config entry: device info needs to either describe a device, link to existing device or provide extra information.
asusrouter: Not adding entity with invalid device info: Invalid device info {'connections': {('mac', 'XX:XX:XX:XX:XX:XX')}, 'default_name': 'XX', 'identifiers': {('asusrouter', 'XX:XX:XX:XX:XX:XX')}, 'via_device': ('asusrouter', 'XX:XX:XX:XX:XX:XX')} for 'asusrouter' config entry: device info needs to either describe a device, link to existing device or provide extra information.
asusrouter: Not adding entity with invalid device info: Invalid device info {'connections': {('mac', 'XX:XX:XX:XX:XX:XX')}, 'default_name': 'XX', 'identifiers': {('asusrouter', 'XX:XX:XX:XX:XX:XX')}, 'via_device': ('asusrouter', 'XX:XX:XX:XX:XX:XX')} for 'asusrouter' config entry: device info needs to either describe a device, link to existing device or provide extra information.

This error originated from a custom integration.

Logger: custom_components.asusrouter.entity
Source: custom_components/asusrouter/entity.py:65
integration: AsusRouter (documentation, issues)
First occurred: 21:12:58 (2 occurrences)
Last logged: 21:12:58

argument of type 'NoneType' is not iterable

Diagnostics information
No response
Additional information
No response

Please, check 0.33.2. It fixes your issue with the firmware string (which is somehow missing the major version part. The device trackers are also fixed now
As per the last one (which is a warning) - logging was improved, so now you'll see what exactly entity cannot be created. Then we can troubleshoot or fix something more
Let me know what you find

All good now.

Great :+1:


Consider adding a section on 'navigation vs task lists' to better illustrate use case for navigation

What
In the 'Help users navigate a service' pattern, add some information to help services decide whether they need navigation – and suggest task list as an alternative if appropiate.
From working group member:

I feel like there must be something around services that use task lists here. Could this be used in conjunction with a service that uses a task list or not? Not sure. There needs to be more thought around this and how they relate to task lists before I can see this going into the design system.

Working Draft Guidance Google document
Why
Currently header and navigation assume that services have already decided, however some guidance can help services avoid unclear and unnecessary navigation menus.
Who needs to be involved
Content designer, interaction designer
Who needs to review
Team
Tasks

[ ] Decide whether to do
[ ] Gather information
[ ] Draft content in guidance document
[ ] Review content

I reviewed the draft guidance. The only feedback I left on two places was regarding making it clearer that neither navigation nor task list is necessary if your service consists of only a single end-to-end journey.


Update docker.rst to use bash from the PATH in docker run command

Overview: What does this pull request change?
The docker docs use a docker run command that runs /bin/bash, but it's easier to use bash from the PATH.

Motivation and Explanation: Why and how do your changes improve the library?

Links to added or changed documentation pages
docker.rst

Further Information and Comments

I've verified the updated command works.

Reviewer Checklist

[ ] The PR title is descriptive enough for the changelog, and the PR is labeled correctly
[ ] If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
[ ] If applicable: newly added functions and classes are tested

Is there any reason that this is better? If /bin/bash works and it's more explicit why not stick with it?

If the explicit way is better then I suggest making this choice consistent across the document, in all invocations of a command inside a container:
diff --git a/docs/source/installation/docker.rst b/docs/source/installation/docker.rst
index 45eab686..317d51f5 100644
--- a/docs/source/installation/docker.rst
+++ b/docs/source/installation/docker.rst
@@ -29,7 +29,7 @@ with the following command.

 .. code-block:: bash

-   docker run --rm -it -v "/full/path/to/your/directory:/manim" manimcommunity/manim manim -qm test_scenes.py CircleToSquare
+   docker run --rm -it -v "/full/path/to/your/directory:/manim" manimcommunity/manim /usr/local/bin/manim -qm test_scenes.py CircleToSquare

 .. tip::

@@ -62,7 +62,7 @@ a scene ``CircleToSquare`` in a file ``test_scenes.py``, run

 .. code-block:: sh

-   docker exec -it my-manim-container manim -qm test_scenes.py CircleToSquare
+   docker exec -it my-manim-container /usr/local/bin/manim -qm test_scenes.py CircleToSquare

 Running JupyterLab via Docker
@@ -73,6 +73,6 @@ local JupyterLab instance. To do that, simply run

 .. code-block:: sh

-   docker run -it -p 8888:8888 manimcommunity/manim jupyter lab --ip=<IP_ADDRESS>
+   docker run -it -p 8888:8888 manimcommunity/manim /usr/local/bin/jupyter lab --ip=<IP_ADDRESS>

 and then follow the instructions in the terminal.

(I didn't change the docker command itself to avoid assuming which OS the reader is using)
Here are my thoughts on why using the PATH is preferable: When using a shell we usually rely on the PATH, it's there to help find binaries we know by name, and it saves typing. It also let's us not hardcode a path, which might change, for example the path to manim will change if we add the --user flag to pip install. IMO being explicit here only gives people the wrong impression - that docker requires a full path there (I know a few people who had that impression).
Regardless of which style is preferable, I think consistency is important, so if the maintainers prefer explicit paths I'll update the PR with the change above.


when flask request code use multiprocessing, request maybe deadlock.

Expected Behavior
Tell us what should happen.
Code
def check(s,c):
    print(22222222222222)
    app = current_app._get_current_object()
    logger = current_app.logger
    ...

class fix_service(Resource):
    def post(self, service_id):
            ...
            logger.info('fix: {name} done，start check'.format(name=service.name))
            # check
            with multiprocessing.Pool() as pool:
                print(111111111)
                check_results = pool.starmap(check, containers)

            logger.info('fix: check done')
            ...

Actual Behavior
Tell us what happens instead.
#### console just can see 111111111 and 6730  was deadlock . Not often, but occasionally####
# ps -elf
0 S root       6517   5322  0  80   0 - 50490 poll_s 10:54 ?        00:00:00 /usr/local/bin/python3.5 /usr/local/bin/gunicorn --threads 8 app:create_app("test") -b <IP_ADDRESS>:18113 --access-lo
1 S root       6520   6517  1  80   0 - 290893 ep_pol 10:54 ?       00:00:10 /usr/local/bin/python3.5 /usr/local/bin/gunicorn --threads 8 app:create_app("test") -b <IP_ADDRESS>:18113 --access-lo
1 S root       6730   6520  0  80   0 - 290690 futex_ 11:01 ?       00:00:00 /usr/local/bin/python3.5 /usr/local/bin/gunicorn --threads 8 app:create_app("test") -b <IP_ADDRESS>:18113 --access-lo

(gdb) bt
#0  0x00007f99c0e31a00 in sem_wait () from /lib64/libpthread.so.0
#1  0x00007f99b5950ff1 in semlock_acquire (self=0x7f99ace44688, args=<value optimized out>, kwds=<value optimized out>) at /opt/soft/Python-3.5.2/Modules/_multiprocessing/semaphore.c:307
#2  0x00007f99c10fd961 in PyCFunction_Call (func=0x7f99ad2000d8, args=0x7f99c16ff048, kwds=<value optimized out>) at Objects/methodobject.c:98
#3  0x00007f99c1184f25 in call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4705
#4  PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3236
#5  0x00007f99c1185e99 in _PyEval_EvalCodeWithName (_co=<value optimized out>, globals=<value optimized out>, locals=<value optimized out>, args=<value optimized out>, argcount=1,

Environment

Python version:3.5.2
Flask version:0.11.1
Werkzeug version:

It's not clear how this issue is related to Flask. Also, you appear to be using other libraries: Flask-Restful and Gunicorn. This is also not a minimal reproducible example.
Please use Stack Overflow for questions about your own code. This tracker is for issues related to the project itself. Be sure to include a minimal, complete, and verifiable example.


Use Bazel/CMake to drive examples

I think we broken this down in examples for storage vs. bigtable.


Memoize config

I need to check this PR on a large project before merging it.

before:
Total time: 38779ms
Average time per file: 7.7558ms

after:
Total time: 25641ms
Average time per file: 5.1282ms

An improvement of 33.8% across 5k files with the following code:
import postgres from "postgres";

type Nullable<T> = T | null;

interface Starship {
  id: number;
  name: string;
  captain_id: Nullable<number>;
}

export function check() {
  const sql = postgres();

  sql<{ id: number }[]>`SELECT id FROM starship`;
  sql<{ id: number; name: string; captain_id: Nullable<number> }[]>`SELECT * FROM starship`;
  sql<Starship[]>`SELECT * FROM starship`;
}


Minor lseq cleanup

While we are testing this I thought it would be good to clean up this. The file is a bit all over the place, but I think this should be safe to add to your PR.

Thanks!


Rolling 1d1 produces odd numbers like 7

<>roll 1d1 = 7 ?

You aren't clamping the numbers to a range I don't think

Indeed it would appear you are correct

@s0cks nope. lmao, after looking at code, I just had the closing parentheses in the wrong spot, so it was parsing the 1+1 as 11 instead of parsing the 1 and then adding 1 to it


PoC: Legacy KVM under Kubernetes

@alanmeadows working this issue.

See https://github.com/att-comdev/aic-helm/issues/27


record by defect on the dummylookup by error

Hello shivuparagi, I'm having a problem when i putted the control on a quick create form. When I open it, the field is setted with a record by defect that is blank. It only shows the icon of the entity:

Hi,
This is fixed now. Please try with the latest solution and associated code change.
Thanks and regards,
Shivakumar


Add support for list value paths in Elastic custom metrics.

What does this PR do?
Elastic custom metric integration allows specifying a value path traversing a nested dictionary. Allow specifying a path that can also include list indices to traverse a path of nested dictionaries and lists.
Ex. value_path -> a.0.b of dictionary {"a": [{"b": "c"}]} should return "c".
Motivation
Desire for multiple tags pulled per aggregation bucket. This is able to be achieved with Elasticsearch Multi Term Aggregations but the original implementation did not allow for specifying the key path as a list index.
Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] PR title must be written as a CHANGELOG entry (see why)
[ ] Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
[ ] PR must have changelog/ and integration/ labels attached
[ ] If the PR doesn't need to be tested during QA, please add a qa/skip-qa label.

@yzhan289 @buraizu Thank you both for the review! I'm a bit confused on the failing CI test, would it be possible to get some assistance? I'm not really sure why the container failed to start.
https://github.com/DataDog/integrations-core/actions/runs/5381174741/jobs/9765199563?pr=14718

@yzhan289 @buraizu Thank you both for the review! I'm a bit confused on the failing CI test, would it be possible to get some assistance? I'm not really sure why the container failed to start. https://github.com/DataDog/integrations-core/actions/runs/5381174741/jobs/9765199563?pr=14718

Hi @chamidiz, thanks for the changes. I took a look at that CI failure, and I think all PRs from external contributors will fail since forked repos do not have DD_API_KEY environment variable set, so this is not an issue for your PR.


Access the ZED camera from multiple apps

Hi
Is it possible to grab the Zed camera frames from multiple apps running in parallel, and in different languages?
E.g. I want to run the SLAM, so I open tje camera and track, but let s say I want to grab frames in a pythin program which rins at the same time as the SLAM: can I do that?
For now, when I open the access to the camera, it seems it locks its usage and I can not access the camera from other programs, unless I stop the one which opened the camera first.
Thanks

Technically you can with a trick.
The idea is to use the streaming feature for the ZED SDK

One program is opening the camera and sending the stream of images,
All others will open the stream (opening the local network stream).

The opening apps can use the same stream several times and in different languages (using the ZED SDK). Please note that the streams are compressed using hardware acceleration and are therefore limited, but for several apps, it will be fine.
See the streaming samples here https://github.com/stereolabs/zed-examples/tree/master/camera streaming

so I gave it a try, and that works however this is quite slow. I am on Jetson Xavier NX, and turning off CV2 image rendering I get get only 15-20fps for 720p@60, with some nasty compression artefacts.
I suspect the h264 encoding, even if helped by the GPU, is the limitation but not sure.
-> Does it look normal to you? Have you tried the streaming performance on Jetson Nano or NX? Do I do something wrong?
I need real high fps for my main app (which works fine with your cpp slam example for instance with 100fps refresh in VGA), then I need some reasonable latency like 10 to 20 fps for other apps to grab frames in // of the main app). Now the problem is that the streaming with one server/client pair already put the NX on its knees, without any SLAM or other computer vision workload so there is no point at the stage using it for me.
Thanks a lot for your help

The app that sends the stream should do nothing else to avoid issues, especially OpenCV display (which is notoriously slow on jetson), depth computation, etc.
By default, a ZED SDK instance will compute the depth map in ULTRA mode with depth_stabilization which enabled the positional tracking to run. None of these should run with the steaming apps (using DEPTH_MODE::NONE without any image retrieval, especially CPU) and ideally only one of the app should do it since the computations aren't shared. So 2 instances with depth map are equivalent to 2 independent cameras on the same jetson.
Local streaming to share a single USB ZED is a trick and is not ideal for performance concerns (as using display and python API).

hi, can you please remind me if the zed sdk on jetson would store the zed frames in central ram or in gpu ram , when the gpu cuda acceleration is ON?
trying to see if I can use shared memory as an ipc mechanism here.
thanks


CSV not removed after deletion when not in Success/Terminal state.

Bug Report
It appears that CSVs may not be deleted when they are "deleted". The CSV remains after a deletion attempt, which means that all resources associated with (owned by) the CSV remain.
See #3108

What did you do?
Happens during e2e (Install Plan creation with permission), it's a flake.
When a CSV is not in a (e.g.) success state, and it's deleted, it's not actually deleted.
What did you expect to see?
When a CSV is deleted, the CSV is deleted regardless of the state it's in.
What did you see instead? Under which circumstances?
When the CSV is deleted, it remains.
Environment

operator-lifecycle-manager version: master
e2e tests

Kubernetes version information: e2e test (most recent)

Kubernetes cluster kind:  openshift and kind

This does not really have to do with the state that the CSV is in. The controller, as written today, is edge-driven. If it ever misses a deletion event, since there is no finalizer, you are not guaranteed that the clean-up code runs.

What appears to be happening is that the CSV is being re-created by the Subscription, as the UIDs are different. With some of the performance enhancements, this is occurring a lot quicker now.


cilium: Drop encryption with tunnel support beta tag

Encryption with tunnel support has been working for some time and we've
never dropped the beta tag. Lets drop it now for v1.10 seeing its in
use and working as expected.
Signed-off-by: John Fastabend<EMAIL_ADDRESS>

@jrfastab please rebase, then we can merge this.


Fix offline dependency with chart_studio

Issue https://github.com/santosjorge/cufflinks/issues/210 is my bad with PR https://github.com/santosjorge/cufflinks/pull/202. This PR would fix chart_studio dependency.

Thanks!


Performance difference

I did a small performance comparison with the standard MySQL connection and the new driver in a lambda function. (using this)
I found that when using the serverless driver the cold start times and the execution times in a warm lambda take at least twice as long, often longer. For example, for a cold start with MySQL it's 3-4s, with the HTTP driver, it's more like 10s. Warm starts are 1s compared to 3 or 4s
I haven't yet added any logging of what's taking the additional time, but before I dig into things further I was curious to find out what others' experiences were in terms of performance?

👋 hey there, do you have any code you can share that reflects this?
I'm curious if the impact is purely on boot up time of the lambda and not runtime? Is that correct?
In practice, the actual query times and whatnot should be almost identical in performance if not actually a bit faster using the HTTP interface than mysql.
But if it's startup times purely, I wonder if we have any insight into what would cause that. I've not used Lambda myself so I'm not too familiar with their runtime.

Also, not that it should affect this too much, are you using the global connection endpoint? e.g. aws.connect.psdb.cloud as opposed to {region}.connect.psdb.cloud. It should definitely speed up initial connection times in both cases.

👋 hey there, do you have any code you can share that reflects this?
I'm curious if the impact is purely on boot up time of the lambda and not runtime? Is that correct?
In practice, the actual query times and whatnot should be almost identical in performance if not actually a bit faster using the HTTP interface than mysql.
But if it's startup times purely, I wonder if we have any insight into what would cause that. I've not used Lambda myself so I'm not too familiar with their runtime.

Thanks for getting back to me, it's both cold start and warm start, i.e. with and without a start-up. I also posted in the discussions area, so here's what I posted there today:
To help illustrate what's happening, here's the trace with the serverless driver

and here with mysql driver

As you can see, after the query returns in the mysql version, the next API calls to another service happen immediately, whereas with the serverless driver, there's a big time gap. (The post to psdb.v1alpha1... is the PlanetScale query - I'm sure that's obvious to you but just wanted to be specific!)
This smells like an event loop problem in our own code (we're using Node.js) but the only code that's changed is to use the driver and provide got-fetch as the HTTP client rather than mysql native.
I'll see if I can somehow separate out the code to make this happen into a minimal reproducible sample but it'll take me a while

Yeah, that's an interesting trace since it's mostly suggesting to me that the actual execution and response time of the query is faster with the HTTP driver by a significant margin. I guess figuring out what happens after the response comes back seems to be the big missing block of time.
I wish I had more to add here, but we haven't observed this at all, and I even use this in a personal project in Vercel workers.
Seems sorta like a Promise not being awaited on properly or something along those lines?

Oh, I just realized you're using this: https://www.npmjs.com/package/got-fetch as the fetch implementation. I wonder if there are some incompatibility issues there?
I'm pretty confident we've tested with https://www.npmjs.com/package/node-fetch and the builtin Fetch APIs when they're available.
Out of curiosity, why got-fetch instead? I'd be interested in seeing if you simply swapped it out.
Also if you're using recent Node, fetch is native and built in iirc.

I just put together a very small test for this and it seems fine with got-fetch outside of lambda:
index.js:
import 'process';
import {Client} from '@planetscale/database';

import gotFetch from 'got-fetch';
import nodeFetch from 'node-fetch';

const useNodeFetch = process.env.FETCH == 'node';

const fetch = useNodeFetch ? nodeFetch : gotFetch;

const client = new Client({
    url: process.env.DATABASE_URL,
    fetch,
});

const conn = client.connection();

const start = Date.now();
const results = await conn.execute('select 1 from dual');
console.log("execute time:", Date.now() - start, "ms");
console.log("fetch impl:", useNodeFetch ? "node-fetch" : "got-fetch");
console.log(results);

And when running this with FETCH=node and without, I get effectively identical runtimes nowhere near multiple seconds.
Inside the results we return, we track our own time as well in results.time. I'm curious if that reflects the multiple seconds of time or if it's the shorter ~300ms in your trace.

Thanks for this - there was no specific reason for using got-fetch, I'll try node-fetch.
When accessing with a DATABASE_URL - what does that look like?
I've been using the host, username and password approach (which is what the console gives me if I select connect using @planetscale/database) but a URL is simpler.
Would I just replace mysql:// with https:// ?

Something like mysql://user:pw@host works sufficient. I too, also prefer using one variable here. We just support both forms. It doesn't need to be https, we just ignore the protocol part of the url so it more interops with other stuff. https is an implementation detail anyways that isn't necessarily relevant.

I'm now seeing something a bit weird, using a DATABASE_URL env var approach I constantly get unauthorised errors when using node-fetch. However, using a different HTTP client such as undici, it works correctly but takes a long time, as per the original issue.
My code looks like this
import { PlanetScaleDialect } from 'kysely-planetscale';
import { Kysely } from 'kysely';
// import fetch from 'node-fetch';
import { fetch } from 'undici';

import { log } from '@/utils/Log';
import { ResourceInventoryTableItem } from '@/transit/db/resourceInventoryTable/resourceInventoryMySql';
import { ActivityTableItem } from '@/transit/db/activityTable/ActivityTableMySql';
import {
  PartsCatalogItem,
  PartsCatalogPackagedVersionTable,
  PartsCatalogVersionItemTable,
} from '@/transit/db/partsCatalogTable/partsCatalogMySql';

interface Database {
  resource_inventory: ResourceInventoryTableItem;
  activities: ActivityTableItem;
  parts_catalog: PartsCatalogItem;
  parts_catalog_version: PartsCatalogVersionItemTable;
  parts_catalog_package_version: PartsCatalogPackagedVersionTable;
}

let db: Kysely<Database>;

export function createKysely() {
  if (!db) {
    db = new Kysely<Database>({
      dialect: new PlanetScaleDialect({
        url: process.env.DATABASE_URL,
        fetch,
      }),
      log(event): void {
        if (event.level === 'query') {
          log.debug(event.query.sql);
          log.debug(JSON.stringify(event.query.parameters));
        } else if (event.level === 'error') {
          log.error(JSON.stringify(event.error));
        }
      },
    });
  }
  return db;
}

db = createKysely();

I guess one difference is that I'm having to go through they kysely-planetscale adapter but this is a very thin wrapper and looking at the code in that repo, I can't see why node-fetch would make a difference. I'm stumped but I need to sleep now! I'll take another look tomorrow, if you have any thoughts in the meantime, they'd be gratefully received!

@rcoundon I'm genuinely not too sure if there's more I can assist with helping here. There's a decent amount of indirection here and I'm inclined to think it's something misbehaving in your code or in the kysely-planetscale library that I've not looked at.
I find it hard to believe this is a Lambda issue in itself, and I'd probably suggest distilling this down to attempting to just run a select 1 yourself with our library directly to see if that's any issue.
We've definitely put together demos and whatnot in Lambda and had no issues, but we haven't used kysely-planetscale or any other abstractions with database-js, so I'm unsure where things can be falling apart.
On top of that, I am not the most proficient at JavaScript and TypeScript. I worked on and implemented the server side APIs and all of that. So I know how the APIs work and all that, but I'm a bit of a noob when it comes to debugging JS runtimes.

I totally understand, and thank you for your time and help thus far. I'm still digging, I'll let you know what I find!

Hey @rcoundon, I'm going to close this issue for now, but if you have more to share in the future we are happy to take a look again.


ISSUE#793: fix docs broken link in web monitor

Motivation
Fixes #793.  Excited about this project.

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

Thanks for this PR @gustavoguimaraes !
Could you make the link point to the file: https://github.com/OLSF/libra/blob/main/ol/documentation/node-ops/validators/web_monitor_account_dictionary.md

Thanks for this PR @gustavoguimaraes ! Could you make the link point to the file: https://github.com/OLSF/libra/blob/main/ol/documentation/node-ops/validators/web_monitor_account_dictionary.md

You got it @0o-de-lally  :-)


cloudflared logs

Some logs get posted to the localhost. not sure if we want to look at ferreting those out...
https://chat.google.com/room/AAAAEL538nI/DM1YgFqNswQ

this issue is actually resolved by updating cloudflared. may want to document it but does not require any changes to wrangler code.


Support templates in format and border descriptors

As far as I can tell, it's not possible use a template in lines4 or lines5 services for the "format:"  or "border:" lines
It would be nice if it were possible to use templates to do things like:
format1: "{% if  state_attr('climate.lower_level','current_temperature') > 80 -%}lwbr{%- else -%}lwbb{%- endif %}"
to use red text if the temperature is over 80, and black text otherwise.

It would also be useful to have templates supported in the "color" field for drawcustom.
Color is the one that's of most interest to me, but I imagine templates could also be useful for the other fields like font, size, x, ty, etc.

It would also be useful to have templates supported in the "color" field for drawcustom.

alias: OEPL - Display Schreibtische
description: ""
trigger:

platform: state
entity_id:

switch.0x842e14fffe1392f2
switch.schreibtisch_mattheus
condition: []
action:

service: open_epaper_link.drawcustom
target:
entity_id: open_epaper_link.0000021876953b1f
data:
background: white
rotate: 0
payload:
- type: icon
value: desk
x: 50
"y": 39
size: 50
color: >-
{{'red' if states('switch.0x842e14fffe1392f2') == 'on' else 'black'
}}
- type: text
value: >-
{{'Eingeschaltet' if states('switch.0x842e14fffe1392f2') == 'on'
else 'Ausgeschaltet' }}
color: >-
{{'red' if states('switch.0x842e14fffe1392f2') == 'on' else 'black'
}}
font: ppb.ttf
x: 10
"y": 96
size: 18
- type: icon
value: desk
x: 200
"y": 39
size: 50
color: >-
{{'red' if states('switch.schreibtisch_mattheus') == 'on' else
'black' }}
- type: text
value: >-
{{'Eingeschaltet' if states('switch.schreibtisch_mattheus') == 'on'
else 'Ausgeschaltet' }}
color: >-
{{'red' if states('switch.schreibtisch_mattheus') == 'on' else
'black' }}
font: ppb.ttf
x: 160
"y": 96
size: 18
mode: single

OK, my face is red...   I was sure that I tested it in drawcustom, but apparently I didn't do it correctly because, yes, it works for me to!
So you can ignore that comment!    But I believe it's still correct that it doesn't work in the lines4 or lines5 service, right?

Closing this issue because a workaround was found and 4line/5line are depricated


Trying to understand GSM code

Hello! First of all this is a super nice paper.
I am trying to wrap my head around the concept of the paper. What I don't understand is this:
No matter what the output from the LM is, the LM is prompted again with the same question and the generated code/text (code+comments), until the LM itself says "it is correct", with a maximum of max_attempts for each question?
The paper reports improvements over 5 iterations, so if the model outputs "it is correct" the same output is used for the next iteration? Just want to make sure I understood this correctly.

Sorry about the late response.

No matter what the output from the LM is, the LM is prompted again with the same question and the generated code/text (code+comments), until the LM itself says "it is correct", with a maximum of max_attempts for each question?

Right.

so if the model outputs "it is correct"

In such cases, the self-refine loop can stop, see line 3 of the algorithm.


add support for any type of fields on validation

Description

How Has This Been Tested?

Types of changes

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

Checklist:

[x] The PR is submitted to the correct branch (dev).
[x] My code follows the code style of this project.
[ ] I've added relevant tests.

Hi @allandsantos, can you elaborate a bit about your use case? Why do you want to remove the generic type parameter?

I'll close this PR due to inactivity. Feel free to open it, if you want to continue the discussion.


ModuleNotFoundError: No module named 'gdt.datasets.specter_dataset'

Hi, I have the following error when running "python cli_specter.py extract_triples spector/train.pkl spector/train_triples.csv", how can I solve it, thanks.

Hi, I have the following error when running "python cli_specter.py extract_triples spector/train.pkl spector/train_triples.csv", how can I solve it, thanks.

Sorry, that file was not checked in but now it should be fixed.

Hi, I have the following error when running "python cli_specter.py extract_triples spector/train.pkl spector/train_triples.csv", how can I solve it, thanks.

Also, may I ask where I can get the "S2ORC_EMBEDDINGS" ? Thanks.

S2ORC_EMBEDDINGS are the citation graph embeddings from S2ORC. See https://github.com/malteos/scincl#citation-graph-embeddings
The trained embeddings are quite large (150GB) and currently I do not have any possibility to upload them somewhere. But I would be happy to upload them somewhere if you have the infrastructure for that.

https://github.com/malteos/scincl/blob/25c49766632724eb15854de0d35b4bc086767d72/cli_specter.py#L57
I think it should be just gdt.datasets.specter here instead of specter_dataset

Thanks, the import path is now fixed as well.


pulseaudio: system user and group changed to pulse.

pulseaudio couldnt be started in system-wide mode because the user and group pulseaudio couldn't be found.

It looks like the "pulseaudio" names where first set in https://github.com/NixOS/nixpkgs/commit/a2a35082ccd64b4d00d88778d9633fe18c0bb215.
/cc @wkennington

The default is "pulse" (source: http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/configure.ac?id=v6.0), so I don't see any harm in merging this.
Thanks!


fix: adjust default tool choice

This PR fixes a regression with the default and auto tool_choice. These changes will ensure that auto tools work, and to use OneOf in the case tools are provided without a tool_choice

This PR has been updated to improve the syntax of the default tool choice. These change make use of the existing ToolChoice struct and add an option to explicitly set NoTool via tool_choice="none".
Additionally this PR has been updated to include refactors to the ToolGrammar impl that make it more readable and improvements to the error messages if a function call fails


New Term Request: pollen aperture formation

New term requested
term name: pollen aperture formation
definition: specification and process of forming apertures, or areas where exine is reduced or absent, in the pollen cell wall.
suggested parentage: part of GO:0010208 pollen wall assembly
reference: PMID:30150313

Hi @lreiser
I don't see pollen aperture in the PO or in cellular component. Does it make sense to add it to CC? It seems from the definition that it is a region of the cell wall.

or perhaps part of the pollen wall (GO:0043667)? Should this be a type of cell wall and is it distinct from pollen coat?

It could be added as a part of the pollen wall- a region where the exine is absent or reduced. I have no annotation to that particular term tho- the proteins involved are located in the PM in the region where the aperture forms-probably having something to do with inhibiting production/secretion of exine in those regions.

OK. I tweaked your definition a bit.  If what I did doesn't work for you, reopen this and let me know how to fix it.

okey dokey


Tabs don't match content

Minor issue -
CREATOR shows Country
PUBLISHER shows Creator
COUNTRY shows Publisher

Thanks for spotting that! I've issued a pull request (https://github.com/CLOSER-Cohorts/dashboard/pull/75) that fixes this issue.


Update on deprecated code and requirement file

Deprecated Code
The current code has removed some functions but not yet updated in the readme file, this push is intended to update those changes.
Requirement files
Updated requirements.txt to include openai and other required packages.

Hey! Thanks for this PR, I made similar changes here -> https://github.com/preset-io/promptimize/commit/07260cea67afd1ea3700b562a4f668b217816597

Thanks @mistercrunch !


chore: enforce import/no-extraneous-dependencies rule

Description of changes
Enforces and fixes violators of https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md .

Issue #, if available

Description of how you validated changes
Checklist

[x] PR description included
[x] yarn test passes
[x] Tests are changed or added
[ ] Relevant documentation is changed or added (and PR referenced)
[ ] New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
[ ] Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

It's beautiful 🥲

John is right about all of the @types dev dependencies. Those are just typedefs that are only used at build time. The actual runtime packages are separate


Dynamic require() module, unexpected behavior

When I want to dynamicly require() module in my react-app something weird happend.
In my app, I have translation files that I required like this.
['en', 'fr'].forEach((el) => {
    require('./locale/' + el + '.js');
});

Here the related part of my arborescence.
As you can see, I have more translation files than the translations I required above. See the array ['en', 'fr'], and in my directory I have en.js, es.js, fr.js, it.js

app

locale

en.js
es.js
fr.js
it.js

My problem is
All my translations files are bundled, not only en.js, fr.js
The same happend for node_modules.
Is that normal ? Or, am I doing something wrong ?

It's well known issue with dynamic require with webpack. Since in most cases webpack doesn't really evaluate the JS to know what imports should be really done.
I'm not sure if it works better in webpack 2. But, better not using concatenated string with require.

You can try this with the 0.10 alpha release (which uses webpack 2), but yes, this is a known "issue" with webpack out of our control.
I can't find the webpack issue off hand, but I've seen it before.
Please open an issue with the webpack team for a more detailed answer and/or workarounds.

Ok, I was beginning to think of something like this, but didn't find the info !
Thx, really quick response :)

I recommend putting explicit require for each locale you support. What's the benefit of magic here? At least this way you know exactly what's happening.
I would also recommend avoiding bundling extra locales with your initial bundle. You can use code splitting with require.ensure in 0.9.0, or dynamic import in 0.10.x (not released yet).


Fix badge to stable doc version

Codecov Report
Patch and project coverage have no change.

Comparison is base (687baea) 100.00% compared to head (95c1ec2) 100.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff            @@
##              main        #3   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            3         3
  Lines           60        60
  Branches         8         8
=========================================
  Hits            60        60

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Update Docs for Bank - Connection Requests

Update documentation and sample code for Bank - Connection Requests

ensure all available endpoints (GET, POST, PATCH, and DELETE) are documented
update request and response examples from real API data (2 items for GET list responses)
JSON should be formatted with 2 space indents
ensure any/all params are documented in tables
https://thenewboston.com/bank-api/connection-requests

I take this.


TF1 Colab - RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

Hey there,
I've been trying to use the TF1 colab to train a dataset for the edge tpu.  I'm getting the following error: RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd.  This occurs in Create CSV data files and TFRecord files.  I've tried a few things but unable to figure it out.  Your help would be very appreciated.
Thanks!

Hey @joshfox10 , sorry to hear you're having trouble with the TF1 Colab. I haven't touched that one up in a while. I won't be able to look at it for a couple weeks, so let me know if you do figure out what the issue is. By the way, I've found that ssd-mobilenet-v2-fpnlite-320x320 from the TF2 Model Zoo seems to work well and have good accuracy, even when quantized. It does run about 25% slower than qssd-mobilenet-v2q, though. You may want to try that model out (with TF2) and see how it does.
Happy Holidays!


Specify load strategy per query

Eager loading of relationships is a performance improvement where the relationship is accessed in the same session.  However, not all queries on the same resource will require the same relationship access, which means those queries actually take a performance hit instead.  The Load Strategy is defined on the model itself, which means the implementer has to guess at how the relationships will be used in general and choose the better of two evils.
It would be better to override the Load Strategy per query, so that the implementer can tune performance on a query-by-query basis.  If the implementer knows the relationship data will be used, it can be eagerly loaded for that query.  If the Load Strategy on the model is eager and that relationship data will not be used, then the implementer could turn off eager loading in that instance.  This is consistent with other ORMs and feasible using JsonApi.
Below is one possible look.  Otherwise CreateQuery could have additional parameters, or the implementation could be "opt-in only" where the only option is to specify which relationships will be loaded.
// Method PeopleToVisit
var puppies = session
    .CreateQuery<Puppy>()
    .LoadStrategy(x => x.Owners, LoadStrategy.Eager)
    .LoadStrategy(x => x.Leash, LoadStrategy.Lazy)
    .Where(x => x.Breed = BreedType.GoldenRetriever);
return puppies
    .Select(x => new VisitResponse {
        Puppy = x,
        OwnerNames = x.Owners.Select(x => x.Name).ToArray();
    });

// Method PuppiesToWalk
var puppies = session
    .CreateQuery<Puppy>()
    .LoadStrategy(x => x.Leash, LoadStrategy.Eager)
    .LoadStrategy(x => x.Owners, LoadStrategy.Lazy)
    .Where(x => x.LastWalkTime <= DateTime.Now.AddHours(-1));
return puppies
    .Select(x => new WalkResponse {
        PuppyName = x.Name,
        Leash = x.Leash
    });

// Opt-in possible look
var puppies = session
    .CreateQuery<Puppy>()
    .EagerLoad(x => x.Owners)
    .EagerLoad("leash");

// CreateQuery possible look
var puppies = session
    .CreateQuery<Puppy>(eagerLoad: new [] { "owners" });

Ah yes. This could allow models to be more situationally versatile. I think I like the second opt in approach better. Lazy should be implicitly assumed as the default, as it is the default for the api spec as well.


Telework: New (DMN-based) workflow

Background: A new Telework workflow was designed by Andrew that simplifies how things work in that form. The new workflow is based on DMN.
Goal: We need to test out this workflow and make sure it's production-ready.
In our last attempt to deploy that to PROD, Meghan discovered there were some long delays in submission.

Development is done, but might need to change to DMN workflow in test and devs need to test. Then we can move to  Review/QA & then move to prod

yay this worked great - gonna close this baby


ESP-Mesh corrupt heap detected in comprehensive mode (IDFGH-9376)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
release/v5.0 @ 885e501
Operating System used.
Linux
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32S2 - Custom Board
Power Supply used.
External 5V
What is the expected behavior?
I hava a mesh network of at least two devices. When I reset/restart a child node of the mesh network, it will boot again and reconnect to the root node. Even when heap corruption detection is in comprehensive mode, everything should work normally. No heap corruption should be detected.
What is the actual behavior?
When I restart a child node, it finds the root node but it can't connect to it, because the root node already panicked due to detection of a corrupted heap.
Steps to reproduce.

Use the mesh/internal_communication example (most likely any mesh example will work)
Set your Router SSID and password in sdkconfig example configuration
Set Heap corruption detection in sdkconfig to Comprehensive
Flash at least onto two devices
Start the devices
Restart one of the children (e.g. via reset button)
Root will detect a corrupted heap when the child tries to reconnect

Debug Logs.
I (71725) wifi:new:<10,2>, old:<10,2>, ap:<10,2>, sta:<10,2>, prof:10
I (71735) wifi:Send SA Query req with transaction id 2a79
I (71945) wifi:Send SA Query req with transaction id c4f
I (72145) wifi:Send SA Query req with transaction id 7b84
I (72355) wifi:Send SA Query req with transaction id de62
I (72555) wifi:Send SA Query req with transaction id e17c
I (72765) wifi:STA not responded to 5 SA Query attempts, Reset connection sending disassoc
I (72765) wifi:station: 7c:df:a1:01:0d:30 leave, AID = 1, bss_flags is 134243, bss:0x3ffeb070
I (72765) wifi:new:<10,2>, old:<10,2>, ap:<10,2>, sta:<10,2>, prof:10
I (72775) mesh_main: <MESH_EVENT_CHILD_DISCONNECTED>aid:1, 7c:df:a1:01:0d:30

CORRUPT HEAP: Invalid data at 0x3ffeb370. Expected 0xfefefefe got 0x00000000

assert failed: multi_heap_malloc multi_heap_poisoning.c:258 (ret)

Backtrace: 0x4002391e:0x3ffd6b20 0x4002a419:0x3ffd6b40 0x40030bd5:0x3ffd6b60 0x4002ecf6:0x3ffd6c80 0x40023b29:0x3ffd6ca0 0x40023b89:0x3ffd6cc0 0x40023bbe:0x3ffd6ce0 0x40030be5:0x3ffd6d00 0x40026865:0x3ffd6d20 0x401189cd:0x3ffd6d40 0x40033311:0x3ffd6d70 0x400340c4:0x3ffd6da0 0x400344fd:0x3ffd6de0 0x400345a5:0x3ffd6e20 0x40032328:0x3ffd6e60 0x4002cd85:0x3ffd6e90
0x4002391e: panic_abort at /home/ibrahim/esp/esp-idf/components/esp_system/panic.c:423

0x4002a419: esp_system_abort at /home/ibrahim/esp/esp-idf/components/esp_system/esp_system.c:153

0x40030bd5: __assert_func at /home/ibrahim/esp/esp-idf/components/newlib/assert.c:78

0x4002ecf6: multi_heap_malloc at /home/ibrahim/esp/esp-idf/components/heap/multi_heap_poisoning.c:258 (discriminator 1)

0x40023b29: heap_caps_malloc_base at /home/ibrahim/esp/esp-idf/components/heap/heap_caps.c:145

0x40023b89: heap_caps_malloc at /home/ibrahim/esp/esp-idf/components/heap/heap_caps.c:165

0x40023bbe: heap_caps_malloc_default at /home/ibrahim/esp/esp-idf/components/heap/heap_caps.c:190

0x40030be5: malloc at /home/ibrahim/esp/esp-idf/components/newlib/heap.c:24

0x40026865: wifi_malloc at /home/ibrahim/esp/esp-idf/components/esp_wifi/esp32s2/esp_adapter.c:65

0x401189cd: esf_buf_alloc_dynamic at ??:?

0x40033311: esf_buf_alloc at ??:?

0x400340c4: wDev_IndicateFrame at ??:?

0x400344fd: wDev_ProcessRxSucData at ??:?

0x400345a5: wdevProcessRxSucDataAll at ??:?

0x40032328: ppTask at ??:?

0x4002cd85: vPortTaskWrapper at /home/ibrahim/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:154

More Information.
I don't think it is a real corruption, only the poisoning fill pattern is not properly written, rather a memory region is filled with zeros even in comprehensive mode.

@IH303 https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/api-reference/system/heap_debug.html?highlight=heap memory#comprehensive
Yes, it is not a real corruption. And it is recommended to only enable the comprehensive mode when debugging, not in production.

@IH303 The bug has been fixed in the latest release/v5.0, and the solution will be synchronized to the github ASAP.

@IH303 89bb920c86d65fe2694c0d9b533b170d4a1c7dd2 has been merged, you can use the release/v5.0 after this branch

Thanks for reporting, feel free to reopen.


Extend C to ignore Visual Studio artifacts

Reasons for making this change:
The .gitignore before wasn't properly ignoring artifacts created by compiling projects using CL.EXE / LINK.EXE instead of the GNU / LLVM compiler toolchain.
Links to documentation supporting these rule changes:
Visual Studio creates a few artifacts which weren't ignored before,
mainly .idb, .pdb and .ilk files which are either created by CL.EXE or
by LINK.EXE were added to the gitignore for Windows projects.
A little more information can be found here on Microsoft's
documentation: https://msdn.microsoft.com/en-us/library/3awe4781.aspx

@Leandros unfortunately there's a merge conflict now due to #2115 - are you able to reconcile this?

@shiftkey Sure thing. I've merged master into my branch and resolved all conflicts.

@Leandros excellent, thanks!


examples/tests: fix yq task

Changes
Fix yq image version and update yq arguments
Signed-off-by: Vincent Demeester<EMAIL_ADDRESS>/kind misc
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:

[ ] Includes tests (if functionality changed/added)
[ ] Includes docs (if user facing)
[ ] Commit messages follow commit message best practices
[ ] Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.
Double check this list of stuff that's easy to miss:

If you are adding a new binary/image to the cmd dir, please update
the release Task to build and release this image.

Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
Release Notes
NONE

/hold
Doesn't seem to fix the problem 😅

/hold
Doesn't seem to fix the problem 😅

/hold cancel
It works 🎉

/hold cancel
It works 🎉

/lgtm

/lgtm


Implement initial FEA and Topology Optimization Capability

Creating issue to track progress. I will add details later.

3/6 Meeting with Ruben; tentative plan:
3/6  - 3/24  Ruben plans to finish the implementation
3/27 - 4/7   Initial SPI2py integration attempt
4/10 - 4/21 Refactor code, generate & validate results
4/24 - 4/28 Prepare presentation for NSF POETS Tech conference


type checker cannot see any attributes of retry.py

[x] This is actually a bug report.
[ ] I am not getting good LLM Results
[ ] I have tried asking for help in the community on discord or discussions and have not received a response.
[ ] I have tried searching the documentation and have not found an answer.

What Model are you using?

[ ] gpt-3.5-turbo
[ ] gpt-4-turbo
[ ] gpt-4
[x] Other (please specify)

Describe the bug
The type: ignore[all] comment at the top of retry.py teaches mypy that retry has no attributes at all.
To Reproduce
When I write a python module with:
from instructor.retry import InstructorRetryException

and type check it with mypy in an environment with instructor installed, mypy complains:
error: Module "instructor.retry" has no attribute "InstructorRetryException"  [attr-defined]

Expected behavior
Since instructor ships with a PEP 561 py.typed file, I expected type checking to be largely correct across the package.

@kojiromike it's in from instructor.exceptions import InstructorRetryException

Aha, thanks! Perhaps this was fixed in #710 three weeks ago and released in 1.3.3 then. I will test.

Unfortunately this is not really fixed. mypy still cannot see any attributes of retry.py, because it still has type: ignore[all] at the top. The example case is avoidable now because we can (and should) get the exception class from another module, but from instructor.retry import reask_messages still causes mypy to give an error.


Update ee auth from props.token

Updates EEApi.initialize to take either a clientId or token; if token is provided it sets the token with ee directly. This could be renamed to accessToken if we wanted to be more clear that this is the short-lived OAuth token.

Adds an _updateToken step which calls initialize with the token if the prop exists and has changed. The full initialize step might not need to be called again if it's previously happened and only the token has changed. You might be able to do just setToken, which might prevent an extra HTTP call, but I haven't tested this.
The idea is that on the Python side, a class could keep track of when the access token expires, and automatically refresh the token and pass it to JS on the next layer call.

I tested this with a modification of ee-demo/app.js, where I commented out this.loginProvider in the constructor. It worked but it's not possible to have a static demo using a predefined short-lived access token.
Closes #15

Continuing from https://github.com/UnfoldedInc/earthengine-layers/pull/17#discussion_r410403845
I agree about auth being really important.

Maybe we could read a token or clientId parameter from the URL.

I'm not sure I follow. When data is passed from Python to JS, there's no URL there. The EE object is serialized as a string, and shouldn't be modified.
I guess my two big questions are:

Where does authentication happen?

With the existing JS EE demo, authentication happens before and outside of the layer.
When linking with Python, it's probably easiest to allow authentication passed directly to the layer. Creating authentication as a global as you mentioned above is probably the best option, because once ee has been initialized globally, it should work across layers.

How to pass authentication parameters?

Here I think I'd suggest having two layer props: credentials and accessToken, where either one can be provided.

When loading persistent credentials, the Python EE API creates a standard Google OAuth2 Credentials object. This object has all the information needed to request an access_token.
from google.oauth2.credentials import Credentials
Credentials(
    None,
    refresh_token=refresh_token,
    token_uri=oauth.TOKEN_URI,
    client_id=oauth.CLIENT_ID,
    client_secret=oauth.CLIENT_SECRET,
    scopes=oauth.SCOPES)

Assuming this object can be serialized/deserialized losslessly as JSON, this could be passed as the credentials layer prop, which the JS side then requests an access token for.
Alternatively, the accessToken prop would allow for keeping the credentials on the Python side, and accessToken could be passed directly to the EE API.
I don't think it would be too much work to support both, but let me know if you think we should standardize on just one.

Maybe we could read a token or clientId parameter from the URL.

I was referring to the browser URL bar when running the example, letting the user add ?token= or ?clientId=. Admittedly not a very good idea.
Before we get too bogged down in details, let's take a step back and think about what a user is likely to want to do with the JavaScript layer, e.g.:

I don't feel that having the complicated GoogleLoginProvider class in this repo makes much sense. It looks quite arbitrary. If we want to show the user how to login, a minimal login code should be enough. At the very least we should clean up that class (it currently supports two login apis etc), if not remove it outright.
Having a React example for what is mainly a Google API is a bit unusual. A pure JS example would be more reasonable.
At least for JS users, this layer is clearly intended for someone who is already able to create eeObjects. We would expect them to be able to log in on their own.
That said, we do want to host an example on the website where users can login and test. That is probably best done with client id.

I don't feel that having the complicated GoogleLoginProvider class in this repo makes much sense. It looks quite arbitrary. If we want to show the user how to login, a minimal login code should be enough. At the very least we should clean up that class (it currently supports two login apis etc), if not remove it outright.

I don't know how complicated it would be to maintain. But as noted below, I think it might make a no-download example in the docs simpler, where a user could authenticate solely with signing into google.

At least for JS users, this layer is clearly intended for someone who is already able to create eeObjects. We would expect them to be able to log in on their own.

I wouldn't necessarily assume that. JS users might currently be using the Earth Engine code editor, where they've never had to deal with authentication.

That said, we do want to host an example on the website where users can login and test. That is probably best done with client id.

If it's an example in the documentation website, then I think that should have OAuth set up, so that ideally someone with EarthEngine access could sign in, similar to the existing approach, all on the docs website without downloading anything.
If it's a local example, we could use the credentials generated by the CLI. E.g.:
earthengine authenticate
yarn run start-local

Where that yarn script is set up to something like
REFRESH_TOKEN=$(cat ~/.config/earthengine/credentials) && yarn start

where the example fetches the access token behind the scenes.


exclude deprecated fields from template

import airr
r = airr.schema.RepertoireSchema.template()
print(json.dumps(r, indent=2))

[snip]
    "age_event": null,
    "age": null,
    "ancestry_population": null,
[snip]

age is deprecated. This should be easy fix.

I hit the wrong button and accidentally pushed this fix to master in 9f572ef instead of making a PR. Can you test in master, please?

looks good! Generating a template for DataFile is interesting, I like it

Oh, I didn't think about trying it on DataFile. That works pretty well!


hardhat-abi-exporter: duplicate output destination:

I am trying to deploy a contract, and each version has the same error message, deleting the ABI folder does nothing, deleting all cache folders and other compile time folders also doesn't work.
Error in plugin hardhat-abi-exporter: duplicate output destination: /Users/computer/folder/testCoin-4/abis/Ownable.json
I have tried running clear & also trying a fresh install.  I have also changed folder names, and moved their destination, starting from a fresh starter also doesn't help.
 abiExporter: {     path: "./abis",     runOnCompile: true,     clear: true,     flat: true,     only: [],     spacing: 2,     pretty: true,   },

The flat option will cause two contracts with different paths but the same name to have the same ABI output path. For example, both contracts/File.sol and contracts/folder/File.sol will have their ABIs exported to abi/File.json.
Remove the flat option, or use only and except to be ore specific about which files you want to generate ABIs for.

Ok, thanks, that opened up another error, I'll try work it out.
reason: 'invalid address (argument="address", value=undefined, code=INVALID_ARGUMENT, version=address/5.6.0)',
Error: invalid address (argument="address", value=undefined, code=INVALID_ARGUMENT, version=address/5.6.0) (argument="_add1", value=undefined, code=INVALID_ARGUMENT, version=abi/5.6.0)


Escaping comments

Say I have this structure:
prop: {
  foo: #bar
}

If I want the value of "foo" to be "#bar", how would I escape comments? Is there any way to do it other than enclosing everything in quotes?

No, quoteless strings do not have escapes.
{
  prop: {
    # you can use
    foo1: "#bar with escapes like \t"
    # or
    foo2: '''#bar without escapes'''
  }
}

Got it, thanks!


chore(doc): latest and stable cleanup

rewording k8s related references to stable as we have removed the tag.
LOG-13374

I ended up screwing up the merge from master, so I made a new PR...and included your nits, @stsantilena


Typo in mental_simulation.py, line 46

mental_simulation.py
Line 46 reads:
personality = "Peronsality:\n" + open(os.path.join(STATE_DIR, "personality.txt")).read()

It should say:
personality = "Personality:\n" + open(os.path.join(STATE_DIR, "personality.txt")).read()

dream.py
Line 81 reads:
personality = "Peronsality:\n" + open(os.path.join(STATE_DIR, "personality.txt")).read()

It should say:
personality = "Personality:\n" + open(os.path.join(STATE_DIR, "personality.txt")).read()

oh yeah, i'll fix that

okay, i fixed the typo, thanks for pointing it out🙂


Add support for templating in spec.triggers.metadata.query

Proposal
It'd be great if Keda allowed users to use templates instead of hardcoding the target deployment name in the query when using a scaler like Prometheus. Something along the lines of:
triggers:
  - type: prometheus
    metadata:
      serverAddress: http://<prometheus-host>:9090
      metricName: http_requests_total
      threshold: '100'
      query: sum(rate(http_requests_total{deployment="{{ target-deployment }}"}[2m]))

Keda could then refer to .spec.scaleTargetRef to get the actual value and insert it into the query before running the query. This would enable other operators to interact with ScaledObjects in a cleaner manner.
Use-Case
This would help a controller in creating a ScaledObject for a deployment based on an existing user provided ScaledObject for a different deployment. Right now, copying over the spec of the existing ScaledObject (and inherently the query for the scaler) would lead to the new ScaledObject to scale based on the query meant for the other deployment. This would force some kind of a best effort attempt at modifying the query suitable for the new ScaledObject, which is error prone.  Adding support for templates, makes it easier for controllers by letting them just copy pasting the spec and eliminates the need for any hacky query modification.
Anything else?
No response

I am not a big fan of this. .spec.scaleTargetRef of the ScaledObject need to be specified anyway. You can automate generation of ScaledObjects, so if you are specifying .spec.scaleTargetRef then it is not so problematic to specify the same value anywhere in the metadata.

Specifying .spce.scaleTargetRef in the to be generated ScaledObject is rather simple, you just use the name of the deployment you want to target. Since right now we have to hard code the deployment name in the query, figuring out the right query for the to be generated ScaledObject on the other hand could be a much more complex task, as it would involve parsing the original query, doing some regex on it and making a guess about where to modify the deployment name in the query, which is error prone and could lead to potentially unexpected behavior.

The point is that AFAIR, right now that information is not passed to the scalers, so we have to pass extra information to all the scalers that is only needed in 1 edge case inside one of them.
TBH, I don't like a lot of this because it opens the door to pass other internal information that scalers shouldn't have.
I mean, why not the min and max replicas? Or in your same case, why not the API version also apart from the name?
I agree with @zroubalik here, if you have an automatism to add .spec.scaleTargetRef, the same variable could be used to replace it in the metadata.

I kinda prefer what ArgoRollout did with AnalysisTemplate
apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata:
  name: success-rate
spec:
  args:
  - name: application-name
  metrics:
  - name: success-rate
    successCondition: result.successRate >= 0.95
    provider:
      newRelic:
        profile: my-newrelic-secret  # optional, defaults to 'newrelic'
        query: |
          FROM Transaction SELECT percentage(count(*), WHERE httpResponseCode != 500) as successRate where appName = '{{ args.application-name }}'

^ spec.args seems like something that could workout anywhere for any query or type.

Perhaps key/value with defaults would work well enough here?
- name: application-name
   value: myapp

Not sure how far it could get, but here's what I think would be ideal to have args support:
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: nr-rollouts-demo
spec:
  maxReplicaCount: 15
  args:
    - name: app-name
       value: 'myapp'
    - name: canary-pod-hash
       value: 'hash'
    - name: since
       value: '30 seconds'
  scaleTargetRef:
    name: rollouts-demo
  triggers:
  - type: new-relic
    metadata:
      account: 'accnum'
      nrql: "SELECT rate(count(apm.service.transaction.duration), 1 second) as 'Web throughput' FROM Metric WHERE (appName = '{{ args.app-name }}') AND (host like '{{ args.app-name }}-{{ args.canary-pod-hash }}-%') AND (transactionType = 'Web')  SINCE {{ args.since }} UNTIL NOW"
      noDataError: "true"
      threshold: '10'
    authenticationRef:
      name: keda-trigger-auth-new-relic

A Rollout/Canary system could inject args to be used/replaced in the query above.


Loader

Hello,
Is it possible to customize the loader while loading ajax content ?
For example, i need to display a text while loading (or displaying another img)
Thanks

Can't you add a listener to the window that watches for Ajax loading?
Dale
Sent from my iPhone
On May 20, 2016, at 6:51 AM, Deliator <notifications<EMAIL_ADDRESS>wrote:
Hello,
Is it possible to customize the loader while loading ajax content ?
For example, i need to display a text while loading (or displaying another img)
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHubhttps://github.com/craftpip/jquery-confirm/issues/105

@Deliator you can do this using a custom theme now in v3.


Event logging fails on macOS 10.13

Travis CI update macOS to 10.13.3 from 10.12.6 and the logging tests for macOS started to fail after that.
Here are a few failed builds:
https://travis-ci.org/PowerShell/PowerShell/jobs/410647719#L4675
https://travis-ci.org/PowerShell/PowerShell/jobs/410584884#L5560
https://travis-ci.org/PowerShell/PowerShell/jobs/410959434#L5523
The logging tests for macOS is marked as pending for now by PR #7433.
I tried the script block logging on macOS 10.12.6 with the file powershell.config.json located in $PSHome and the logging works fine -- expected script invocation related events show up in Console. However, when starting pwsh with -settings <config.json>, Console shows a bunch of security exceptions (see an example screenshot below).
Be noted that, @TravisEz13 tried the scirpt block logging on his macOS (version 10.13.6), and Console consistently shows a bunch of security exception errors no matter by putting powershell.config.json under $PSHOME or by using -settngs <config.json>.

I've debugged and there is a code path loading the configuration before the -settingfile parameter has been parsed in Release configuration but not others.  Here is the call stack

Fixed by https://github.com/PowerShell/PowerShell/pull/7449


Content-Type: "application/json; charset=utf-8" causes HTTP 422 Unprocessable Entity in graphql-java-spring

Summary
Interceptor sets Content-Type: application/json; charset=utf-8 that causes SpringMVC based https://github.com/graphql-java/graphql-java-spring to throw a HTTP 422 Unprocessable Entity
Version
2.4.6
Description
Sending a mutation (POST) to a springmvc based graphql server returns a 422. Figured out that Content-Type is the issue in my case.
Between ApolloCall, ApolloServerInterceptor, ApolloHTTPNetworkTransport, OkHttp's RealCall and a bunch of interceptors there, if a mutation's RequestBody is set with a Content-Type, OkHttp uses that to set the Request Header.
What I have tried to alleviate this problem:

Tried setting ApolloMutationCall.RequestHeaders that overrides the Content-Type header to application/json. No luck
Tried setting application interceptors and also network interceptors that fixes the header in a custom OkHttpClient for ApolloClient. No luck.

Deprecation of charset=utf-8 in Content-Type header
https://github.com/spring-projects/spring-framework/issues/22788
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/MediaType.html#APPLICATION_JSON_UTF8
As in the discussions & docs above, RFC8259 has made the charset subtype not necessary. All popular browsers have implemented the change. In apollo-android case, I'm not sure if OkHttp has already implemented the change.
Temporary fix that works
Using a custom GraphQLController in the server to handle an incoming Content-Type with charset seems to be the easier (and the only) workaround right now.
Related bug reports
https://github.com/apollographql/apollo-android/issues/1571
Draft PR
https://github.com/vikrama/apollo-android/pull/1/files
What do you think is the right step forward? If you think OkHttp is where I should be filing this bug against, let me know. Also, if there is any other way around the Apollo application interceptor, OkHttp application & network interceptor that don't seem to work for me, any help is appreciated.

Hi ! Thanks for the detailed issue. A few thoughts:

Switching from apollication/json; charset=utf-8 toapplication/json seems very reasonable to me. Do you mind opening the PR on the repo?
OkHttp is fine as it really is doing what we tell it to do so no need to file a bug there.
It's a bit weird that the server isn't robust to that as it shouldn't cost much to ignore the charset if it's utf-8. It might be worth trying to understand more why that was done even if ultimately, I agree using application/json makes sense.
If you're using multiplatform, you should be able to workaround by passing your custom OkHttpClient with interceptors to ApolloHttpNetworkTransport()

Hi ! Thanks for the detailed issue. A few thoughts:

Switching from apollication/json; charset=utf-8 toapplication/json seems very reasonable to me. Do you mind opening the PR on the repo?
OkHttp is fine as it really is doing what we tell it to do so no need to file a bug there.
It's a bit weird that the server isn't robust to that as it shouldn't cost much to ignore the charset if it's utf-8. It might be worth trying to understand more why that was done even if ultimately, I agree using application/json makes sense.
If you're using multiplatform, you should be able to workaround by passing your custom OkHttpClient with interceptors to ApolloHttpNetworkTransport()

Addressed by #2883. PR merged

Addressed by #2883. PR merged


new compaction: Fix failure in staircasing test

slack link
Error msg:
ERROR layer_delete{tenant_id=61e66dc7e243450d90a8ed5624ad9d26 shard_id=0000 timeline_id=df0ea8a3bad847e88802a4b6a809c533}:<PHONE_NUMBER>00000000000000000000000000-000000067F00000001000004E70000000016__000000000DBC0841 was unlinked but was not dangling

Replied already here: https://neondb.slack.com/archives/C06Q6MQ2QSC/p1710964895205409?thread_ts=1710959383.410039&cid=C06Q6MQ2QSC

I've investigated this today.

The affected files are all image layers
Before the mentioned error message, the files produce log lines like:

INFO request{method=PUT path=/v1/tenant/b4ed2fb5d2020a52930b09b5fdefb8e4/timeline/3a3a25d547a6b9a801621ff43c090713/do_gc request_id=678ea518-ebb7-477c-a9f9-fdd0d9e145d4}:manual_gc{tenant_id=b4ed2fb5d2020a52930b09b5fdefb8e4 shard_id=0000 timeline_id=3a3a25d547a6b9a801621ff43c090713}:gc_timeline{timeline_id=3a3a25d547a6b9a801621ff43c090713 cutoff=0/21853860}: Deleting layer 000000067F00000001000004E70000000016-000000067F0000000100000A280300000000__000000000DBBCAE1 not found in latest_files list, never uploaded?

Those unlinked errors show up, timestamp wise, before the Physical storage size log entry (for step=2), so most of the steps are not needed to reproduce this issue (giving shorter iteration time)


Code example not working

Prerequisites
Please answer the following questions for yourself before submitting an issue.

[ ] I am running the latest version
Not applicable
[ ] I checked the documentation and found no answer
Not applicable
[ ] I checked to make sure that this issue has not already been filed
Not aplicable
[x] I'm reporting the issue to the correct repository (for multi-repository projects)

Expected behavior
Please describe the behavior you are expecting
I expect your code example to work.
Current behavior
What is the current behavior?
It wont work
Steps to Reproduce
Please provide detailed steps for reproducing the issue.

Create Discord bot, in main file copy and paste in main file the example
Install all dependancies
Run main file

Context
In Discord.JS 13, messageCreate replaces message event, so I assume your example is for Discord.JS 13. You need to declare Client intents, else, it wont work

The code is missing intents. If you want the right one, there is the code:
const Discord = require('discord.js');
const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_VOICE_STATES"] }); // Leave blank for Discord.js v12

const { DiscordTogether } = require('discord-together');

client.discordTogether = new DiscordTogether(client);

const prefix = "!"; // Change the prefix if you want.

client.on('messageCreate', (message) => { // 'message' for Discord.js v12
    if (message.author.bot || !message.content.startsWith(prefix)) return;

    let args = message.content.trim().split(/ +/);
    const commandName = args[0].slice(prefix.length).toLowerCase();

    if (commandName === "start") {
        if(message.member.voice.channel) {
             client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'doodlecrew' /* <- Change this if you dont want doodlecrew*/).then((invite) => {
                return message.reply(`${invite.code}`);
            });
        };
    };
});

client.login('5EcR3t.b0T.T0k3N.D0nT5h4rETh3t0KeN0fTh3B0t');

Note: The code is better than the example.

The code is missing intents. If you want the right one, there is the code:

const Discord = require('discord.js');

const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_VOICE_STATES"] }); // Leave blank for Discord.js v12

const { DiscordTogether } = require('discord-together');

client.discordTogether = new DiscordTogether(client);

const prefix = "!"; // Change the prefix if you want.

client.on('messageCreate', (message) => { // 'message' for Discord.js v12

    if (message.author.bot || !message.content.startsWith(prefix)) return;

    let args = message.content.trim().split(/ +/);

    const commandName = args[0].slice(prefix.length).toLowerCase();

    if (commandName === "start") {

        if(message.member.voice.channel) {

             client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'doodlecrew' /* <- Change this if you dont want doodlecrew*/).then((invite) => {

                return message.reply(`${invite.code}`);

            });

        };

    };

});

client.login('5EcR3t.b0T.T0k3N.D0nT5h4rETh3t0KeN0fTh3B0t');

Note: The code is better than the example.

Hope that you token is invalid...

The code is missing intents. If you want the right one, there is the code:
const Discord = require('discord.js');

const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_VOICE_STATES"] }); // Leave blank for Discord.js v12

const { DiscordTogether } = require('discord-together');

client.discordTogether = new DiscordTogether(client);

const prefix = "!"; // Change the prefix if you want.

client.on('messageCreate', (message) => { // 'message' for Discord.js v12

    if (message.author.bot || !message.content.startsWith(prefix)) return;

    let args = message.content.trim().split(/ +/);

    const commandName = args[0].slice(prefix.length).toLowerCase();

    if (commandName === "start") {

        if(message.member.voice.channel) {

             client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'doodlecrew' /* <- Change this if you dont want doodlecrew*/).then((invite) => {

                return message.reply(`${invite.code}`);

            });

        };

    };

});

client.login('5EcR3t.b0T.T0k3N.D0nT5h4rETh3t0KeN0fTh3B0t');

Note: The code is better than the example.

Hope that you token is invalid...

lol

Thank you very much, I'll update the package

Thank you very much, I'll update the package


flatcc generates header files with "alignas" even after recompiling flatcc with FLATCC_PORTABLE

I'm trying to use flatcc in an embedded ARM-based FreeRTOS system. On my Ubuntu host, I created a schema and ran flatcc to generate the header files, but they use "alignas" on certain struct elements. The version of gcc we're using to generate the embedded ARM app does not support this. I tried recompiling flatcc with FLATCC_PORTABLE, and verified that -std=c11 was not being specified, but even after this, flatcc still generates header files with "alignas". Is there a way around this?

Flatcc has been used by other users on FreeRTOS as I recall. The generated code will always use C11 constructs such as alignas. The portable library implements macros to emulate this behaviour on other platforms. To the best of my knowledge GCC has had support of such constructs for a very long time. The use of -std=c11 will largely disable use of use such macros in favor of the real thing, but since some features in C11 are optional, and some are just plain not implemented in glibc for example, even with -std=c11, some portable macros are necessary in most cases.
So, to try solving your problem, you first need to identity what your actual problem is in terms of actual error messages.
It appears that might think the generated code should change when FLATCC_PORTABLE is enabled, and therefore alignas by default is a problem while it might not be a problem at all. If it is a problem, we can see if portable needs to be extended to better support your platform. In that case a test and contribution from your side will be important.
Now, there is an ancient way to not use alignas by padding structs instead and relying in the non-standard pragma pack feature. But it has never ever been necessary and therefore untested and unlikely to be relevant. It can be enabled via a FLATCC config flag for the flatcc compiler itself. It will remove alignas.

I forgot to mention:
https://github.com/dvidelabs/flatcc/blob/master/include/flatcc/portable/pstdalign.h
You can try to 1) read the comments in the header that mentions various problems being solved, and 2) insert #error directives to figures out which alignas implementation you are using.

Understood - many thanks for the clarification! I did find that, in a quick test separate from flatcc, the #define for alignas in pstdalign.h (#define alignas(t) attribute((aligned(t)))) worked. I grepped through the flatcc-generated headers to see if that #define was added, but it wasn't. Perhaps it's in a different header. I'll see if I can get this working today.

Macros that support C11, such as alignas, are not generated. They are defined by including certain header files in include/flatcc, and these will typically also include some files from include/flatcc/portable, such as the pstdaligh.h I mentioned. This file will detect the current platform and try to define alignas appropriately. As I mentioned, if you insert #error into pstdalign.h, you can get an error message telling you which line was triggered, and thereby see exactly how alignas is defined on your system.
The generated headers will make sure to include the above predefined headers. This mostly happens through
https://github.com/dvidelabs/flatcc/blob/master/include/flatcc/flatcc_flatbuffers.h
as I recall.

Indeed, it all works now. Once I figured out a few things, it works well so far under FreeRTOS. I still need to test a lot more, but so far so good, Many thanks! I think you can close this issue, as it was basically an error in my understanding and not in flatcc itself.


Installing Sundials Solver in MATLAB

Hii,
I am writing to seek your assistance regarding an issue I encountered while using the Lionsimbattoolbox that requires the installation of the IDA Sundials solver in MATLAB.
I have diligently searched the user guide of Sundials to find relevant information on the installation process, but unfortunately, I couldn't locate any specific details on how to install the solver in MATLAB. As this step is crucial for my work, I am reaching out to you for guidance and support.
I am aware that the Sundials package offers a MATLAB interface, but I'm unsure about the precise steps to enable it and successfully install the solver within the MATLAB environment. Given your expertise and knowledge in this area, I am hopeful that you can provide me with the necessary information or a step-by-step guide to complete the installation process correctly.
Thank you in advance for your time and consideration. I am grateful for any support you can extend to help me resolve this matter.

Hello, I missed this comment. Are you still looking for help?

Hello, I missed this comment. Are you still looking for help?

I have encounted the same problem, is there any tutorial for installing sundials for matlab in windows? My matlab version is 2021a. Hope you can give me some help, thanks.


System commands via NFC tags

Hi,
Is it possible to execute system commands via NFC tags? For example, an NFC tag for system shutdown or volume up / down?

Hi @zork32. Checkout branch offline-fix-and-command-feature for the feature. Example usage:
043fd8daa74881:
    # Run a system command.
    name: Unix name
    command: uname -a

The command key can also be used in conjunction with the spotify or mp3 keys, as seen in the tags.yml-sample file.


[WIP] Add IApplicationBuilder extension method UseSignalRWithSpecification

For core 3.0 this can now be implemented correctly, see also
https://github.com/dotnet/aspnetcore/pull/8425


Make Bossbar persistent in Weapon_Info_Display

Description
As the title
Configuration
 Boss_Bar:
        Title: <string>
        Bar_Color: <string>
        Time: <string> （I think true is ongoing）

Hmm, what's the use case of this? Currently, WM shows display always when state of the weapon changes


Trying to run in Docker Compose

I started working to get this running in docker-compose and ran into an error when running up. I exec into the container and it looks like the file is mounted in the correct place in app/srh-config/tokens.json
I thought it would be cool to get compose instructions in the readme or at least help to figure out how to support it. I might just have some network config wrong. I know there's a lot of things that could be wrong with my set up and not necessarily this repo. But any tips would be appreciated.
Error:
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
tokens.json
{
  "development-token": {
    "srh_id": "some_unique_identifier",
    "connection_string": "redis:6379",
    "max_connections": 3
  }
}

docker-compose.yaml
  redis:
    image: redis
    ports:
      - '6379:6379'
    expose:
      - 6379
    volumes:
      - ./packages/must-stash/volume:/data
  serverless-redis-http:
    ports:
      - '8079:80'
    image: 'hiett/serverless-redis-http:latest'
    volumes:
      - ./packages/must-stash/local-config/tokens.json:/app/srh-config/tokens.json

I then cloned the repo and built the image ran up pointed to my local image and wasn't getting the same error. It seemed to stay up ok. Then I tried hitting http://localhost:8079 with '@upstash/redis' doing a set and hset and got an Elixir error. So, I got a little closer.

Hey! Thanks for reaching out. Reading that error, it looks like it's unable to pass your connection_string as a URI. From the tokens.json you provided, you've just got redis:6379 - could you try formatting it as a URI (eg redis://redis:6379) and let me know if that fixes it?

Regarding the segmentation fault, are you by any chance running an M1 Mac? From some brief googling it seems to be an issue commonly associated with that (I compiled this on an x64 mac).
I can look into some solutions online and get some CI up and running so it compiles via that, rather than me just doing it on my Macbook :)

are you by any chance running an M1 Mac?

Ah yes I am. I should have mentioned that.

could you try formatting it as a URI (eg redis://redis:6379)

Yes! this works. So now when I use a locally built image of this repo I'm able to communicate with the redis in docker using upstash/redis.
eg
import { Redis } from '@upstash/redis/with-fetch'

const redis = new Redis({
  url: 'http://localhost:8079',
  token: 'development-token'
})

async function go() {
  const what = await redis.get('abra')
  console.log({ what })
}

go()

Fantastic, glad it's working.
From the research I've done then, it seems that the issue is that I'm not also distributing an ARM-based Docker container to DockerHub. This seems like a simple fix on my end. I'll get some CI setup in a bit that will compile and push both. Then should be good to go!

Hey @trentonsnyder!
I've just pushed a new docker image to DockerHub under the tag 0.0.4-alpha, that has both an amd64 build and an arm64 build.
Would you be able to test that out in your Docker Compose to see if it fixes the segmentation fault?
serverless-redis-http:
  image: hiett/serverless-redis-http:0.0.4-alpha
  ... etc ...

https://hub.docker.com/layers/hiett/serverless-redis-http/0.0.4-alpha/images/sha256-ae41dba9f6ea1d947cb93618918935459b989e09e50016d057f72ede331d1e40?context=explore

Update on this issue, a friend has tested the new build on an M1 mac, and it worked.
Going to close this out, and move 0.0.4-alpha to be latest & 0.0.4!

Would you be able to test that out in your Docker Compose to see if it fixes the segmentation fault

Yes I have now tried 0.0.4 and it seems to work great! 💯 Thank you!

I can't seem to connect into the SRH container from other containers in the cluster, i.e. curl http://serverless-redis-http:8079
However, on the host and inside the SRH container this does work curl http://localhost:8079
could I have an issue with which interfaces/addresses the http server is binding to?


Seperation of concerns, View and Controller

Just having view and code behind ( for controller or logic ) is not sufficient since it sends us back to the winforms, webforms era.
WPF, UWP and Angular all enforces us to use multiple classes (conceptually). The framwrok should provide all the below mentioned approaches.
1. View Model first approach : The controller is called when we need to switch the view, the conrol will tell which cshtml file should be used as the view.
2. View first approach : The view will tell which class to be used as the controller (eg: DataContext={Binding x} in XAML or <div ng-app="myApp" ng-controller="myCtrl"> in angular).
It is possible to bind to a property in the code behind and that property can hold any class (eg: controller), then it means Blazor automatically supports both these approaches.
Data Context
This should support a similar concept of DataContext, where we can define the scope for the tag. Where one div tag has a diffenert datacontext compared to other.

Thanks for the suggestions!
We are definitely expecting to support a "code behind"-like model for developers who want that. This provides a lot of options to set up whatever kind of model/view separation you want.
Once there's a more fully formed app model for you to try out, it would be interesting to see how well it meets these requirements.


Responsive issues

What is the URL of the page with the issue?
https://constructs.dev/
What did you do?
Just landed on the homepage.
What did you expect to happen?
Page should layout correctly
What actually happened?
Some content is cut off from the page.
The issue starts at around 1280px breakpoint.

Web Browser
Edge 104.0.1293.54
OS
Mac
Other information
Willing to fix this if the src code for the website is available.
The issue lies really from the set padding on the containers with test-id homeRedesign-infoSection.
Better to use a container div that has the padding from the side of the page, then let that container be the grid parent and use CSS gap property instead to give spacing between the columns.

Hey there, here is the source code for the frontend if you wanna take a crack at a fix https://github.com/cdklabs/construct-hub-webapp

@MrArnoldPalmer opened pr - https://github.com/cdklabs/construct-hub-webapp/pull/1080


Importing only user modified DB Parameter Group parameters

First off, thanks for an awesome gem.  It has made the process of importing terraform configurations so much easier.  I am trying to import several DB Parameter Groups into our existing terraform configurations.  Rather then importing the first 100 (this suffers from the paging problem that other users have reported), why not import only user modified parameters.  I'd be willing to submit a PR for this, but just wanted to confirm the reasoning first.

Paging issue seems to have been solved on master since July, but v9.1 was release din june


Various Song Optimizations for Terrific Audio Driver v0.0.14

These aren't related to the early release feature because it didn't actually save any memory (though it was tested out on one of the songs where it could have been used). Most of the optimizations are instead related to replacing a subroutine call twice with a loop section and a break point, with a few other duplicated note sections also undergoing the same treatment. These save a subroutine slot and a few bytes at the cost of an extra byte of stack consumption due to the addition of a loop counter.
These are intended for Terrific Audio Driver v0.0.14. Initially this was because portamento has a slight adjustment done to it internally past this point: these songs aren't overly sensitive to that particular change, but nevertheless, it's a change for bugfixing reasons. Later on, it's because new features started getting involved: commit 8643d8e5735ef6287df29c9d4f7f1c01d6359788 and later use v0.0.14's new volume and panning fade features.
This also contains two new songs: the Boss Clear Theme and the Jungle Theme.

Thank you for updating the songs to v0.0.14 and testing TAD v0.0.13 & v0.0.14.


Question about training from Checkpoint.pth

Hi,
I use this command to train
python3 -m torch.distributed.launch --nproc_per_node=4 --use_env main.py --epochs 500 --model LeViT_256 --data-path /scratch/pytorch-image-models-master/imagenet --output_dir /scratch/LeViT-main/output
My workstation is broken when it finish 70 epochs train for LeViT-256. So I want to re-start from 70 epochs. But when I use the same command, it start from 0 epoch. Does anyone know how to re-start from 70 epochs. The checkpoint file is in the output/ dictionary.
Thanks

Use the --resume argument to identify the checkpoint to use, please.