Edit Teams calendar window to propose open time slots to the meeting organizer for cross geo collaboration

I am reaching out to get an understanding if there is a way to enable the following experience within the Teams Calendar window -
Our Nudging Teams App allows users to book/edit time on their calendars for group meetings (recurring/new). However, in the case of recurring cross-geo meetings/collaboration, we also propose times to the meeting organizer to be mindful of other people's preferences. This proposed feature currently exists in our Teams app as a separate feature on another surface. Thus, I am looking to see if there is a way where we can let the organizer know within the calendar experience window inside of Teams about the suggested times (either pre-populate the time block with the first available suggestion or provide them the suggested times underneath the time block on Calendar window in Teams, so the user has a more streamlined experience and doesn't have to switch surfaces to get to the proposed timeslots. Please let me know if this makes sense.
One of my devs was exploring this link - https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/deep-link-workflow?tabs=teamsjs-v2. It only provides info about new meetings and not the recurring ones.
Would you have any expert advice on how can we go forward to enable this?
[Enter feedback here]

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

ID: 98d88f26-f11f-4810-162a-40ca552be3e3
Version Independent ID: 98d88f26-f11f-4810-162a-40ca552be3e3
Content: Deep link to a workflow in Teams - Teams
Content Source: msteams-platform/concepts/build-and-test/deep-link-workflow.md
Service: msteams
GitHub Login: @v-npaladugu
Microsoft Alias: surbhigupta

if there is a way where we can let the organizer know within the calendar experience window inside of Teams about the suggested times

@shefalik - Teams meeting scheduling experience is not customizable. Only option we have currently is to Deep link to open a meeting scheduling dialog and pass startTime and endTime. User can then edit the meeting details.
One option would be to allow users to choose available timeslot beforehand and then pass selected dates to scheduling dialog.
Please let us know if that helps.


i am using gitbash

Graham@grahamspc MINGW64 ~/tabiva (main)
$ pip install PyQtWebViewEngine
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement PyQtWebViewEngine (from versions: none)
ERROR: No matching distribution found for PyQtWebViewEngine
does this seem weird to you?

i think it should be PyQtWebEngine

lemme try that

srry it was a mistake i forgor about that module does not exsist

i think we must add addons,themes and more to tabiva being collaborators

okay

fir now just merge that pull request i made

merged it :)

k


Add option for choosing sqlitedb file path

Resolves
https://github.com/aslotte/MLOps.NET/issues/474
Description

Adds a pass through option for setting the SQLite Data Source
Adds minimal test to show, that db file gets initialized

Looks good to me. I will leave for @aslotte to review and approve.

Thanks for your review. I added your suggested changes 🙇♂

Would also love to know more about what you're working on @WalternativE!

Would also love to know more about what you're working on @WalternativE!

I'm trying out MLOps.NET of course! I had a couple of ideas of what I could do with it. One being putting it into a docker container putting it behind a light-weight web API layer. I refrained from doing that because I saw, that the API would be consuming ML.NET types directly (like IDataView, metrics, etc) and I thought, that serializing/deserializing all of this would be kind of messy.
I tried to use it from F# interactive but for some reason intellisense broke for me. This isn't a MLOps.NET probelm, though. I'll have to investigate this further. Finally I tried .NET Interactive (the Jupyter thingy in VSCode) and had success using it. I'm currently playing with a toy data set and wanted to try out a couple of experiments with the AutoML API. I'm very fond about the possibility of saving all the different runs of this experiment with MLOps.NET - no conservation of cell outputs and oddly named zip files flying around my repo! I just had to find a way to specify the path of the SQLite database file (because the .NET process hosting the kernel is just somewhere on my system - don't even know if it stays constant). As you can see in the screenshot, it's pretty basic. I can imagine, that for a single person working on a couple of models this workflow is more than sufficient. At the current point I just want to get started - setting up infrastructure would be too much of a hassle right now 🙈

That's great @WalternativE, thank you for sharing and trying MLOps.NET out! The CI build still fails but I'm going to merge this PR as I'm positive it doesn't have anything to do with your PR but rather some type of issues with the secrets in this repo (one of the test uses a GitHub Secret to run an integration test against a real Azure Container Registry and Azure Kubernetes Service).
Thank you for your contribution! 👍

That's great @WalternativE, thank you for sharing and trying MLOps.NET out! The CI build still fails but I'm going to merge this PR as I'm positive it doesn't have anything to do with your PR but rather some type of issues with the secrets in this repo (one of the test uses a GitHub Secret to run an integration test against a real Azure Container Registry and Azure Kubernetes Service).
Thank you for your contribution! 👍

Thank you for your consideration and all your work. Happy to have something I can use. Hope, that I'll be able to contribute more useful stuff in the future 😅


feat: add support for generating and starting Python functions

Adds support for --language python to:

generate function
run:function:start
run:function:start:local

