directives as tuple?

https://github.com/graphql-python/graphql-core-next/blob/b0fa058bacf3913d0af9a75289e241f343c3842a/graphql/type/directives.py#L169
Hi, I'm new to GraphQL and have a quick question. I want to add a custom directive to the default directives including skip and included.
schema = GraphQLSchema(query, directives=specified_directives + [custom_directives])
However, the following TypeError occurs:
can only concatenate tuple (not "list") to tuple
I noticed that graph-core returns a list of these predefined directives, but graph-core-next returns a tuple. Is there a reason for this?

In GraphQL.js which we want to replicate it has the type ReadOnlyArray. Tuple are immutable and therefore a good fit in Python. The intention is that this list should not be accidentally mutated.
Maybe using a subclass of list that is immutable would be better. I'm thinking about it.
Meanwhile, you can pass the directives to the schema as list(specified_directives) + [custom_directives] or as specified_directives + tuple(custom_directives) or as [*specified_directives, *custom_directives].

Made it a list that cannot be modified now (and you can even add a tuple to that list if you want).


Production Deployment

Changes
Features ✨

Add dialog to import colors from other palettes

Bug fixes 🩹

Prevent duplicate color names (generated and manually entered ones)
Delay drag start event on mobile to allow scrolling

Internal 🛠

Add support for custom validators in prompt dialog
Add utilities to filter and map arrays inside observables
Move ColorRangeSlider component to shared feature

Includes

#78

Closes #74

#79

Closes #75

:tada: This issue has been resolved in version 1.5.0-staging.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version 1.5.0-staging.3 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version 1.5.0-staging.4 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version 1.5.0-staging.5 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version 1.5.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


add virtualtime to setup.py install_requires

i didn't realize that requirements.txt isn't recognized for packages.
really, we only need virtualtime for python 2, but based on TravisCI's behavior, it seems like it's fine to install it on python 3.

https://github.com/Sentenai/py-sentenai/commit/faae53dfff2876f031686a717d2db9efa15ac027


Trigger Flowlet

This serries of commits adds support for triggerFlowlet to accurately track cause / effect in the application.

Could you update this PR by resolving the merge conflicts with https://github.com/facebook/hyperion/pull/130?

Could you update this PR by resolving the merge conflicts with #130?

Done


Add Integration Testing

Add Integration Testing for:

AddTaskCommand
DeleteTaskCommand
DeleteMemberCommand
DoneTaskCommand
FindByPriorityCommand
UndoTaskCommand

Codecov Report

Merging #158 (7d12efa) into master (1b118a9) will increase coverage by 0.47%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #158      +/-   ##
============================================
+ Coverage     70.00%   70.47%   +0.47%
- Complexity      589      593       +4
============================================
  Files           104      104
  Lines          1890     1890
  Branches        208      208
============================================
+ Hits           1323     1332       +9
+ Misses          494      486       -8
+ Partials         73       72       -1

Impacted Files
Coverage Δ
Complexity Δ

src/main/java/seedu/address/model/AddressBook.java
92.30% <0.00%> (+5.12%)
18.00% <0.00%> (+1.00%)

...rc/main/java/seedu/address/model/ModelManager.java
100.00% <0.00%> (+8.06%)
29.00% <0.00%> (+2.00%)

...a/seedu/address/logic/commands/AddTaskCommand.java
100.00% <0.00%> (+16.66%)
8.00% <0.00%> (+1.00%)

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 1b118a9...7d12efa. Read the comment docs.


undefined symbol:_Py_Dealloc

When trying to run the training script ./train_ycb.sh on Ubuntu with Python2.7.12, it fails with the stack trace:

set -e
export PYTHONUNBUFFERED=True
export CUDA_VISIBLE_DEVICES=0
python ./tools/train.py --dataset ycb --dataset_root ./data/YCB_Video_Dataset
/home/user/Work/DenseFusion/lib/transformations.py:1912: UserWarning: failed to import module _transformations
warnings.warn('failed to import module %s' % name)
Traceback (most recent call last):
File "./tools/train.py", line 26, in
from lib.loss import Loss
File "/home/user/Work/DenseFusion/lib/loss.py", line 9, in
from lib.knn.init import KNearestNeighbor
File "/home/user/Work/DenseFusion/lib/knn/init.py", line 7, in
from lib.knn import knn_pytorch as knn_pytorch
File "/home/user/Work/DenseFusion/lib/knn/knn_pytorch/init.py", line 3, in
from ._knn_pytorch import lib as _lib, ffi as _ffi
ImportError: /home/user/Work/DenseFusion/lib/knn/knn_pytorch/_knn_pytorch.so: undefined symbol: _Py_Dealloc

I want to addressed via building _knn_pytorch.so with Py2, but it still fails with the stack trace:
python2 build_ffi.py
Traceback (most recent call last):
File "build_ffi.py", line 19, in
include_dirs=[osp.join(abs_path, 'include')]
File "/usr/local/lib/python2.7/dist-packages/torch/utils/ffi/init.py", line 176, in create_extension
ffi = cffi.FFI()
File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 46, in init
import _cffi_backend as backend
ImportError: /usr/local/lib/python2.7/dist-packages/_cffi_backend.so: undefined symbol: PyUnicodeUCS2_FromUnicode
Makefile:31: recipe for target 'build/knn_pytorch/_knn_pytorch.so' failed
make: *** [build/knn_pytorch/_knn_pytorch.so] Error 1

hi @j96w , i'm working on conda 2.7 , so i built the knn_torch with python 2 in conda environment and always get this problem with modules ,

set -e
export PYTHONUNBUFFERED=True
PYTHONUNBUFFERED=True
export CUDA_VISIBLE_DEVICES=0
CUDA_VISIBLE_DEVICES=0
python ./tools/train.py --dataset linemod --dataset_root ./datasets/linemod/Linemod_preprocessed
Traceback (most recent call last):
File "./tools/train.py", line 12, in
import numpy as np
ImportError: No module named numpy

i tried it also outside cud a environment , always the same probleme . i don't know if i miss something !
thank you in advance

@hamza-04 's problem has been solved in Issue#17.


TaskQueue fetch undefined

React-Native v0.31
When trying to call fetch inside of  InteractionManager.runAfterInteractions, i get the following error:

Code:
 componentDidMount() {
    Orientation.lockToPortrait();
    this.state.screenHeight=Dimensions.get('window').height;
    this.state.screenWidth=Dimensions.get('window').width;
    InteractionManager.runAfterInteractions(() => {
      this.fetchData();
    });
  }

  fetchData() {
    fetch(REQUEST_URL)
      .then((response) => response.json())
      .then((responseData) => {
        for(var i=0; i<responseData.length; i++)
        {
          if(responseData[i].defType=="Movies")
          {
            this.setState({
              dataSource: responseData[i].defVal,
              loaded: true,
            });
            break;
          }
        }
      })
      .done();
  }

Thanks in advance for the help,
Daniel.

I think this got no response because the paste of the error is broken. I am going to close this issue for lacking sufficient information but if you do have a repro of this - I suggest a rnplay.org link - then feel free to open a new issue.


Default credentials profile is not not read by Amazon.SimpleEmailV2 SDK for .net

Describe the bug
As per the documentation at credential and profile resolution, the default credentials profile at %USERPROFILE%\.aws\credentials should be used by SDK, if available. However the AWSSDK.SimpleEmailV2 SDK throws error.
Expected Behavior
It should use the default profile as per the credentials file at the default location to make AWS API calls.
Current Behavior
Exception is thrown when trying to use the default credentials (see reproduction steps). However I have verified the default credential is correct by the following code:
        var netSdkStore = new NetSDKCredentialsFile();
        netSdkStore.TryGetProfile("default", out CredentialProfile profile);
        return profile;

I get the correct access key and the secret key using above and I am able to make API calls.
Reproduction Steps

Create a Default profile at the location %USERPROFILE%\.aws\credentials.

Use package AWSSDK.SimpleEmailV2 Version="<IP_ADDRESS>"
Create client object using default constructor:AmazonSimpleEmailServiceV2Client client = AmazonSimpleEmailServiceV2Client();

When calling any method on client object, error is thrown:public async Task<CreateEmailIdentityResponse> Post()
 {
     // Create SES identity
     AmazonSimpleEmailServiceV2Client client = new AmazonSimpleEmailServiceV2Client() ;
     CreateEmailIdentityRequest request = new CreateEmailIdentityRequest()
     {
         EmailIdentity =<EMAIL_ADDRESS>     };
     var response = await client.CreateEmailIdentityAsync(request);  //<- Error is thrown here

     return response;
 }

An unhandled exception has occurred while executing the request.
   Amazon.SimpleEmailV2.AmazonSimpleEmailServiceV2Exception: The security token included in the request is invalid.
    ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.
      at Amazon.Runtime.HttpWebRequestMessage.GetResponseAsync(CancellationToken cancellationToken)
      at Amazon.Runtime.Internal.HttpHandler`1.InvokeAsync[T](IExecutionContext executionContext)
      at Amazon.Runtime.Internal.Unmarshaller.InvokeAsync[T](IExecutionContext executionContext)
      at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
      --- End of inner exception stack trace ---
      at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionStream(IRequestContext requestContext, IWebResponseData httpErrorResponse, HttpErrorResponseException exception, Stream responseStream)
      at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionAsync(IExecutionContext executionContext, HttpErrorResponseException exception)
      at Amazon.Runtime.Internal.ExceptionHandler`1.HandleAsync(IExecutionContext executionContext, Exception exception)
      at Amazon.Runtime.Internal.ErrorHandler.ProcessExceptionAsync(IExecutionContext executionContext, Exception exception)
      at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
      at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
      at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
      at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
      at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext)
      at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
      at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
      at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
      at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
      at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
      at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)
      at WorkerWebServerDemo.Controllers.WeatherForecastController.Post() in D:\dev_temp\WorkerWebServerDemo\Controllers\WeatherForecastController.cs:line 43
      at lambda_method5(Closure , Object )
      at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
      at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
      at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
      at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
      at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
      at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
      at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
      at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
      at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
      at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
      at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
      at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
      at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
      at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.SimpleEmailV2 <IP_ADDRESS>
Targeted .NET Platform
.NET 6
Operating System and version
Windows 10

Hi @ThisIsArnab,
Good evening.
Few pointer:

Are you using Visual Studio for your development and access AWS services using AWS Explorer? If yes, refer Using the SDK Store (Windows only), you might be using Windows SDK store located at %USERPROFILE%\AppData\Local\AWSToolkit\RegisteredAccounts.json. You may rename or move this file to a different location.
Is environment variable AWS_PROFILE  set in your environment? If yes, please either remove it or update it with default profile.
Could you check the output of FallbackCredentialsFactory.GetCredentials()? If these return credentials, could you check the source and credentials information to validate if the default credentials are returned?

