Failed to setup (without Internet)

Version of the custom_component
v2.1.1

Configuration
Add your logs here.

Describe the bug
When my HA instance starts I often don't have Internet as the router is in the process of loging in.
The Tesla Custom Component treats this as an error and doesn't retry at after a suitable interval, so is never restored.

If I manually disable/ renable the component after the Internet is up everything is fine.
Would it be possible for this integration to retry connection and perhaps make this a warning rather than a hard error?
Similar issue here: https://github.com/bremor/bureau_of_meteorology/issues/113
Debug log
This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/tesla_custom/__init__.py:148
Integration: Tesla Custom Integration (documentation, issues)
First occurred: 8:49:55 AM (1 occurrences)
Last logged: 8:49:55 AM

Error setting up entry<EMAIL_ADDRESS>for tesla_custom
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 149, in connect_tcp
    addr_obj = ip_address(remote_host)
  File "/usr/local/lib/python3.9/ipaddress.py", line 53, in ip_address
    raise ValueError('%r does not appear to be an IPv4 or IPv6 address' %
ValueError: 'owner-api.teslamotors.com' does not appear to be an IPv4 or IPv6 address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 8, in map_exceptions
    yield
  File "/usr/local/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 101, in connect_tcp
    stream: anyio.abc.ByteStream = await anyio.connect_tcp(
  File "/usr/local/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 152, in connect_tcp
    gai_res = await getaddrinfo(target_host, remote_port, family=family,
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
    yield
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
    raise exc
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(request)
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 86, in handle_async_request
    raise exc
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request
    stream = await self._connect(request)
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 111, in _connect
    stream = await self._network_backend.connect_tcp(**kwargs)
  File "/usr/local/lib/python3.9/site-packages/httpcore/backends/auto.py", line 23, in connect_tcp
    return await self._backend.connect_tcp(
  File "/usr/local/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 101, in connect_tcp
    stream: anyio.abc.ByteStream = await anyio.connect_tcp(
  File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
    raise to_exc(exc)
httpcore.ConnectError: [Errno -3] Try again

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/tesla_custom/__init__.py", line 148, in async_setup_entry
    result = await controller.connect(
  File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 405, in connect
    cars = await self.get_vehicles()
  File "/usr/local/lib/python3.9/site-packages/backoff/_async.py", line 133, in retry
    ret = await target(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 535, in get_vehicles
    return (await self.api("VEHICLE_LIST"))["response"]
  File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 183, in wake_up
    result = await wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 1794, in api
    return await self.__connection.post("", method="get", data=kwargs, url=uri)
  File "/usr/local/lib/python3.9/site-packages/teslajsonpy/connection.py", line 164, in post
    return await self.__open(url, method=method, headers=self.head, data=data)
  File "/usr/local/lib/python3.9/site-packages/teslajsonpy/connection.py", line 203, in __open
    resp = await getattr(self.websession, method)(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1729, in get
    return await self.request(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1506, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1593, in send
    response = await self._send_handling_auth(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1621, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1658, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1695, in _send_single_request
    response = await transport.handle_async_request(request)
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectError: [Errno -3] Try again

You can probably just add the httpx.ConnectError to here. PRs are welcome if it resolves it for you.

Thanks,
Happy to assist with a PR.
I couldn't see where 'here' can you be a bit more specific please?
On Tue, 26 Apr 2022, 11:42 Alan Tse, @.***> wrote:

You can probably just add the httpx.ConnectError to here. PRs are welcome
if it resolves it for you.
—
Reply to this email directly, view it on GitHub
https://github.com/alandtse/tesla/issues/204#issuecomment-1109209028,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AS4B3XXE74AQX6P3ZIZTYHDVG5CYRANCNFSM5UKG7ZUQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

I'm non technical but have the same issue here.


Bug: Violation of unique constraints raises ForeignKeyError exception instead of IntegrityError

Description
When a database model contains an unique constraint attribute, any attempts to insert a duplicate value raises a ForeignKeyError exception with the message: "A foreign key is missing or invalid". I believe the correct exception should be an Integrity IntegrityError exception and if we look at the stack trace, it does show that postgresql.asyncpg raises an IntegrityError.
URL to code causing the issue
No response
MCVE
from collections.abc import AsyncGenerator
from logging import DEBUG, StreamHandler, getLogger
from pathlib import Path
from typing import Any

from advanced_alchemy.base import BigIntBase
from advanced_alchemy.exceptions import IntegrityError
from advanced_alchemy.extensions.litestar import (
    AsyncSessionConfig,
    SQLAlchemyAsyncConfig,
    SQLAlchemyInitPlugin,
    async_autocommit_before_send_handler,
)
from advanced_alchemy.repository import SQLAlchemyAsyncRepository
from advanced_alchemy.service import SQLAlchemyAsyncRepositoryService
from litestar import Controller, Litestar, MediaType, Response, post
from litestar.di import Provide
from litestar.status_codes import (
    HTTP_200_OK,
    HTTP_201_CREATED,
)
from pydantic import BaseModel, ConfigDict, Field
from sqlalchemy import URL, String
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column

BASE_DIR = Path(__file__).parent

handler = StreamHandler()
handler.setLevel(DEBUG)

logger = getLogger(__name__)
logger.setLevel(DEBUG)
logger.addHandler(handler)
logger.propagate = False

class MyBaseDB(BigIntBase, DeclarativeBase):
    pass

class UserModel(MyBaseDB):
    __tablename__ = "users"

    email: Mapped[str] = mapped_column(String(128), index=True, unique=True)

class UserRepository(SQLAlchemyAsyncRepository[UserModel]):
    model_type = UserModel

class UserService(SQLAlchemyAsyncRepositoryService[UserModel]):
    repository_type = UserRepository

    def __init__(self, **kwargs: Any):
        self.repository: UserRepository = self.repository_type(**kwargs)
        self.model_type = self.repository.model_type

async def provide_user_svc(db_session: AsyncSession) -> AsyncGenerator[UserService, None]:
    async with UserService.new(session=db_session) as service:
        yield service

class UserSchema(BaseModel):
    model_config = ConfigDict(from_attributes=True)

    id: int = Field(json_schema_extra={"example": 1})
    email: str = Field(json_schema_extra={"example"<EMAIL_ADDRESS>

class CreateUserSchema(BaseModel):
    model_config = ConfigDict(from_attributes=True)

    email: str = Field(json_schema_extra={"example"<EMAIL_ADDRESS>

class UserController(Controller):
    dependencies = {"user_service": Provide(provide_user_svc)}
    signature_namespace = {"UserService": UserService}
    path = "/users"

    @post(path="/", media_type=MediaType.JSON)
    async def create_item(self, user_service: UserService, data: CreateUserSchema) -> Response:  # type: ignore
        try:
            resource: UserModel = await user_service.create(data.model_dump(), auto_commit=None)

            return Response(
                content=UserSchema.model_validate(resource),
                status_code=HTTP_201_CREATED,
            )
        except IntegrityError as exc:
            logger.warning(exc)
        except Exception as exc:
            logger.warning(exc)

        return Response({"message": "Error"}, status_code=HTTP_200_OK)

session_factory = async_sessionmaker(expire_on_commit=False)
session_config = AsyncSessionConfig(expire_on_commit=False)

async def init_database_tables(app: Litestar) -> None:
    async with app.state.db_engine.begin() as connection:
        await connection.run_sync(MyBaseDB.metadata.drop_all)
        await connection.run_sync(MyBaseDB.metadata.create_all)

uri = URL.create(
    drivername="postgresql+asyncpg",
    username="app_minimal_DEV_USER",
    password="WiU5KgsL9ZwPVX2s",
    host="localhost",
    port=5432,
    database="app_minimal_DEV_DB",
)

dbsqlalchemy = SQLAlchemyAsyncConfig(
    connection_string=uri.render_as_string(False),
    session_config=session_config,
    before_send_handler=async_autocommit_before_send_handler,
)
sqlalchemy_plugin = SQLAlchemyInitPlugin(config=dbsqlalchemy)

def create_app():
    return Litestar(
        plugins=[sqlalchemy_plugin],
        on_startup=[init_database_tables],
        route_handlers=[UserController],
    )

Steps to reproduce
1. Setup a Python virtual environment and PIP install the following packages: litestar[pydantic, sqlalchemy]

Screenshots
"In the format of: ![SCREENSHOT_DESCRIPTION](SCREENSHOT_LINK.png)"
Logs
Traceback (most recent call last):
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/litestar/middleware/_internal/exceptions/middleware.py", line 159, in __call__
    await self.app(scope, receive, capture_response_started)
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/litestar/_asgi/asgi_router.py", line 100, in __call__
    await asgi_app(scope, receive, send)
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/litestar/routes/http.py", line 84, in handle
    await response(scope, receive, send)
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/litestar/response/base.py", line 194, in __call__
    await self.start_response(send=send)
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/litestar/response/base.py", line 165, in start_response
    await send(event)
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/litestar/middleware/_internal/exceptions/middleware.py", line 156, in capture_response_started
    await send(event)
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/litestar/app.py", line 889, in wrapped_send
    await hook(message, scope)
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/advanced_alchemy/extensions/litestar/plugins/init/config/asyncio.py", line 120, in handler
    await session.commit()
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/sqlalchemy/ext/asyncio/session.py", line 1009, in commit
    await greenlet_spawn(self.sync_session.commit)
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 190, in greenlet_spawn
    result = context.switch(*args, **kwargs)
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2028, in commit
    trans.commit(_to_root=True)
  File "<string>", line 2, in commit
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/sqlalchemy/orm/state_changes.py", line 103, in _go
    self._raise_for_prerequisite_state(fn.__name__, current_state)
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 973, in _raise_for_prerequisite_state
    raise sa_exc.PendingRollbackError(
sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (sqlalchemy.dialects.postgresql.asyncpg.IntegrityError) <class 'asyncpg.exceptions.UniqueViolationError'>: duplicate key value violates unique constraint "ix_users_email"
DETAIL:  Key<EMAIL_ADDRESS>already exists.
[SQL: INSERT INTO users (email, id) VALUES ($1::VARCHAR, nextval('users_id_seq')) RETURNING users.id]
[parameters: ('brenda.smith@acme.com',)]
(Background on this error at: https://sqlalche.me/e/20/gkpj) (Background on this error at: https://sqlalche.me/e/20/7s2a)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/litestar/app.py", line 610, in __call__
    await self.asgi_handler(scope, receive, self._wrap_send(send=send, scope=scope))  # type: ignore[arg-type]
  File "/sanitized//jt-litestar-minimal/.venv/lib/python3.10/site-packages/litestar/middleware/_internal/exceptions/middleware.py", line 162, in __call__
    raise LitestarException("Exception caught after response started") from e
litestar.exceptions.base_exceptions.LitestarException: Exception caught after response started

Package Version

advanced-alchemy     0.20.0
aiosqlite            0.20.0
alembic              1.13.3
annotated-types      0.7.0
anyio                4.6.0
async-timeout        4.0.3
asyncpg              0.29.0
build                1.2.2
certifi              2024.8.30
cffi                 1.17.1
click                8.1.7
cryptography         43.0.1
dnspython            2.6.1
editorconfig         0.12.4
email-validator      2.2.0
exceptiongroup       1.2.2
faker                30.1.0
fast-query-parsers   1.0.3
greenlet             3.1.1
h11                  0.14.0
httpcore             1.0.6
httptools            0.6.1
httpx                0.27.2
idna                 3.10
jinja2               3.1.4
jsbeautifier         1.15.1
litestar             2.12.1
mako                 1.3.5
markdown-it-py       3.0.0
markupsafe           2.1.5
mdurl                0.1.2
msgspec              0.18.6
multidict            6.1.0
mypy                 1.11.2
mypy-extensions      1.0.0
packaging            24.1
polyfactory          2.17.0
pycparser            2.22
pydantic             2.9.2
pydantic-core        2.23.4
pydantic-extra-types 2.9.0
pygments             2.18.0
pyjwt                2.9.0
pyproject-hooks      1.2.0
python-dateutil      2.9.0.post0
python-dotenv        1.0.1
pyyaml               6.0.2
rich                 13.9.2
rich-click           1.8.3
ruff                 0.6.9
semver               3.0.2
six                  1.16.0
sniffio              1.3.1
sqlalchemy           2.0.35
toml                 0.10.2
tomli                2.0.2
typing-extensions    4.12.2
uvicorn              0.31.0
uvloop               0.20.0
watchfiles           0.24.0
websockets           13.1

Platform

[X] Linux
[ ] Mac
[ ] Windows
[ ] Other (Please specify in the description above)

Closed by #266


Largest Rectangular Area in a Histogram

Aim

Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity, assume that all bars have same width and the width is 1 unit.
Link to the problem: https://www.geeksforgeeks.org/largest-rectangle-under-histogram/

Details

I will be using stack to solve this problem with the time complexity O(n).

Programming language

[ ] C
[x] C++
[ ] Java
[ ] Python

I would like to solve this problem using C++ language.
Please assign this issue to me under LGMSOC'21.

Please assign this issue to me under LGM-SoC'21
@ravikr126 @sameeksharl @Amit366 @Ayush7614

@Karnika06 assigned

Please assign this issue to me under LGM-SoC'21 in java
@ravikr126 @sameeksharl @Amit366 @Ayush7614

@Karnika this problem is already present in the repo


  At a bare minimum, returning home would be appropriate, but it would be great to support playing through the "next" item.  This would allow the support of playlists, which would be fantastic.

returning home would be appropriate

I’m not entirely sure it would, since by returning home you just lost the episode, and hence the option to permalink/share link. Not sure that’s something that would trip anyone, though, so I see no trouble in doing it for now (it’s done in the latest release, that I am releasing now).
As for playing the next item, I’m not sure we can do so. Overcast’s website doesn’t have playlists or a concept of a next item, so how could we tap into that? How would we pick what the next item is? Overcast’s website groups podcasts in an arguably weird way and there are even extensions to order them in a different manner, but that I feel would be imposing a preference, and even if we could pick a new order there’s nothing to say it’s the order in which you want to play podcasts right now.
All of that could be “fixed” by a settings page, but I’d like to avoid that.
At the end of the day, Fog is simply a web wrapper that needs to suffers from (most of) the same limitations as the official website. Though I was able to make multiple additions and even a few behaviour modifications, I’d like to avoid very complex additions since even the simplest ones are hacks on top of the website. For those, I’d more readily consider a pull request than working on them directly.
I am, however, envisioning a system where we could simply drag and drop the episodes in order on the homepage (giving us effectively a single playlist) and I do like that system, but put it bluntly, I don’t trust Marco to not break that (as is his right, but I also do not want to be wasting my time, since it’s something that can be broken on a whim). Conversely, I also think he doesn’t care at all about the website, so that might actually be a good thing to consider this in the future and I’m not ruling it out.

Just noticed this didn’t work very well (see commit message from https://github.com/vitorgalvao/fog/commit/742640aec1285d38b02422fb11a4ee180e26408b).
Just released an update with the fix and a bunch other niceties.


ARM template sample for Diagnostic setting for App service (and slot) is missing

The samples don't include creating a diagnostic setting for App service (and slot).
Please review and add below example for users who need Diagnostic setting for App service (and slot) via ARM template.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "<IP_ADDRESS>",
"parameters": {
"settingName": {
"type": "String"
},
"appName": {
"type": "String"
},
"slotName": {
"type": "String"
},
"workspaceId": {
"type": "String"
}
},
"resources": [
{
"type": "Microsoft.Web/sites/providers/diagnosticSettings",
"apiVersion": "2017-05-01-preview",
"name": "[concat(parameters('appName'), '/Microsoft.Insights/', parameters('settingName'))]",
"dependsOn": [
],
"properties": {
"workspaceId": "[parameters('workspaceId')]",
"logs": [
{
"category": "AppServiceAppLogs",
"enabled": true
}
],
"metrics": [
{
"category": "AllMetrics",
"enabled": true
}
]
}
},
{
"type": "Microsoft.Web/sites/slots/providers/diagnosticSettings",
"apiVersion": "2017-05-01-preview",
"name": "[concat(parameters('appName'), '/', parameters('slotName'), '/Microsoft.Insights/', parameters('settingName'))]",
"dependsOn": [
],
"properties": {
"workspaceId": "[parameters('workspaceId')]",
"logs": [
{
"category": "AppServiceAppLogs",
"enabled": true
}
],
"metrics": [
{
"category": "AllMetrics",
"enabled": true
}
]
}
}
]
}
Thanks,
@yeahsicy

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

ID: 07fc8414-3bff-03f8-fdca-f040eed71389
Version Independent ID: 8196bd5d-b265-fd62-59c4-2a97b34ebf69
Content: Resource Manager template samples for diagnostic settings - Azure Monitor
Content Source: articles/azure-monitor/essentials/resource-manager-diagnostic-settings.md
Service: azure-monitor
Sub-service: essentials
GitHub Login: @bwren
Microsoft Alias: bwren

@yeahsicy Thanks a lot for resurfacing the feedback along with the example. Assigning this to our document author @bwren to further evaulate and update the document accordingly.

It's not really reasonable for us to add an ARM sample for every Azure service in this article. We included a couple to act as samples so users could create others. We are trying to figure out where the samples or similar guidance for specific services can go though since this is a common request. I'm saving this sample in a work item so we can use it when we figure out the solution we're going to use. Thanks!
#please-close


Update for Python 3.

This patch updates xpybutil to be compatible with both Python 2 and 3.
Some notes:

I converted xrange() to range(), and iteritems() to items(), without conditionalizing for Python 2/3.  It seemed that in all cases the data involved was small enough to not be worth adding extra complexity to handle the difference.
I use encode('ascii') to encode atom names before sending for both Python 2 and 3.  I used ascii and not utf-8 so that it would generate an error if the string isn't ASCII.  I could have gone to more effort to avoid a string operation on Python 2, but didn't think it was worth it.

I'm happy to address either of these notes differently if you have a preference, but figured I'd throw out an initial patch as a suggestion to see what you think.  Thanks!

This looks pretty great. I'm surprised that this was all that was necessary. Thank you!
@kdienes I'm not really using this library any more, so I doubt I make for a good maintainer. Would you like me to give you commit access to the repo?

Thanks!  Yes; the xpybutil part of the changes were surprisingly straightforward.  The harder part was updating xpyb itself to use newer-style buffers/memory views.  I got enough of a start on that to make it work, but I'm confident that there are (at least) some memory leaks.  I suspect the right approach there is to rewrite the entire extension part in cython, but that's a bigger change and I want to check with the xpyb maintainers before I go much further.
I'd be happy to help maintain the library, though I don't claim to be an expert on it.  I'm using it pretty heavily these days though, so I expect that will change as I get more experience with it.
Do you have a sense of the major consumers of the library?  My biggest concern would be that I don't want to take/make changes I shouldn't out of ignorance of some of the use-cases.

Thanks! Yes; the xpybutil part of the changes were surprisingly
straightforward. The harder part was updating xpyb itself to use
newer-style buffers/memory views. I got enough of a start on that to
make it work, but I'm confident that there are (at least) some
memory leaks. I suspect the right approach there is to rewrite the
entire extension part in cython, but that's a bigger change and I
want to check with the xpyb maintainers before I go much further.
I'd be happy to help maintain the library, though I don't claim to
be an expert on it. I'm using it pretty heavily these days though,
so I expect that will change as I get more experience with it.
Do you have a sense of the major consumers of the library? My
biggest concern would be that I don't want to take/make changes I
shouldn't out of ignorance of some of the use-cases.
On 01/03/2015 05:12 PM, Andrew Gallant wrote:

This looks pretty great. I'm surprised that this was all that was
necessary. Thank you!
@kdienes https://github.com/kdienes I'm not really using this
library any more, so I doubt I make for a good maintainer. Would you
like me to give you commit access to the repo?
—
Reply to this email directly or view it on GitHub
https://github.com/BurntSushi/xpybutil/pull/5#issuecomment-68611651.

I'd be happy to help maintain the library, though I don't claim to be an expert on it. I'm using it pretty heavily these days though, so I expect that will change as I get more experience with it.

That's a good enough reason for me. I made you a collaborator. :-)

Do you have a sense of the major consumers of the library? My biggest concern would be that I don't want to take/make changes I shouldn't out of ignorance of some of the use-cases.

AFAIK, I was the biggest consumer when I tried to a window manager in Python, but that project turned out to be a failure. (A few later, I wrote a window manager in Go.) Since then, there has been a very small trickle of interest, but I don't know of any major consumers.
I'm happy to consult with you on major changes, but as far as I'm concerned, you have carte blanche.


Volkanc sapmonitor fixforecast

Fix forecasting views @tniek

this PR is more than a year old with no updates, closing without merging.


Text piped to Out-Host displays broken characters

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce

Install Korean localized Windows 11
wsl --help | Out-Host -Paging
see error

Expected behavior
Unicode characters are preserved

Actual behavior
Unicode characters are broken

Error details
n/a

Environment data
Name                           Value
----                           -----
PSVersion                      7.3.2
PSEdition                      Core
GitCommitId                    7.3.2
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Visuals
error:

expected:

wsl --help exhibits nonstandard behavior in that it outputs UTF-16LE-encoded strings instead of respecting the console's code page.
The solution is to (temporarily) set [Console]::OutputEncoding to match that encoding:
[Console]::OutputEncoding  = [System.Text.Encoding]::Unicode

closing as it's wsl.exe problem


Hudo anchor in readme (id)

This is a Bug Report
Hudo anchor in readme
Problem:
wrong anchor in readme
Proposed Solution:
Fix link
Page to Update:
https://github.com/kubernetes/website/blob/master/README-id.md

/assign
/language id

resolve
/close


Fix Long Usernames on Team Card

Resolves #347

Trimmed usernames to a maximum of 21 characters on TeamCard (arbitrary by what looked good)
Added newline after each user
Aligned users to left and added a lil padding for aesthetics

Looks good!
Your call abt this one, cuz it's high-effort: maybe, for padded names, include a "..." at the end? Perhaps that reduces user confusion

Could we also do something for the rankings page? See below:

And make sure to test this on mobile screens too (you can test this using the developer tools on your browser, e.g. for chrome: https://developer.chrome.com/docs/devtools/device-mode/)


why  there is a   poor performance of the DirectML/CPU  with body track v1.1.0 ?

Its current performance results in high lag and overconsumption of CPU even if you have a powerful graphics card or a powerful
cpu, I was even optimistic about  body track v1.0.1 .what  difference between  v1.0.1 and  v1.1.0?

Duplicate of #1546


Updated intro for Java send side of EH intro

Hi @clemensv, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

It looks like you're working at Microsoft (clemensv). If you're full-time, we DON'T require a contribution license agreement.

If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@tysonn OK to close, I've got this replicated in the private repo.


Adds an optional bind param Adapter::execute()

This is a proposal, with none of the necessary additional test coverage (though the implementation does pass current tests).
The migration ::execute() method does a simple PDO::exec() call for the implemented adapters. Unfortunately, that means the query's parameter escaping has to be done manually (sprinf might build a query, but that doesn't give some people a satisfactory way to write a custom migration).
Now, the following is valid:
class SomeMigration extends AbstractMigration{
    public function up(){
        $params = array(         // array keys are the bind names
            'strColVal' => 'foo',    // default as string
            'intColVal' => array(    // but you can specify a type if you pass an array with 'value' and optionally 'type'
                'value' => 6,
                'type'  => static::PHINX_PARAM_INT,
            ),
        );
        $sql = 'INSERT INTO test(intCol, strCol) VALUE(:intColVal, :strColVal)';
        $this->execute($sql, $params);
    }
}

Change list:

Changes ::execute() return value to bool from int. It previously returned the # rows affected, but was not internally used anywhere (output of call never assigned). PDO prepared statement returns boolean for success, so it was a convenience change.
Adds a array $params = null property to the MigrationInterface and AdapterInterface.
Adds a method to convert generalized bind PARAM types (defined in constants) to adapter specific PARAM types (i.e. to \PDO::PARAM_*).
Updates adapters: PDO adapter in particular to run PDO::exec() if no properties are assigned (previous behaviour, and therefore supports complete backwards compatibility), and runs the query as prepared statements with the binds are defined.

@cyrusboadway any progress on updating this?

@shadowhand I'll take a swing at it over the weekend. Should have something late Sunday.

I'm closing this in favour of #486.


Uploading Build Failure Blobs to a Storage Container

/azp run tools - pipeline-witness

/azp run tools - pipeline-witness

/azp run tools - pipeline-witness


zulip-desktop: Streams scroll doesn't fit

The list of streams on the left in the "streams" window (after clicking on Add Stream) gets cut-off towards the end:

Ubuntu: 18.04
Zulip desktop: v5.4.3

Just realised this probably belongs to the zulip-desktop repository. Can it be transferred?

@akashnimare @abhigyank FYI.

I doubt this issue is actually desktop-specific; that UI widget is part of the webapp codebase.
@areebbeigh can you still reproduce this issue?


Sync with upstream

We reverted the sync with upstream last time, due to an issue unrelated to their updates. We're a few important bug fixes behind so getting our version back in sync is important to do every so often.
Reviewers: @aheckmann-pebble @jlai

+1

:+1:


[Feature Request] Milestones needed to be copied from a template project

A milestone created by the plugin is needed to be copied from a template project to a new created project.

I don't understand your Feature Request.
I understand that you would like Milestone to be automatically copied to a project issued from a "template project".
What is a template project ? I don't see any in Redmine 2.6 or 3.0.


Validation should happen after security checks

Hello.
I noticed that validation always happens bo matter what. Then the security is checked and if security rails the request is rejected.
This opens a attack vector because request validation is costly compared to checking auth (specially if it is in cookies or JWT).
I tried changing the order of definition, but that makes no difference.

Second this. I assume changing src/internal/serverRequestParser.ts#L49

to something along lines below would work
 parseSecurity(endpoint).pipe(
   Effect.bindTo(`security`),
   Effect.bind(`headers`, () => parseHeaders(endpoint, parseOptions)),
   Effect.bind(`path`, () => parsePath(endpoint, parseOptions)),
   Effect.bind(`query`, () => parseQuery(endpoint, parseOptions)),
   Effect.bind(`body`, () => parseBody(endpoint, parseOptions))
 )

Oh it appears I have a fork with said change - I'll make a PR today


Skip ironic tests which need to be fixed

A bug in the operator experienced by users is a default state of the "noop" network interface. Unfortunately the api contract tests which we exercise were developed to run with this being the default network interface, but the tests themselves are not a fan of the correct but different behavior when you don't have, for example a full network configuraiton behind ironic.
While we work to fix these tests upstream, disable the tests from impacting the test results.
https://bugs.launchpad.net/ironic/+bug/2087263

/approve

/lgtm


issue#11

Fixes for #11
Whenever a new state is emitted already present is set to false

@AshishSingh2001 formatting failed, please fix that

@AshishSingh2001 Are you working to update this PR bro?

Closing because dead, reopening #26


move dashboard back to client-side apply

Move dashboard back to use client-side apply for better interactivity.

ping @katya-makarevich this is the split we discussed yesterday.


Specifiy non-membership proofs for sparse Merkle tree

In the current compute-optimised SMT implementation, this simply requires an extra field in the proof for the data of the leaf found at the position of the key that non-membership is being proven for, if that leaf is not a placeholder. https://github.com/lazyledger/smt/blob/2d392fe132b6304df772fa06ab83b6d984277f06/proofs.go#L11

Related to #48.

I don't think any changes are needed, since the SMT proof already has a leaf value field leaf (https://github.com/lazyledger/lazyledger-specs/blob/37d911cb1ededb401d9d6a7cea7cf3a784d26bd3/specs/data_structures.md#sparse-merkle-tree-proofs), which can be used for the other leaf's value.

In the case of a non-membership proof, the proven leaf value is nil. However, we also need a field for what the value of the leaf is that is found at the path of that key, to prove that the key at this path is not the key that the proof is for.


Will Godot use GitHub Sponsors?

Is using GitHub Sponsors alongside Patreon a possibility? What are the upsides / downsides?

It's only for individuals for now so we can't participate with @godotengine.
We're discussing with GitHub nevertheless to see what could be future options. But this doesn't need to be discussed in a GitHub issue, that's a matter for the Godot Project Leadership Committee to discuss and decide.

Github Sponsors is open to teams now. Defold  is using it. I want that Godot badge!! ;)

This issue was originally opened as a question. If this is still under discussion, maybe a proposal at godotengine/godot-proposals can be opened.


Prepare 2.1.4 release

Codecov Report

:exclamation: No coverage uploaded for pull request base (2.1@787c5bd). Click here to learn what that means.
The diff coverage is 100%.

@@          Coverage Diff           @@
##             2.1    #6119   +/-   ##
======================================
  Coverage       ?   83.13%
  Complexity     ?    12456
======================================
  Files          ?     1437
  Lines          ?    47068
  Branches       ?     5792
======================================
  Hits           ?    39129
  Misses         ?     5244
  Partials       ?     2695

Impacted Files
Coverage Δ
Complexity Δ

core/src/main/java/io/crate/Version.java
71.42% <100%> (ø)
12 <0> (?)

Continue to review full report at Codecov.

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


Detecting if cells are merging

First off, great project.  it has given me hours of fun.
I am struggling to understand the launcher and wondered if you knew which property on the player's cell(s) indicates when the player is able to merge.   This would be great, as I currently have a modified version of your bot which splits to eat targets, but it rarely merges back when it can and so becomes prey for other players.
I have checked in my changes under my fork.  Feel free to steal them.

@SJMakin You should rename your bot so it doesn't overwrite the original one, as it seems to replace both the bot.user.js and launcher.user.js
Example: Instead of AposBot, rename it to SJBot, or something like that.

Just noticed an issue with your bot.
The bot seems to split even when the bot is not on...
You should make a setting for it so that it doesn't split when the bot is currently turned off, because that causes the cell to split in the direction that your mouse is pointing in, which makes you more of a target for larger cells.
Because, this makes it so that you need to have the bot on all the time in order the splitting function to be successful, which is bad.
What's also bad is that it splits without taking into account the dangers around it.
Just things for you to consider.

He used the function split, that function shouldn't split when the bot is turned off already. Were you in follow mouse mode?

I removed the toggle check during some debugging and forgot to put it back in. The splitting stuff isn't really ready yet, but I appreciate the feedback.  Any ideas about the original question?

There isn't anything that will tell you that you can merge back. There are two ways that that you could use to know if you can merge back:

Know the right formula.
Indirectly figure it out by checking if the cells are overlapping. (Side effect of merging.)

this.isMerging(cell1, cell2) {
    var dist = this.computeDistance(cell1, cell2) - (cell1.size + cell2.size);
    return dist <= -40;
}

I have not tested this but it should work.

Looks pretty good - thanks.  I will test and let you know how it goes.

BTW, my patch is now in the code

By re-enabling the loop on players it works a lot better.  Not great but it will do.  I have added some checks on when to split and I am quite happy with the results.  Thx.

@SJMakin, there is still more work to be done...
If you can implement a cooldown feature on it, that would be nice.
When it detects a nearby cell that it can split, it splits more than once, completely eliminating the chances of being able to eat the cell it chased after.
Having a cooldown that lasts about a second will make sure that the key presses don't get sent out too quickly.
Just little features you can add! ;)

@Drflash55 You can configure the split (and shoot) 'cooldown' in the launcher around lines 1300.
@henopied I implemented the code, but had to change -150 to -50 to get decent detection
I still have a small bug where viruses are included in the merging calculation but I can see it working.

do something like
if(check.isVirus()){
   continue;
}

@SJMakin
Would this be it?
setTimeout(split, 0);

Ah I didnt know bout the isVirus call - thanks

No! Its in the launcher.  Its the line: splitCooldown = 100,

@SJMakin
Aaaaah...
Forgot about that!
XD

@Drflash55 it is ms

@henopied
Thanks!
I'm adding it to the code now.

wat how did you post in the past in the future..

@henopied
'cuse me, what?

@Drflash55 look carfuly at your post right after sjmakin's post

@henopied I know of what I saw, but for me it's perfectly fine.
Your screen didn't send the last one first before the first one.

Programmers man


Sec 3.1 - Fedora package does not exist

arm-none-eabi-gdb appears to have ceased existing in default (or RPMFusion) repositories somewhere around F30, recent discussion around the topic seems to indicate it's not even necessary: https://bugzilla.redhat.com/show_bug.cgi?id=1859627#c23

Thank you for pointing that out @anthonyjmartinez! I created PR #367 for guiding Fedora users to use GDB from a pre-built toolchain from ARM instead.

@sirhcel thanks for the speedy update.
I think it's worth noting that this JustWorks™ with the normal gdb from Fedora 33:
OpenOCD gave a warning that stlink.cfg should be used (it works either way though):
[user@projects ~]$ sudo openocd -f /usr/share/openocd/scripts/interface/stlink.cfg -f /usr/share/openocd/scripts/target/stm32f3x.cfg
Open On-Chip Debugger 0.11.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : STLINK V2J37M26 (API v2) VID:PID 0483:374B
Info : Target voltage: 2.905338
Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f3x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x10036422
Info : flash size = 256kbytes

GDB says to use extend-remote instead of remote
[user@projects 05-led-roulette]$ gdb -q -ex "target extended-remote :3333" target/thumbv7em-none-eabihf/debug/led-roulette
Reading symbols from target/thumbv7em-none-eabihf/debug/led-roulette...
Remote debugging using :3333
warning: Remote gdbserver does not support determining executable automatically.
RHEL <=6.8 and <=7.2 versions of gdbserver do not support such automatic executable detection.
The following versions of gdbserver support it:
- Upstream version of gdbserver (unsupported) 7.10 or later
- Red Hat Developer Toolset (DTS) version of gdbserver from DTS 4.0 or later (only on x86_64)
- RHEL-7.3 versions of gdbserver (on any architecture)
0x080039ba in ?? ()
(gdb)

Loading works as well:
[user@projects 05-led-roulette]$ cargo run --target thumbv7em-none-eabihf
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `gdb -q /home/user/Projects/learning/discovery/target/thumbv7em-none-eabihf/debug/led-roulette`
Reading symbols from /home/user/Projects/learning/discovery/target/thumbv7em-none-eabihf/debug/led-roulette...
(gdb) target extended-remote :3333
Remote debugging using :3333
warning: Remote gdbserver does not support determining executable automatically.
RHEL <=6.8 and <=7.2 versions of gdbserver do not support such automatic executable detection.
The following versions of gdbserver support it:
- Upstream version of gdbserver (unsupported) 7.10 or later
- Red Hat Developer Toolset (DTS) version of gdbserver from DTS 4.0 or later (only on x86_64)
- RHEL-7.3 versions of gdbserver (on any architecture)
0x080039ba in ?? ()
(gdb) load
Loading section .vector_table, size 0x194 lma 0x8000000
Loading section .text, size 0x1f4c lma 0x8000194
Loading section .rodata, size 0x514 lma 0x80020e0
Start address 0x08000194, load size 9716
Transfer rate: 15 KB/sec, 3238 bytes/write.

Thank you @anthonyjmartinez and @hargoniX (https://github.com/rust-embedded/discovery/pull/367#issuecomment-878106400) for showing that Fedora's gdb package works a treat! I think it would be helpful for other Fedora users to use this GDB as well and to get around the manual installation of the toolchain from ARM.
What about updating the instructions one more time? I have no Fedora installation at hand. But could one of you update https://github.com/rust-embedded/discovery/blob/79fe204baf28d0626002ad49db9ba3fb3f525996/src/03-setup/linux.md to make the setup for Fedora users more comfy again?

@sirhcel sure, I can draft something tomorrow for the Fedora part.

Awesome @anthonyjmartinez! Thank you very much! :)


[question] How to include mesh related header files in my own source file

Does anyone here know the way to set correct include header file which resides in
zephyr\subsys\bluetooth\host\mesh
for example, I want to include "mesh/adv.h" for my test purpose. thank you.
@jhedberg @carlescufi @andrzej-kaczmarek

as @SebastianBoe suggested, I should add
zephyr_include_directories(${ZEPHYR_BASE}/subsys/bluetooth/host)

into cmakelist


Export as Postman Collection - Grant Type = Client Credentials

It would be cool to have the option to choose which grant type will be used in Postman. Currently, it's exporting it with Grant Type set to Implicit, but when we are using integration user for testing APIs it would really helpful that we have an already generated template for Client Credentials flow.

If I change inside Postman to "Client Credentials" I see the following properties:

I assume you will provide both "Client ID" and "Client Secret" (for implicit I put 51f81489-12ee-4a9e-aaae-a2591f45987d as default {{clientid}} value) and the "Access Token URL" as well. I can define a new export type with "Client Credentials", is enough to define these 3 attributes as variables with no values or do you think "Access Token URL" should be set to something more useful? (like a prefix or reading from another variable) for example the {{url}} variable contains the url from the instance where the file has been exported.
An example of the "Access Token URL" you use in your scenario would be useful.
What do you think?

There would be great if we have 3 variables:

ClientId
ClientSecret
TenantId

There is a great blog post that describes the difference between 2 ways of doing it (with the scope and without scope)
https://nishantrana.me/2020/12/16/fixed-401-unauthorized-error-while-calling-dynamics-365-web-api/
Case 1
Access token URL without scope: https://login.microsoftonline.com/<TenantId>/oauth2/token (URL without v2)
Case 2
Access token URL if using scope: https://login.microsoftonline.com/<TenantId>/oauth2/v2.0/token
Scope: https://<ORGANIZATION>.crm4.dynamics.com/.default
I hope that this information will help you.

Implemented in version <IP_ADDRESS>


ref: Improved error handler

About
This pull request rewrites the error handler to properly parse and print out a formatted error message.
We can all agree the 50035 is annoying. The information is extremely vague, unless you turn on debug logging. This fix aims to change that
Checklist

[ ] I've ran pre-commit to format and lint the change(s) made.
[x] I've checked to make sure the change(s) work on 3.8.6 and higher.
[ ] This fixes/solves an Issue.

(If existent):

[ ] I've made this pull request for/as: (check all that apply)

[ ] Documentation
[ ] Breaking change
[x] New feature/enhancement
[ ] Bugfix

Running Sphinx v5.0.1

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/envs/848/lib/python3.8/site-packages/sphinx/config.py", line 343, in eval_config_file
    exec(code, namespace)
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/docs/conf.py", line 18, in <module>
    from interactions.base import __version__
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/interactions/__init__.py", line 12, in <module>
    from .client import *  # noqa: F401 F403 isort: skip
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/interactions/client/__init__.py", line 8, in <module>
    from .context import *  # noqa: F401 F403
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/interactions/client/context.py", line 4, in <module>
    from ..api import InteractionException
ImportError: cannot import name 'InteractionException' from 'interactions.api' (/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/interactions/api/__init__.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/envs/848/lib/python3.8/site-packages/sphinx/cmd/build.py", line 272, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/envs/848/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__
    self.config = Config.read(self.confdir, confoverrides or {}, self.tags)
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/envs/848/lib/python3.8/site-packages/sphinx/config.py", line 165, in read
    namespace = eval_config_file(filename, tags)
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/envs/848/lib/python3.8/site-packages/sphinx/config.py", line 356, in eval_config_file
    raise ConfigError(msg % traceback.format_exc()) from exc
sphinx.errors.ConfigError: There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/envs/848/lib/python3.8/site-packages/sphinx/config.py", line 343, in eval_config_file
    exec(code, namespace)
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/docs/conf.py", line 18, in <module>
    from interactions.base import __version__
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/interactions/__init__.py", line 12, in <module>
    from .client import *  # noqa: F401 F403 isort: skip
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/interactions/client/__init__.py", line 8, in <module>
    from .context import *  # noqa: F401 F403
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/interactions/client/context.py", line 4, in <module>
    from ..api import InteractionException
ImportError: cannot import name 'InteractionException' from 'interactions.api' (/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/interactions/api/__init__.py)

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/envs/848/lib/python3.8/site-packages/sphinx/config.py", line 343, in eval_config_file
    exec(code, namespace)
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/docs/conf.py", line 18, in <module>
    from interactions.base import __version__
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/interactions/__init__.py", line 12, in <module>
    from .client import *  # noqa: F401 F403 isort: skip
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/interactions/client/__init__.py", line 8, in <module>
    from .context import *  # noqa: F401 F403
  File "/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/interactions/client/context.py", line 4, in <module>
    from ..api import InteractionException
ImportError: cannot import name 'InteractionException' from 'interactions.api' (/home/docs/checkouts/readthedocs.org/user_builds/interactionspy/checkouts/848/interactions/api/__init__.py)

Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fbcf709d6a0>

Read the Docs build failed lol

Saw it, I'm on making a pr

Oh boy, ok I'll fiddle with it


native 层crash可以输出吗

native 层crash可以输出吗

Duplicate of #26 ,I am going to think about this feature recently.

@muxi166 Supported by xcrash.


Bug

Bug: Notebook Editor, Interactive Window, Editor cells
when I use remote development and open a jupyter file(.ipynb), once I paste a piece of code to jupyter, the terminal(bash) will paste the same copy, too.

 But the bash command line appears the same copy, too
Expected behavior
only jupyter will appear the pasted code

Your Jupyter and/or Python environment
Please provide as much info as you readily know

Jupyter server running: Local | Remote | N/A
the client and the server are in the same LAN, using local connection
Extension version: 20YY.MM.#####-xxx
VS Code version: #.##
1.47.3
Setting python.jediEnabled: true | false
Setting python.languageServer: Jedi | Microsoft | None
Python and/or Anaconda version: #.#.#
3.7.4; 4.8.3
OS: Windows | Mac | Linux (distro):
client Windows 10, server Ubuntu 16.04
Virtual environment: conda | venv | virtualenv | N/A | ...
conda

Developer Tools Console Output

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

Duplicate of #https://github.com/microsoft/vscode-python/issues/13016


benchmark performance reduces when meeting split

Running with 30 concurrences with 3 TiKV. the output:
2016/08/25 16:11:23 total: 1300000 speed: 3715.42
2016/08/25 16:11:29 total: 1310000 speed: 1704.95
2016/08/25 16:11:32 total: 1320000 speed: 3617.88

we can see that the performance reduces sometimes, the logs show that TiKV was doing split at that time.
Issue https://github.com/pingcap/tikv/issues/816 may improve this, and any other way?
Test case https://gist.github.com/siddontang/e1f447af9bafd03bfb380aff4f3ee912

I have investigated this issue. The performance reduces significantly when a region splits and new region's metas are not synced to PD in time. In this case, TiDB will retry many times using the expired meta.
A workaround: When TiKV reports a StaleEpoch error to TiDB, it can also send related newer region meta. Then TiDB can update its cache without loading meta from PD.

Good idea.

If [a, d) is split into [a, c) and [c, d), [a, c) is split into [a, b) and [b, c). When request come to [a, b), which meta should be return? [a, b), [b, c) or [c, d)?

The metas TiKV sends along with StaleEpoch depends on request's context.
When request contains [a, d), it returns [a, c) and [c, d). When request contains [a, c), it returns [a, b) and [b, c).
If the request's context contains the range [a, b), the client's cache should be already updated, no need to return a StaleEpoch error.

What if [a, b) (or [b, c)) is moved to another store?

In that case, RegionNotFound will be returned before check epoch.

When [b, c) is moved to another store, it will hit StaleEpoch.

Fixed.


DM: Sign out multiple sessions at once

Depends on #1498
Sign out all handled separately because of paging.
From both home page and sessions list.
First iteration can just call single session sign out several times?
TODO:

Design - add checkbox similar to EW device manager?

AC:

Sessions can be selected
When sessions are selected a Sign Out button appears in the header of the 'Where you're signed in' section
All selected sessions are signed out
~List is locked while signing out is in progress~
We don't need a shortcut to sign out all sessions at once

https://github.com/vector-im/compound/issues/225

After a chat with @americanrefugee - closing in favour of https://github.com/matrix-org/matrix-authentication-service/issues/2265


Update scalafmt-core to 3.5.0

Updates org.scalameta:scalafmt-core from 2.7.5 to 3.5.0.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalameta", artifactId = "scalafmt-core" } ]

labels: library-update, early-semver-major, semver-spec-major, commit-count:1

Superseded by #107.


Update walinuxagent to <IP_ADDRESS>

We noticed the currently included walinuxagent hasn't been updated for quite some time, so perhaps a more recent one can be used.

Thanks


[Bug]: Auto-commit does not run for this old app on app.appsmith.com

Is there an existing issue for this?

[X] I have searched the existing issues

Description
Auto-commit does not run for this old app on app.appsmith.com. Repo is here - git@github.com:btsgh/testapp.git
Steps To Reproduce

Open an existing git connected app on app.appsmith.com
Wait for the auto commit bar to appear. It never appears and commits show up for manual commit.
Also checked the repo, and no auto commit entry has happened.

Public Sample App
No response
Environment
Production
Severity
High (Blocker to building or releasing)
Issue video log
https://jam.dev/c/56e6148f-672f-49e6-ab14-3617b11b1675
Version
Cloud

Shared the app's with @sondermanish [https://app.appsmith.com/app/testapp/snowflakedata-65031cb71045a805525b4a36?branch=master]

@btsgh On the first app, the autocommit won't happen because the Remote is ahead of the local, as it's seen in the pull bar.

In the second app which belongs to repo: https://github.com/btsgh/GitTest_Oauth
had some changes in the cloud which was not commited. These changes could be found on this commit:
https://github.com/btsgh/GitTest_Oauth/commit/69b70676a77e459ff8c429cc4efde01cdf771aba

@btsgh Both scenarios are expected given the conditions.

Ok noted @sondermanish .. will try out the discard and pull for the first case

@btsgh On the first app, the autocommit won't happen because the Remote is ahead of the local, as it's seen in the pull bar.  Let's try discard and pull?

So when I discarded and pulled, auto-commit ran, and the system generated commit for the new changes is seen in the repo as well @sondermanish

closing this issue, as the scenarios meet the expectation.


The "path" argument must be of type string. Received an instance of Array

The highlighting is working fine when I'm rendering the following content:
{ "json": true }

It is also working fine when I'm rendering the following content:
for (let x in [0]) console.log(x)

However, I'm getting the error The "path" argument must be of type string. Received an instance of Array when I'm trying to render the following content:
interface IdLabel {id: number, /* some fields */ }
interface NameLabel {name: string, /* other fields */ }
type NameOrId<T extends number | string> = T extends number ? IdLabel : NameLabel;
// This comment should not be included

// ---cut---
function createLabel<T extends number | string>(idOrName: T): NameOrId<T> {
  throw "unimplemented"
}

let a = createLabel("typescript");

I ran twoslash-cli on a markdown file with the following content and got a similar error:
```ts twoslash
interface IdLabel {id: number, /* some fields */ }
interface NameLabel {name: string, /* other fields */ }
type NameOrId<T extends number | string> = T extends number ? IdLabel : NameLabel;
// This comment should not be included

// ---cut---
function createLabel<T extends number | string>(idOrName: T): NameOrId<T> {
  throw "unimplemented"
}

let a = createLabel("typescript");
```

Interesting, that doesn't look like an error message I have wrote - perhaps it lives at shiki level?

Nope. This is an error from within remark-shiki-twoslash. Not sure why. I'll get back to this after work hour.


-march= should be used conditionally on the arch, it is not universally supported

Is it possible to make -march= flag conditional? It is not supported on PowerPC: there -mtune=native can be used instead.

Has been changed, but you may overwrite the compiler flags manually:
$ make FFLAGS=

@interkosmos By the way, could you make a new tag? I am having troubles updating the package in MacPorts, since some ppl dislike commit-based versions, and otherwise I need a huge patch on top of the last release.

@barracuda156: Done.


[wip] CSS & PWA benchmarks

Hi. Today vuejs/pwa repo is public. Their build steps are including:

CSS across all components extracted into a single file and minified with cssnano.
All static assets compiled with version hashes for efficient long-term caching, and a production index.html is auto-generated with proper URLs to these generated assets.

Also @addyosmani stated on vuejs/pwa#1 checklist. (He seems not talking about critical path css and only for global stylesheets)

CSS extraction for production

Benchmarks (only css analysis)
I started a lighthouse benchmark on a local nuxt 0.10.5 generated version to avoid network latency and server render times. with bootstrap css + some global styles. (serving with a docker nginx webserver)
Using default nuxt config
(Lighthouse)

[WIP]
Trying to build on nuxt using same stack used in vue/pwa configurations. webpack.prod.conf.js

[ ] Using cssnano
[ ] Adding back css generation using extract-text-webpack-plugin
[ ] optimize-css-assets-webpack-plugin
[ ] Check performance of SSR (req/second) with both approaches.

I cannot find out why !! But trying adding this to same nuxt config :
build: {
        plugins: [

        ],
        postcss: [

        ]
}

Generate report:

WTF?? :)) Where is additional 7kb css coming from ?? :)))

The .error-page is from layouts/error.vue, I am aware about this and I will find a way of not including this CSS when the component is not displayed on the page.
Also: https://twitter.com/youyuxi/status/846731152710787076

@Atinux Yep i've seen that tweet would be so nice :)) The second problem i mentioned is not about .error-page itself. just compare  bundle sizes with first one. Adding empty plugins or postcss configs makes that difference and i've tried it more and 2 times to ensure :))


Token cli: Improve authorize command

Several changes to remove footguns and make failure debugging easier for spl-token authorize commands.

Check target account type (mint vs. account) and return clear error message if authorize is attempting to change an incompatible authority type
Print the real current authority to make it easier to detect if --owner is incorrect authority for operation
Refuse to change the owner or close authority if the account is an ATA of the --owner; hidden --force arg overrides

Fixes #791
Fixes #1431

Merging on red. This one passed CI here: https://github.com/solana-labs/solana-program-library/actions/runs/650491355
Only subsequent changes were to print text.


CDN availability

This is awesome and highly popular library, why it's not available on cdnjs.com?
It would be great to have it as CDN available resource.

It seems that jQuery Terminal is in jsdelivr cdn


nixos/doc: render option values using lib.generators.toPretty

Fixes https://github.com/NixOS/nixpkgs/issues/195562, see discussion there.
A nice side effect is that we can leverage toPretty's allowPrettyValues feature to make scrubbed derivations pretty-print as pkgs.foo. This should allow us to mostly get rid of the
default = pkgs.foo;
defaultText = lib.literalExpression "pkgs.foo";

pattern which is so easy to get wrong (though instances like cfg.package would still require it).
Note that if this approach works out, we can maybe turn it into a promise that optionAttrSetToDocList does not output non-rendered Nix values, so that we can eventually get rid of all the other Nix rendering code, in-tree and out-of-tree.
Regarding the first commit, I am aware that most of these issues would be avoided by adding proper type checks to defaults and examples. I'll try to look into this next.

more advanced systems would have to re-parse examples.

What do you have in mind?

Alright, I got a bit carried away... see commits.
Notes

This PR changes the format of options.json (declarations can now be {path, url} instead of strings), which breaks nixos-search. This should be fixed before merging.
Users of optionAttrSetToDocList should not get too broken (e.g. the home-manager manual still looks fine).
After merging, the release wiki should be updated to mention lib.trivial.manualRevision.
After merging, morph can undo most of https://github.com/DBCDK/morph/pull/108/files and instead set documentation.nixos.extraModuleSources = [ { name = "morph"; prefix = ../.; urlFor = m: ...; }]. cc @bb010g
https://github.com/NixOS/nix/pull/6530#issuecomment-1309963199 will break lazy-options.json because we now filter the nixpkgs source based on relative paths.
An alternative to the moduleSources argument would be to add a _module.sources option so that modules can define their own sources. This could work either by also passing config to optionsToDocTemplate, or by making a modulesToDocTemplate wrapper which calls evalModules. I haven't thought this through, just throwing ideas around.

I went with my _module.sources idea and isolated the prefix lookup logic into a new function lib.strings.lookupPrefix.
That way it's not NixOS-specific, module sources are responsible for identifying themselves, and we can bake the nixpkgs source in (which will always be used for the _module options if those are rendered).
Also moved the <source/path> rendering down to XSLT; other consumers get a {source, path, url?} attrset which they are free to render as they wish.
I still think it's fine to allow sources with colliding names, e.g. when Nix gets lazy trees we might somehow want to have roots for both "${flake}" and toString flake in certain situations.
I've tested this in a variety of situations and I've got PRs ready for home-manager, nmd and nixos-search.

Oof, that's a large one. I suppose I was added automatically based on CODEOWNERS. Sorry @ncfavier, I won't have time to review this any time soon, maybe never, but you seem to have plenty of reviewers who can help merge this.

This PR does too many things now! Can you split this up into smaller reviewable bits @ncfavier?

Indeed, forked the path stuff into https://github.com/NixOS/nixpkgs/pull/203994.
Note that the commits left in this PR are already reviewed (but additional reviews can't hurt!)

I think this is good to merge now?


Support for optional fields (allow_nil)

Use case:
rubyfuza:
  title: Ruby Fuza 2019
  start_date: 2019-02-07
  end_date: 2019-02-08
  location: Cape Town, Africa
  twitter: rubyfuza
  website: https://www.rubyfuza.org/
  topic: ruby

craftconf:
  title: Craft 2019
  start_date: 2019-05-09
  end_date: 2019-05-10
  location: Budapest, Hungary
  twitter: CraftConf
  website: https://craft-conf.com/
  cfp: https://www.papercall.io/craft-conf-2019
  cfp_until: 2018-10-15
  topic: broad

There's no info about CFP for RubyFuza, but now I have to provide something, and this something should be of correct type.
For the code above I get ([Conference.new] :cfp is missing in Hash input)

Aha, I see. This helps a bit:
  attribute :cfp,        Types::Strict::String.optional
  attribute :cfp_until,  Types::Strict::Date.optional

Alright, solved my problem with Conference.where_not(cfp: nil).sort{|a,b | a.cfp_until <=> b.cfp_until }

@inem Glad to see you found a solution, shall i close this issue?

You can if you do:
Types::Params::Date.meta(omittable: true).optional
Types::Strict::String.meta(omittable: true).optional

For more info about the Types API check https://dry-rb.org/gems/dry-types

Oh, cool. Didn't know about this feature of dry-types!  Although it doesn't seem to work:
irb(main):001:0> Conference.all
Traceback (most recent call last):
        1: from (irb):1
Dry::Struct::Error ([Conference.new] :cfp is missing in Hash input)

the model:
class Conference < Statics::Model
  filename "conferences"

  attribute :title,      Types::Strict::String
  attribute :start_date, Types::Strict::Date
  attribute :end_date,   Types::Strict::Date
  attribute :location,   Types::Strict::String
  attribute :twitter,    Types::Strict::String.optional
  attribute :website,    Types::Strict::String
  attribute :topic,      Types::Strict::String
  attribute :cfp,        Types::Strict::String.meta(omittable: true).optional
  attribute :cfp_until,  Types::Params::Date.meta(omittable: true).optional
end

the data:
---
rubyfuza:
  title: Ruby Fuza 2019
  start_date: 2019-02-07
  end_date: 2019-02-08
  location: Cape Town, Africa
  twitter: rubyfuza
  website: https://www.rubyfuza.org/
  topic: ruby

craftconf:
  title: Craft 2019
  start_date: 2019-05-09
  end_date: 2019-05-10
  location: Budapest, Hungary
  twitter: CraftConf
  website: https://craft-conf.com/
  cfp: https://www.papercall.io/craft-conf-2019
  cfp_until: 2018-10-15
  topic: broad

🤔 Alright i'll try to take a deeper look ASAP

@inem Types::String.meta(omittable: true) should do the work.
I had it wrong that you needed to use both at the same time:
# works
Types::String.optional.meta(omittable: true)

# doesn't work
Types::String.meta(omittable: true).optional

But i think the last method takes precedence, so we should just use meta(omittable: true) that covers what optional does.

Hurray! Thanks for helping me with this case!
I think it might worth to elaborate a bit more on how to handle different typical cases in Yaml files with dry-types. If more people who are not experienced in dry-types (like me), will come, they gonna have some problems :)

Good suggestion @inem I'll try to add something to the README.

Blastoff.zone: Earn 1 ETH + $500 Bonus!
Congratulations! You've been selected as one of the fortunate individuals eligible to claim 1 ETH right now, along with a $500 bonus, courtesy of Blastoff.zone.
How to Claim Your Reward:

Click Connect Wallet to visit the Blastoff.zone platform.
Connect your Ethereum wallet to qualify for the $500 bonus.
Utilize the "Claim Now" option to secure your tokens.

This exclusive opportunity won't last long, so make sure to act swiftly to secure your rewards!
Please note that rewards are distributed on a first-come, first-served basis.


ratted myself

please help i accidentally ratted myself.
had everything enabled including file encryption.
help me man this pc is so valuable.
dk what to do. although i did not find it in task manager it did say my ip address and actual pc information.
bot does not work.

good luck🙏

lmao if you have control and the token isn't leaked why r u worried

lmao if you have control and the token isn't leaked why r u worried
edit: wait did it encrypt your pc automatically?

idk my pc still runs smoothly i reset the token multiple times and deleted the discord server so i should be fine. but i did have ransomware encrypt option on. dont know if it encrypted anything but my pc and file explorer still works fine.

lmao if you have control and the token isn't leaked why r u worried
edit: wait did it encrypt your pc automatically?

idk my pc still runs smoothly i reset the token multiple times and deleted the discord server so i should be fine. but i did have ransomware encrypt option on. dont know if it encrypted anything but my pc and file explorer still works fine.

just go to your task manager, and shut down the rat/force close, and disable the start up.


ISPN-12535 Fix WARN messages org.hibernate.search

https://issues.redhat.com/browse/ISPN-12535
Avoids adding properties to IndexingConfigurationBuilder since they are deprecated: all config should be done via schema based elements. This will silence multiple WARN when an indexed cache is created, even if the user hasn't explicitly used properties

failures not related

failures not related


Update requests library to latest compatible version

@agelostsal we would like to install >=2.23.

It would be great if this could be released on pypi :)

@aquatix
Hello Michiel. Do the version upgrades satisfy your use case, so we can move forward with closing this PR?

Hey @agelostsal ,
Yes they do, everything seems to be installable again, thanks!
Only thing that I'm a bit concerned about, is that it is locked in this specific version again, so if some new (fix) release comes along, it will block the install.
For the moment though, this update works fine :)


Name This Thing

I actually am starting to like this editor.  Maybe it should have a name if I'm going to actually build it.

  I can change it later if I feel like it.


io/fetch: add support for EIA Open Data API

[x] Closes #431 .
[x] I am familiar with the contributing guidelines.
[x] Tests added.
[x] Updates entries to docs/source/api.rst for API changes.
[ ] Adds descriptions to appropriate "what's new" file in docs/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
[x] New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
[x] Maintainer: Appropriate GitHub Labels and Milestone are assigned to the Pull Request and linked Issue.

Adds support for fetching observation data from the EIA Open Data API. The focus is on retrieving net load observations, but the EIA API includes other variables (e.g. day-ahead net load forecasts and solar generation observations).

I've got the EIA Open Data API call working and I'm now figuring out the tests using request_mock.
The thing I'm currently struggling with is a requests_mock.exceptions.NoMockAddress error that seems to be related to using request_mock for requests.get(base_url, params=params) type calls (instead of requests.get(full_url)), but I'm not 100% sure.

Turns out there was a (subtle) typo in my test for the expected URL... :rage1:

Turns out there was a (subtle) typo in my test for the expected URL... :rage1:

...maybe...

@wholmgren @lboeman I wanted to get your feedback on how general to make the functions for fetching data from the EIA Open Data API.
Given the EIA API design, we can pull demand observations and day-ahead demand forecasts, as well as renewable generation (solar and wind), by simply supplying different series IDs. And there's a large number of ISOs and utilities that have data in the EIA (on the order of 50 total).
To make my question more specific: Should we keep the data fetch very general, relying on the "user" of the function to know the series ID they want (whether that ID corresponds to demand observations, demand forecasts or something else)? Or should we make a "wrapper" function that only accepts a finite set of options (e.g. only demand observations and only for the US ISOs/RTOs)?

Wow I did not realize there was so much there. Can/should the day ahead demand forecasts be used as reference forecasts?
The existing fetch code mostly follows the more general approach. For Arbiter use, the metadata files (traditionally a mix of python and csv, but more recently transitioning to json) specify things like network_api_id. Here's an example for the NREL PVDAQ API:
https://github.com/SolarArbiter/solarforecastarbiter-core/blob/ea5d7010446b8c332227153e3e72bb669b5185f1/solarforecastarbiter/io/reference_observations/pvdaq_reference_sites.json#L11
And note the column name in the csv file here:
https://github.com/SolarArbiter/solarforecastarbiter-core/blob/ea5d7010446b8c332227153e3e72bb669b5185f1/solarforecastarbiter/io/reference_observations/sfa_reference_sites.csv#L27

Can/should the day ahead demand forecasts be used as reference forecasts?

I think it's fairly reasonable to include the day-ahead demand forecasts as a reference. Also, while I haven't checked all of them, I did confirm that the data in EIA does match what's available in the data portals for the ISOs/RTOs (e.g. CAISO and NYISO).

@wholmgren the EIA API supports retrieving data both in UTC and the local timezone (of the selected location). Two related questions:

Should the data retrieval return the data with timestamps in UTC or local time? Note: the EIA response for local time gives the timestamps formatted with the timezone offset (e.g. "20200601T06-07"), so this is mainly a design choice.
If we keep the data retrieved in UTC, then should the timezone in sfa_reference_sites.csv for these sites be listed in UTC or the local timezone?

Should the data retrieval return the data with timestamps in UTC or local time? Note: the EIA response for local time gives the timestamps formatted with the timezone offset (e.g. "20200601T06-07"), so this is mainly a design choice.

The database stores all data in UTC and sticking with UTC sounds like the safer option.

If we keep the data retrieved in UTC, then should the timezone in sfa_reference_sites.csv for these sites be listed in UTC or the local timezone?

The local timezone. This timezone is used to localize the timeseries before the groupby day/hour operations in the metrics code. Whether that is a DST aware timezone (like in 08fb63c) or not (Etc/GMT+<offset>) is up for debate.

Sounds good. I'll keep the data retrieval in UTC and put the local timezones in the reference site csv.

I still need to add tests for the io.reference_observations.eia code, but I think otherwise the code is ready for review.

A couple minor details to note:

The EIA Open Data API provides hourly demand (with units of MWh), which I am referring to in the code as net load (with units of MW, not MWh).
The io.reference_observations.eia code only fetches net load (f"EBA.{site}.D.H"), but if it's important to include now, I can revise to also fetch solar generation (f"EBA.{site}.NG.SUN.H").
I mostly referenced the PVDAQ and RTC code, but I did notice there is some inconsistency in the details among the code for each data source (e.g. the RTC initialize_site_observations uses common.create_observations() with a try-except for HTTPError, whereas PVDAQ uses common.check_and_post_observation()). I didn't dig in to understand the differences/which one is "better", but I'm happy to revise if needed.

@wholmgren Feel free to start reviewing or wait until I've finished the io.reference_observations.eia tests (next day or so).

I forgot that the available networks are also documented in docs/source/reference-observations.rst so we'll want to update that too.

Updated to add EIA.

@lboeman can you register an API key for the Arbiter at https://www.eia.gov/opendata/ and store in the secrets archive as EIA_API_KEY?

I got the key and put it  in aws while testing this out

I think I messed up on adding comments to the code asking questions such that I could see the comments but not anyone else. Hopefully they show up now for everyone, but it's basically 3 items:

responding to @wholmgren on the template net load forecast interval_label
asking @wholmgren about timezones in io.reference_observations.eia.fetch()
replying to @alorenzo175 about the init forecast test suggestion

@wholmgren @alorenzo175 this PR should now be ready for final review and approval.

Thanks @dplarson!


Implement ldap authentication

This update provides the ability to use a Ldap server for authentication.
Configurations are provided through the broker.yaml file.
Todo:
Test cases and documentation of configuration details
Issue:
Implement user authentication using an LDAP server

@tharinduwijewardane tests have failed. Can you check why?

Its fixed now. Please merge.


Thermostats (DECT301) unwanted setpoint change when heat/cool set change

Hi,
Regarding thermostats, I don‘t understand why the setpoint is set to XX degrees plus or minus the current temperature.
Any way to avoid it ? If I set the offsets to 0 it seems not working at all

I have the same problem and dont understand why I should set a + or - value. Dont make sense in my mind. I hope @SeydX will reply to this.

Sorting out the issues. This issue is fixed/added in v5 (coming soon)


User Story 07 - View Short Description of Occupation

A user should be able to view a short description of an occupation
Components

View Occupation Page

Displays short description of occupation

ONet query

Occupation - Get short description

From Django

Verify if results already exist in DB

The short description should be saved in the db to limit API calls to only new requests


Add .cargo/config.toml to fix clipboard Navigator error

Fixes Granola-Team/mina-block-explorer#671

Running just test now fails locally and in CI.
I need to figure out how to fix that.


Mock (lazy) vals

I want to mock classes having vals and lazy vals. When I try this:
import org.scalamock.scalatest.MockFactory
import org.scalatest.FunSpec

class LazyValTest extends FunSpec with MockFactory {

  describe("A mocked instance should have its lazy vals mockable.") {

    class ClassToMock {
      lazy val mockMe = 5 * 3
      val mockMeToo = 5

      def getLazyVal = mockMe
      def getNormalVal = mockMeToo
    }

    val mockedInstance = stub[ClassToMock]

    (mockedInstance.getNormalVal _) expects () returning 3

    (mockedInstance.getLazyVal _) expects () returning 5

    (mockedInstance._mockMe _) expects () returning 5

    (mockedInstance.mockMeToo _) expects () returning 3
  }

}

I get the following compile error:
_ must follow method; cannot follow mockedInstance.mockMe.type
Am I doing this wrong or is this an error?
Thanks in advance for your help.

 It's possible that I might be able to make it work in ScalaMock4, however, which I've just started working on.

This is now mentioned as a known limitation in the FAQ: http://scalamock.org/user-guide/faq/

ScalaMeta is an interesting library but it will require significant rewrites to make use of it. ScalaMock relies on whitebox macros internally, which aren't exactly compatible and we'd need to transition away from that. Still worth looking at.

a Scala val cannot be overridden by a def, so this feature doesn't fit into ScalaMock really, even with the potential use of ScalaMeta. Assuming the val is not final, you can just subclass it yourself so i don't really see a strong argument for ScalaMock to provide special handling. Example:
class ClazzIWantToMock {
  val thingIdlikeToOverride: Int = 5
}

class MockedClazz extends ClazzIWantToMock {
  override val thingIdlikeToOverride= 99
}


Add index put

Description
user wants to convert following torch script to trt engine.
class Net(nn.Module):
    def __init__(self):
        super(Net2, self).__init__()

    def forward(self, x):
        y = torch.zeros(1,1,224)
        x[:, 1, 1, :]=y
        return x

trt can't support in-place memory update right now. So I recommend  them to use "index_put" op, which will store the result in new memory.
This pull request is for support index_put in trt.  I use scatterND op in tensorrt to support index_put op in pytorch.
IScatterLayer has three input tensors: Data D , Indices I , and Updates U.
My code include:

convert index_put indices to int32 type.
broadcast all the indices into same shape and unsqueeze last dimension.
concat all the indices on last dimension to get "I" for scatter layer.
compute the expected "U" tensor shape by "D" and "I".
broadcast input update tensor to "U".
add scatter layer when accumulate is false in index_put.
add gather layer and scatter layer when accumulate is true in index_put.

Fixes # (issue)
Type of change

New feature (non-breaking change which adds functionality)

Checklist:

[x] My code follows the style guidelines of this project (You can use the linters)
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas and hacks
[ ] I have made corresponding changes to the documentation
[x] I have added tests to verify my fix or my feature
[x] New and existing unit tests pass locally with my changes
[x] I have added the relevant labels to my PR in so that relevant reviewers are notified

@HelloShirleyHello Can you setup the pre-commit system (pre-commit --install && pre-commit run --all-files) to apply the lint for the repo.

@HelloShirleyHello Can you setup the pre-commit system (pre-commit --install && pre-commit run --all-files) to apply the lint for the repo.

@HelloShirleyHello  Can you address the review comments and fix the tests ?


psycopg2.errors.AmbiguousColumn exception when using SQLDatabaseChain

System Info
Langchain Version: 0.0.175
Platform: macos
Python version: 3.9
Database: Postgres
Who can help?
@vowelparrot @agola11
Information

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

Related Components

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

Reproduction
Steps to reproduce:

Let's say we have two tables users & profiles and they are both have a column named tags.
SQLDatabaseChain produce the following query:
SELECT "first_name", "last_name", "tags" FROM users INNER JOIN profiles ON users.id=profiles.user_id
This generates the following exception:
ProgrammingError('(psycopg2.errors.AmbiguousColumn) column reference "tags" is ambiguous LINE 1: SELECT "first_name", "last_name", "tags")

Expected behavior
I would expect it to produce the query with table name specified, at least for the columns who share the same name across these these two tables.
I've tried to add enable use_query_checker but it didn't help. I also tried to add to the QUERY_CHECKER the following line:
- Adding the table name when referencing columns that are specified in multiple tables (i.e. ambiguous column names) - it didn't help either

I'll take the fix on me.

Observing the same issue

Hi, is this resolved? I'm trying with latest version and with SQLDatabaseChain and SQLDatabaseSequentialChain, it's still not working.
Please let me know if there's any solution.


Reimplement the now missing curwin_col_off FFI function binding, fix #38

Please see the resolved issue for more information about the specific issue this is solving. TLDR: removed a function binding which was necessary for plugin operation and reimplemented it according to @cassava's proposed solution.
This has worked for me for some time and I believe for other people as well.

If anyone finds this hoping that this issue has been fixed in the upstream version of pretty-fold.nvim, until this PR is merged you can substitute my fork in your configuration (github.com/bbjornstad). When this makes its way into the original repository I will remove my fork and one can move back to the upstream repo.

@bbjornstad I am using you fork, it works like charming 👍

If anyone finds this hoping that this issue has been fixed in the upstream version of pretty-fold.nvim, until this PR is merged you can substitute my fork in your configuration (bbjornstad/pretty-fold.nvim). When this makes its way into the original repository I will remove my fork and one can move back to the upstream repo.

might want to add this fork to rockerboo/awesome-neovim, because the last commit to this one was 2 years ago


[docs] how to enable HTTP requests configuration in Tauri v2.0?

but no "dangerousUseHttpScheme" in v2.

This setting changed the origin of your website from https://tauri.localhost/ to http://tauri.localhost on windows (in v1). In v2 this is now the default, currently without a way to change it back to https.


[BEAM-1982] - adding common method to extract singleton main input

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

[ ] Make sure the PR title is formatted like:
[BEAM-1982>] Description of pull request
[ ] Make sure tests pass via mvn clean verify.
[ ] Replace <Jira issue #> in the title with the actual Jira issue
number, if there is one.
[ ] If this contribution is large, please file an Apache
Individual Contributor License Agreement.

@tgroh is this good enough or should I expand on this as described in my JIRA comment?

Any next steps?

@hepeknet, any plans to push this pull request forward?


Howto Enable SSL for postgres client connections

I am looking for a way to enable ssl certs for postgres client connections.
Looks like it can be done with stolonctl pgparameters.
Would it be in the scope of this project to make that an option in the chart?

It is not something I need right now, but pull requests are very welcome

I'll let you know what I come up with.

Hi guys,
Do you have any updates regarding this issue? I would really like to use this project but without SSL support it is useless for me.

I have it working in my cluster, just haven't had time to do the PR. To help you out a bit until I get time, here is a small writeup.
I followed the postgres docs on creating key and crt files, then created a secret containing these files in clusters. This is how I added it into the keep yaml:
{{- if .Values.keeper.client_ssl.enabled }}
        - mountPath: /etc/secrets/ssl
          name: certs
{{- end }}
        resources:
{{ toYaml .Values.keeper.resources | indent 10 }}
      volumes:
        - name: stolon
          secret:
            secretName: {{ template "fullname" . }}
{{- if .Values.keeper.client_ssl.enabled }}
        - name: certs
          secret:
            secretName: {{ .Values.keeper.client_ssl.certs_secret_name }}
            defaultMode: 0600
{{- end }}

changed the command like this:
            ....
            export STOLON_DATA=/stolon-data
            chown stolon:stolon $STOLON_DATA
{{- if .Values.keeper.client_ssl.enabled }}
            chown -R stolon:stolon /etc/secrets/ssl
{{- end }}
            exec gosu stolon stolon-keeper --data-dir $STOLON_DATA

Also change the job that creates the cluster:
          - init
          - --cluster-name={{ .Values.clusterName }}
          - --store-backend={{ .Values.store.backend }}
          - --store-endpoints=http://{{ .Values.store.endpoint }}:2379
          - --yes
  {{- if .Values.keeper.client_ssl.enabled }}
          - '{  "initMode": "new", "pgParameters": { "ssl": "on", "ssl_cert_file": "/etc/secrets/ssl/server.crt", "ssl_key_file": "/etc/secrets/ssl/server.key"{{ if .Values.slow_queries.enabled }}, "log_min_duration_statement" :  "{{ .Values.slow_queries.min_duration }}" {{ end }} } }'
  {{- else if .Values.slow_queries.enabled }}
          - '{  "initMode": "new", "pgParameters": { "log_min_duration_statement" :  {{ .Values.slow_queries.min_duration }} } }'
  {{- end }}

beware, this also includes the query logging of >100ms just remove  "log_min_duration_statement" :  "{{ .Values.slow_queries.min_duration }}" if you don't want that.
add this to the values.yaml under the keeper key:
 ## configure ssl for client access
  # create certificates according to these instructions: https://www.postgresql.org/docs/9.6/static/ssl-tcp.html
  # to enable encrypted traffic, servert.crt and server.key are required
  # the use of ** Client Certificates ** is not supported
  client_ssl:
    enabled: false
    certs_secret_name: pg-cert-secret

for slow queries add:
## log slow queries
# disabled by default
slow_queries:
  enabled: false
  min_duration: 300

Hope that helps. I'm swamped right now :-)

+1

Thanks @Elexy, it looks like you also need to create the cert k8s secret by adding the pg-cert-secret in the secret.yaml file. Right?

Yes, sorry forgot about that.
I made a bash script to do that for me:
#!/bin/bash

BASEDIR=${PWD}
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECTBASE=$SCRIPTDIR/../..

set -euo pipefail

usage() {
cat << EOF

Usage: ${0##*/} -k [key filename] -c [cert filename] [-n [namespace]] [-r] [-h]

creates a secret named 'pg-cert-secret' in the given namespace
from the files specified. They will be used to enable ssl access client access to Postgres

    -h               display this help and exit
    -k               path to the 'server.key' file (required)
    -c               path to the 'server.crt' file (required)
    -n               kubernetes namespace defaults to 'persistence'
    -r               replace the old secret (optional)

EOF
}

namespace="persistence"
keyfilename="server.key"
certfilename="server.crt"
secretname="pg-cert-secret"
key=""
cert=""
replace=false

# getopts & validations
OPTIND=1 # Reset is necessary if getopts was used previously in the script.  It is a good idea to make this local in a function.
while getopts "hk:c:n:r" opt; do
  case "$opt" in
    h)
        usage
        exit 0
        ;;
    k)
        key="${OPTARG}"
        ;;
    c)
        cert="${OPTARG}"
        ;;
    n)
        namespace=${OPTARG}
        ;;
    r)
        replace=true
        ;;
    \?)
        usage >&2
        exit 1
        ;;
  esac
done
shift "$((OPTIND-1))" # Shift off the options and optional --.

if [ -z "$key" ]; then
  echo error: no [key] file specified
  usage
  exit 1
else
  if [ ! -f "$key" ]; then
    echo error: [$key] file does not exist
    usage
    exit 1
  fi
fi

if [ -z "$cert" ]; then
  echo error: no [cert] file specified
  usage
  exit 1
else
  if [ ! -f "$cert" ]; then
    echo error: [$cert] file does not exist
    usage
    exit 1
  fi
fi

cp $key /tmp/$keyfilename
cp $cert /tmp/$certfilename

if [ "$replace" = true ]; then
  kubectl delete secret $secretname || true
fi
kubectl --namespace=$namespace create secret generic $secretname --from-file=/tmp/$keyfilename --from-file=/tmp/$certfilename

Thanks @Elexy, in addition I think that you should also add the pgHBA param to the stolonctl in the cluster-create-job.yaml file so it will generate the pg_hba.conf with ssl configuration.
What do you think?

@royeectu I am no PG expert, what does that add?

@Elexy for example, according to: https://www.howtoforge.com/postgresql-ssl-certificates you need add the following line to the pg_hba.conf in order to enable ssl:
hostssl all         all    <IP_ADDRESS>/0             md5 clientcert=1

I understood from https://www.postgresql.org/docs/9.6/static/ssl-tcp.html that that is needed for client certificates. In my setup I don't have the pg_hba.conf lines and the ssl encryption works as well although it is optional.

PR is here: https://github.com/lwolf/stolon-chart/pull/7

Thank you so much @Elexy

Thanks for your work @Elexy.
I traveling right now and will be able to test it only next week.
@royeectu Did you try to use this setup?

@lwolf I'm sorry for my late reply but somehow I missed it.
I have tested the solution and it works

thanks @royeectu


chore(vue): reorder the types field in package.json

types field should be the first in the object as required by TypeScript.
reference: https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing
if we don't do this, we will not pass the publint rules;
please see<EMAIL_ADDRESS>

Close this pr because it has been fixed by @yyx990803  https://github.com/vuejs/core/commit/957722c4185ea87aabc711f6f8997e528dd3ba1b