See:
https://github.com/heroku/sf-functions-core/pull/59
https://github.com/heroku/sf-functions-python
For now, this support is behind the environment variable PYTHON_FUNCTIONS_ALPHA. This env var is only temporary for the brief alpha period, and will be removed for the public beta.
In addition, a "Python support for Salesforce Functions is experimental" console warning is shown when running the sf generate function command. This warning is only added here to the generate command, since the start command warning is handled in sf-functions-core (since otherwise there would be no way to show a warning for the start's --language auto mode iff using Python). The console warnings will remain for the public beta (unlike the env var), and then be removed shortly before GA.
In addition:

the --language options help text now has the supported options listed alphabetically (with the exception of having auto be the first listed option where supported).
the long form help text no longer duplicates the options that are automatically generated/shown
the README has been regenerated using npx oclif readme (for now this doesn't include the new --language python options by design, since they are behind the env var).

This should not be merged until a new release of sf-functions-core has been performed, that includes heroku/sf-functions-core#59.
GUS-W-11643531.
GUS-W-11790647.

Example usage...
Setup:
$ sf generate project -n testproject && cd $_

Generate function command without env var:
testproject $ sf generate function --language python -n pythonfunction
 ›   Error: Expected --language=python to be one of: java, javascript, typescript
 ›   See more help with --help

Generate function command with env var:
testproject $ PYTHON_FUNCTIONS_ALPHA=1 sf generate function --language python -n pythonfunction
Warning: Python support for Salesforce Functions is experimental.
Created python function pythonfunction in /Users/emorley/src/testproject/functions/pythonfunction.

Setup for Python environment:
testproject $ cd functions/pythonfunction/
pythonfunction $ python -m venv .venv && . .venv/bin/activate
(.venv) pythonfunction $ pip install -r requirements.txt
...

Start command when relying on --language auto (doesn't need env var; can only stumble upon this case by knowing how to create a project that will pass detection):
(.venv) pythonfunction $ sf run function start
WARNING: Python support for Salesforce Functions is experimental.
INFO:     Started server process [16687]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://localhost:8080 (Press CTRL+C to quit)

Start command using explicit --language python without env var:
(.venv) pythonfunction $ sf run function start --language python
 ›   Error: Expected --language=python to be one of: auto, java, javascript, typescript
 ›   See more help with --help

Start command using explicit --language python with env var:
(.venv) pythonfunction $ PYTHON_FUNCTIONS_ALPHA=1 sf run function start --language python
WARNING: Python support for Salesforce Functions is experimental.
INFO:     Started server process [16626]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://localhost:8080 (Press CTRL+C to quit)


Nested Pydantic Model for args_schema in Tool Registration is not Recognized

System Info
Description:
I am using the StructuredTool function to register a custom tool, and I've encountered a problem with nested Pydantic Models in the args_schema parameter.
Problem:
When registering a function with a nested Pydantic Model in the args_schema, only the first outer layer of the model scheme seems to be consumed. This issue appears to lead to a failure in the llm processing.
Example:
I'm trying to create a weather forecasting function using nested Pydantic Models:
from __future__ import annotations

from typing import Any, Dict, Optional

from pydantic import BaseModel, Field

class Data(BaseModel):
    key: str = Field(..., description='API key')
    q: str = Field(..., description='Location')
    days: int = Field(..., description='Number of days to forecast')

class Model(BaseModel):
    data: Data
    json_: Optional[Dict[str, Any]] = Field(None, alias='json')

I registered the tool with:
tool = StructuredTool.from_function(name=function_name, func=test_func,
                 description=function_description, args_schema=Model)

However, when running the tool with agent.run("how is the weather in Taipei today?"), llm seems cannot recognize the Field inside the Data object, which then lead to the failure of the function_call.
"generations": [
    [
      {
        "text": "",
        "generation_info": {
          "finish_reason": "function_call"
        },
        "message": {
          "lc": 1,
          "type": "constructor",
          "id": [
            "langchain",
            "schema",
            "messages",
            "AIMessage"
          ],
          "kwargs": {
            "content": "",
            "additional_kwargs": {
              "function_call": {
                "name": "weather_forecast",
                "arguments": "{\n  \"data\": {\n    \"location\": \"Taipei\"\n  }\n}"
              }
            }
          }
        }
      }
    ]
  ],

Moreover, I've tried to transform the tool into OpenAI function with format_tool_to_openai_function(tool), the nested Data class seems to be discarded, as shown in the generated scheme
{'name': 'weather_forecast',
 'description': 'weather_forecast(**kwargs) - Get the weather forecast for a location.',
 'parameters': {'type': 'object',
  'properties': {'data': {'$ref': '#/definitions/Data'},
   'json': {'title': 'Json', 'type': 'object'}},
  'required': ['data', 'json']}}

Expected Behavior:
The nested Pydantic Model should be recognized, and the tool should be able to process the nested args_schema correctly.
Besides, the
Additional Context:

Documentation Reference: StructuredTool

Questions:

Is there a way to support nested Pydantic Models in the args_schema parameter?
Is this behavior intentional, or is it a bug?

Who can help?
@hwchase17
Information

[ ] The official example notebooks/scripts
[X] My own modified scripts

Related Components

[ ] LLMs/Chat Models
[ ] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[ ] Document Loaders
[ ] Vector Stores / Retrievers
[ ] Memory
[X] Agents / Agent Executors
[X] Tools / Toolkits
[ ] Chains
[ ] Callbacks/Tracing
[ ] Async

Reproduction
Init Model
model_str = """
from __future__ import annotations

from typing import Any, Dict, Optional

from pydantic import BaseModel, Field

class Data(BaseModel):
    key: str = Field(..., description='API key')
    q: str = Field(..., description='Location')
    days: int = Field(..., description='Number of days to forecast')

class Model(BaseModel):
    data: Data
    json_: Optional[Dict[str, Any]] = Field(None, alias='json')
"""
exec(model_str)

Define function
import requests
def convert_to_test_function(endpoint):

    def api_function(**kwargs):
        # Construct the URL with query parameters from the description and provided arguments
        url = endpoint
        data = kwargs.get("data")
        data = {key: kwargs["data"][key] for key in kwargs.get("data") if key in kwargs["data"]}
        json_payload = kwargs.get("json")

        print("Data:", data)
        print("JSON:", json_payload)
        return requests.post(url, data=data, json=json_payload).json()

    return api_function

weather_func_test = convert_to_test_function("https://api.weatherapi.com/v1/forecast.json")

# Test the function
weather_func_test(data={"key": KEYS_FOR_WEATHER_API, "q": "London", "days": 1})

Test with tools
from langchain.chat_models import ChatOpenAI
from langchain.agents import initialize_agent, AgentType
from langchain.tools import StructuredTool
llm = ChatOpenAI(temperature=0, model="gpt-3.5-turbo-16k")
weather_tool = StructuredTool.from_function(name="weather_forecast", func=weather_func_test, description="useful for weather forcasting", args_schema=Model)
agent = initialize_agent([weather_tool], llm, agent=AgentType.OPENAI_FUNCTIONS, verbose=True)
agent.run("How is the weather in Taipei for this two days? I have the key for api calling: " + KEYS_FOR_WEATHER_API)

Result
> Entering new AgentExecutor chain...

Invoking: `weather_forecast` with `{'data': {'city': 'Taipei', 'days': 2, 'apiKey': KEYS_FOR_WEATHER_API}}`

Expected behavior
Expected Result
Following the Pydantic Model, we would expect the result from llm execution could be
Invoking: `weather_forecast` with `{'data': {'q': 'Taipei', 'days': 2, 'key': KEYS_FOR_WEATHER_API}}`

, which means we could generate the request as
{
  "data":
  {
    "key": KEYS_FOR_WEATHER_API,
    "q": "London",
    "days": 1
  }
}

I believe the function provided by the bot might accommodate 2-level nested functions. However, this leads to two important areas for further discussion:

Depth of Nesting: We cannot make the assumption that the number of layers in the requested json_schema will always be less than or equal to 2. More complex structures might require support for deeper nesting.

Standard Compliance: A question arises about whether the tool should comply with the standard json_schema format. Ensuring compatibility with the standard might increase the tool's versatility and adherence to common practices.

Encountering similar issue where calls to the tool would not pass the correct structure to the tools causing validation errors using AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION  with default prompts, the structured tools in the tools portion of the prompt have only the 'properties' portion of the json schema from the model.  This leads to only references in the nested models, not the actual model data.
class StructuredTool(BaseTool):

    @property
    def args(self) -> dict:
        """The tool's input arguments."""
        return self.args_schema.schema()["properties"]

If the full schema is returned, the llm generated calls to the tool provide valid arguments, but this impacts prompt length.


ui-select-header is not working iam unable to see the header please help me

The issues forum is NOT for support requests. It is for bugs and feature requests only.
Please read https://github.com/angular-ui/ui-select/blob/master/CONTRIBUTING.md and search
existing issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.
Bug description:
Link to minimally-working plunker that reproduces the issue:
Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS
Angular:
UI-Select:
Bootstrap/Select2/Selectize CSS (if applicable):

Any Update on this ?


Not working on Linux

Hi !
I can't get to make it work on linux.
I'm struggling with user permission as generate files are root privileged and I'm not able to edit them from my host IDE.
Unless this problem, everything works like a charm.
Can you help ?

Same problem here!
We need somehow to transfer and set user to docker container to create folder as a local user

Got it working with this (I am not sure it is correct solution yet):
docker run -it --rm  -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd):/site -p 8000:8000 aripalo/gatsby-docker bin/sh


[SPARK-17996][SQL] Fix unqualified catalog.getFunction(...)

What changes were proposed in this pull request?
Currently an unqualified getFunction(..)call returns a wrong result; the returned function is shown as temporary function without a database. For example:
scala> sql("create function fn1 as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFAbs'")
res0: org.apache.spark.sql.DataFrame = []

scala> spark.catalog.getFunction("fn1")
res1: org.apache.spark.sql.catalog.Function = Function[name='fn1', className='org.apache.hadoop.hive.ql.udf.generic.GenericUDFAbs', isTemporary='true']

This PR fixes this by adding database information to ExpressionInfo (which is used to store the function information).
How was this patch tested?
Added more thorough tests to CatalogSuite.

cc @srinathshankar

Test build #67161 has started for PR 15542 at commit 6068e44.

Test build #67161 has finished for PR 15542 at commit 6068e44.

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

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

Merged build finished. Test FAILed.

Test build #67171 has started for PR 15542 at commit 5597d25.

Test build #67171 has finished for PR 15542 at commit 5597d25.

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

Merged build finished. Test PASSed.

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

Test build #67883 has started for PR 15542 at commit e8d1a7e.

Test build #67883 has finished for PR 15542 at commit e8d1a7e.

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

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

Merged build finished. Test PASSed.

Merging to master. Thanks for the review.


fixed minor typos in README.md

Small fix to change premise to premises (see http://itsonpremises.com) and varios to various.

🚢
Will add to the next train which should land later today.


just push the Jjdgment functionn

[Note] Just FYI, should probably update the PR name to follow the naming standard of UIUX-<TICKET NUMBER>-<TICKET NAME>


Use of memory after it is freed

Reproduer:
// Instantiating a map template.
#define NAME int_int_map
#define KEY_TY int
#define VAL_TY int
#include "verstable.h"

int main(void)
{
    int_int_map our_map;
    int_int_map_itr itr;

    int_int_map_init(&our_map);
    itr = int_int_map_insert(&our_map, 1, 1);
    if (int_int_map_is_end(itr))
    {
        exit(1);
    }
    int_int_map_cleanup(&our_map);
    exit(0);
}

$ clang-tidy -checks=cert-* repro.c
verstable.h:1299:11: note: Use of memory after it is freed
 1299 |           FREE_FN(
      |           ^
 1300 |             new_table.buckets,

Hi! Thanks for working on this. I was able to spend a few hours investigating it today. I hadn’t used clang-tidy before, so I hope I’m understanding its output correctly and apologize in advance if I seem uninformed.
The tool seems to report a lot of issues related to the buckets array, namely NULL-pointer dereferences and uses-after-free. I suspect all these reports are false positives. Consider the simplified example below, in which I’ve replaced _insert with _insert_raw. _insert_raw attempts to insert a new key and, if it can’t do so without violating the maximum load factor, returns an end iterator (_insert, on the other hand, simply wraps _insert_raw in a loop that grows the table if the key cannot be inserted).
// Instantiating a map template.
#define NAME int_int_map
#define KEY_TY int
#define VAL_TY int
#include <https://raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h>

int main(void)
{
    int_int_map our_map;
    int_int_map_init( &our_map );
    int_int_map_insert_raw(&our_map, 1, &(int){1}, false, true);
    int_int_map_cleanup(&our_map);
}

Godbolt link with clang-tidy window.
Here’s the full clang-tidy output:
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1051:33: warning: Dereference of null pointer [clang-analyzer-core.NullDereference]
 1051 |   size_t home_bucket = HASH_FN( table->buckets[ bucket ].key ) & table->buckets_mask;
      |                                 ^
[<source>:10:5: note: Calling 'int_int_map_init'](javascript:;)
   10 |     int_int_map_init( &our_map );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:901:3: note: Null pointer value stored to 'our_map.buckets'
  901 |   table->buckets = NULL;
      |   ^~~~~~~~~~~~~~~~~~~~~
[<source>:10:5: note: Returning from 'int_int_map_init'](javascript:;)
   10 |     int_int_map_init( &our_map );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[<source>:11:5: note: Calling 'int_int_map_insert_raw'](javascript:;)
   11 |     int_int_map_insert_raw(&our_map, 1, &(int){1}, false, true);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1129:7: note: Assuming the condition is true
 1129 |   if( !( table->metadata[ home_bucket ] & VT_IN_HOME_BUCKET_MASK ) )
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1129:3: note: Taking true branch
 1129 |   if( !( table->metadata[ home_bucket ] & VT_IN_HOME_BUCKET_MASK ) )
      |   ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1133:43: note: Calling 'int_int_map_bucket_count'
 1133 |       VT_UNLIKELY( table->key_count + 1 > VT_CAT( NAME, _bucket_count )( table ) * MAX_LOAD ) ||
      |                                           ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:429:24: note: expanded from macro 'VT_CAT'
  429 | #define VT_CAT( a, b ) VT_CAT_( a, b )
      |                        ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:428:25: note: expanded from macro 'VT_CAT_'
  428 | #define VT_CAT_( a, b ) a##b
      |                         ^
note: expanded from here
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:434:61: note: expanded from macro 'VT_UNLIKELY'
  434 | #define VT_UNLIKELY( expression ) __builtin_expect( (bool)( expression ), false )
      |                                                             ^~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:979:3: note: Returning without writing to 'table->buckets'
  979 |   return table->buckets_mask + (bool)table->buckets_mask;
      |   ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1133:43: note: Returning from 'int_int_map_bucket_count'
 1133 |       VT_UNLIKELY( table->key_count + 1 > VT_CAT( NAME, _bucket_count )( table ) * MAX_LOAD ) ||
      |                                           ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:429:24: note: expanded from macro 'VT_CAT'
  429 | #define VT_CAT( a, b ) VT_CAT_( a, b )
      |                        ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:428:25: note: expanded from macro 'VT_CAT_'
  428 | #define VT_CAT_( a, b ) a##b
      |                         ^
note: expanded from here
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:434:61: note: expanded from macro 'VT_UNLIKELY'
  434 | #define VT_UNLIKELY( expression ) __builtin_expect( (bool)( expression ), false )
      |                                                             ^~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1133:7: note: Assuming the condition is false
 1133 |       VT_UNLIKELY( table->key_count + 1 > VT_CAT( NAME, _bucket_count )( table ) * MAX_LOAD ) ||
      |       ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:434:35: note: expanded from macro 'VT_UNLIKELY'
  434 | #define VT_UNLIKELY( expression ) __builtin_expect( (bool)( expression ), false )
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1133:7: note: Left side of '||' is false
 1133 |       VT_UNLIKELY( table->key_count + 1 > VT_CAT( NAME, _bucket_count )( table ) * MAX_LOAD ) ||
      |       ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:434:35: note: expanded from macro 'VT_UNLIKELY'
  434 | #define VT_UNLIKELY( expression ) __builtin_expect( (bool)( expression ), false )
      |                                   ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1135:9: note: Assuming the condition is true
 1135 |       ( table->metadata[ home_bucket ] != VT_EMPTY && VT_UNLIKELY( !VT_CAT( NAME, _evict )( table, home_bucket ) ) )
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1135:9: note: Left side of '&&' is true
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1135:69: note: Calling 'int_int_map_evict'
 1135 |       ( table->metadata[ home_bucket ] != VT_EMPTY && VT_UNLIKELY( !VT_CAT( NAME, _evict )( table, home_bucket ) ) )
      |                                                                     ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:429:24: note: expanded from macro 'VT_CAT'
  429 | #define VT_CAT( a, b ) VT_CAT_( a, b )
      |                        ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:428:25: note: expanded from macro 'VT_CAT_'
  428 | #define VT_CAT_( a, b ) a##b
      |                         ^
note: expanded from here
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:434:61: note: expanded from macro 'VT_UNLIKELY'
  434 | #define VT_UNLIKELY( expression ) __builtin_expect( (bool)( expression ), false )
      |                                                             ^~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1051:33: note: Dereference of null pointer
 1051 |   size_t home_bucket = HASH_FN( table->buckets[ bucket ].key ) & table->buckets_mask;
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1139:39: warning: Dereference of null pointer [clang-analyzer-core.NullDereference]
 1139 |     table->buckets[ home_bucket ].key = key;
      |                                       ^
[<source>:10:5: note: Calling 'int_int_map_init'](javascript:;)
   10 |     int_int_map_init( &our_map );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:901:3: note: Null pointer value stored to 'our_map.buckets'
  901 |   table->buckets = NULL;
      |   ^~~~~~~~~~~~~~~~~~~~~
[<source>:10:5: note: Returning from 'int_int_map_init'](javascript:;)
   10 |     int_int_map_init( &our_map );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[<source>:11:5: note: Calling 'int_int_map_insert_raw'](javascript:;)
   11 |     int_int_map_insert_raw(&our_map, 1, &(int){1}, false, true);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1129:7: note: Assuming the condition is true
 1129 |   if( !( table->metadata[ home_bucket ] & VT_IN_HOME_BUCKET_MASK ) )
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1129:3: note: Taking true branch
 1129 |   if( !( table->metadata[ home_bucket ] & VT_IN_HOME_BUCKET_MASK ) )
      |   ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1133:43: note: Calling 'int_int_map_bucket_count'
 1133 |       VT_UNLIKELY( table->key_count + 1 > VT_CAT( NAME, _bucket_count )( table ) * MAX_LOAD ) ||
      |                                           ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:429:24: note: expanded from macro 'VT_CAT'
  429 | #define VT_CAT( a, b ) VT_CAT_( a, b )
      |                        ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:428:25: note: expanded from macro 'VT_CAT_'
  428 | #define VT_CAT_( a, b ) a##b
      |                         ^
note: expanded from here
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:434:61: note: expanded from macro 'VT_UNLIKELY'
  434 | #define VT_UNLIKELY( expression ) __builtin_expect( (bool)( expression ), false )
      |                                                             ^~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:979:3: note: Returning without writing to 'table->buckets'
  979 |   return table->buckets_mask + (bool)table->buckets_mask;
      |   ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1133:43: note: Returning from 'int_int_map_bucket_count'
 1133 |       VT_UNLIKELY( table->key_count + 1 > VT_CAT( NAME, _bucket_count )( table ) * MAX_LOAD ) ||
      |                                           ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:429:24: note: expanded from macro 'VT_CAT'
  429 | #define VT_CAT( a, b ) VT_CAT_( a, b )
      |                        ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:428:25: note: expanded from macro 'VT_CAT_'
  428 | #define VT_CAT_( a, b ) a##b
      |                         ^
note: expanded from here
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:434:61: note: expanded from macro 'VT_UNLIKELY'
  434 | #define VT_UNLIKELY( expression ) __builtin_expect( (bool)( expression ), false )
      |                                                             ^~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1133:7: note: Assuming the condition is false
 1133 |       VT_UNLIKELY( table->key_count + 1 > VT_CAT( NAME, _bucket_count )( table ) * MAX_LOAD ) ||
      |       ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:434:35: note: expanded from macro 'VT_UNLIKELY'
  434 | #define VT_UNLIKELY( expression ) __builtin_expect( (bool)( expression ), false )
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1133:7: note: Left side of '||' is false
 1133 |       VT_UNLIKELY( table->key_count + 1 > VT_CAT( NAME, _bucket_count )( table ) * MAX_LOAD ) ||
      |       ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:434:35: note: expanded from macro 'VT_UNLIKELY'
  434 | #define VT_UNLIKELY( expression ) __builtin_expect( (bool)( expression ), false )
      |                                   ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1135:9: note: Assuming the condition is false
 1135 |       ( table->metadata[ home_bucket ] != VT_EMPTY && VT_UNLIKELY( !VT_CAT( NAME, _evict )( table, home_bucket ) ) )
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1135:52: note: Left side of '&&' is false
 1135 |       ( table->metadata[ home_bucket ] != VT_EMPTY && VT_UNLIKELY( !VT_CAT( NAME, _evict )( table, home_bucket ) ) )
      |                                                    ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1139:39: note: Dereference of null pointer
 1139 |     table->buckets[ home_bucket ].key = key;
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1166:29: warning: Dereference of null pointer [clang-analyzer-core.NullDereference]
 1166 |         VT_LIKELY( CMPR_FN( table->buckets[ bucket ].key, key ) )
      |                             ^
[<source>:10:5: note: Calling 'int_int_map_init'](javascript:;)
   10 |     int_int_map_init( &our_map );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:901:3: note: Null pointer value stored to 'our_map.buckets'
  901 |   table->buckets = NULL;
      |   ^~~~~~~~~~~~~~~~~~~~~
[<source>:10:5: note: Returning from 'int_int_map_init'](javascript:;)
   10 |     int_int_map_init( &our_map );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[<source>:11:5: note: Calling 'int_int_map_insert_raw'](javascript:;)
   11 |     int_int_map_insert_raw(&our_map, 1, &(int){1}, false, true);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1129:7: note: Assuming the condition is false
 1129 |   if( !( table->metadata[ home_bucket ] & VT_IN_HOME_BUCKET_MASK ) )
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1129:3: note: Taking false branch
 1129 |   if( !( table->metadata[ home_bucket ] & VT_IN_HOME_BUCKET_MASK ) )
      |   ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1159:8: note: 'unique' is false
 1159 |   if( !unique )
      |        ^~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1159:3: note: Taking true branch
 1159 |   if( !unique )
      |   ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1162:5: note: Loop condition is true.  Entering loop body
 1162 |     while( true )
      |     ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1165:9: note: Assuming the condition is true
 1165 |         ( table->metadata[ bucket ] & VT_HASH_FRAG_MASK ) == hashfrag &&
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1165:9: note: Left side of '&&' is true
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1166:29: note: Dereference of null pointer
 1166 |         VT_LIKELY( CMPR_FN( table->buckets[ bucket ].key, key ) )
      |                             ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:433:61: note: expanded from macro 'VT_LIKELY'
  433 | #define VT_LIKELY( expression )   __builtin_expect( (bool)( expression ), true )
      |                                                             ^~~~~~~~~~
6 warnings generated.
Suppressed 3 warnings (3 in non-user code).

So clang-tidy is reporting, for example, a (potential?) NULL-pointer dereference on line 1051, which is in the _evict function. _insert_raw calls this function to evacuate the new key’s home bucket if the bucket is occupied by a key that doesn’t below there.
Given that _init sets   key_count to 0, buckets_mask to 0x0000000000000000ull, buckets to NULL, and metadata to (uint16_t *)&vt_empty_placeholder_metadatum (where vt_empty_placeholder_metadatum is defined as static const uint16_t vt_empty_placeholder_metadatum = VT_EMPTY;), we can follow clang-tidy’s output and see where it goes wrong:
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1133:7: note: Assuming the condition is false
 1133 |       VT_UNLIKELY( table->key_count + 1 > VT_CAT( NAME, _bucket_count )( table ) * MAX_LOAD ) ||
      |       ^
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:434:35: note: expanded from macro 'VT_UNLIKELY'
  434 | #define VT_UNLIKELY( expression ) __builtin_expect( (bool)( expression ), false )
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1133:7: note: Left side of '||' is false
 1133 |       VT_UNLIKELY( table->key_count + 1 > VT_CAT( NAME, _bucket_count )( table ) * MAX_LOAD ) ||

table->key_count + 1 > VT_CAT( NAME, _bucket_count )( table ) * MAX_LOAD - i.e. the left side of || - is true, not false as clang-tidy reports (_bucket_count in this instance returns zero, so the equation becomes 0 + 1 > 0 * MAX_LOAD). So the if statement short circuits here and _evict (which comes later in the same if statement) is never called. But even if that wasn’t the case, _evict still wouldn’t be called:
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1135:9: note: Assuming the condition is true
 1135 |       ( table->metadata[ home_bucket ] != VT_EMPTY && VT_UNLIKELY( !VT_CAT( NAME, _evict )( table, home_bucket ) ) )
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1135:9: note: Left side of '&&' is true
/app/raw.githubusercontent.com/JacksonAllan/Verstable/main/verstable.h:1135:69: note: Calling 'int_int_map_evict'
 1135 |       ( table->metadata[ home_bucket ] != VT_EMPTY && VT_UNLIKELY( !VT_CAT( NAME, _evict )( table, home_bucket ) ) )

home_bucket here is zero (size_t home_bucket = hash & table->buckets_mask;), and metadata points to  vt_empty_placeholder_metadatum, which is VT_EMPTY. In other words, the left side of '&&' is false, not true, so _evict is still never called.
It looks like clang-tidy is getting confused by the logic of setting metadata to a global placeholder (whose value is VT_EMPTY) rather than e.g. NULL. This approach is an optimization that allows us to skip NULL or zero-bucket-count checks in most places that they would otherwise be needed, but the absence of those checks seems to be making clang-tidy complain.
I’m not sure what the best solution here is. How important is it to support clang-tidy if we know that it is repeatedly generating false positives? I suspect that the outcome will be // NOLINT scattered throughout the code.

Hi! Thanks for a very clean API for this implementation of a hashmap. Compared to others I've looked at it's a joy to work with. Thank you.
I agree with your assessment about the false positives, except for the use of memory after it's freed. On line 1299, if we failed to insert an entry we then free newtable.buckets, double bucket_count and then continue back to line 1286 and attempt to insert a new entry into a bucket we just freed.
Firstly, the continue statement is odd because it's at the end of the for loop already - it's a non op.
Secondly, bucket_count changing inside the for loop does nothing. It's only used at the top of the while loop creating new_table.
I think the intent of the continue was to goto table creation again and start over with an increased bucket count. Am I wrong here? Is this another false positive and if so can you please explain why?

I’m not sure what the best solution here is. How important is it to support clang-tidy if we know that it is repeatedly generating false positives? I suspect that the outcome will be // NOLINT scattered throughout the code.

I don't think supporting it directly is fair, other analysis tools can and do emit other false positives based on personal experience in other projects. However, if others use analysis tools on their code (which is more and more common place) at least having a comment somewhere about it would be best maybe including a light technical reason why it's a false positive.
Specifically for clang-tidy, there is no way of saying "ignore all analysis from a header file". They have recently committed an option to exclude a header, but I think it will still analyse macros which won't help here so the only way silencing clang-tidy is to add // NOLINT to verstable.h. I also like to push any changes I need to make to 3rd party code upstream to help others :)
I think adding // NOLINT is fine as it's quite short and doesn't affect the readability to any detriment and is not clang-tidy specific.

Thanks, glad you're finding it useful! There’s a work-in-progress draft of an article benchmarking the library against other hash table libraries here. The actual data shown currently shown there is old, but newer data is available here.

I agree with your assessment about the false positives, except for the use of memory after it's freed. On line 1299, if we failed to insert an entry we then free newtable.buckets, double bucket_count and then continue back to line 1286 and attempt to insert a new entry into a bucket we just freed.
Firstly, the continue statement is odd because it's at the end of the for loop already - it's a non op.
Secondly, bucket_count changing inside the for loop does nothing. It's only used at the top of the while loop creating new_table.
I think the intent of the continue was to goto table creation again and start over with an increased bucket count. Am I wrong here? Is this another false positive and if so can you please explain why?

You’re absolutely right! Sorry, I should have examined your PR more closely before jumping to conclusions.
It seems that this bug was able to go undetected because of its rarity. This code handles the case that upon doubling the table's bucket count, one of the existing keys cannot be reinserted within 211 quadratic jumps (i.e. what I call “quadratic displacement” in the in-code comments) of its home bucket. Under normal usage, I think this should basically never happen. Even if the hash function is bad, if a key was insertable when the bucket count was x then it is almost certainly insertable when the bucket count is 2x and all the other keys are the same. However, I should perhaps write a unit test that tests this code path, e.g. by using a hash function that somehow checks the bucket count and begins hashing all keys to the same bucket once a certain threshold is met (the expected behavior is that the table continues trying to grow until the target bucket count exceeds the available memory and _insert returns failure, assuming that malloc actually returns NULL once memory is exhausted).
By the way, this bug also affects CC, whose hash-table implementation is based on Verstable.
So what I’d like to do now is release a patch within the next day or two fixing this bug and the unnecessary cast-away-const in the endian-checking functions (#6).
As for the // NOLINT comments, I’m not sure about introducing them right now because I fear that properly conforming with clang-tidy could require many more similar additions and changes, and would I'd rather not introduce a partial solution. In other words, unless you’re confident that adding // NOLINT in just these places is enough, I need to investigate this issue further, e.g. by running clang-tidy on the unit tests and randomized tests against STL (for example, in simple examples clang-tidy was also giving me warnings about using memcpy instead of memcpy_s).

OK, that's fair.
I have to disable the clang-tidy checks for memcpy_s and friends because our build target is Alpine Linux which uses musl libc which does not support those.
Sadly, I cannot use // BEGINNOLINT and '// ENDNOLINT' around including the header. I'm happy using // NOLINT locallly for the time being, but maybe a comment somewhere upstream would at least be useful.

I've uploaded a preliminary fix to the dev branch. It's slightly different to the one you proposed. I think there should either be a while loop or a goto, but not both as the goto makes the while redundant. I opted to preserve the while loop on the basis that it's a bit more idiomatic.
bool VT_CAT( NAME, _rehash )( NAME *table, size_t bucket_count )
{
  // The attempt to resize the bucket array and rehash the keys must occur inside a loop that incrementally doubles the
  // target bucket count because a failure could theoretically occur at any load factor due to the displacement limit.
  while( true )
  {
    NAME new_table =  {
      0,
      bucket_count - 1,
      NULL,
      NULL
      #ifdef CTX_TY
      , table->ctx
      #endif
    };

    void *allocation = MALLOC_FN(
      VT_CAT( NAME, _total_alloc_size )( &new_table )
      #ifdef CTX_TY
      , &new_table.ctx
      #endif
    );

    if( VT_UNLIKELY( !allocation ) )
      return false;

    new_table.buckets = (VT_CAT( NAME, _bucket ) *)allocation;
    new_table.metadata = (uint16_t *)( (unsigned char *)allocation + VT_CAT( NAME, _metadata_offset )( &new_table ) );

    memset( new_table.metadata, 0x00, ( bucket_count + 4 ) * sizeof( uint16_t ) );

    // Iteration stopper at the end of the actual metadata array (i.e. the first of the four excess metadata).
    new_table.metadata[ bucket_count ] = 0x01;

    for( size_t bucket = 0; bucket < VT_CAT( NAME, _bucket_count )( table ); ++bucket )
      if( table->metadata[ bucket ] != VT_EMPTY )
      {
        VT_CAT( NAME, _itr ) itr = VT_CAT( NAME, _insert_raw )(
          &new_table,
          table->buckets[ bucket ].key,
          #ifdef VAL_TY
          &table->buckets[ bucket ].val,
          #endif
          true,
          false
        );

        if( VT_UNLIKELY( VT_CAT( NAME, _is_end )( itr ) ) )
-       {
-         FREE_FN(
-           new_table.buckets,
-           VT_CAT( NAME, _total_alloc_size )( &new_table )
-           #ifdef CTX_TY
-           , &new_table.ctx
-           #endif
-         );
-
-         bucket_count *= 2;
-         continue;
-       }
+         break;
      }

+   // If a key could not be reinserted due to the displacement limit, double the bucket count and retry.
+   if( new_table.key_count < table->key_count )
+   {
+     FREE_FN(
+       new_table.buckets,
+       VT_CAT( NAME, _total_alloc_size )( &new_table )
+       #ifdef CTX_TY
+       , &new_table.ctx
+       #endif
+     );
+
+     bucket_count *= 2;
+     continue;
+   }
+
    if( table->buckets_mask )
      FREE_FN(
        table->buckets,
        VT_CAT( NAME, _total_alloc_size )( table )
        #ifdef CTX_TY
        , &table->ctx
        #endif
      );

    *table = new_table;
    return true;
  }
}

The main issue that I'm having at the moment is that I haven't yet managed to craft a dataset and/or hash function that tests this code path (and therefore triggers the bug). What is needed is a dataset/hash function that causes a displacement limit violation when the bucket count is x but not when it is 2x (in which case the bug could presumably be triggered via _shrink). This is hard to craft because the displacement limit is, by design, very high (2048 quadratic jumps from the key's home bucket), but someone who is better than me at math might be able to figure it out.
Also note that the dev branch now contains some other changes that have been pending for a while. Most are insignificant (e.g. corrections to typos in the code comments), but the default integer hash function (was murmur3) has changed to a slightly weaker one (fast-hash) that proved to perform better in my benchmarks.

Change looks good to me! I can't run it through my linter to verify until next week though as I'm on holiday.

New issue regarding proper Clang-Tidy support: #11

New issue regarding proper Clang-Tidy support: #11.


Bug: Noble error causes Homebridge SIGTERM

Describe The Bug
BLE connection failures can result in Homebridge restarting
To Reproduce
Open and close a curtain until the error occurs
Expected behavior
Only frequent BLE errors
Relevant log output
[25/01/2023, 19:42:57] TypeError: Cannot read properties of undefined (reading 'exchangeMtu')
    at Timeout._onTimeout (/usr/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:307:27)
    at listOnTimeout (node:internal/timers:564:17)
    at processTimers (node:internal/timers:507:7)
[25/01/2023, 19:42:57] Got SIGTERM, shutting down Homebridge...

Config for homebridge-switchbot
"devices": [
    {
        "deviceId": "xxx",
        "configDeviceName": "Curtain",
        "configDeviceType": "Curtain",
        "connectionType": "BLE",
        "curtain": {
            "set_min": 10,
            "set_max": 90,
            "hide_lightsensor": false,
            "set_minlux": 1,
            "set_maxlux": 6001
        },
        "disableCaching": true,
        "logging": "standard"
    }

Screenshots
No response
Device & Model
SwitchBot Curtain W0701600
Node.js Version
v18.12.1
NPM Version
v8.19.2
Homebridge Version
v1.6.0
Homebridge Switchbot Plugin Version
v2.4.0 and v2.5.0-beta.0
Homebridge Config UI X Plugin Version
v4.50.2
Operating System
Raspian

I'm not sure if https://github.com/abandonware/noble/pull/243 could fix this, I seem to remember a version change to decrease the noble version at some point recently.


Feature Request: Detached Encryption Key

Just a brief feature request - I would love the option to have a detached encryption key (i.e. one that's stored locally on the remote machine) in the instance where we don't trust the remote repository (given that a key could be theoretically brute forced). Would love to have this option available!

My apologies - forgot FR are for the forums :) Closing now


How to use only one gpu to train?

I did not to use Parallel GPU by this code(torch.nn.DataParallel(retinanet).cuda()).
So how to improve this code by using one gpu only?
I appreciated you. Thank you.

@Hung-Hsiang-617 I don't think any modifications are required to run this on a single GPU, I am running it on a single GPU and it works fine.

@Hung-Hsiang-617 i have the same problem, are you fit it?


Crackling audio through DAS on opentpcast

Just upgraded to opentpcast, and for the most part it's working perfectly.
However, I've noticed audio is very crackly..
Put it back onto the old sdcard, and the issue went away.
Has anyone seen this before?

Make sure that HDMI audio (the device is typically called HTC-VIVE-1) is selected in SteamVR.
Please use the Community Discord for troubleshooting issues rather than opening a bug report.


Port additional exercises

I'd like to port the following exercises before the end of the month (unless you have other exercises in mind)

[ ] armstrong-number
[ ] darts
[ ] high-scores
[ ] pop-count
[ ] square-root
[ ] two-fer

That would be nice, thanks a lot in advance :)

I'll add high-scores this weekend to close this round of exercises.

Thank you :)


Server error trying to use Gemini api

I’m trying to use the new ChatGPT api support for Gemini and I’m getting a server error.
https://ai.google.dev/gemini-api/docs/openai

Wow, thanks for the info. was totally unaware that Google has an OpenAI compatibility API. 😂

Yeah it just came out last Friday - very new stuff

Hi @provencher, the issue is that Gemini doesn’t provide the id in the completion response. I’ve merged PR #19 to fix this. It works for me. Could you please confirm by checking the main branch before I release a new version?

Hey yep got this working, thanks!


Add creation of the default subnet pools for tenant networks

Default subnet pool is required to run tests for the auto allocate network functionality. This patch adds creation of such default and shared pools for IPv4 and IPv6.
This patch is not enough to make auto allocate network tests running fine as it also require external network to be marked as "default" for projects and that can't be done using ansible openstack module yet. It will require patch [1] and then additional change in the os_net_setup module.
[1] https://review.opendev.org/c/openstack/ansible-collections-openstack/+/917690
As a pull request owner and reviewers, I checked that:

[ ] Appropriate testing is done and actually running
[x] Appropriate documentation exists and/or is up-to-date:

[x] README in the role
[x] Content of the docs/source is reflecting the changes

Related: #OSPRH-6541

/approve
/lgtm

I'll test it against HCI before shipping it

/lgtm
It passed the HCI run I did. Merging.


chore(main): release 1.0.5

:robot: I have created a release beep boop
1.0.5 (2024-05-20)
Bug Fixes

API/client changes: New client_id and client_secret (#2) (011bc75)

Miscellaneous Chores

release 1.0.5 (340a955)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/kamiKAC/dartnissanconnect/releases/tag/v1.0.5 :sunflower:


[embedded] Fix generic function skipping in PerfDiags, diagnose KeyPathInsts in closures

We were skipping some functions (generic, but fully specialized) in PerformanceDiagnostics, and that resulted in e.g. a KeyPathInst in a closure not being flagged. See the attached testcase, which ends up crashing the compiler in IRGen when an attempt to lower a KeyPathInst is made. Let's fix that.
rdar://135948987

@swift-ci please test


See also links - find the way to display them

Done in https://github.com/pokatomnik/MrakopediaReader2/pull/19


Remove mention of is_internal as it is deprecated and we don't use it anyway

Description
Remove mention of is_internal as it is deprecated and we don't use it anyway
Type of change

Documentation update

Testing steps
N/A
Checklist

[ ] make before_commit passes
[ ] updated documentation wherever necessary
[ ] added or modified tests if necessary
[ ] updated schemas and validators in insights-data-schemas in case of input/output change

Codecov Report
Patch has no changes to coverable lines.
:loudspeaker: Thoughts on this report? Let us know!.


difficulty wrapping fun in let even with separating whitespace

given:

pressing "t" yields:

which is expected except for the seemingly unnecessary grout.
but then if i move down:

and try to insert an "in" below to wrap the function i get:

however, if i go up and delete the weird grout, then it works

the in wrapping issue is fixed by https://github.com/hazelgrove/tylr/commit/ef82f278b1eac64f9128c0e347c961e318280721 tho the extra grout upon first expanding let is still unexpected


internal: Skip website, docs dirs for checkout

Motivation

Checkout is a bottleneck in circleci and currently takes 30s
Solution

website and docs dir are not needed. They also have lots of files and some assets (larger size) in them.

circleci doesn't actually have a way of configuring this


translation spelling mistake - sir mastak rakhya paarbrehman

Describe the bug
A clear and concise description of what the bug is.
Translation spelling mistake for protected, it's spelt 'procted'
Shabad is
sir mastak rakhya paarbrehman (smrphkrp)

To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Specs

Device: [e.g. iPhone6]
OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

@bhajneet Similar to #1757, but in this case, it is a typo.

A typo in the printed source as well?

A typo in the printed source as well?

I don't have the printed source, this is as close as its going to get.

http://www.gurbanifiles.net/translations/Gurmukhi to English translation of SGGS, page by page.pdf
This seems to be the pdf used for printed source. Its a typo, I believe there is nothing wrong with doing that.

http://report.sikhnet.com/files/2013/10/SGGS_Gurmukhi_English_Vol_5_edition2.5_Nov_19_2015.pdf

#1392


Fixed forge command to create a new project

Thanks for your contribution. I guess we have to apply this fix to each and every translation.


Wha about removing the btn class?

Not bad.
On the other hand, Sign Out is an action, rather than a page. Usually it's seen in the top right or under the user menu. But removing the btn class is definitely an improvement.


v2 bug: ( flags have become positional, ignored when placed after arguments )

my urfave/cli version is v2.2.0
It seems flags now have become positional, they are ignored if they are placed after main argument.
Checklist

[x] Are you running the latest v2 release? The list of releases is here.
[x] Did you check the manual for your release? The v2 manual is here
[x] Did you perform a search about this problem? Here's the Github guide about searching.

Dependency Management

[x] My project is using go modules.
[ ] My project is using vendoring.
[ ] My project is automatically downloading the latest version.
[ ] I am unsure of what my dependency management setup is.

Describe the bug
Below command used to detect correct value for flag in v1 but with v2 update it returns empty value
example subcommand arg1 arg2 --flag1 this_value_is_ignored

To reproduce
Pass string flag value after arguments to subcommand
Observed behavior
Value for the flag is empty in execution
Expected behavior
Actual value should have been set in flag
Additional context

# paste `go version` output in here

Run go env and paste its output here
# paste `go env` output in here

Considering this is behaving as documented, I'm going to go ahead and close this.


Update Song “2023-04-10/index”

Automatically generated by Netlify CMS

👷 Deploy Preview for cosmic-druid-18a2fd processing.

Name
Link

🔨 Latest commit
77e8e96879eb84a53f496efbeadaf3991d02daa5

🔍 Latest deploy log
https://app.netlify.com/sites/cosmic-druid-18a2fd/deploys/675b656397848400083857eb


Improve unit test and fix code

Improved test:

compare improvements
reporting improvements

Fixed files which were reported as error
NOTE: got now stackoverflowException inside this test.

Stackoverflow fixed, but test still fails because equal isn't smart enough.


Cannot run the containerexec example: Invalid chunk size

Crate version: 0.4.0 from master https://github.com/softprops/shiplift/commit/eb98b1916c0220e44e2d0f3c869c01a2dd037f60
OS: macOS 10.14.1
Output of running docker version on the command line:

Client: Docker Engine - Community
 Version:           18.09.1
 API version:       1.39
 Go version:        go1.10.6
 Git commit:        4c52b90
 Built:             Wed Jan  9 19:33:12 2019
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.1
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.6
  Git commit:       4c52b90
  Built:            Wed Jan  9 19:41:49 2019
  OS/Arch:          linux/amd64
  Experimental:     true

I might well be overlooking something, but I was trying to run the containerexec example from the repository and I get an error message:
/p/t/shiplift ❯❯❯ docker run -d centos:latest sleep infinity
Unable to find image 'centos:latest' locally
latest: Pulling from library/centos
a02a4930cb5d: Pull complete
Digest: sha256:184e5f35598e333bfa7de10d8fb1cebb5ee4df5bc0f970bf2b1e7c7345136426
Status: Downloaded newer image for centos:latest
33ad7bfd9b46f7217fa16f4c8e9070f1cae75267b361159f621f5c9a6607b75c
/p/t/shiplift ❯❯❯ cargo run --example containerexec -- 33ad7bfd9b46f7217fa16f4c8e9070f1cae75267b361159f621f5c9a6607b75c
    Finished dev [unoptimized + debuginfo] target(s) in 0.56s
     Running `target/debug/examples/containerexec 33ad7bfd9b46f7217fa16f4c8e9070f1cae75267b361159f621f5c9a6607b75c`
Error: Docker Error: Docker Error: error reading a body from connection: Invalid chunk size line: Invalid Size

A normal docker exec from the commandline works as expected:
docker exec 33ad7bfd9b46f7217fa16f4c8e9070f1cae75267b361159f621f5c9a6607b75c echo "hello world"
hello world

Any idea why this might be happening?
Found some issues regarding chunked encoding in hyper (https://github.com/hyperium/hyper/issues/1146), but I'm not sure how to troubleshoot this. Maybe there's a way to curl the Docker API directly and inspect the headers somehow.

Alright I think that's a leftover task from moving to an async API.
https://github.com/softprops/shiplift/pull/128#issuecomment-432869752 and https://github.com/softprops/shiplift/blob/master/src/lib.rs#L452
Maybe @abusch has an idea on how to fix that.

Damn, I have no memories of why I put that TODO there :( I wonder if this could be the same kind of issue that was fixed in https://github.com/softprops/shiplift/pull/154 ?

I just pushed a new release with that pr published a new release including this pr https://github.com/softprops/shiplift/blob/master/CHANGELOG.md#050. can you verify if this is still a problem

Just encountered this exact same issue, mac OS 10.14.4, docker version:
Client: Docker Engine - Community
 Version:           18.09.2
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        6247962
 Built:             Sun Feb 10 04:12:39 2019
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.2
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.6
  Git commit:       6247962
  Built:            Sun Feb 10 04:13:06 2019
  OS/Arch:          linux/amd64
  Experimental:     false

I only encounter this issue on macOS. In Linux, the example runs fine. I'm unfamiliar with how to dig in further.
docker version from macOS host
 Version:           19.03.2
 API version:       1.40
 Go version:        go1.12.8
 Git commit:        6a30dfc
 Built:             Thu Aug 29 05:26:49 2019
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.2
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.8
  Git commit:       6a30dfc
  Built:            Thu Aug 29 05:32:21 2019
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          v1.2.6
  GitCommit:        894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc:
  Version:          1.0.0-rc8
  GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87f
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

docker version from Linux host
 Version:           19.03.1-ce
 API version:       1.40
 Go version:        go1.12.8
 Git commit:        74b1e89e8a
 Built:             Fri Aug 16 14:00:42 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          19.03.1-ce
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.8
  Git commit:       74b1e89e8a
  Built:            Fri Aug 16 13:58:02 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.8.m
  GitCommit:        a4bc1d432a2c33aa2eed37f338dceabb93641310.m
 runc:
  Version:          1.0.0-rc8
  GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87f
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

macOS example
$ uname
Darwin
$ docker run -d centos:latest sleep infinity
Unable to find image 'centos:latest' locally
latest: Pulling from library/centos
d8d02d457314: Pull complete
Digest: sha256:307835c385f656ec2e2fec602cf093224173c51119bbebd602c53c3653a3d6eb
Status: Downloaded newer image for centos:latest
98eb5d732950d33bae45c9765162f700ba4a0810002dd7be1fc33c7322d7d806
$ cargo run --example containerexec -- 98eb5d732950d33bae45c9765162f700ba4a0810002dd7be1fc33c7322d
7d806
    Finished dev [unoptimized + debuginfo] target(s) in 0.17s
     Running `target/debug/examples/containerexec 98eb5d732950d33bae45c9765162f700ba4a0810002dd7be1fc33c7322d7d806`
Error: Docker Error: Docker Error: error reading a body from connection: Invalid chunk size line: Invalid Size

Linux example
$ uname
Linux
$ docker run -d centos:latest sleep infinity
Unable to find image 'centos:latest' locally
latest: Pulling from library/centos
d8d02d457314: Pull complete
Digest: sha256:307835c385f656ec2e2fec602cf093224173c51119bbebd602c53c3653a3d6eb
Status: Downloaded newer image for centos:latest
c37421ba8ce4f0c8656b2345bc84eeca1582541407163de124b794ddcc17a020
$ cargo run --example containerexec -- c37421ba8ce4f0c8656b2345bc84eeca1582541407163de124b794ddcc17a020
    Finished dev [unoptimized + debuginfo] target(s) in 0.04s
     Running `target/debug/examples/containerexec c37421ba8ce4f0c8656b2345bc84eeca1582541407163de124b794ddcc17a020`
Stdout: echo VAR=value on stdout
Stderr: echo VAR=value on stderr

Same issue here, sorry I could not investigate more.

https://github.com/hyperium/hyper/commit/cb71d2cdbd22e538663e724916dc343430efcf29 appears to fix this issue. The issue before was that Docker on macOS returns the logs as Transfer-Encoding: identity, which hyper wasn't handling properly. Was able to get things running locally by manually applying the diff in the commit to the version of hyper that shiplift uses.

Crate 0.6.0 on master 6cd1d7f93bd6f150341582a1b54087cefffdbf87..4b399f576e219c8b407aaba7049e87f11beac716

Since #229 updated hyper, I thought it was about time to check back in on this issue on both Linux and MacOS.
At least from my manual testing, it appears to be fixed in master.
(However #229 mistakenly changed the eprintln!() stderr output to say stdout, which we'll see in the example output.)
https://github.com/softprops/shiplift/blob/4b399f576e219c8b407aaba7049e87f11beac716/examples/containerexec.rs#L34
Linux:
Linux output placeholder
MacOS:
$ uname
Darwin
$ docker run -d centos:latest sleep infinity
099c5ec6663289f9d041ad0c890b2ca87b2bbf66001cf18235835308244fc363
$ cargo run --example containerexec -- 099c5ec6663289f9d041ad0c890b2ca87b2bbf66001cf18235835308244fc363
     Running `target/debug/examples/containerexec 099c5ec6663289f9d041ad0c890b2ca87b2bbf66001cf18235835308244fc363`
Stdout: echo VAR=value on stderr
Stdout: echo VAR=value on stdout


⚠ Bofrost.es has degraded performance

In 1444798, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1868 ms

Resolved: Bofrost.es performance has improved in 92ec5e9.


Import POSTMAN collection with inconsistent request.method capitalization

I have checked the following:

[X] I use the newest version of bruno.
[X] I've searched existing issues and found nothing related to my issue.

Describe the bug
Try importing https://github.com/commercetools/commercetools-postman-collection/blob/master/api/collection.json on Bruno 1.25.0
This gives a validation error:
ValidationError     at Object.createError (_app-7d2ec193079a61ca.js:31:76737)     at Object.test (_app-7d2ec193079a61ca.js:34:3550)     at validate (_app-7d2ec193079a61ca.js:31:76989)     at runTests (_app-7d2ec193079a61ca.js:31:74506)     at _app-7d2ec193079a61ca.js:34:740     at _app-7d2ec193079a61ca.js:31:74249     at _app-7d2ec193079a61ca.js:31:74751
If you dive deeper, the inner error is:
items[1].items[11].request.method must be one of the following values: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, TRACE
Inspecting the postman collection, the request.method is inconsistent. Sometimes it's lower case get/post/delete etc.
Would it make sense to allow lower case values for request.method? Or uppercase and validate them?
.bru file to reproduce the bug
No response
Screenshots/Live demo link

It ought to validate as upper case:
https://datatracker.ietf.org/doc/html/rfc9110#section-9

The method token is case-sensitive because it might be used as a gateway to object-based systems with case-sensitive method names. By convention, standardized methods are defined in all-uppercase US-ASCII letters.

I will instead ask for the collection to be fixed, thanks!


Next and previous posts don't work correctly

Hi,
I've just upgrade from Ghost 1.x to Ghost 2.0, the upgrade was successful. I tried the latest version of Casper theme but it didn't work. I didn't make any modification in the theme.
Screenshot

Steps to Reproduce

Open a post
Scroll to the bottom, there are two related post (next/previous), but the summary doesn't work, it show undefined and the url doesn't as well, when click on it, it return to home page (/).

Technical details

Casper Version:2.9.3
Ghost Version:2.16.2
Browser Version:Chrome 72.0.3626.119
OS Version:macOS

i have same issue in post

Can you please update to 2.16.3? Thanks!

Closing. This was fixed in 2.16.3. I recommend updating to the latest Ghost version 2.16.4.


gracefully handle when ~/.flutter is not writable

We should handle situations where we're not able to write to ~/.flutter. The solution might look something like:

disabling analytics for that run
not displaying the large, multi-line analytics warning
possibly showing a one line warning about being unable to write to the settings file

cc @abarth since this affected Fuchsia's build recently.

I'm punting this for now (few people have a read-only home directory); let me know if there's a reason this should be considered higher priority.

let me know if there's a reason this should be considered higher priority.

Because it brings the installer to a halt for no good reason. This is not to be expected of a library whose strengths include quality and compatibility; ignoring small and easily solved issues like these is death by a thousand cuts.
If the home directory could not be found or is not writeable, pretty much all platforms have other directories you can write to (for instance, Library/Application Support on macOS, or %APPDATA% on Windows). If this is too much to ask, then at the very least, please support this specification for base directories. I should add that I would be glad to help implement this if given the right location in the codebase.

I've hit this when writing a workflow file for github actions:
on: push
name: Flutter Lint, Format, Test and build+deploy

jobs:
  test:
    name: health check
    runs-on: ubuntu-latest

    container: cirrusci/flutter:master

    steps:
      - uses: actions/checkout@v1
      - run: flutter doctor -v
      - run: flutter packages get
      - run: flutter format --set-exit-if-changed .
      - run: flutter test

This makes the flutter doctor step fail with a:

Unhandled exception:
FileSystemException: Cannot create file, path = '/github/home/.flutter' (OS Error: Permission denied, errno = 13)


dose not work with the new devtools version 7.6.2

new vue devtools (7.6.2) seems to break

I am also facing the issue for vue devtools (7.6.3).

You're might using Vue 2. Seems that Vue Devtools 7 no longer supports it. Ref: https://github.com/vuejs/devtools/issues/652
Let's try Vue.js Devtools Legacy

I use vue3 and vue-force-dev also not working

Thanks for your issue，i've fixed it and submitted the release application, which is under review.

The latest version has been released.

Thank you!


[BEAM-2062] XmlIO and XmlSource now take an optional validationEventHandler to th…

Jaxb now use an optional ValidationEventHandler.

R: @lukecwik

We have been having some issues with Jenkins/Github integration so I manually kicked off a precommit test run here:
https://builds.apache.org/view/Beam/job/beam_PreCommit_Java_MavenInstall/10098/

LGTM, will fix some minor whitespace/comment issues and merge.

Coverage increased (+0.01%) to 69.833% when pulling 340ed8c8f1215d543b5a5b994806041fac3203f9 on dgouyette:master into 196f4ba0bb3a4a8385a9f7eb078378d51bd39f89 on apache:master.

Coverage decreased (-0.03%) to 69.791% when pulling 340ed8c8f1215d543b5a5b994806041fac3203f9 on dgouyette:master into 196f4ba0bb3a4a8385a9f7eb078378d51bd39f89 on apache:master.


test: Set organization name

From Qt docs:

If QCoreApplication::setOrganizationName() and QCoreApplication::setApplicationName() has not been previously called, the QSettings object will not be able to read or write any settings, and status() will return AccessError.

Fixes https://github.com/bitcoin-core/gui/issues/799.

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews
See the guideline for information on the review process.
A summary of reviews will appear here.

Friendly ping @ryanofsky @sipsorcery @furszy @jarolrod

Building this PR with msvc and running test_bitcoin-qt.exe gives me:
...snip...
********* Start testing of OptionTests *********
Config: Using QtTest library 5.15.11, Qt 5.15.11 (x86_64-little_endian-llp64 static release build; by MSVC 2022), windows 11
PASS   : OptionTests::initTestCase()
PASS   : OptionTests::migrateSettings()
PASS   : OptionTests::integerGetArgBug()
PASS   : OptionTests::parametersInteraction()
PASS   : OptionTests::extractFilter()
PASS   : OptionTests::cleanupTestCase()
Totals: 6 passed, 0 failed, 0 skipped, 0 blacklisted, 20ms
********* Finished testing of OptionTests *********
...snip...

Does that demonstrate the fix?

Building this PR with msvc and running test_bitcoin-qt.exe gives me:
...snip...
********* Start testing of OptionTests *********
Config: Using QtTest library 5.15.11, Qt 5.15.11 (x86_64-little_endian-llp64 static release build; by MSVC 2022), windows 11
PASS   : OptionTests::initTestCase()
PASS   : OptionTests::migrateSettings()
PASS   : OptionTests::integerGetArgBug()
PASS   : OptionTests::parametersInteraction()
PASS   : OptionTests::extractFilter()
PASS   : OptionTests::cleanupTestCase()
Totals: 6 passed, 0 failed, 0 skipped, 0 blacklisted, 20ms
********* Finished testing of OptionTests *********
...snip...

Does that demonstrate the fix?

Exactly.

tACK 49cf63522e202caf326bad161ff6fa05d1076566.


Handlers not being triggered

Hey,
So i already set up the presence etc everything works, but how do i catch an error/check if discord is even running?

You can use the event handlers you pass to DIscord_Initialize to determine when it connects or disconnects.

Okay so after some testing i got the Ready event to work but every other event is not working...
        handlers.errored = (err, err1) -> {
            System.out.println(err + "\n" + err1);
        };
        handlers.disconnected = (err, err1) -> {
            System.out.println(err + "\n" + err1);
        };
        handlers.ready = (user) -> {
            System.out.print(user);
        };

This is the code i am using for the events. I added it under the handlers declaration (initPresence())
if you want the full class (Note the events are not included):
here

Handlers not being triggered can only be caused by the official SDK. This seems related to discordapp/discord-rpc#220

I am using it on MacOS and i get this famous LRegistry error thing maybe its related to the events not being triggered?

That error means it was unable to create the command used to start the app from within discord.

I have proposed a fix for the disconnected event handler to the official SDK, it is currently waiting to be reviewed.

This should be fixed in 2.0.2, feel free to open a new issue for other complications.


Create external user for new OAuth2 user

Fix #21202.
After creating a new OAuth2 user, should insert an external user if it doesn't exist.

Hmm... My usual comment about transactions applies here. We would actually need this to be an upsert and certainly not do a select then insert outside of a transaction.
Now, regarding this, the external user stuff seems to have gotten broken along the way here and I'm not certain whether it's being used at all or if it's helpful, or what it was intended to do.
We could merge this and then attempt to rationalize this code but I think we might want to take a closer look. Adding a little flag on to the function to say 'upsert' or not feels kinda wrong to me.

You are right. Actually, I tried to find an elegant way to fix it, but the flow is so complex. The upsert is the simplest safe way I can think of to solve the error logs, a temporary patch to give us time to figure out the root cause.

That may not be correct. If I understand the existing code an ExternalLoginUser

makes the connecting between some existing user and additional external login sources

From the code this type is only inserted if an external login is used for an existing user but not if the user is created with/by that source. In this case User.LoginType has a specific value and no ExternalLoginUser is needed. (?)

Alternative fix if my assumption is correct: #21504


Broken link in README

Associated Issue: #4

Adding link of issues page.

Pull Request Test Coverage Report for Build 38

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 89.231%

Totals

Change from base Build 35:
0.0%

Covered Lines:
87

Relevant Lines:
99

💛  - Coveralls

@G-ferreira Thank you for the effort but this was already fixed by #5.


address already in use :::3000 when I launch the build

Hello,
I follow exactly the step to install PandoraAI, but it seems I missed something and I don't understand what and why.
The server "node-chatgpt-api" is up and worked fine when I test "npm run cli".
When I launch "npm run dev" for PandoraAI, I have a random port, I have the nuxt Pandora page, But I have no answer from Chatgpt from my prompt.
When I launch "npm run build" for PandoraAI, when I want to preview this build using node .output/server/index.mjs I have the error :
[nitro] [dev] [uncaughtException] Error: listen EADDRINUSE: address already in use :::3000
Could you help me to understand ?

You'll want to run the API server in a port other than 3000, since the frontend also uses that port by default.

Check the browser console for errors (and look at the network request too).

I have the same problem, would you explan how do you solve it?
I checked the console. it keeps showing unable to connect to server.
I followed the exact procedure. I can use CLI locally, but the web gui is not working
Nuxt 3.3.1 with Nitro 2.3.1                                                     23:51:29
[get-port] Unable to find an available port (tried 3000). Using alternative port: 3001
                                                                                23:51:29
  > Local:    http://localhost:3001/
  > Network:  http://<IP_ADDRESS>:3001/

experimental

@ddliu365 The optimal way to do this is to run node-chatgpi-api server on port 3001 instead, and set that address in .env.

The result is same.
See the terminal in browser
[Debug] [vite] connecting... (client, line 206)
[Error] WebSocket connection to 'ws://localhost:24678/_nuxt/' failed: Could not connect to the server.
[Log] [vite] server connection lost. polling for restart... (client, line 262)
[Error] Failed to load resource: Could not connect to the server. (_nuxt, line 0)

See the config file
in node-chatgpt-api
settings.js
export default {
    // Options for the Keyv cache, see https://www.npmjs.com/package/keyv.
    // This is used for storing conversations, and supports additional drivers (conversations are stored in memory by default).
    // Only necessary when using `ChatGPTClient`, or `BingAIClient` in jailbreak mode.
    cacheOptions: {},
    // If set, `ChatGPTClient` and `BingAIClient` will use `keyv-file` to store conversations to this JSON file instead of in memory.
    // However, `cacheOptions.store` will override this if set
    storageFilePath: process.env.STORAGE_FILE_PATH || './cache.json',
    chatGptClient: {
        // Your OpenAI API key (for `ChatGPTClient`)
        openaiApiKey: process.env.OPENAI_API_KEY || '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',
        // (Optional) Support for a reverse proxy for the completions endpoint (private API server).
        // Warning: This will expose your `openaiApiKey` to a third party. Consider the risks before using this.
        // reverseProxyUrl: 'https://chatgpt.hato.ai/completions',
        // (Optional) Parameters as described in https://platform.openai.com/docs/api-reference/completions
        modelOptions: {
            // You can override the model name and any other parameters here.
            // The default model is `gpt-3.5-turbo`.
            model: 'gpt-3.5-turbo',
            // Set max_tokens here to override the default max_tokens of 1000 for the completion.
            // max_tokens: 1000,
        },
        // (Optional) Davinci models have a max context length of 4097 tokens, but you may need to change this for other models.
        // maxContextTokens: 4097,
        // (Optional) You might want to lower this to save money if using a paid model like `text-davinci-003`.
        // Earlier messages will be dropped until the prompt is within the limit.
        // maxPromptTokens: 3097,
        // (Optional) Set custom instructions instead of "You are ChatGPT...".
        // (Optional) Set a custom name for the user
        // userLabel: 'User',
        // (Optional) Set a custom name for ChatGPT ("ChatGPT" by default)
        // chatGptLabel: 'Bob',
        // promptPrefix: 'You are Bob, a cowboy in Western times...',
        // A proxy string like "http://<ip>:<port>"
        proxy: '',
        // (Optional) Set to true to enable `console.debug()` logging
        debug: true,
    },
    // Options for the Bing client
    bingAiClient: {
        // Necessary for some people in different countries, e.g. China (https://cn.bing.com)
        host: '',
        // The "_U" cookie value from bing.com
        userToken: '',
        // If the above doesn't work, provide all your cookies as a string instead
        cookies: '',
        // A proxy string like "http://<ip>:<port>"
        proxy: '',
        // (Optional) Set to true to enable `console.debug()` logging
        debug: false,
    },
    chatGptBrowserClient: {
        // (Optional) Support for a reverse proxy for the conversation endpoint (private API server).
        // Warning: This will expose your access token to a third party. Consider the risks before using this.
        reverseProxyUrl: 'https://bypass.duti.tech/api/conversation',
        // Access token from https://chat.openai.com/api/auth/session
        accessToken: '',
        // Cookies from chat.openai.com (likely not required if using reverse proxy server).
        cookies: '',
        // A proxy string like "http://<ip>:<port>"
        proxy: '',
        // (Optional) Set to true to enable `console.debug()` logging
        debug: false,
    },
    // Options for the API server
    apiOptions: {
        port: process.env.API_PORT || 3000,
        host: process.env.API_HOST || 'localhost',
        // (Optional) Set to true to enable `console.debug()` logging
        debug: false,
        // (Optional) Possible options: "chatgpt", "chatgpt-browser", "bing". (Default: "chatgpt")
        clientToUse: 'chatgpt',
        // (Optional) Generate titles for each conversation for clients that support it (only ChatGPTClient for now).
        // This will be returned as a `title` property in the first response of the conversation.
        generateTitles: false,
        // (Optional) Set this to allow changing the client or client options in POST /conversation.
        // To disable, set to `null`.
        perMessageClientOptionsWhitelist: {
            // The ability to switch clients using `clientOptions.clientToUse` will be disabled if `validClientsToUse` is not set.
            // To allow switching clients per message, you must set `validClientsToUse` to a non-empty array.
            validClientsToUse: ['bing', 'chatgpt', 'chatgpt-browser'], // values from possible `clientToUse` options above
            // The Object key, e.g. "chatgpt", is a value from `validClientsToUse`.
            // If not set, ALL options will be ALLOWED to be changed. For example, `bing` is not defined in `perMessageClientOptionsWhitelist` above,
            // so all options for `bingAiClient` will be allowed to be changed.
            // If set, ONLY the options listed here will be allowed to be changed.
            // In this example, each array element is a string representing a property in `chatGptClient` above.
            chatgpt: [
                'promptPrefix',
                'userLabel',
                'chatGptLabel',
                // Setting `modelOptions.temperature` here will allow changing ONLY the temperature.
                // Other options like `modelOptions.model` will not be allowed to be changed.
                // If you want to allow changing all `modelOptions`, define `modelOptions` here instead of `modelOptions.temperature`.
                'modelOptions.temperature',
            ],
        },
    },
    // Options for the CLI app
    cliOptions: {
        // (Optional) Possible options: "chatgpt", "bing".
        // clientToUse: 'bing',
    },
};

In .env of PandoraAI,
API_BASE_URL=http://localhost:3001

I run the server and Web GUI on the same machine
Here are the result
dongdong@desktop:~/node-chatgpt-api$ npm run server

><EMAIL_ADDRESS>server
> node bin/server.js

                                                                                10:07:57
Nuxi 3.3.1                                                                                10:07:57
Nuxt 3.3.1 with Nitro 2.3.1                                                                           10:07:57
[get-port] Unable to find an available port (tried 3000). Using alternative port: 3001                10:07:57
                                                                                10:07:58
  > Local:    http://localhost:3001/
  > Network:  http://<IP_ADDRESS>:3001/

ℹ Using default Tailwind CSS file from runtime/tailwind.css                          nuxt:tailwindcss 10:07:58
ℹ Tailwind Viewer: http://localhost:3001/_tailwind/                                  nuxt:tailwindcss 10:07:58
ℹ Vite client warmed up in 966ms                                                                      10:07:59
✔ Nitro built in 295 ms                                                                         nitro 10:07:59

You didn't change the port to 3001 though?


Support creation of SKDRequest(Dictionary|Array) from literals

IMO this makes it a lot clearer which keys are present in the request dictionaries because we are no longer mutating them on the fly.

@swift-ci Please test


v2-rc21 - SharePoint Setup flow fails

The import of the solution works now - great job.
Two things are not yet running smoothly:

During the import of the current solution, the import process did not ask for the environment variable for the SharePoint site.
The flow for the SharePoint setup fails because it is not part of a solution - and cannot be added to one. Environment Variables can be used for flows only in solutions.

Happy to say finally got around to fixing the solution, flow is now included,.. Get the latest here


HiddenMarkovModelTrainer train_unsupervised - TypeError

Hello,
I'm trying to use the train_unsupervised method from the nltk.hmm module, however, it's throwing the following TypeError:
TypeError: Can't instantiate abstract class RandomProbDist with abstract methods max
Here is the code I'm using:
import nltk

trainer = nltk.hmm.HiddenMarkovModelTrainer()
tagger = trainer.train_unsupervised([
    ('a', ''),
    ('b', ''),
    ('c', '')
])

Here's the full error:
Traceback (most recent call last):   File "test.py", line 10, in <module>     ('c', '')   File "/Library/Python/2.7/site-packages/nltk/tag/hmm.py", line 932, in train_unsupervised     priors = RandomProbDist(self._states) TypeError: Can't instantiate abstract class RandomProbDist with abstract methods max
NLTK version 3.2.5; tested on Python 2.7.10 and Python 2.7.14.
Am I doing something silly wrong?
Thank you very much.

This also happens using python 3.6.2 with NLTK 3.2.5

The updates in the git repo aren't yet reflected in the nltk pip package. I would suggest pulling the updates in the commits and working with it.


feat: Add support for Typer

Hey @willmcgugan, You don't have a CONTRIBUTING.md on this repo, so I'm not sure if/how I can contribute to this, but these are the changes I made on my fork to get Trogon working in my Typer app. I have a few TODOs below but would like your input for desired usage and best practice. Thank you 🙏
TODO:

[ ] match desired usage
[ ] tests based on best practice

Removed the dependency requirement on typer and created an extra for it. This pattern of init_tui(app) feels more intuitive than shoehorning the decorator to work with a library that suggests creating many nested apps.
I'm weighing the benefits of being able to add this to a single command in typer, as the pattern set out in the docs would be to create a nested app for that.

Hi @darrenburns - I made a PR against @evanmags' branch fixing the docs. When he merges that, your review will be included is there anything else that needs to be done to make this land?


arrays of fields or field groups

Support for an array of fields, or an array of field groups would be very useful. Without this feature, there is no obvious way to collect a list of values/objects if the length of the list is indeterminate. Here a couple of example use cases:
1. Array of Fields
For example, a form that allows the user to upload an unlimited number of images, each image would be stored base64 encoded inside an array.
2. Array of Field Groups
For example, if a user needs to enter the name, surname and date-of-birth of each of their children, this would be stored in the model as:
[
  {"name": "John", "surname": "Doe", "dob": "1999-01-01"},
  {"name": "Jane", "surname": "Doe", "dob" "2000-01-01"}
]

A suggested implementation is to add [+] and [-] buttons to the form which would allow the user to add and remove an item in the array, or in the case of (2), clicking these buttons would add/remove a group of fields.
Support for this feature exists in Angular Schema Form (an AngularJS declarative form library). The feature is documented here and a demo is available here by choosing "Array" from the "Select Example" dropdown.

Sorry, not yet, I've been so busy and just haven't had spare time to look at this. Feel free to PR if you want though

@donalmurtagh see issue #39 which has a sample repeater field. While it's not natively supported by a vue-formly package, it's not too hard to implement. Gist is here


No error/warning for missing symbolic alternate allele description in header

I had a file with entries that had ALT column <DUP> but that ALT did not have a description in the vcf header. vcf-validator didn't generate an error or warning for this file. I looked in the vcf spec and didn't see this as a requirement, but perhaps vcf-validator should generate a warning for it?

My mistake. I did get a warning for this scenario:
Line 199: Alternate '' is not listed in a valid meta-data ALT entry (warning)

Yes, that is the expected behaviour. Glad you figured it out. Also, if this or any other part of the usage of the vcf-validator is unintuitive or hard to work with, please tell us.


Papr crashes in iOS 12 and lower.

Since SVG format is not supported in iOS, the app crashes when it tries to access an image with a given resource name.
static var arrowUpRight: UIImage {
    if #available(iOS 13.0, *) {
        return UIImage(systemName: "arrow.up.right", withConfiguration: symbolConfigurationMedium)!#
    }
    return UIImage(imageLiteralResourceName: "arrow.up.right") // #CRASH
}

We can solve this issue by (I would like to avoid having a dependency for this use case) by converting the SVGs into .png or supporting iOS13 and higher.
Thoughts on this @serjooo (since you closed #89) ?
(This app is not planned to be released, so supporting only the latest iOS version seems fine to me.)

I think it would be nice to support older versions of iOS. So I don't mind providing the images in PNG format and returning those images when needed. What do you think?


[Draft] TDS8: Accept additional values for encrypt

This PR allows passing additional values for 'encrypt' option and is part of changes for TDS8 support

Codecov Report

Merging #125 (386a3fc) into main (b607336) will decrease coverage by 0.40%.
The diff coverage is 31.66%.

@@            Coverage Diff             @@
##             main     #125      +/-   ##
==========================================
- Coverage   74.02%   73.63%   -0.40%
==========================================
  Files          29       29
  Lines        5633     5662      +29
==========================================
- Hits         4170     4169       -1
- Misses       1212     1241      +29
- Partials      251      252       +1

Impacted Files
Coverage Δ

tds.go
68.42% <31.66%> (-2.94%)
:arrow_down:

... and 1 file with indirect coverage changes

update the readme and the changelog

encrypt, err := interpretPreloginResponse(p, fedAuth, fields)

should we make sure encrypt is true when p.Encryption is set to strict or mandatory, or does that happen inside interpretPreloginResponse already?

Refers to: tds.go:1236 in 291c8eb. [](commit_id = 291c8eb6815b53456b091f8fabc8ed9d26b45f98, deletion_comment = False)

encrypt, err := interpretPreloginResponse(p, fedAuth, fields)

should we make sure encrypt is true when p.Encryption is set to strict or mandatory, or does that happen inside interpretPreloginResponse already?
Refers to: tds.go:1236 in 291c8eb. [](commit_id = 291c8eb, deletion_comment = False)

In case of TDS 8.0 the value received for encrypt in prelogin response is undefined. I got it as EncryptNotSupported when encrypt was set to strict. It is expected behavior from server. In case when it is set to mandatory, there is already a check in interpretPreloginResponse to ensure it doesn't contain unexpected value.

  {"encrypt=true;tlsmin=1.4", func(p Config) bool {

can we add a 1.3 case now?

Refers to: msdsn/conn_str_test.go:78 in e91b8c1. [](commit_id = e91b8c12ca08cee45ec8764cd50c30d252f616f5, deletion_comment = False)


TODO: support for tcpdump packet captures

Support files with .pcap extension created using tcpdump or Wireshark. (Use scapy to extract packets)
Include option to filter by protocol, such as HTTP, NFS, etc.

Will be in 0.4.0

Add docs regarding pip install log_merger[pcap] and installing tshark

Released in 0.4.0


Plan to integrate with nv-wavenet?

I think integrating taco2 with nv-wavenet still is a long way, first thing i think nv-wavenet should support mol, not just 8bit.

Great work!
Can u share some wav sample of your full stack tts system(8 bit nv-wavenet)?

Not yet but soon. We're currently working on another release.

@rafaelvalle How long do you think it will be before the integration with nv-wavenet is released? How is the voice quality with that integration?

Pytorch bindings for 8-bit mulaw nv-wavenet should be out this week.

nice work!@rafaelvalle, Can I use r9y9's wavenet arch of 8-bit mulaw with your work?

It should be possible. You'll need to load the weights onto the PyTorch bindings.

@rafaelvalle are the Pytorch bindings for 8-bit mulaw nv-wavenet going to be integrated into this repo? Or will we need to figure out how to get them to work together?

Integration is simple: just provide mel-spectrograms as input to the nv-wavenet pytorch bindings.
The pull request is here:
https://github.com/NVIDIA/nv-wavenet/pull/7/files

For a follow-up with this issue please use this https://github.com/NVIDIA/nv-wavenet/pull/7/files where the pytorch bindings are being released.
Closing.

@rafaelvalle Reposted!

@rafaelvalle  It should be possible. You'll need to load the weights onto the PyTorch bindings.
How to load the weights?

@viogoes please ask this question on the nv-wavenet repo.


Auto-highlight first result

Sometimes when I do a search, the first option is higlighted, but sometimes not. How can I make sure that the first option is always highlighted and that I can simply press "enter" to select it?

I am also interested in this. I think the title should be "auto-highlight first result".

The pointer stays where you left it.


[mapbox-polylabel] Update to 1.1.0

Describe the pull request

What does your PR fix?
Updates mapbox-polylabel to 1.1.0

Which triplets are supported/not supported? Have you updated the CI baseline?
As before, Yes

Does your PR follow the maintainer guide?

Yes

Thanks for the update, quotes, modernization, and license!