If default credentials are returned as output of FallbackCredentialsFactory.GetCredentials(), could you try using them for your scenario? If this doesn't work, then most likely your credentials might be invalid. Kindly check by using these with other AWS services.

If default credentials are not returned as output of FallbackCredentialsFactory.GetCredentials(), then check the source.

Thanks,
Ashish

Thank you @ashishdhingra that helped!
Credentials were indeed read from Windows SDK Store. Checked using FallbackCredentialsFactory.GetCredentials(). I found out this was set during the usage of AWS NoSql Workbench. I renamed the RegisteredAccounts.json file and now credentials are read from default shared credentials!


Badge audio sending sometimes sends old data

See log below
(Note - in this version of the hub we use the last chunk's data to determine the last timestamp. Need to change this as a temporary fix)
2016-10-09 13:55:59,170 - INFO - Requesting device H0HBQ2TD1R from server...
2016-10-09 13:55:59,196 - INFO - [D6:B8:C6:BA:9B:2B] Connecting to D6:B8:C6:BA:9B:2B
2016-10-09 13:56:01,000 - INFO - [D6:B8:C6:BA:9B:2B] Connected
2016-10-09 13:56:01,001 - INFO - [D6:B8:C6:BA:9B:2B] Starting audio recording
2016-10-09 13:56:01,139 - INFO - [D6:B8:C6:BA:9B:2B] Got time ack
2016-10-09 13:56:01,140 - INFO - [D6:B8:C6:BA:9B:2B] Badge datetime was:<PHONE_NUMBER>,23
2016-10-09 13:56:01,140 - INFO - [D6:B8:C6:BA:9B:2B] Starting proximity scans
2016-10-09 13:56:01,349 - INFO - [D6:B8:C6:BA:9B:2B] Got time ack
2016-10-09 13:56:01,349 - INFO - [D6:B8:C6:BA:9B:2B] Badge datetime was:<PHONE_NUMBER>,225
2016-10-09 13:56:01,349 - INFO - [D6:B8:C6:BA:9B:2B] Requesting data since<PHONE_NUMBER> 603
2016-10-09 13:56:04,640 - ERROR - [D6:B8:C6:BA:9B:2B] failed pulling data
2016-10-09 13:56:04,640 - ERROR - [D6:B8:C6:BA:9B:2B] 1
2016-10-09 13:56:04,641 - ERROR - [D6:B8:C6:BA:9B:2B] Device disconnected
2016-10-09 13:56:04,641 - INFO - [D6:B8:C6:BA:9B:2B] Disconnecting from D6:B8:C6:BA:9B:2B
2016-10-09 13:56:04,641 - INFO - Errors pulling data. Saving data is anything was received
2016-10-09 13:56:04,641 - INFO - Chunks received: 7
2016-10-09 13:56:04,641 - INFO - saving chunks to file
2016-10-09 13:56:04,641 - DEBUG - Chunk timestamp:<PHONE_NUMBER>.603, Voltage: 2.875, Delay: 50, Samples in chunk: 114
2016-10-09 13:56:04,642 - DEBUG - Chunk timestamp:<PHONE_NUMBER>.303, Voltage: 2.875, Delay: 50, Samples in chunk: 114
2016-10-09 13:56:04,642 - DEBUG - Chunk timestamp:<PHONE_NUMBER>.003, Voltage: 2.875, Delay: 50, Samples in chunk: 114
2016-10-09 13:56:04,642 - DEBUG - Chunk timestamp:<PHONE_NUMBER>.703, Voltage: 2.875, Delay: 50, Samples in chunk: 114
2016-10-09 13:56:04,643 - DEBUG - Chunk timestamp:<PHONE_NUMBER>.403, Voltage: 2.875, Delay: 50, Samples in chunk: 114
2016-10-09 13:56:04,643 - DEBUG - Chunk timestamp:<PHONE_NUMBER>.388, Voltage: 2.893, Delay: 50, Samples in chunk: 114
2016-10-09 13:56:04,643 - DEBUG - Chunk timestamp:<PHONE_NUMBER>.361, Voltage: 2.780, Delay: 50, Samples in chunk: 114
2016-10-09 13:56:04,643 - INFO - done writing
2016-10-09 13:56:04,643 - DEBUG - Setting last badge audio timestamp to<PHONE_NUMBER> 361
Traceback (most recent call last):
File "./badge_hub.py", line 331, in
pull_devices(mgr, args.start_recording)
File "./badge_hub.py", line 229, in pull_devices
dialogue(b, activate_audio, activate_proximity)
File "./badge_hub.py", line 125, in dialogue
bdg.set_audio_ts(last_chunk.ts, last_chunk.fract)
File "/home/orenled/Documents/OpenBadge/src/nRF_hub/badge.py", line 302, in set_audio_ts
raise ValueError('Trying to update last_audio_ts with old value')
ValueError: Trying to update last_audio_ts with old value

After some more testing:

This issue sometimes causes the badge to get stuck
It only happens if proximity recording is turned on (not sure why though)

It appears to somehow happen when there are too many badges in range (>28).
Also, somehow we are getting more than 28 results in a scan from the badge... something that is not supposed to happen since MAX_SCAN_RESULTS = 28

Seems to be fixed in the latest firmware update


AttributeError: 'FlagEmbedding' object has no attribute 'embed_documents'

from langchain.text_splitter import CharacterTextSplitter
from langchain.document_loaders import TextLoader

path_f = 'test.txt'

# Load and process the text
loader = TextLoader(path_f)
documents = loader.load()

#text_splitter = CharacterTextSplitter(chunk_size=300, chunk_overlap=70)
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
texts = text_splitter.split_documents(documents)

with open(path_f, 'r') as file:
    content = file.read()

Hello I usually load my txt file for embedding with langchain textloader so as to split it into chunks. So I was able to do the embedding with code below but unable to add it to a vector store with chromadb
fe_model = Embedding(model_name="BAAI/bge-base-en-v1.5", max_length=512)

embeddings = fe_model.passage_embed(texts)
list(embeddings)

Code to add to chromadb
from langchain.vectorstores import Chroma

vectorstore = Chroma.from_documents(documents=texts, embedding=Embedding(), persist_directory="./db2")
print("[+]Done")

Error - AttributeError: 'FlagEmbedding' object has no attribute 'embed_documents'
What could be wrong, I usually save my embedding this way to be able to use it with langchain llm like llama for free. Thanks!

Hey. It seems you are using the FlagEmbedding class from the library to use with Langchain.
Whereas you should be importing
from langchain.embeddings.fastembed import FastEmbedEmbeddings

ModuleNotFoundError: No module named 'langchain.embeddings.fastembed'
But I'm getting this, I have langchain and fastembed installed

Can you confirm your Langchain version?

Name: langchain
Version: 0.0.331
Summary: Building applications with LLMs through composability
Home-page: https://github.com/langchain-ai/langchain
Author:
Author-email:
License: MIT
Location: /opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages
Requires: aiohttp, anyio, async-timeout, dataclasses-json, jsonpatch, langsmith, numpy, pydantic, PyYAML, requests, SQLAlchemy, tenacity
Required-by:

You are on an older version of Langchain and a version with the latest fastembed integration is not out on PyPi yet.
You can wait for a new release or do the following to get the latest version of Langchain from the source with the FastEmbed integration.
pip uninstall langchain

pip install git+https://git@github.com/langchain-ai/langchain.git@8d6faf56657070137a16669bc2420a08a5ab7f24#subdirectory=libs/langchain

from langchain.embeddings.fastembed import FastEmbedEmbeddings

fe_model = FastEmbedEmbeddings(model_name="BAAI/bge-base-en-v1.5", max_length=512)

embeddings = fe_model.embed_documents(texts)
print(embeddings)

TypeError: TextEncodeInput must be Union[TextInputSequence, Tuple[InputSequence, InputSequence]]

Could you recheck how texts is defined?
Here's a reference.
https://github.com/langchain-ai/langchain/blob/master/libs/langchain/tests/integration_tests/embeddings/test_fastembed.py#L16-L24

from langchain.text_splitter import CharacterTextSplitter
from langchain.document_loaders import TextLoader

path_f = 'test.txt'

# Load and process the text
loader = TextLoader(path_f)
documents = loader.load()

#text_splitter = CharacterTextSplitter(chunk_size=300, chunk_overlap=70)
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
texts = text_splitter.split_documents(documents)

This is how texts was defined. It is chunks of document

You don't need to call embed_documents() explicitly with the docs. It's internal.

from langchain.embeddings.fastembed import FastEmbedEmbeddings

embeddings = from_documents(texts, embedding=FastEmbedEmbeddings(model_name="BAAI/bge-base-en-v1.5", max_length=512))
print(embeddings)

NameError: name 'from_documents' is not defined

As per your original message

Code to add to chromadb

from langchain.vectorstores import Chroma

vectorstore = Chroma.from_documents(documents=texts, embedding=Embedding(), persist_directory="./db2")

from langchain.vectorstores import Chroma
from langchain.embeddings.fastembed import FastEmbedEmbeddings

vectorstore = Chroma.from_documents(documents=texts, embedding=FastEmbedEmbeddings(model_name="BAAI/bge-base-en-v1.5", max_length=512), persist_directory="./db2")
print("[+]Done")

OperationalError: attempt to write a readonly database

from langchain.vectorstores import Chroma
from langchain.embeddings import OllamaEmbeddings

vectorstore = Chroma.from_documents(documents=texts, embedding=FastEmbedEmbeddings(model_name="BAAI/bge-base-en-v1.5", max_length=512), persist_directory="./db3")
print("[+]Done")

I also changed the persisit directory name, now different error.
ValueError: Expected EmbeddingFunction.call to have the following signature: odict_keys(['self', 'input']), got odict_keys(['self', 'args', 'kwargs'])
Please see https://docs.trychroma.com/embeddings for details of the EmbeddingFunction interface.
Please note the recent change to the EmbeddingFunction interface: https://docs.trychroma.com/migration#migration-to-0416---november-7-2023

from langchain.vectorstores import Chroma
from langchain.embeddings.fastembed import FastEmbedEmbeddings

vectorstore = Chroma.from_documents(documents=texts, embedding=FastEmbedEmbeddings(model_name="BAAI/bge-base-en-v1.5", max_length=512), persist_directory="./db2")
print("[+]Done")

OperationalError: attempt to write a readonly database

Appears to be related to Chroma. Could you try reaching out support?

Ok thanks, I would

from langchain.vectorstores import Chroma
from langchain.embeddings import OllamaEmbeddings
from chromadb.utils import embedding_functions
from langchain.vectorstores import Qdrant
from langchain.embeddings.fastembed import FastEmbedEmbeddings

embeddings = FastEmbedEmbeddings(model_name="BAAI/bge-base-en-v1.5", max_length=512)

#vectorstore = Chroma.from_documents(documents=texts, embedding=FastEmbedEmbeddings(model_name="BAAI/bge-base-en-v1.5", max_length=512), persist_directory="./db3")
qdrant = Qdrant.from_documents(
    texts,
    embeddings,
    path="./local_qdrant",
    collection_name="db1",
)
print("[+]Done")

Qdrant worked perfectly!


Training image samples: samples_scaled_gs vs samples_gs

Can you explain what the difference is between the samples_scaled_gs images and the samples_gs images produced during training? In all my attempts to train a model the samples_scaled_gs images seem have the correct structure of the my training images and the samples_gs just seem to be a lot more random maybe just the style of the training set I am not sure. But all my attempts to use the trained embedding also seem to more closely match the samples_gs random images even though the samples_scaled_gs images generated during training look pretty good.

https://github.com/nicolai256/Stable-textual-inversion_win/issues/9

https://github.com/rinongal/textual_inversion/issues/19


suthesh/career-page-static

Changes:

building department page

Type of change

[ ] Bug fix
[x] New feature
[ ] Update feature
[ ] Refactor code
[ ] Translation to code
[ ] Translation to crowdin
[ ] Script configuration
[ ] Improve performance
[ ] Style only
[ ] Dependency update
[ ] Documentation update
[ ] Release

Please compress the images yeah 🙏


Fix create list in issues board

a POST request is needed to add a list to an issues board:
https://docs.gitlab.com/ee/api/boards.html#new-board-list

by mistake, this PR also includes the changes of PR #353

Please rebase & add test


ES Modules: please discuss

I suspect this is a feature many people would like, though perhaps not as many as were the case for Underscore. I personally think that there would be value in being able to import Backbone.Events, Backbone.Model, Backbone.Collection and perhaps the extend class emulator without importing the entirety of Backbone. Modularizing Backbone has been part of stage 2 of my maintenance takeover plan (https://github.com/jashkenas/backbone/issues/4244#issuecomment-993692119).
@vtalas started an attempt in #4215, but seems to have abandoned the branch since. As I will discuss below, I can think of a few good reasons why he might have given up.
I decided to make my own attempt, partly because I wanted to focus on regenerating a backwards-compatible UMD bundle using Rollup first, and partly because I didn't like Node.js's idiosyncratic .mjs extensions. I was planning to go a similar route as I have done for Underscore (see https://github.com/jashkenas/underscore/pull/2826, https://github.com/jashkenas/underscore/pull/2849 and https://github.com/jashkenas/underscore/pull/2914), with .js files in a modules directory that has a nested package.json with type: "module". However, I ran into serious difficulties. Unless some Rollup or ESM guru can help me out, I'm afraid we will have to face some hard choices.
Below is a link to my attempt-in-progress. The branch is not at all clean, so please do not base new work on top of it. Rollup would be invoked with npx rollup -c --bundleConfigAsCjs.
https://github.com/jashkenas/backbone/compare/master...jgonggrijp:modules-2
The difficulties relate to the way the present, hand-written UMD bundle treats jQuery as an optional import.

The factory assumes that if jQuery is available, it is available synchronously. For this reason, I cannot use dynamic import() to approximate the behavior (unless I optionally import jQuery and then call a factory function that builds Backbone around the provided import, but that would defeat the purpose of modularization). Even if I could somehow use import(), it begs the question whether Rollup would translate that to a UMD bundle that is backwards-compatible with the existing bundle.
In the CommonJS case, the existing UMD wrapper wraps the require('jquery') call in a try/catch. As far as I can tell, there is no Rollup parameter or plugin that lets me replicate that behavior.
In the browser globals case, the existing UMD wrapper attempts to find jQuery under various names with the expression root.jQuery || root.Zepto || root.ender || root.$. Again, there seems to be no way to reproduce this logic with Rollup. I can pass such a string to output.globals.jquery, but Rollup attempts to use the entire expression as a single property lookup in that case.

I have tried and considered several solutions, but none of them is (1) treeshakable, (2) backwards-compatible and (3) sourcemap-tracable to the source modules at the same time:

I could use @rollup/plugin-alias to replace the jQuery import by a hand-written file that attempts to replicate the behavior in the existing UMD wrapper and then export { $ }. It would do require('jquery') in the AMD and CommonJS cases and the root.jQuery || root.Zepto || ... thing in the browser globals case. Alas, doing require('jquery') in the AMD case means a breaking change; it replaces async module loading by sync module loading, which in most cases will likely not even work. I cannot do define(['jquery'], ...) in the AMD case, because that would not produce the $ on time in order to export it.
I looked into writing a custom Rollup plugin in order to modify the internal logic of the UMD wrapper, but it is unclear from the documentation whether any hook will actually allow me to do that. Even if there is a way, such a patch would have to update the sourcemap, something for which I currently lack the expertise.
I could more bluntly patch the UMD wrapper with @rollup/plugin-replace or a similar plugin. However, this is an extremely fragile solution that would break the sourcemap as well. Also, it is again unclear from the documentation whether I can even modify the UMD wrapper in this way.
I could make Rollup generate a bundle, trim off the header and footer entirely, and embed the remaining code in an completely hand-written UMD wrapper that looks exactly like the existing one. This would work and would be backwards-compatible, but again, there would be no sourcemap. It also feels like a rather questionable solution.

So unless somebody can point me to a golden solution, I'm afraid we will have to make at least one of three sacrifices:

Give up on treeshakability. This basically means giving up on ES modules entirely. While this is a valid option, it does not seem very future-facing.
Give up on backwards compatibility. Also a valid option, but I feel that now is not the right time for a 2.0 version bump, so this would likely delay modularization substantially. This option would also mean figuring out an entirely new approach to the optional jQuery dependency.
Give up on sourcemapping from the generated UMD bundle to the source modules. At first sight, this may seem like a minor sacrifice compared to the other two, especially given that Rollup keeps the bundle very readable. However, as I described above, every approach I can think of to make this sacrifice without the other two is rather iffy.

So, what do we do? Please share all the opinions, ideas and suggestions you may have!

Is UMD still a thing? IMHO ESM should get the primary focus nowadays.

Okay, my bad. I should not conclude from my use case to others.
As far as I remember, when I migrated the backbonejs application which I'm maintaining in 2020 from no module system with grunt concat to a module system with Webpack, ESM were already preferred over UMD. But maybe I remembered it wrong.

Yes, ESM is the standard and it has been for a while. Then again, not everyone is catching up at the same rate.

Would using the "exports" field in package.json help, more specifically the "conditional exports"? I haven't looked into the details, but on the surface it looks like it can point to different files based on the import mechanism used.
https://nodejs.org/api/packages.html#conditional-exports
I have also seen some packages simply keeping the ESM build separate in an "es" or "esm" subdirectory. So the import would look something like import { ... } from 'backbone/esm'. For better or worse it kind of implies a pipeline for the ESM build.

It will be part of the solution. However, for backwards compatibility, a UMD bundle would still be necessary.

ESM and components are already widely used in many frameworks. I'd argue that right now I need Backbone to provide easy DOM management with the above from Vanillajs.
I don't need legacy support.
I'd say put the 1.x in a separate release LTS branch move forward.

@kuwv Please forgive me for quote-sniping; there is a lot to unpack here. I'll go through both of your posts:

ESM and components are already widely used in many frameworks.

Why mention other frameworks? Why could Backbone not do something that is different from other frameworks?
(I agree that there is a value to ESM and components, I just wonder why you feel that other frameworks are relevant here.)

I'd argue that right now I need Backbone to provide easy DOM management

I presume you mean that Backbone is currently doing this, too, but ...

with the above

... you want it to be ESM-based and integrate more with Web Components, ...

from Vanillajs.

... preferably without depending on jQuery?
What is currently lacking when you want to use Backbone with Web Components, and how does it bear relevance to ESM?
What problem do you think will be solved for you, if Backbone no longer depends on jQuery?

I don't need legacy support.

I'll take your word for that. Lots of other people do, though. Even when I change the interface, I want to keep migration feasible for most of those people.

* implement class support and deprecate 'extend'

ES classes are an even more difficult problem than ES modules. I agreed with Jeremy to postpone such a transition until a really good solution manifests itself. You can read #4245 for background. ESM will definitely happen sooner than ES classes.

* improve super initialization

What do you mean by this?

It's fine.

I don't need legacy support.

I'll take your word for that. Lots of other people do, though. Even when I change the interface, I want to keep migration feasible for most of those people.

Let me clarify. An ADM/UDM based app does not need ESM support, as an ESM app does not need to support either ADM/UDM.
Backbone can be split into two supported versions: active and maintenance through the use of a "git workflows" with releases.
https://about.gitlab.com/topics/version-control/what-is-gitlab-flow/ or https://www.endoflineblog.com/oneflow-a-git-branching-model-and-workflow
Also, if SEMVER is done correctly an Alpha version can be used to prototype these ES6+ features without locking the project into it. This would allow implementation of classes and modules much more interactively with the community IMO. Supporting two versions also removes any pressure for legacy users to make immediate changes.
https://survivejs.com/maintenance/packaging/publishing/
That's why I think it wouldn't be beneficial to try to pack all package types and features within one build. It's just not needed. This is why versioning exists.

Why mention other frameworks? Why could Backbone not do something that is different from other frameworks?

When evaluating tools or frameworks I look at it's fits within an ecosystem. There are two primary use cases for backbone which are: vanillajs apps and microfrontend components. Backbone can be used with other frameworks to build smaller UI components that can then be assembled in something like React or Vuejs frontend.
https://single-spa.js.org/docs/ecosystem-backbone/
With microfrontends ESM/Comonents are actually viable approach with microservices internally (non-www). Ideally these systems want multiple UI components from each API it consumes to assemble pages.
Currently, backbone doesn't provide much help to developers here as it sits on the sidelines with legacy features and integration options though. Which is sad because of how well positioned it is.

@jgonggrijp I'm sure systemjs can be used from rollup. The System.import supports conditional imports if the module exists in the path with transpilation. This module loader not only would provide CommonJS and ESM but can additionally allow ADM for jQuery.

Ah, I didn't think of SystemJS. I'll look into that, thanks for the tip!

It seems ESM support is already coming to jQuery:
https://github.com/jquery/jquery/issues/4592
https://github.com/jquery/jquery/pull/5255

It seems ESM support is already coming to jQuery:
https://github.com/jquery/jquery/issues/4592
https://github.com/jquery/jquery/pull/5255

That is certainly interesting. Just to be clear though, the problem with jQuery is not that it doesn't support ESM yet, but that Backbone currently has a "creative" approach to depending on it.

Yeah, I've been looking at that too. The thread suggested https://www.npmjs.com/package/@rollup/plugin-node-resolve
But, that's only be system side.

If that's a block, maybe the solution is just an initialization function that receives $. So the consumers will provide it, instead of this auto-resolution
import * as Backbone from 'backbone';
import jQuery from 'jquery';

Backbone.setJQuery(jQuery);

Thanks for thinking along, @VitorLuizC. I think such a solution could work (and it would have a few other advantages), but it would be a breaking change. So that would amount to option 2, "give up on backwards compatibility".

+1 to support ESM.
My main use case is consistency. We have a big project with a lot of dependencies only supporting CJS. It would be great being able to finally migrate all the CJS code to ESM to simplify bundle processes and to keep a consistente codebase (without having several ways to do each thing).
On a very personal note, the three caveats you've (@jgonggrijp) mentioned, are more likely a nice to have rather than must have.

@tiagox I always write all my code in ESM notation. The bundling tools add an emulation layer for the modules that are still written in CJS or AMD. What stops you from doing the same?
Treeshakability and sourcemap-traceability are non-optional, as far as I'm concerned. Without treeshaking there is no point in modularizing and without a sourcemap, you cannot see what's going on in your code. I can give up on backwards compatibility, and there might be no other option, but that means I have to wait and pool it with other breaking changes. I don't want major releases to be a frequent thing, users should be able to depend on some stability.
(Just to clarify, though: I'm still interested in magic solutions if anyone can think of one.)

I would skip backward compatibility. There are no magic solutions; it is supposed to be changed to move forward. I would like to contribute with many things, but ES modules are a bottleneck. Personally, I love Backbone not because of stability, but also because of its simplicity and approach to building applications.
In any case, in the future it will be necessary to remove jQuery as dependency

Thank you for your comment, @valeriivolkovskyi. There is a lot to unpack!

I would skip backward compatibility. There are no magic solutions;

I didn't mean magic magic, rather "something I have not thought of yet". That being said, if SystemJS is not the silver bullet and I don't find anything else (and I suspect that will be the case), then backwards compatibility is certainly out of the window.

it is supposed to be changed to move forward.

Could you elaborate a bit on this? What are you referring to with "it"?

I would like to contribute with many things,

Which things?

Do you mean they prevent you from making those contributions? How?

Personally, I love Backbone not because of stability, but also because of its simplicity and approach to building applications.

❤

In any case, in the future it will be necessary to remove jQuery as dependency

Why?

I mean, I believe it's crucial to transition to ES modules as soon as possible. This transition will accelerate opportunities for contributions to the framework and enhance its modernity, provided that the community is interested in it.

Which things? If there are too many to list, could you just give a few examples?
I have some ideas to improve re-rendering performance. Or I would help with ES classes, or other issues. Do we have a roadmap BTW?

Why?
are you believe jQuery is still worth keeping as a dependency?

@valeriivolkovskyi Please excuse me for firing all these questions at you. I just want to get to the essence of what you are saying.

I mean, I believe it's crucial to transition to ES modules as soon as possible. This transition will accelerate opportunities for contributions to the framework and enhance its modernity, provided that the community is interested in it.

Do you mean "ES modules are the modern way to do things, so Backbone will look cooler if it uses them, which might attract new contributors"? Or is there more to it?

I have some ideas to improve re-rendering performance. Or I would help with ES classes, or other issues.

But only after Backbone switches to ES modules? For what reason(s)?

Do we have a roadmap BTW?

Somewhat. I previously published this list, which is mostly about Backbone's state of maintenance. We are currently at stage 3. I intended to do ESM in stage 2, but postponed it for the reasons discussed in this ticket.
Other than that (i.e., concrete features), there has been a vague road map in my mind. I will try to list it as concretely as possible over here:

Don't change much unless it is necessary; I believe Backbone is mostly fine the way it is. Keep making small enhancements when they come up.
Nevertheless, I anticipate some breaking changes that I was hoping to aggregate in a single major release:

Upgrade to Underscore 2.0, once I have released that and find it stable enough. (Underscore 2.0 will support Map, Set, iterators, promises, etcetera, and become stateless and properly treeshakable.)
Reconcile with the new TypeScript-inspired class sugar, if we ever find a good way. See the numbered list at the end of https://github.com/jashkenas/backbone/issues/4245#issuecomment-1002290690 for what I mean by "good".
Reorganize the way Backbone depends on jQuery and/or base Backbone.ajax on fetch by default.
Switch to ES modules (though I originally hoped to do this in a non-breaking way, as mentioned before).

Now that jQuery 4 is in beta, this might inform future change in Backbone as well. This might go with step 2, or it might warrant another major release, if necessary.
Resume just adding small enhancements.

are you believe jQuery is still worth keeping as a dependency?

I do, for the simple reason that a lot of Backbone's functionality depends on jQuery. Do you believe there is a need to get rid of jQuery as a dependency?

+1 remove jQuery -- Great talk -- I found myself refactoring my old backbone app, so glad this is going on.  We just upgraded to the latest Webpack and swapped out all of the requires for imports.  I am looking how to make the Router work with webpack ports, I am guessing an upgraded Router would also be nice.

@techcto What do you mean by an "upgraded" Router? What would you like to see changed about it?

Do you mean "ES modules are the modern way to do things, so Backbone will look cooler if it uses them, which might attract new contributors"? Or is there more to it?

Let's not be dismissive. What backbone does well is provide a low barrier of entry to powerful SPA capabilities. Using standardized features does that better than esoteric or deprecated ones.

@kuwv let me get a few things out of the way.

I am not being dismissive; I am just asking whether @valeriivolkovskyi is only talking about the coolness factor (which is there, anyway) or also about something else. I am not saying that his argument is wrong if it is only about the coolness, I just want to make sure I don't miss something.
This question about coolness was in relation to contributing to Backbone, not using it.
If you are building SPAs, you are using a bundling tool, and if you are using a bundler, you can use anything you want with ESM. There is absolutely nothing stopping you from doing import { Model } from 'backbone'; today with Backbone 1.6 or earlier.
UMD is neither esoteric nor deprecated. Please leave out the hyperbole and stick to the facts.
 We are all on the same side. The question is not about whether to make the transition, but how.

I personally would

If that's a block, maybe the solution is just an initialization function that receives $. So the consumers will provide it...
I know this breaks backwards compatibility, but this makes sense to me. I wonder if it is worth to explore if this would be easy to migrate to with a simple code change for backbone users or if it would create scenarios which get some stuck, unable to migrate.

@jdittrich For what it is worth, it makes sense to me, too. In fact, I think it is the most straightforward way to retrofit Backbone in an ESM jacket, if our aim is to keep Backbone otherwise the same as much as possible.
That is not necessarily my aim, though. Maybe I have been unclear about this. I want to offer the users stability that they can depend on, but if we're going to have a major update anyway, somewhere close to the library's 15th birthday, I'm thinking that maybe it should be as disruptive as possible. Pool as many breaking changes as we can think of, so that the next breaking update can wait another 15 years. It might as well be a full redesign? Thoughts welcome.
(And then continue to support Backbone 1.x for a while in parallel, as @kuwv has also suggested. And make sure there is a way in which Backbone 1.x and 2.x can be used together in a single application, to ease the transition.)

Pool as many breaking changes as we can think of, so that the next breaking update can wait another 15 years.
It might as well be a full redesign? Thoughts welcome.

Gladly! I just wanted to stay on discussion here, and it seems most concerns were around maintaining backwards compatibility and transitioning to ESM. But maybe we want another issue for collecting potentially breaking changes? (or is there already one?)

@jdittrich Good suggestion, thanks. I just opened a new ticket for that purpose, see reference above. @kuwv and @valeriivolkovskyi, I encourage you to reply there, since you seemed to be full of ideas.
Yes, the concerns around here are about transitioning to ESM and backwards compatibility. I'm afraid those two cannot be reconciled, though I have not looked deeply enough into SystemJS yet to be sure. Then again, if you suggest a "less-breaking" conservative solution, I get the impression that this is what you prefer. Is it? There would be nothing wrong with that.

"less braking" conservative solution… get the impression that this is what you prefer.

Yes. At least when (for now) keeping Backbone mostly as-is, but transitioning to ESM, it seems that an "less-breaking", minor migration-effort-solution (like having to inject jQuery) might be a good solution.


macOS no longer able to bind Command + Period

I'm on macOS. I just grabbed the latest code (7433f45ff9c6efeb48e223e90dd4aa9ee135b5e8) and built a fresh app via make app.
A previous keybinding of mine has stopped working. I had mapped Command + Period to send \x03 as suggested by jwilm via freenode to match the default behavior of macOS's built-in Terminal app. With this latest code base the binding no longer works.
The character sequence in question works great when bound to any other key combination. I am unable to get Command + Period to bind to anything, be it my desired character sequence or any other characters or action.
# used to work but no longer does
  - { key: Period,   mods: Command, chars: "\x03"                        }

# works fine (Alt instead of Command)
  - { key: Period,   mods: Alt,     chars: "\x03"                        }

# does not work - can't bind Command + Period to anything?
  - { key: Period,   mods: Command, action: IncreaseFontSize             }

I highly doubt that the commit you've linked is actually what broke this functionality. Would you mind bisecting which commit exactly introduced this regression for you?
Also please make sure that there are no syntax errors in your config, you can do so by starting alacritty from the CLI to capture the stderr, if there's any output while starting alacritty from a different terminal session, there's probably something wrong with your configuration file.

Thanks, @chrisduerr - I took a look at the CLI output on startup and the only thing reported was an issue with my alacritty.yml having old (default) 0.0 values for font offsets that have since changed to 0. I updated my config and there's nothing echoing out now on startup. No change for the issue.
I'll try to pinpoint the specific commit that broke my desired functionality and report back.

@chrisduerr the commit that broke things for me is 765949f256aefcc513d0bfb46b64d315f9c2f3d2
("Update to glutin 0.16.0").

Yeah that makes sense. Winit 0.15 has overhauled keyboard support in macos, I'd assume this might be a regression introduced there. Is Period the only key which is creating issues with Command? I'd be interested to know if others are also causing trouble.
I'd also be interested in seeing exactly which keys are reported when you press Command + Period. If you have some time and feel like investigating, here's a patch which will write exactly which keys are reported to stdout: https://paste.rs/slY. I'd be interested in seeing the output of this when you hit Command + Period.

Thanks, @chrisduerr - I'll try other Command based combinations and I'll try your patch and report back on both items.

Thanks for the help with troubleshooting this, it's very much appreciated!

@chrisduerr
These three (default) bindings involving the Command key but not the Period key work just fine:
  - { key: Key0,     mods: Command, action: ResetFontSize                }
  - { key: Equals,   mods: Command, action: IncreaseFontSize             }
  - { key: Minus,    mods: Command, action: DecreaseFontSize             }

With your patch applied, if I press and then release Command + Period, the following is printed:
STATE: Released, KEY_CODE: Some(RWin), MODIFIERS: ModifiersState { shift: false, ctrl: false, alt: false, logo: true }
STATE: Released, KEY_CODE: Some(RWin), MODIFIERS: ModifiersState { shift: false, ctrl: false, alt: false, logo: false }

The same debug output can be produced by pressing and releasing the Command key by itself. It's as if Period doesn't register at all when Command is pressed.
For comparison, here's the output produced by pressing and releasing Alt + Period:
STATE: Released, KEY_CODE: Some(LAlt), MODIFIERS: ModifiersState { shift: false, ctrl: false, alt: true, logo: false }
STATE: Pressed, KEY_CODE: Some(Period), MODIFIERS: ModifiersState { shift: false, ctrl: false, alt: true, logo: false }
STATE: Released, KEY_CODE: Some(Period), MODIFIERS: ModifiersState { shift: false, ctrl: false, alt: true, logo: false }
STATE: Released, KEY_CODE: Some(LAlt), MODIFIERS: ModifiersState { shift: false, ctrl: false, alt: false, logo: false }

I'd assume that there might be some IME stuff going on where it's waiting for additional keystrokes or something like that.
@francesca64 you probably know best about these kind of things, are you aware of a bug like this?
Also I hope it's okay to ping you for winit/glutin related stuff, but I don't really want to always put the burden on you. So if you would prefer it I could instead also open issues on the winit/glutin repo, so you have more control about when you want to get to it (or someone else might be able to).

Well, the best reason for opening an issue on winit instead is because I totally forgot about this for 2 days... it's a lot simpler from an organization perspective.
I don't mind being pinged on principle or anything, but my stress levels have been higher lately, so the results will reflect that.
Since macOS keyboard issues are still abundant, the plan of attack is to compare against the implementations of NSTextInputClient in SDL, GTK, and Qt:

https://github.com/spurious/SDL-mirror/blob/b00ee82424a5a8198e2556f960e8a09bfe584b26/src/video/cocoa/SDL_cocoakeyboard.m#L47
https://github.com/GNOME/gtk/blob/83a80ab86640c4b24698c9755e9699ae3cce0d33/gdk/quartz/GdkQuartzView.c#L26
https://github.com/qt/qtbase/blob/1ef03f69e8416a70efd14df09e1231ce0bc00ea9/src/plugins/platforms/cocoa/qnsview.mm#L126

When I'll get a chance to do that is anyone's guess, but it at least looks pretty straightforward (and these resources would make it manageable for someone else to take a crack at it).

Nope, no issue was made. If you went ahead with that, that would be super!


⚠ Bofrost.be has degraded performance

In 9a319b4, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 4524 ms

Resolved: Bofrost.be performance has improved in 1306685 after 6 minutes.


failed to start

hey Veryan，I cloned your project from GitHub, but there was an error when starting it: 'lit not fonud'. I found that there was no lit-related dependency in pakes.json, so I downloaded it, but when I executed pnpm dev, the error shown in the picture was displayed. Can you help me solve it?

I’ll look at this tomorrow morning. In the meantime try running ‘npm i’ before running ‘npm dev’ to make sure all of the dependencies of the project are installed

Hi @renmengwen, I tried a couple of different ways and installing the node dependencies via npm i before running the project with npm run dev seems to do the trick. If it's still not working for you please let me know which OS you're running and what the version is. Please also provide your version of node and npm. Thanks.

Forgot to update github, but had a back and forth with @renmengwen a week ago and it turns out the issue was that the loading of languages had a bug and only accounted for english and french. After updating the lit-spa library with a fix to allow for any unrecognized browser language to be defaulted to english, this was resolved in the commit 6ee0d2 on August 28th 2024


Add first pass at an edX configuration for stylelint

https://openedx.atlassian.net/browse/FEDX-380
This is a first cut at an edX-wide configuration for Sass linting using stylelint. I'm also using the plugin stylelint-scss to add Sass-specific rules.
To see it in action, I have PRs to add it to two repos:

https://github.com/edx/edx-bootstrap/pull/8
https://github.com/edx/edx-platform/pull/15982

I've added a few rule exclusions to this repo based upon idioms that seemed reasonable in these two PRs. Let's discuss on this PR if they all make sense, and if there are other rules that we should be excluding.
FYI @edx/fedx-team

Note: there are 17672 failures in the edx-platform Sass!

Reviewers: in particular, check out this edx-platform commit that shows an auto-fix of a medium-sized Sass directory, with a few manual fixes as well:
https://github.com/edx/edx-platform/pull/15982/commits/e27b95d34e23210467a16706e1e90ff9aeab31c3?w=1


fiction tag should make byline change to fiction by {authorName}

May add other tags or even a general byline-{word} solution later but this is nice for now. Plus we can organize all our fiction!

Ah! Wrong repo, so sorry. Forgot what CWD I was in with the GH CLI.

I don't have delete access but somebody else is more than welcome to.


Can't get to work

Downloaded app from app store.
ios 9.2.1 iphone 6
downloaded zip file from release here on github
iphone on wifi with mac
open app on phone - approve sending of notifications
open app on mac see device list choose device
tap "push" button - no notification
close knuff app  on phone
tap "push" button - no notification
You see anything I am doing wrong?
Thanks!

Hi! Thanks for trying it out!
Did you switch to "Knuff iOS" at the top in the Mac app?

I have the very same problem :/ "Knuff iOS" is selected!

Yes Knuff iOS is selected  thanks

If you have a look at the notification settings for the app, it is stil allowed there?

Yes I doubled checked.  I also installed on my ipad and no luck there as well.  If there is some debug data you wish I could build each app and provide just let me know.  Thanks

Ok, so it should be the OSX app then. If you open Keychain Access, do you have keys/cert for com.madebybowtie.Knuff-iOS?
Of so, does it work to choose "Custom" at the top and the select that cert?

Another reason can be that your firewall is blocking it, read more about that here.

Ok so that worked.  Choosing custom, selecting com.madebybowtie.Knuff-iOS cert, selecting production now the notifications are being received   Thanks!

com.madebybowtie.Knuff-iOS is expired? what should i do?

@commando24 Have you downloaded version 1.1?

Version 1.0 (1) i have this version.

i have downloaded new version 1.1.

I have done all the steps above, but it still does not work.

@hezhizhen have you added knuff framework in your app?

@commando24 the token has been detected. do I still need to import the framework?

it seems all right, but when i click the button "push", nothing happens

sometimes i don't work.try to delete the app and install it again.

@hezhizhen yeah it needs token .

@hezhizhen You are trying to push to Knuff iOS. Is this really your intention? It seems you want to push to an own app.
If not you have to select the correct identity by pressing the Choose… button.
Regarding the framework, you dont need it if you already have the token.

@blommegard yeah, I want to push to my ios device. as for the token, when Knuff IOS is opened, I can choose the token by click the Devices on my Macbook's screen. But I see nothing in my iphone's screen. Anything else should I do?

@commando24 I have deleted the app and re-downloaded the latest release of it. But it doesn't work still

@hezhizhen You should be good to go, have you suspended (closed down) the iOS app? Any difference when you select Knuff iOS on the segmented control in the top?

@blommegard I have closed down the screen, but before I click the button Push, I unlock the screen and keep the IOS app open.
The only difference between Custom tab and Knuff iOS tab is the procedure of choosing an identity - the former tab has it and the latter tab doesn't have it.

@hezhizhen you should not have the iOS app open, it should be closed down, pushing to a locked phone works just fine as well.
Yeas, I know the difference, choosing Knuff iOS makes sure it is the correct identity, but both should work assuming you are selecting the correct one in Custom.

@blommegard I closed down the app and locked the screen, and it still did not work.
I wonder if we could choose a more instant way of communicating and then post the reason here.

@hezhizhen the same problem exist for me
Have you found solution?
Nothing happens for knuff and custom apps...

@sena1or Thank you for your comments.


doc: actions/act-runner: document running as a systemd service

This documents running act-runner as a systemd service under a dedicated user account.

I would link to the specific issue on https://gitea.com/gitea/act_runner/issues/ requesting this, but gitea.com has been extremely slow for a few days, to the point of being unusable. Is this a known problem?
Edit: https://gitea.com/gitea/act_runner/issues/379

@nodiscc if you're comfortable saying, which continent are you located on, and what timezone/time of day are you accessing Gitea.com? I'm running operations for gitea.com and so your feedback is helpful/appreciated :)

Is there a particular concern to use - instead of _?

It should be act_runner

which continent are you located on, and what timezone/time of day are you accessing Gitea.com

Europe, GMT+1. I just issued a request to https://gitea.com/gitea/act_runner/issues/nonexisting, if that helps you look through the logs (page load took 13s, https://gitea.com/assets/js/index.js?v=1.22.0~dev-233-g796ff26e0 didn't load at all, timeout)

Is there a particular concern to use - instead of _

Most executables from Debian packages use - instead of _, all user/group names use -, also _ is considered a word separator by many programs/editors, for consistency I always use - in file names unless there is a good reason.
$ ls /usr/bin/ | grep '\-' | wc -l
620
$ ls /usr/bin/ | grep '_' | grep -v x86|wc -l
105
$ grep '\-' /etc/passwd|wc -l
9
$ grep _ /etc/passwd | wc -l
0

Do you still want me to change it? Which parts (executable name? directory names? user name?)

I personally find - more common and friendly than _ and would even go as far as renaming act_runner to act-runner.

Using - instead of _ has implications on text selection and copy/paste. By using _ in the binary name, it means when people double click on a part of the string for copying from docs etc, they will get the full act_runner instead of either just act or runner.
Regardless of which is better to use, as the built binary name uses _ right now, I recommend that the docs should use that to stay consistent.
(thanks for the docs PRs btw, they are very appreciated 😄 )

Yes, we can have other PRs to discuss/do the renaming. But currently, please keep consistent on this PR.

Changed all occurrences of act-runner to act_runner.


Complete branching steps for Rancher 2.9 for Elemental

Tasks

[x] change the rancher-version annotation to catalog.cattle.io/rancher-version: '>= 2.9.0-0 < 2.10.0-0' while adding charts to dev-v2.9 branch. We do this so we can add patches to a particular Rancher minor version, in this case it would be the Rancher 2.9 line.
[x] must have a new chart inside the rancher/charts repository that has a version 104.0.0+upX.Y.Z instead of 103.x.x+upX.Y.Z
[x] testing

Performed just basic testing (chart installation and creation of a MachineRegistry and generation of a ISO via an associated SeedImage).
The chart is the same landed on Rancher 2.8.4, with the difference of the Rancher versioning annotation.


Add test for $unwind not setting all fields

Description
Refs #2914.

Readiness checklist

[ ] I added/updated unit tests.
[ ] I added/updated integration/compatibility tests.
[ ] I added/updated comments and checked rendering.
[ ] I made spot refactorings.
[ ] I updated user documentation.
[ ] I ran task all, and it passed.
[ ] I ensured that PR title is good enough for the changelog.
[ ] (for maintainers only) I set Reviewers (@FerretDB/core), Labels, Project and project's Sprint fields.
[ ] I marked all done items in this checklist.

#4340


Only keep trying if Timeout exception

How do you know this covers all possible cases where we might want to retry? Seems quite limited to me.
I plan on a different strategy. To move the download to a separate service and unblock startup.

This covers the only case documented by the package requests as "safe to retry". It will cover connection and response timeouts. Any other exception would mean connection is not available. And of course we catch the case something unexpected happens.
I like your approach though. It may be better and maybe we can change strategy if we don't need to do our thing with steam is not running. Would like to hear your new idea :)

My concern is the connection could become available later. The purpose of this is essentially that we may not have internet yet, so we are retrying until we do. I think these will break the current flow.

I could see a use case were this can "break" things. The breakage could come from a system that is only powered on and off without any restart of the session, and the connection does not become available before the session. It will manifest as the chimera-data never being updated. If that is the case we can enable NetworkManager-wait-online.service. This will delay the boot process about 10 seconds when no connection is available and wait for it to be online when configured (YMMV).
The final solution, as you said is to make our data retrieval asynchronous so the data can be available on next boot at least.

Sorry, but I am not confident in these changes.


Responsive tooltip does not work as expected

md:tooltip results in the arrow always being visible.  Arrow should be invisible until :hover state makes it visible.
Additionally, :hover state on md:tooltip fails to make the pseudo element containing the tootltip text visible.
Daisy UI v2.6.4
Tailwind v3.0.23

tooltip does not support responsive prefixes.
As you can see on the table here, class names are not labeled as Responsive
Class names that are responsive and accept prefixes (sm:, md:, lg:, etc.) have Responsive in the table. like this one:

The reason is, I don't think there's a need for an element to have tooltip on a specific screen size. Can you tell my why you needed this?

Thanks @saadeghi , our use case is site navigation.  On small screens the navigation is vertical and displays both an icon and text.  On wider screens the navigation is horizontal and only displays the icon, so we want to display the text in a tooltip.
Small:

Wide:

Are menu items the same elements? And you teleport them to the drop-down using JS?
I think the most common practice here is using 2 different menus because they have different layouts.

Yes, the same elements. We don't teleport them as such. Just use responsive CSS to modify the layout. Trying to avoid duplicating markup.

I'm afraid it's not worth it to make the tooltip class itself responsive. This class like almost all other components is giving style to its children (before and after in this case) in many ways. If I make it responsive, Tailwind will generate responsive classes for all possible combination of parent/child elements and this will increase the file size unnecessarily.
Other than that, it opens doors to a way I'm not willing to take: People will ask for weird combinations like what if an element has badge style on small size and then it has tab style on medium size and has btn style on the other size... and it's impossible to draw the line while it creates countless unexpected incompatibilities between components.
I think it's better to stick with the consistency of components. If it's a tooltip, it looks like tooltip on all screen sizes. And in your case, I think you should use separate HTML for navbar and the dropdown because they are different components and they have different layouts.
And it's not really duplication if you think about the result UI.

Hi @saadeghi , thanks for you consideration.

If I make it responsive, Tailwind will generate responsive classes for all possible combination of parent/child elements and this will increase the file size unnecessarily.

Correct me if I'm wrong, but shouldn't Tailwind's JIT/purge take care of this?  Surely the file size would only increase if the tooltip is actually used with a responsive prefix.

I think you should use separate HTML for navbar and the dropdown because they are different components and they have different layouts.

I still disagree that they are different components.  Semantically and functionally the navigation is exactly the same thing.  However I understand that you need to maintain consistency and avoid incompatibility, so I accept this justification.


Backoffice: Filter userExist and userIsLoggedIn

Motivation
it is possible to delete the current user using the current user's account, so its better to add a layer of filter to increase the robustness of the application, despite sacrificing a bit of performance
To do:

[ ] Rename SessionUserExist.Java to SessionUserLoggedIn.java
[ ] Create SessionUserExist.java
[ ] Add SessionUserExist filter to every backoffice route, sequentially after SessionUserLoggedIn.Java

Nope, it is actually impossible to delete the current user.


Support invoking dispatch script

Example yaml:
--- interfaces:
- name: eth1
 type: ethernet
 state: up
 dispatch:
   post-activation: |
     echo post-up-eth1 | systemd-cat
   post-deactivation: |
     echo post-down-eth1 | systemd-cat

The post-up holds the content of script to be invoked after activation.
The post-down holds the content of script to be invoked after
deactivation.
Nmstate might append additional lines to make sure this script is only
invoked for specified interface.
By default, we are storing the dispatch script to
/etc/NetworkManager/dispatcher.d folder, please use system variable
NMSTATE_NM_DISPATCH_DIR to change that.
The dispatch script is not protected by checkpoint, user will get a INFO
log message when they try to modify dispatch script.
Integration test cases included.

Wait on PR #2426


Should not-allowed events fail, or exit neutral?

const tools = new Toolkit({
  event: ['pull_request.opened', 'pull_request.synchronize'],
});

if I just edit pull request comment and triggered pull_request.edited, it would return exit 1. this looks something has failed even it just skipped.

should we allow to return 78 in that case? https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/ what do you think?
Originally posted by @banyan in https://github.com/JasonEtco/actions-toolkit/issues/36#issuecomment-463015991

I've opened this as a separate issue so that it doesn't get lost @banyan! I wanted to make sure I'm understanding your use-case.
I definitely agree that we should be exiting with a neutral status code 78 as per this doc - we can make use of the exit.neutral() method added in #39. I just wanted to highlight this:

When an action returns this exit status, GitHub terminates all concurrently running actions and prevents any future actions from starting.

☝ this is the behavior I'm looking for, without the side effect of the failed status. @banyan if you want to open a PR that'd be wonderful 😍


cTab settings module.

When merged this pull request will:

Adds a new cTab settings module.
I have tested this and it appears to work.

Requested here: https://github.com/Global-Conflicts-ArmA/Olsen-Framework-Arma-3/issues/155

That's a good solution, but would that cause any problems if the mod was removed? Would CBA waiting for something that never happens ever be a problem or a big performance issue?

wouldn't be a big performance issue but you are right, needs the cfgPatches check. Pushed the exit in the last commit.


Fix gradient scaling to account for world_size normalization

Context
What is the purpose of this PR? Is it to

[ ] add a new feature
[x] fix a bug
[ ] update tests and/or documentation
[ ] other (please add here)

Please link to any issues this PR addresses.
Changelog
What are the changes made in this PR?

FSDP/FSDP2/DDP will normalize the gradients by world_size when performing all_reduce. For a sequence processing task where the desired loss is scaled by the total number of non-padded & non-ignored tokens this requires this normalization be undone. For example if world_size = 2, and we have 2 sets A, B of gradient producing tokens, the total loss we desire is loss(A) + loss(B) / (|A| + |B|) where the normalization factor 1 / (|A| + |B|) is currently being handled by scale_grads: https://github.com/pytorch/torchtune/blob/3518492f43a8a5a462cbd604be4101268ff5bd52/recipes/full_finetune_distributed.py#L780

If A, B are processed on separate data parallel workers the current gradients would be produced by loss(A) / 2 + loss(B) / 2, and with the normalization done as before our loss becomes (loss(A) + loss(B)) / (2 * (|A| + |B|)). This PR accounts for world_size cancelling out the scaling factor.
I haven't seen very large differences wrt loss curves in my preliminary experiments after this change:

Where world_size means the gradient scaling factor is world_size / num_tokens and otherwise 1 / num_tokens. The commands to replicate these plots being:
tune run --nproc_per_node 2 full_finetune_distributed --config llama3_2/3B_full metric_logger=torchtune.training.metric_logging.WandBLogger metric_logger.project=llama3.23b_fix metric_logger.name=world_size dataset.packed=True tokenizer.max_seq_len=512 compile=True
tune run --nproc_per_node 2 full_finetune_distributed.py --config configs/llama3_2/3B_full metric_logger=torchtune.training.metric_logging.WandBLogger metric_logger.project=llama3.23b_fix_noprompt metric_logger.name=world_size dataset.packed=True dataset.train_on_input=False tokenizer.max_seq_len=512 compile=True
Someone with more compute budget can probably get a better idea of the effect for larger models.
Test plan
Please make sure to do each of the following if applicable to your PR. If you're unsure about any one of these just ask and we will happily help. We also have a contributing page for some guidance on contributing.

[x] run pre-commit hooks and linters (make sure you've first installed via pre-commit install)
[ ] add unit tests for any new functionality
[ ] update docstrings for any new or updated methods or classes
[x] run unit tests via pytest tests
[ ] run recipe tests via pytest tests -m integration_test
[ ] manually run any new or modified recipes with sufficient proof of correctness
[ ] include relevant commands and any other artifacts in this summary (pastes of loss curves, eval results, etc.)

UX
If your function changed a public API, please add a dummy example of what the user experience will look like when calling it.
Here is a docstring example
and a tutorial example

[ ] I did not change any public API
[ ] I have added an example to docs or docstrings

Thanks @mirceamironenco for finding this bug and for making the fix! Apologies for the delay in getting back to it, I wanted to put together a minimal repro to validate this myself (I trust the code pointers, but I like seeing numerical parity). So I put together the following script(s) to convince myself. Can confirm that on identical toy models with identical data we see (grad on N devices) == (grad on single device) / N. Let me run some more experiments to see to what extent this will affect loss curves on larger world sizes. If there is an impact, we should give people an fyi before landing. Will get back to you soon once I run the experiments!


New benchmark version (1.8.0)

Benchmark version: https://github.com/google/benchmark/releases/tag/v1.8.0
Only patch needed was removing minimum cmake. All other patches have been resolved within benchmark itself.

As far as I know gbenchmark is not covered in CI. I had to pass -DENABLE_BENCHMARKS=ON and -DENABLE_GBENCHMARK=ON into cmake (internal tests) to built it. Then I make and run ./tests/blt_gbenchmark_smoke. Current output:
[meemee@ruby965:blt_build]$ ./tests/blt_gbenchmark_smoke
2023-05-10T17:54:56-07:00
Running ./tests/blt_gbenchmark_smoke
Run on (56 X 2201 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x56)
  L1 Instruction 32 KiB (x56)
  L2 Unified 1024 KiB (x56)
  L3 Unified 39424 KiB (x2)
Load Average: 19.52, 20.16, 20.86
***WARNING*** Library was built as DEBUG. Timings may be affected.
--------------------------------------------------------------------------
Benchmark                                Time             CPU   Iterations
--------------------------------------------------------------------------
benchmark_smoke_empty                 2.78 ns         2.78 ns    255772237
benchmark_smoke_spin_loop/8           43.5 ns         43.4 ns     16253492 items_per_second=184.158M/s
benchmark_smoke_spin_loop/512         2458 ns         2457 ns       285129 items_per_second=208.345M/s
benchmark_smoke_spin_loop/8192       39114 ns        39105 ns        17907 items_per_second=209.489M/s
benchmark_smoke_accum_loop/8          47.4 ns         47.4 ns     14771168 items_per_second=168.749M/s
benchmark_smoke_accum_loop/512        2716 ns         2716 ns       256237 items_per_second=188.547M/s
benchmark_smoke_accum_loop/8192      43117 ns        43095 ns        16183 items_per_second=190.089M/s

Not really sure how to build gbenchmark as Release yet.

I had to change a smoke test to avoid a weird -Wdeprecated-declarations warning. Upon doing a small amount of investigation google benchmark is aware of the issue and its a GCC bug?
It's fixed now but here was the warning if interested:
[ 68%] Building CXX object blt/thirdparty_builtin/benchmark-1.8.0/src/CMakeFiles/benchmark_main.dir/benchmark_main.cc.o
/usr/workspace/meemee/blt/repo/tests/smoke/blt_gbenchmark_smoke.cpp: In function 'void benchmark_smoke_empty(benchmark::State&)':
/usr/workspace/meemee/blt/repo/tests/smoke/blt_gbenchmark_smoke.cpp:17:48: warning: 'typename std::enable_if<(std::is_trivially_copyable<_Tp>::value && (sizeof (Tp) <= sizeof (Tp*)))>::type benchmark::DoNotOptimize(const Tp&) [with Tp = long int; typename std::enable_if<(std::is_trivially_copyable<_Tp>::value && (sizeof (Tp) <= sizeof (Tp*)))>::type = void]' is deprecated: The const-ref version of this method can permit undesired compiler optimizations in benchmarks [-Wdeprecated-declarations]
     benchmark::DoNotOptimize(state.iterations());
                                                ^
In file included from /usr/workspace/meemee/blt/repo/tests/smoke/blt_gbenchmark_smoke.cpp:6:
/usr/WS2/meemee/blt/repo/thirdparty_builtin/benchmark-1.8.0/include/benchmark/benchmark.h:485:5: note: declared here
     DoNotOptimize(Tp const& value) {
     ^~~~~~~~~~~~~
/usr/workspace/meemee/blt/repo/tests/smoke/blt_gbenchmark_smoke.cpp:17:48: warning: 'typename std::enable_if<(std::is_trivially_copyable<_Tp>::value && (sizeof (Tp) <= sizeof (Tp*)))>::type benchmark::DoNotOptimize(const Tp&) [with Tp = long int; typename std::enable_if<(std::is_trivially_copyable<_Tp>::value && (sizeof (Tp) <= sizeof (Tp*)))>::type = void]' is deprecated: The const-ref version of this method can permit undesired compiler optimizations in benchmarks [-Wdeprecated-declarations]
     benchmark::DoNotOptimize(state.iterations());
                                                ^
In file included from /usr/workspace/meemee/blt/repo/tests/smoke/blt_gbenchmark_smoke.cpp:6:
/usr/WS2/meemee/blt/repo/thirdparty_builtin/benchmark-1.8.0/include/benchmark/benchmark.h:485:5: note: declared here
     DoNotOptimize(Tp const& value) {

LMK if there is a better solution to setting gbenchmark to Release. See patch:
https://github.com/LLNL/blt/blob/44b01efd7b18fb4257c24d1fc2098c2e5f01e51e/thirdparty_builtin/patches/gbenchmark-2023-05-11-set-build-type.patch

Can you add a release note?

Updated tests to include 's', since I was getting the following log:

log(0): value passed to --benchmark_min_time should have a suffix. eg., 30s for 30-seconds”


build failing on m1 Mac

When trying to build on m1 Mac the build is failing with below errors
quickwit-0.2.0 %  RUST_BACKTRACE=1 cargo build
Compiling quickwit-cli v0.2.0 (/Users/ayalar/quickwit-0.2.0/quickwit-cli)
Compiling num_cpus v1.13.1
Compiling parking_lot_core v0.8.5
Compiling signal-hook-registry v1.4.0
Compiling socket2 v0.4.2
Compiling cpufeatures v0.2.1
Compiling which v4.2.2
Compiling time v0.1.44
error: failed to run custom build command for quickwit-cli v0.2.0 (/Users/ayalar/quickwit-0.2.0/quickwit-cli)
Caused by:
process didn't exit successfully: /Users/ayalar/quickwit-0.2.0/target/debug/build/quickwit-cli-2647c80d0bef984e/build-script-build (exit status: 101)
--- stderr
thread 'main' panicked at 'byte index 7 is out of bounds of ``', quickwit-cli/build.rs:28:27
stack backtrace:
0: rust_begin_unwind
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14
2: core::str::slice_error_fail
3: core::str::traits::<impl core::slice::index::SliceIndex for core::ops::range::RangeTo>::index
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/str/traits.rs:289:21
4: core::str::traits::<impl core::ops::index::Index for str>::index
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/str/traits.rs:64:9
5: <alloc::string::String as core::ops::index::Index<core::ops::range::RangeTo>>::index
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/string.rs:2228:10
6: build_script_build::main::{{closure}}
at ./build.rs:28:27
7: core::result::Result<T,E>::map_or
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/result.rs:793:22
8: build_script_build::main
at ./build.rs:23:27
9: core::ops::function::FnOnce::call_once
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
quickwit-0.2.0 %
quickwit-0.2.0 % rustc --version
rustc 1.57.0 (f1edd0429 2021-11-29)
quickwit-0.2.0 % cargo --version
cargo 1.57.0 (b2e52d7ca 2021-10-21)

Thanks @galactus009 for reporting this bug. I have a M1 and I was working on cargo 1.56, everything worked well with 1.56.
I've just updated cargo/rustc to 1.57 and I had a couple of minor issues, there are formatting errors that are now raised with the new version of cargo. I will fix that.
But I did not reproduced the error "thread 'main' panicked at 'byte index 7 is out of bounds of ``', quickwit-cli/build.rs:28:27".
Can you make a cargo clean first? And while I fix the bugs on 1.57, you can try with cargo 1.56.

hello
I am getting same error even after downgrading to 1.56
quickwit-0.2.0 % cargo --version
cargo 1.56.0 (4ed5d137b 2021-10-04)
quickwit-0.2.0 % rustc --version
rustc 1.56.1 (59eed8a2a 2021-11-01)
% cargo clean && cargo build
(o/p truncated)
Compiling spin v0.9.2
error: failed to run custom build command for quickwit-cli v0.2.0 (/Users/ayalar/quickwit-0.2.0/quickwit-cli)
Caused by:
process didn't exit successfully: /Users/ayalar/quickwit-0.2.0/target/debug/build/quickwit-cli-4d3090bba1777188/build-script-build (exit status: 101)
--- stderr
thread 'main' panicked at 'byte index 7 is out of bounds of ``', quickwit-cli/build.rs:28:27
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Mmm, ok I think I understood, it's not directly related to quickwit code. The faulty code is as follows:
let git_commit_hash = Command::new("git")
    .args(&["rev-parse", "HEAD"])
    .output()
    .map_or("unknown".to_string(), |output| {
        let hash = String::from_utf8(output.stdout).unwrap();
        String::from(&hash[..7])
      });

Can you tell me the output of the following command git rev-parse HEAD?

Hello
apologies. I downloaded the zip file then the build was failing. but when I git cloned v0.2.0 tag and built it worked fine.
Sorry for the rehearing


In Codeunit 8612 make function InsertTamplate external

Hey,
we would like that function InsertTablate in Codeunit 8612 - Config. Template Management to be External instead of Local function.
Thanks in addition.
Best regards

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


Lots of Warnings for "Could not find Application" (appengine apps)

Not sure if something has shifted underneath us again on the platform, but now seeing lots of this from running a new inventory.  Some of these projects don't have appengine apps to begin with.  So, perhaps it's something we need to handle better?
018-02-16 15:12:25,721 WARNING google.cloud.forseti.common.gcp_api.appengine(get_app): <HttpError 404 when requesting https://appengine.googleapis.com/v1/apps/<some project>?alt=json returned "Could not find Application "<some project".">

Warning should not get logged for expected responses from the API: https://github.com/GoogleCloudPlatform/forseti-security/blame/2.0-dev/google/cloud/forseti/common/gcp_api/appengine.py#L309


TODO List General Content Big Fixes

TODO:

Add apt and pacman installs options
Tut 3, open firewall ports for openmpi
Add tcl for arch lmod dependencies

Hi @nyameko to add tcl for arch lmod dependencies.
We used this command : sudo apt install -y tcl tcl-dev lua5.3 lua-posix bc lua-filesystem and it worked
I hope I understood the query correctly

Thanks @thandiwe-01 , you can ignore these issues. These are here for us to fix bugs in the SCC Content before the Selection Round next year


Storing secret key as an environment variable

Hello, I'm trying to use your lib with Slim and I'm having some trouble with storing the secret key as an environment variable as sugested in the docs. I have a middleware to read a file where some data is stored (including the secret key for my token) and add the data to the environment variables, then the token middleware is executed to validate the request token. The problem is, by the time the token middleware is executed, the environment variable is empty. I'm aware that Slim's middlewares use LIFE (last in first executed) order of execution but I can't seem to find the right way.
Here is an example:
$app->add(new \Slim\Middleware\JwtAuthentication([
    "rules" => [
        new Slim\Middleware\JwtAuthentication\RequestPathRule([
            "path" => "/",
            "passthrough" => ["/auth"],
        ]),
        new Slim\Middleware\JwtAuthentication\RequestMethodRule([
            "ignore" => ["OPTIONS"]
        ])
    ],
    "secret" => getenv("SECRETKEY"), // Getting empty value
    "error" => function ($request, $response, $arguments) {
        $data["status"] = false;
        $data["message"] = $arguments["message"];
        return $response->withJson($data);
    }
]));

$app->add(function($request, $response, $next){
   //parses file containing the data
   putenv("SECRETKEY");
   $response = $next($request, $response);
   return $response;
});

When the request is made, I get the message "Key may not be empty".
Any suggestion?

Is there a need to do the putenv() in a middleware? You could set the environment before doing $app->run(). For example in the example below Dotenv package is used for setting the environment:
https://github.com/tuupola/slim-api-skeleton/blob/master/app.php#L22-L23

Yes, because I need to read the file based on some header passed on the request, so the putenv() needs to be executed inside a middleware.

Ok. Not really sure. You could try debug it with using a global variable instead of environment. Just to be sure, is that how you really call putenv in the code? Code above sets an empty value to SECRETKEY. To set some value it should be:
putenv("SECRETKEY=supersecretkeyyoushouldnotcommittogithub");

You could try debug it with using a global variable instead of environment. Just to be sure, is that how you really call putenv in the code? Code above sets an empty value to SECRETKEY.

In the real code it was right, there was a typo in the example.
Using containers solved the problem. Thanks mate.


Add three fantom vaults

BASED-BSHARE
Vault: 0xaC16fd4821e1Bf39148c374f02874e642E6CB8FA
Strategy: 0xF58431c634759bC20793EBB67cce1671EB43E97d
Want: 0x5748b5Dd1f59342f85d170c48C427959c2f9f262
PoolId: 5
Exploding Shrapnel
Vault: 0xE480703dD6959D997359B675B7b2C008f8778e5a
Strategy: 0x7f7Fb573CBdbc2a7E349E5184bC39fB8eAEB88ce
ChefPoolId: 50
WantPoolId: 0x8fdd16a23aebe95b928f1863760618e9ec29e72d000100000000000000000166
Boomer Beets
Vault: 0x19D1c824b2CAC7494095C112c6f98823Bcfc9F3f
Strategy: 0xceb6d118640FF21ED47de296669Ba7A74752942b
ChefPoolId: 62
WantPoolId: 0x8fdd16a23aebe95b928f1863760618e9ec29e72d000100000000000000000166

Why not just swap BSHARE to BASED for LP1 instead of 4 token route?

Because the other route has way deeper liquidity.
Swapping just 5 BSHARE to BASED has over 4% price impact.

There is $500K liquidity? Swapping through the pair makes way more sense. If there is not enough liquidity through the pair we shouldnt vault it.

There is $500K liquidity? Swapping through the pair makes way more sense. If there is not enough liquidity through the pair we shouldnt vault it.

Yeah I see your point. The 4 token route would pay off at a high vault TVL, but in the beginning it won't outweigh the 3x slippage.
I'll just redeploy it with the direct route.

New strategy: StrategyBeethovenxSpiritRouter (https://github.com/beefyfinance/beefy-contracts/pull/172)
Beethoven X recently launched farms with reward tokens that don't have proper liquidity on their side.
"One God Between Two Stables" is one such farms and rewards in BEETS + DEUS.
DEUS however can only be swapped over community pools with very low liquidity.
This raised the need for a new strategy that utilizes a second DEX that supports the respective reward token.
StrategyBeethovenxSpiritRouter uses both the Beethoven X(for Beets) and SpiritSwap(for DEUS) routers to swap all rewards for native. Then after subtracting the fees, native is swapped for input again using the SpiritSwap routes, which provides deep liquidity for the DEUS-DEI pair.
This strategy can potentially be reused for future dual reward farms that suffer from a similar problem.

All beethovenX strats have callReward as a write function instead a view function. This will not align with whats needed for our cowllector, they will need to be redeployed.


Add a weather app.

Describe the project
I want to add a weather app made using HTML, CSS , JAVASCRIPT and API.
Issue Type:

[ ] Bug Report
[ ] Feature Request
[ ] Documentation
[x] New Project

Please assign me this issue.

@TusharKesarwani I want to work on this issue under SSOC 2.0, Kindly assign me this issue.

I can create a weather app in react kindly assign me this issue

I want to work on this as I have knowledge and experience in what you are asking for. So, kindly assign me this task.

I can contribute to this using HTML,CSS,JS and API .Please assign this to me as I can also provide it a good UI design as well...under SSOC'2023

Hi @TusharKesarwani I would like to work on this weather app. Can you assign me this task under SSOC'23?

Hello @TusharKesarwani  I have build some weather apps using html ,css  , js and some using react . Can you please assign me this issue...

Hiii sir I want to contribute to this issue . So please  assign me this task.

Hey, I want to work on it as I already created it and want to brush my skills.Please assign it to me .

Hello @TusharKesarwani , I am mentee under SSOC program. I want to work on this issue. So , please assign issue to me .

I would like to work on this under SSOC'23. Please assign it to me and oblige. Thank you.

Hey @TusharKesarwani  ,i have made some clone using HTML ,CSS , JS and Api and i would like to work on this issue , can you please assign it to me?

@TusharKesarwani assign this issue to me.

@TusharKesarwani assigne this issue to under ssoc2.023

I am excited to solve this issue using HTML,CSS,Javascript,Apis. please Assign me

Hello @TusharKesarwani ! I would want to work on this weather app. I would be using React and APIs from weatherapi.com. Please assign me this issue. #SSoC'23

I would like to  work on this using HTML,CSS,JS and API .Please assign  me under SSOC'2023

assign this issue am work on Weather app so you assign me under SSOC 2.0

Hi @TusharKesarwani, this is Sayandeep Dutta, a Frontend Developer with prior experience of more than 1 year and this year participating in SSOC'2023. I would like to work on this project. Assign me to get the best result. Thank you.

I would like to work on this project, Please assign me this issue.

Hey @TusharKesarwani ,
I'm Md Vadiyat Naqvi.
Kindly assign this issue to me, i'm proficient in HTML, Css and JavaScript and the main thing is like this projects i had done earlier, i believe i'll complete this issue with more fun and learning new things like this prjects i had done earlier also you may check my GitHub account and see the images attached to this comment !
Github Link : https://github.com/mdvadiyatnaqvi/weatherApp

Hi @TusharKesarwani I want to work on this project I will work on this project by using React Js and weather api . Please assign me under the label of SSOC 2.0

Hey @TusharKesarwani
I Would Love To Work On This
So , Please Assign It To Me Under SSoC'23

Hello @TusharKesarwani I can build  weather apps using HTML, CSS , JAVASCRIPT and API.  . Can you please assign me this issue...

Hi @TusharKesarwani I would like to work on this issue. Please assign this issue under SSOC'23.

Hi @TusharKesarwani,  I would like to contribute to this. Please assign me this issue.

Hi @TusharKesarwani I have already created a weather app as one of my personal projects. Please assign this issue to me. I can make modifications to the existing project as well.


[DEV] Uniform response content type

[ ] Using application/json instead of text/plain on successful response.
[ ] Adding response msg upon successful registration at /register endpoint

HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Content-Type
Access-Control-Allow-Origin: *
Content-Length: 0
Date: Sat, 11 Sep 2021 09:50:37 GMT

{"message":"registration successful"}

application/json is returned if the request path ends with .json


change text color when selected.

How can I do let selected tab's text color is highlight
.

Did you look at the code of the demo?

https://github.com/ogaclejapan/SmartTabLayout/blob/master/demo/src/main/res/layout/custom_tab.xml
https://github.com/ogaclejapan/SmartTabLayout/blob/master/demo/src/main/res/color/custom_tab.xml

ok, thank you, I set the defaultTextColor with colorStateList, it doesn't work. I must use custom textView.

defaultTextColor is not supported colorStateList.
I'll try to implement in the next version :+1:
Thank you for reporting!


Clean up HandleManagerTests and add more tests

No functional changes, just adding tests.
If you have other suggestions for tests, please let me know!
I'm going to do a similar pass on AndroidHandleManager and AndroidEntityHandleManager as well.

oh, love it! I will update this to use that pattern.


Message if no output produced

I ran HawkeysDups and got the following:

I'm not sure if this means there's no dupes or if somthign didn't work properly.
Would you consider a message if there are no dupes / or if the output of the command is indeed empty, eg:
--- Command succeeded with empty output ---

Great idea,  I have added a PR for this.

Awesome, thanks @tris203 !


Reorder master DAG for quicker report

The master DAG run currently takes about ~1 hour to execute all the DAGS.
I have observed that some of the long-running DAGs like Redshift cluster management, Sagemaker,
EMR EKS PI job, etc. are run later in their groups. This PR re-order the DAG groups to run
the long-running DAGs first so that we reduce the overall execution time for the master DAG.
The duration was down to 37 mins from 1-hour with this minimum re-ordering.

Previous Gannt chart

New Gannt chart


Complete creation of landing page that utilizes the class labels and offer primary entries and variants

A couple of thoughts:

If there is no over-arching class, and no variants, then the user should just be taken to the results page that we show currently.  That is probably the case for the majority of recognized signs, currently.

Assuming there is a class label for the selected sign and/or that the selected sign has at least one variant, then we go to the intermediate page you are now designing.  But that page should remain open, and the selected occurrences should be displayed in a separate window.  So the user could come back to that intermediate page and display a different choice.

THANKS.

examples.pdf

Please read the suggestions above, as well :-)
My suggestion for formatting:

further-corrections-3-7.pdf

The remaining issues from this ticket are all included now in other tickets, as much progress has been made :-)
Closing this...


Create blog-post-Education-Material-available.md

Added blog post: [Education Material Available].

The build failing looks like its due to some settings/secrets issue and not related to the actual content of the PR.
The blog post looks like its missing a couple things, namely frontmatter to give it a date and a directory that it sits in so that it has a link on the sidebar

Here's the one existing blog post to model it after https://github.com/make-models-fair/make-models-fair.github.io/tree/main/content/en/blog/updates/first-post

Perfect, thanks. For future reference, if you create a new branch for pull requests then it'll help keep things tidier on your end the next time you need to checkout the main branch again and just for naming


DEP Update JS dependencies

Issue https://github.com/silverstripeltd/product-issues/issues/505

Just to confirm, @emteknetnz, updating the package.json file isn't necessary to get the updates that are in the yarn.lock file, right?
Just wondering if this is the case of running a generic yarn upgrade or whether it's specifically about the @silverstripe/eslint-config package, in which case we wouldn't need the package.json update at all, or could as well update all other constraints to their latest.

It seemed like the caret ^ on 0.0.x versions may not actually do anything, hence why I bumped it

TIL from https://github.com/npm/node-semver#caret-ranges-123-025-004

Allows changes that do not modify the left-most non-zero element in the [major, minor, patch] tuple.
... and no updates for versions 0.0.X.

In that case I wonder if there's a way how to update only the single dependency and its nested dependencies and not update other stuff, similarly to the difference between what composer require single/package:version vs composer update does, and whether we care in the ever-changing world of npm package versions.

@maxime-rainville ^ might be worth releasing eslint 0.1.0 for this reason so that the caret actually does something

In SEMVER, the >=0.0.0 <1.0.0 interval has a special meaning and set of rules. Going from 0.1.0 to 0.2.0 is considered a major release. So if you have a composer constraint like ^0.1.0, it will let you installed 0.1.2 but not 0.2.0.
NPM works the same way.
I can release @silverstripe/eslint-config: 0.1.0 if you want, but you'll have to update the constraint for it to be installable.

Yeah I think release it, I'm happy to update all the various package.json's (at a slightly later date)