Updated cookbook for habitat API post 0.56.0

Description

Added hab_user_toml resource for templating user.toml
Added auth token support for private organizations

auth_token is passed ont he command line for a package install
HAB_AUTH_TOKEN is templated into the service definition for the supervisor if specified

Remove invalid Habitat API options that no longer apply since Habitat 0.56.0
Added listen_ctl option for hab_sup resource
Added remote_sup option for communication with non-default supervisor
Locked supervisor version to hab version
Set launcher version to make sure it is updated appropriately for hab sup
Set the supervisor service to restart if hab-sup or hab-launcher package resources change
Removed validation of channel name, as channels can be arbitrarily created on bldr
Expanded testing to cover changes
Updated readme

Issues Resolved
This closes #106
This closes #102
Check List

[x] All tests pass. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD
[x] New functionality includes testing.
[x] New functionality has been documented in the README if applicable
[x] All commits have been signed for the Developer Certificate of Origin. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD

I tried if this PR would solve my issues regarding installing private packages, however it still fails when trying to install a private package. I think you missed to fix one spot, where it currently is tried to determine the availability of the package via an http request. You can find my PR to fix this here.
Otherwise I would love to see something like this get merged, however it probably would have been easier to follow along the changes if it would have been multiple PRs. I just hope you know how to get PRs merged within this repo. I was trying to get some feedback from the maintainers for a few weeks on the way the unsupported hab token should be implemented, but did not have any luck at all (I mostly got ignored when following official recommendations). I think we could do properties like you did, use the env var (as this is what hab usually does), or use a cookbook attribute (which would be neat as well, as you only have to specify it once)
However, last time someone needed to get a PR merged, they pinged @tas50 . Let's see how that goes this time...

@st-h I'll re-validate the stand alone package installation on my end and get that fix pulled in 👍 . Did you also attempt via service load, to where the supervisor itself handles the installation? That I validated thoroughly across the three service providers on our end as we use that workflow internally.
I'll see if I can poke anyone on the habitat/chef side and may break this up into multiple PRs if the maintainers would prefer.  I was largely just porting work over from updating the cookbook for internal use and wanted to start the conversation.

@st-h Validated the issue you were seeing. Pulled in your fix but had it use the auth_token property on the package resource. Validate the fix is working 👍 Thank you for catching that.

@wduncanfraser Yeah, iirc the service resource only seems to need the environment set on the init/upstart etc scripts. Otherwise setting the env var works well, except for the http request that bypasses the hab client, that causes the install resource to fail. That actually took me quite some time to figure out, as I wasn't expecting a wild http request to suddenly appear at all.
Let's hope we will get some feedback soon. I am running a patched version myself, but did not submit everything yet, I was hoping to get a response from the maintainers myself before doing so.

btw, this PR should fix #114 as well

Yeah, it would probably be good to depend on the hab search API in the future, as then it's less that has to be maintained in the cookbook itself. Though I will leave that task for a separate PR :)

@wduncanfraser absolutely 💯 I don't know how functional the search api actually currently is though - maybe that's why they used a plain http request in first place.
I just successfully ran a kitchen converge using your recent changes. So, it at least fixes all my initial converge issues with this cookbook. Will deploy this to test soon to see if I can find anything else.

@st-h Just wanted to check in and make sure everything was working for you. Sounds like the primary maintainer for the cookbook is on vacation ATM which is why it has been quite on the PR.

@st-h That would be @jtimberman to my knowledge.

I'll be taking a look at this PR over the next day or two and hopefully cutting a new release soon :)

@jonlives I'll work on getting this split up into smaller PRs today.

@wduncanfraser do you think you'll be able to get around to the smaller PRs? If time is a blocker I can go through the single larger PR.

@jonlives I apologize for the delay, got a little crazy on this end. Working on this now.

@jonlives Opened up new PRs breaking out changes.

Awesome thank you for getting to those, will go through them and try and get a new release cut as soon as I can.

Closing this PR in favour of the new sub-PRs containing the same changes


[REST] provide access to Bagri via REST

get document content from path specified (GET)
run XQuery against connected Schema (POST)
delete selected documents (DELETE)
.........

implementing it.. the following services are exposed:
/access: login/logout functionality
/clns: collections service
/docs: documents service
/query: query service
/schemas: schemas service (? not sure it should be published right now)

tested, works fine. closing the ticket.


Export the SBAS Result in Geotiff format

Dear Alexey,
Thank you so much for creating PyGMTSAR for process SAR imagery.
I want to learn SBAS processing using PyGMTSAR in land subsidence and deformation.
I have a question,
Can we export the results from LOS Displacement from SBAS as a geotiff format?
So that we can process the result in QGIS GIS app and overlay that with the other map
Best regards,
Argo.

Yes, that’s possible to export GeoTIFF files. But the best way is to open the output WGS84 NetCDF files in QGIS by the same way. QGIS app and GDAL tools have native NetCDF support for years.

what is the code for exporting the results from SBAS processing in google colab and PyGMTSAR?

See the Google Colab examples listed on GitHub: https://github.com/mobigroup/gmtsar


⭕ IOTSTOOL1985 - Foundation regression tests

Codecov Report

:exclamation: No coverage uploaded for pull request base (beta@2083420). Click here to learn what that means.
The diff coverage is 10.9%.

@@           Coverage Diff           @@
##             beta     #373   +/-   ##
=======================================
  Coverage        ?   64.05%
=======================================
  Files           ?      185
  Lines           ?     3950
  Branches        ?      604
=======================================
  Hits            ?     2530
  Misses          ?     1418
  Partials        ?        2

Impacted Files
Coverage Δ

src/common/privateFunctions.ts
22.85% <100%> (ø)

src/common/transform.ts
4.16% <4.16%> (ø)

...ty/trustedCertificate/trustedCertificateAdapter.ts
45.45% <50%> (ø)

...dCertificate/subtenantTrustedCertificateAdapter.ts
45.45% <50%> (ø)

src/client/sdkApiBase.ts
17.35% <50%> (ø)

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 2083420...856e79b. Read the comment docs.


Reporting capabilities?

Can you update the documentation to provide information on how to report on password-less authentication usage? Such as registration activities, so that an IT Admin can report on users who haven't yet enabled password-less authentication?

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

ID: ee6ac70d-5853-6a3a-0964-23b46910b4c4
Version Independent ID: a5beda87-9845-8807-6221-7fdc64079587
Content: Passwordless sign-in with the Microsoft Authenticator app - Azure Active Directory
Content Source: articles/active-directory/authentication/howto-authentication-passwordless-phone.md
Service: active-directory
Sub-service: authentication
GitHub Login: @iainfoulds
Microsoft Alias: iainfou

@Joe129 Thanks for the feedback !  I have assigned this issue to content author to investigate and update the document as appropriate.

Thanks for the feedback, @Joe129
The product team is working hard to bring this functionality. At this time, there's no such reporting available. You can also upvote and add your comments to https://feedback.azure.com/forums/169401-azure-active-directory/suggestions/36760324-provide-reporting-around-passwordless-phone-sign-i to help prioritize the work.
When this functionality is available, we'll update the docs accordingly.
For now, #please-close


AutoTrain advanced CLI: error: invalid choice: 'llm' (choose from 'app')

Is the interface undergoing changes? We are encountering various errors.

Please post more details in order for me to understand what the issue might be

While Google Colab instances cannot be initialized to reproduce errors, I encountered the same error consistently on my local PC (Windows 10 with RTX3090). The same error message was also replicated on Google Colab.
After conducting multiple experiments on various Google Colab instances, some resulted in installation errors, some displayed the same error message as mentioned above, and only once did it work properly.
I am experiencing a shortage of GPU resources, which makes Colab an essential choice for me. Could you provide me with some advice on how to deal with these issues regarding the package I have been using? Or is it possible that it should not be used yet due to ongoing development?
I believe your project is very meaningful and will become the future of Hugging Face. Thank you for your fantastic work.

Which version of autotrain-advanced are you using? Could you please try the latest version?

Hi Abhishek,
I'm trying to execute the "autotrain" command for training, but I'm getting the following error message.
(base) C:\Users\2021781>autotrain llm --train --project_name my-llm --model meta-llama/Llama-2-7b-hf --data_path . --use_peft --use_int4 --learning_rate 2e-4 --train_batch_size 12 --num_train_epochs 3 --trainer sft
usage: autotrain  []
AutoTrain advanced CLI: error: invalid choice: 'llm' (choose from 'app').
-->autotrain-advanced -> current Version - 0.5.2
If you try to install the latest version 0.6.2 (autotrain-advanced)
Again asking for dependency library "triton" latest version(triton==2.0.0.post1)
Trying to install "triton" library latest(triton==2.0.0.post1)  as well as lowest(triton==0.4.0) version's .
Getting the below error.
Requirement already satisfied: huggingface-hub>=0.14.1 in c:\programdata\anaconda3\envs\llama\lib\site-packages (from autotrain-advanced==0.6.2) (0.16.4)
INFO: pip is looking at multiple versions of autotrain-advanced to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement triton==2.0.0.post1 (from autotrain-advanced) (from versions: none)
ERROR: No matching distribution found for triton==2.0.0.post1
(llama) C:\Users\2021781>pip3 install triton==2.0.0.post1
ERROR: Could not find a version that satisfies the requirement triton==2.0.0.post1 (from versions: none)
ERROR: No matching distribution found for triton==2.0.0.post1
(llama) C:\Users\2021781>pip3 install triton==0.4.0
ERROR: Could not find a version that satisfies the requirement triton==0.4.0 (from versions: none)
ERROR: No matching distribution found for triton==0.4.0
(llama)
NOTE: Machine Details :
Windows 11
64-bit
RAM : 16GB.
Please provide the solution for above error.

(lmv4) C:\Users\Saheeq\Desktop\qasim\llamva-finetune>autotrain llm --train --project_name my-llm --model abhishek/llama-2-7b-hf-small-shards --data_path . --use_peft --use_int4 --learning_rate 2e-4 --train_batch_size 12 --num_train_epochs 3 --trainer sft
usage: autotrain  []
AutoTrain advanced CLI: error: invalid choice: 'llm' (choose from 'app')

I have created "lmv4 conda env with python 3.8" or 3.9 or 3.10, and 3.10
then install "pip install autotrain-advanced"
its only run python 3.8 version to 3.10 version
I have Alieware Gaming Computer with 64 GB RAM and RTX 4090 Nvidia GPU
I really need to resolve this issue, i have also tried on google colab but facing short resources error there.

3.11 is supported now. you need to use latest version. if pip doesnt work, install from source

I also have the same problem. On Windows pip installs the version 0.5.2 which doesn't accept any commands. Forcing pip to install version 0.6.2 fails when it can't install the triton 2.0.0.post1 dependency. From what I know, triton is a linux-only package.
So my question is, is Triton necessary to run autotrain-advanced, or can it run without it on windows? I recently used khoya_ss on windows to fine-tune stable diffusion and it gives warnings that triton not being available will disable some optimisations but other than that it works fine.

I got the same error? Where you able to find the solution?

Sort of... After a lot of work I managed to get it running on windows via WSL. The process of setting up everything was very painful - I had to install a lot of libraries (the right version of CUDA, all dependencies for pillow) and fix system paths before autotrain was able to install correctly. I managed to train an SDXL Lora via dreambooth in autotrain, but the resulting .safetensors file was not compatible with Comfy UI or Automatic1111, so I ended up going back to Kohya GUI, which currently works fine with SDXL and is probably the best choice for sdxl training on windows.

This package is very useful, but it seems to lack consideration for various environmental factors at a low-level. Additionally, due to its heavy reliance on diverse resources and hardware drivers for training, it appears to be a challenging task. It might be desirable to completely redesign the package's architecture.

--use_peft --use_int4 >> these two arguments are showing invalid after upgradation of autotrain-advance package. It is working fine on  0.6.51 this version

Hello,
Apologies for reopening this thread, I'm having the error bellow and I don't any reference in the internet on what am I missing.

autotrain  [] llm: error: the following arguments are required: --project-name

The command that I'm running is the following:
autotrain llm \
--train \
--project_name llama-angolan-tuned \
--model abhishek/llama-2-7b-hf-small-shards \
--data_path . \
--use_peft \
--use_int4 \
--learning_rate 2e-4 \
--train_batch_size 4 \
--num_train_ephocs 3 \
--trainer sft > trainer.log

Any hint? I'm running on Macbook M1 for learning purposes.

it clearly says what you need and what you have :) see project-name vs project_name ;)

ops! sorry my mistake... I looked into it thousands times, and the biased eyes always looked the same. Thanks!


Worker terminating with reason :normal after calling resolve_offset

We're using elsa as a wrapper for brod in our Elixir-project. We are facing unexpected behavior when calling brod's resolve_offset function. That is, our elsa consumer that operates on the same topic receives an exit signal with reason :normal. The exit signal arrives not immediately, but a short time after the call of resolve_offset. The consumer works perfectly fine, if we don't call resolve_offset on the same topic.
We tried to narrow down the reason for this and it seems the exit signal is originated somewhere in brod. We weren't able to follow the signal chain entirely, so take this with a grain of salt.
One thing we noticed is that the following changes in the parameters of with_conn stop the unexpected behavior and our consumer doesn't quit after calling resolve_offset on the same topic:
https://github.com/kafka4beam/brod/blob/master/src/brod_utils.erl#L156
%% @doc Resolve timestamp to real offset.
-spec resolve_offset([endpoint()], topic(), partition(),
                     offset_time(), conn_config(),
                    #{timeout => kpro:int32()}) ->
        {ok, offset()} | {error, any()}.
resolve_offset(Hosts, Topic, Partition, Time, ConnCfg, Opts) ->
  with_conn(
    % we changed this, as seen in get_metadata
    % kpro:connect_partition_leader(Hosts, ConnCfg, Topic, Partition, Opts),
    Hosts, ConnCfg,
    fun(Pid) -> resolve_offset(Pid, Topic, Partition, Time) end).

Do you have any idea if this is a bug or are we just doing it wrong?
We really appreciate any hints, since we've already spent days debugging this issue.

hi @smoes this is bug.
we'll have a look and fix.

Hi @smoes
which version brod are you using ?
also, please check which kafka_protocol is used too. (pined by mix.lock maybe)

We are using
brod, "3.9.5"
kafka_protocol, "2.3.3"

Forgot to mentioned: Tested and works as expected now. Thank you for the very fast fix!


learn doesn't retain login data from www

Describe your problem and - if possible - how to reproduce it
I'm logged in on https://www.freecodecamp.org, but learn.freecodecamp.org doesn't retain the login. I've tried using both Firefox and Chrome to see if the issue would be solved, but it didn't. My progress in the curriculum isn't tracked either. When clicking the Sign In button (top right), I'm taken back to https://www.freecodecamp.org where it tells me I'm logged in again.
Add a Link to the page with the problem
https://www.freecodecamp.org https://learn.freecodecamp.org
Tell us about your browser and operating system

Browser Name: Firefox Quantum
Browser Version: 60.0.2 (64-bits)
Operating System: Windows 7

If possible, add a screenshot here

Hi @bjorno43 we use cookies for configuring the login and session persistence. Can you check your DevTools

DO NOT SHARE a screenshot. Just confirm if you have those.

Firefox Quantum

I am not sure, does this variant disable cookies by default?

Hi @raisedadead I've confirmed that there were cookies present (though the default Firefox Quantum doesn't allow me to see which cookies exactly) and that they were not disabled or deleted on browser close by default. I've downloaded Firefox Quantum: Developer Edition to see if I could get more meaningfull information. However, my login details were retained perfectly fine there. So this led me to the conclusion something else must be going on.
After logging out in the default Firefox Quantum and logging back in again, the login details were retained perfectly fine as well. So I think that the cookie somehow was still valid for www, but not for learn. One noticable difference was that when the cookie was invalid voor learn, it opened up learn in a new tab every single time. When it was valid, it simply followed the url instead.

@bjorno43 and the same results on Chrome as well?

@raisedadead In Chrome I'm able to view the cookies more clearly. I can see cookies present for both www and learn. However, www has the access_token and userId present, while learn does not. I'm pretty sure the issue will solve itself there as well if I logout and back in again, but I will lose any debugging information that I still have access to right now in that browser. As I do not require a succesfull login in Chrome, I'm not sure if you want me to do that? The information present might be usefull to track the exact issue down.


Support multiple session properties in same header

Per RFC 7230 section 3.2.2, multiple header fields with the same name may
be combined into a single field with the values as a comma-separated list.

Looks good


Use the Segment Adapter for retrieving page visits

This fixes the last occurence of directly accessing the session in the
codebase

rebased and merged


Replace RStudio defaultURL option to an nbgitpuller link

Follow-up to https://github.com/2i2c-org/infrastructure/pull/1552
For some reason this doesn't work although same config worked ok on staging.
This one is changing the RStudio option to the nbgitpuller link.
Anyway, this should do the trick until we figure out the "why"s.

I've deployed this manually, but I noticed that setting defaultUrl to be the nbgitpuller link didn't work until I actually selected it from the configurator interface. I'm a bit confused right now to be honest, but at least it now works.


Bug: comments are indexed in mongodb

Hi,
I have encountered an issue with the creation of comments: when creating comments or updating its commentable resource, a MongoID exception raised saying that my operation failed with error 17280: "Btree::insert: key too large to index, failing my_db.my_commentable.$comments_1.
After some investigations, I found that the index comments_1 was created directly by mongoid_commentable in lib/mongoid/commentable.rb:
module Mongoid::Commentable
  extend ActiveSupport::Concern
  included do |base|
    base.embeds_many :comments, :as => :commentable
    if Gem::Version.new(Mongoid::VERSION) < Gem::Version.new('3.0.0')
      base.index [['comments', Mongo::ASCENDING]]
    else
      base.index 'comments' => 1 # Index created right here....
    end
  end

Why are you indexing the whole comment? Didn't you mean to index comment._id instead?

I encountered the same issue. I ended up just removing the base.index line completely, and everything worked fine afterwards; no issue creating indexes.


Updated dependencies to support final version of Kotlin 1.1.0

This will allow to release a new version addressing #2

Could this be merged ?

@jrgonzalezg Thank you, I will merge this and also publish a new release to JitPack

Thanks!. BTW, are there any slides / youtube talk where you have explained what you did here? I am fairly new to FP / coroutines and i do not find it easy to understand your implementation. Also, for what i have been checking after my PR it seems to me that you don't really use anything either from kotlin-reflect or from kotlinx-coroutines-core, am i right? If so they could be removed together with the kotlin-eap repo and the library will be lighter.

@jrgonzalezg Sorry for the delay with the answer. No, there's currently no other materials than the README.MD in the repo, but I considered writing a post about it. I will also fix the repositories & dependencies next time I update the project.

No problem, thanks!. And it would be nice to see that post if you write it at some point :)


403 response

I am having an issue where after successfully logging in, doing claudesync organization ls(or select) on mac(v14.6) results in an error.
Commands (reinstall to show newest version):
(base) xxx@Bens-MBP ~ % pip install claudesync
....
Successfully installed claudesync-0.3.8
(base) xxx@Bens-MBP ~ % claudesync api login claude.ai
....
Please enter your sessionKey: sk-ant-xxx
Logged in successfully.
(base) xxx@Bens-MBP ~ % claudesync organization ls
ERROR:claudesync.providers.claude_ai:Received a 403 Forbidden error. Your session key might be invalid. Please try logging out and logging in again. If the issue persists, you can try using the claude.ai-curl provider as a workaround:
claudesync api logout
claudesync api login claude.ai-curl
...
(base) xxx@Bens-MBP ~ % claudesync api logout
Logged out successfully.
(base) xxx@Bens-MBP ~ % claudesync api login claude.ai-curl
...
Please enter your sessionKey: sk-ant-xxx
Logged in successfully.

(base) xxx@Bens-MBP ~ % claudesync organization ls
Traceback (most recent call last):
  File "/opt/anaconda3/bin/claudesync", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/decorators.py", line 45, in new_func
    return f(get_current_context().obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/claudesync/utils.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/claudesync/cli/organization.py", line 18, in ls
    organizations = provider.get_organizations()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/claudesync/providers/claude_ai_curl.py", line 150, in get_organizations
    return [{"id": org["uuid"], "name": org["name"]} for org in response]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/claudesync/providers/claude_ai_curl.py", line 150, in <listcomp>
    return [{"id": org["uuid"], "name": org["name"]} for org in response]
                   ~~~^^^^^^^^
TypeError: string indices must be integers, not 'str'

Curl is installed:
(base) xxx@Bens-MBP ~ % curl
curl: try 'curl --help' for more information

Hi, like I mentioned last time, can you share the output of https://claude.ai/api/organizations from your browser?

Sure:
//<PHONE_NUMBER>5943
// https://claude.ai/api/organizations
[
{
"uuid": "a621cc80-xxxx",
"name": "xxx G",
"settings": {
"claude_console_privacy": "default_private",
"allowed_invite_domains": null
},
"capabilities": [
"chat",
"claude_pro"
],
"rate_limit_tier": "default_claude_ai",
"billing_type": "stripe_subscription",
"free_credits_status": "available",
"data_retention": "default",
"api_disabled_reason": null,
"api_disabled_until": null,
"billable_usage_paused_until": null,
"created_at": "2023-08-09T15:36:31.764797Z",
"updated_at": "2024-05-27T21:08:32.940249Z",
"active_flags": [
]

},
{
"uuid": "760aa33f-xxxx",
"name": "myself",
"settings": {
"claude_console_privacy": "default_private",
"allowed_invite_domains": null
},
"capabilities": [
"api"
],
"rate_limit_tier": "auto_api_evaluation",
"billing_type": "api_evaluation",
"free_credits_status": "available",
"data_retention": "default",
"api_disabled_reason": "out_of_credits",
"api_disabled_until": null,
"billable_usage_paused_until": null,
"created_at": "2024-03-26T05:08:49.011380Z",
"updated_at": "2024-03-26T05:08:49.011380Z",
"active_flags": [
]

}
]

Please retry with 0.4.0

Error is still present:
(base) xxx@Bens-MBP ~ % pip install claudesync
…
Successfully installed claudesync-0.4.0
(base) xxx@Bens-MBP ~ % claudesync api login claude.ai
…
Please enter your sessionKey: sk-ant-xxx
Logged in successfully.
(base) xxx@Bens-MBP ~ % claudesync organization ls
2024-08-01 18:53:56,157 - ERROR - Received a 403 Forbidden error. Your session key might be invalid. Please try logging out and logging in again. If the issue persists, you can try using the claude.ai-curl provider as a workaround:
claudesync api logout
claudesync api login claude.ai-curl
…
(base) xxx@Bens-MBP ~ % claudesync api logout
Logged out successfully.
(base) xxx@Bens-MBP ~ % claudesync api login claude.ai-curl
…
Please enter your sessionKey: sk-ant-xxx
Logged in successfully.
(base) xxx@Bens-MBP ~ % claudesync organization ls
Traceback (most recent call last):
  File "/opt/anaconda3/bin/claudesync", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/click/decorators.py", line 45, in new_func
    return f(get_current_context().obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/claudesync/utils.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/claudesync/cli/organization.py", line 18, in ls
    organizations = provider.get_organizations()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/claudesync/providers/base_claude_ai.py", line 36, in get_organizations
    return [
           ^
  File "/opt/anaconda3/lib/python3.11/site-packages/claudesync/providers/base_claude_ai.py", line 39, in <listcomp>
    if set(["chat", "claude_pro"]).issubset(set(org.get("capabilities", [])))
                                                ^^^^^^^
AttributeError: 'str' object has no attribute 'get'

Ok tried with 0.4.1 didn't work, can't login now but it seems to be because now to have successful login orgs need to be listed. Heres the debug stuff:
(base) xxx@Bens-MBP ~ % claudesync api login claude.ai
---
Please enter your sessionKey: sk-ant-sid01-xxx
2024-08-03 02:49:51,110 - DEBUG - Making GET request to https://claude.ai/api/organizations
2024-08-03 02:49:51,110 - DEBUG - Headers: {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0', 'Origin': 'https://claude.ai', 'Referer': 'https://claude.ai/projects', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate, zstd', 'Accept-Language': 'en-US,en;q=0.5', 'anthropic-client-sha': 'unknown', 'anthropic-client-version': 'unknown', 'Connection': 'keep-alive', 'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Site': 'same-origin'}
2024-08-03 02:49:51,110 - DEBUG - Cookies: {'sessionKey': 'sk-ant-sid01-xxx', 'CH-prefers-color-scheme': 'dark', 'anthropic-consent-preferences': '{"analytics":true,"marketing":true}'}
2024-08-03 02:49:51,457 - DEBUG - Response status code: 403
2024-08-03 02:49:51,457 - DEBUG - Response headers: {'Date': 'Sat, 03 Aug 2024 06:49:51 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Set-Cookie': '__cf_bm=JfXfX9eNdFWi.J.Kgna36ZMkrYU1_WekW_Hq4Pz3Pxg-1722667791-<IP_ADDRESS>-UTx9VMW_5uEu8Hs0sEXetMySDjwmn02t99LdO9Ve0zCfnn2p3AsgSGri8fQx6rSGZ1RipGkedIIzZTo_HV_81w; path=/; expires=Sat, 03-Aug-24 07:19:51 GMT; domain=.claude.ai; HttpOnly; Secure; SameSite=None', 'Vary': 'Accept-Encoding', 'Server': 'cloudflare', 'CF-RAY': '8ad45ec08cf818ee-EWR', 'Content-Encoding': 'gzip', 'alt-svc': 'h3=":443"; ma=86400'}
2024-08-03 02:49:51,457 - DEBUG - Response content: {"error":{"message":"We are unable to serve your request","type":"permission_error"}}...
2024-08-03 02:49:51,457 - ERROR - Received a 403 Forbidden error. Your session key might be invalid. Please try logging out and logging in again. If the issue persists, you can try using the claude.ai-curl provider as a workaround:
claudesync api logout
claudesync api login claude.ai-curl
Failed to retrieve organizations. Please enter a valid sessionKey.
Please enter your sessionKey: ^CAborted!
(base) xxx@Bens-MBP ~ % claudesync api logout

Logged out successfully.
(base) xxx@Bens-MBP ~ % claudesync api login claude.ai-curl
---
Please enter your sessionKey: sk-ant-sid01-xxx
2024-08-03 02:50:04,057 - DEBUG - Got HTTP 403
2024-08-03 02:50:04,058 - ERROR - HTTP request failed with status code 403. Response content: {"error":{"message":"We are unable to serve your request","type":"permission_error"}}. Request headers: ['-H', 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0', '-H', 'Cookie: sessionKey=sk-ant-xxx', '-H', 'Content-Type: application/json']
Failed to retrieve organizations. Please enter a valid sessionKey.

Can you successfully execute the curl command in your terminal?
curl -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0' \
     -H 'Cookie: sessionKey=sk-ant-xxx' \
     -H 'Content-Type: application/json' \
     https://claude.ai/api/organizations

No I get an error: {"error":{"message":"We are unable to serve your request","type":"permission_error"}},
If I use postman proxy and use my web browser, I get the same error:
  "error": {
    "message": "We are unable to serve your request",
    "type": "permission_error"
  }
}

Please open your browser’s developer tools and navigate to https://claude.ai. Create a new project and upload a file to it. Could you then share the request and response headers from this process?

To make the project (from the POST request to https://api.claude.ai/api/organizations/xxx/projects):
Request headers:
:authority: api.claude.ai
:method: POST
:path: /api/organizations/<ORG_ID>/projects
:scheme: https

accept: */*
accept-encoding: gzip, deflate, br, zstd
accept-language: en-US,en;q=0.9
anthropic-client-sha: unknown
anthropic-client-version: unknown
content-length: 63
content-type: application/json

cookie:
  CH-prefers-color-scheme=dark;
  __ssid=<SSID>;
  lastActiveOrg=<ORG_ID>;
  intercom-device-id-lupk8zyo=<DEVICE_ID>;
  user-sidebar-pinned=false;
  __stripe_mid=<STRIPE_MID>;
  _gcl_au=1.1.<VALUE>;
  _fbp=fb.1.<VALUE>;
  _rdt_uuid=<UUID>;
  sessionKey=<SESSION_KEY>;
  __cf_bm=<CF_BM>;
  cf_clearance=<CF_CLEARANCE>;
  intercom-session-lupk8zyo=<INTERCOM_SESSION>

dnt: 1
origin: https://claude.ai
priority: u=1, i
referer: https://claude.ai/

sec-ch-ua: "Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "macOS"
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: same-site

user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36

Response headers:
access-control-allow-credentials: true
access-control-allow-origin: https://claude.ai

alt-svc: h3=":443"; ma=86400

cf-cache-status: DYNAMIC
cf-ray: <CF_RAY>

content-length: 354
content-type: application/json

date: Sat, 03 Aug 2024 22:25:27 GMT
request-id: <REQUEST_ID>

server: cloudflare

set-cookie:
  sessionKey=<SESSION_KEY>;
  Domain=.claude.ai;
  expires=Mon, 02 Sep 2024 22:25:27 GMT;
  HttpOnly; Path=/;
  SameSite=lax; Secure

vary: Origin
via: 1.1 google

x-cloud-trace-context: <TRACE_CONTEXT>

When uploading a file (POST to https://api.claude.ai/api/organizations/xxx/projects/xxx/docs):
Request headers:
:authority: api.claude.ai
:method: POST
:path: /api/organizations/<ORG_ID>/projects/<PROJECT_ID>/docs
:scheme: https

accept: */*
accept-encoding: gzip, deflate, br, zstd
accept-language: en-US,en;q=0.9
anthropic-client-sha: unknown
anthropic-client-version: unknown
content-length: 10211
content-type: application/json

cookie:
  CH-prefers-color-scheme=dark;
  __ssid=<SSID>;
  lastActiveOrg=<ORG_ID>;
  intercom-device-id-lupk8zyo=<DEVICE_ID>;
  user-sidebar-pinned=false;
  __stripe_mid=<STRIPE_MID>;
  _gcl_au=1.1.<VALUE>;
  _fbp=fb.1.<VALUE>;
  _rdt_uuid=<UUID>;
  sessionKey=<SESSION_KEY>;
  __cf_bm=<CF_BM>;
  cf_clearance=<CF_CLEARANCE>;
  intercom-session-lupk8zyo=<INTERCOM_SESSION>

dnt: 1
origin: https://claude.ai
priority: u=1, i
referer: https://claude.ai/

sec-ch-ua: "Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "macOS"
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: same-site

user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36

Response:
access-control-allow-credentials: true
access-control-allow-origin: https://claude.ai

alt-svc: h3=":443"; ma=86400

cf-cache-status: DYNAMIC
cf-ray: <CF_RAY>

content-length: 10354
content-type: application/json

date: Sat, 03 Aug 2024 22:30:19 GMT
request-id: <REQUEST_ID>

server: cloudflare

set-cookie:
  sessionKey=<SESSION_KEY>;
  Domain=.claude.ai;
  expires=Mon, 02 Sep 2024 22:30:19 GMT;
  HttpOnly; Path=/;
  SameSite=lax; Secure

vary: Origin
via: 1.1 google

x-cloud-trace-context: <TRACE_CONTEXT>

I’m not certain if this will resolve your issue, but you might want to try the latest release: v0.4.7. It includes recent updates that could address the problem you're experiencing.

OS: Ubuntu 24.04
Python: 3.12.3
ClaudeSync: 0.4.9
`(venv) tyler@server:~/test$ claudesync config ls
log_level: INFO
upload_delay: 0.5
max_file_size: 32768
two_way_sync: False
curl_use_file_input: False
session_key: None
session_key_expiry: None
active_provider: None
active_organization_id: None
active_project_id: None
active_project_name: None
local_path: None
(venv) tyler@server:~/test$ claudesync api login claude.ai
To obtain your session key, please follow these steps:

Open your web browser and go to https://claude.ai
Log in to your Claude account if you haven't already
Once logged in, open your browser's developer tools:

Chrome/Edge: Press F12 or Ctrl+Shift+I (Cmd+Option+I on Mac)
Firefox: Press F12 or Ctrl+Shift+I (Cmd+Option+I on Mac)
Safari: Enable developer tools in Preferences > Advanced, then press Cmd+Option+I

In the developer tools, go to the 'Application' tab (Chrome/Edge) or 'Storage' tab (Firefox)
In the left sidebar, expand 'Cookies' and select 'https://claude.ai'
Locate the cookie named 'sessionKey' and copy its value. Ensure that the value is not URL-encoded.
Please enter your sessionKey: sk-ant-sid01-crazylongstring
Please enter the expires time for the sessionKey [Sat, 07 Sep 2024 21:29:39 UTC]: Sat, 07 Sep 2024 21:29:05 UTC
2024-08-08 21:29:51,825 - ERROR - Received a 403 Forbidden error. Your session key might be invalid. Please try logging out and logging in again. If the issue persists, you can try using the claude.ai-curl provider as a workaround:
claudesync api logout
claudesync api login claude.ai-curl
Received a 403 Forbidden error. Your session key might be invalid. Please try logging out and logging in again. If the issue persists, you can try using the claude.ai-curl provider as a workaround:
claudesync api logout
claudesync api login claude.ai-curl
Failed to retrieve organizations. Please enter a valid sessionKey.
Please enter your sessionKey: ^X^CAborted!
(venv) tyler@server:~/test$ claudesync api login claude.ai-curl
To obtain your session key, please follow these steps:
Open your web browser and go to https://claude.ai
Log in to your Claude account if you haven't already
Once logged in, open your browser's developer tools:

Chrome/Edge: Press F12 or Ctrl+Shift+I (Cmd+Option+I on Mac)
Firefox: Press F12 or Ctrl+Shift+I (Cmd+Option+I on Mac)
Safari: Enable developer tools in Preferences > Advanced, then press Cmd+Option+I

In the developer tools, go to the 'Application' tab (Chrome/Edge) or 'Storage' tab (Firefox)
In the left sidebar, expand 'Cookies' and select 'https://claude.ai'
Locate the cookie named 'sessionKey' and copy its value. Ensure that the value is not URL-encoded.
Please enter your sessionKey: sk-ant-sid01-crazylongstring
Please enter the expires time for the sessionKey [Sat, 07 Sep 2024 21:30:03 UTC]: Sat, 07 Sep 2024 21:29:05 UTC
2024-08-08 21:30:13,286 - ERROR - HTTP request failed with status code 403. Response content: {"error":{"message":"We are unable to serve your request","type":"permission_error"}}. Request headers: ['-H', 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0', '-H', 'Cookie: sessionKey=sk-ant-sid01-crazylongstring', '-H', 'Content-Type: application/json']
HTTP request failed with status code 403. Response content: {"error":{"message":"We are unable to serve your request","type":"permission_error"}}. Request headers: ['-H', 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0', '-H', 'Cookie: sessionKey=sk-ant-sid01-crazylongstring', '-H', 'Content-Type: application/json']
Failed to retrieve organizations. Please enter a valid sessionKey.
`

lastest version produces 403
$ claudesync auth login
Choose provider (claude.ai) [claude.ai]:
A session key is required to call: https://api.claude.ai/api
To obtain your session key, please follow these steps:
1. Open your web browser and go to https://claude.ai
2. Log in to your Claude account if you haven't already
3. Once logged in, open your browser's developer tools:
   - Chrome/Edge: Press F12 or Ctrl+Shift+I (Cmd+Option+I on Mac)
   - Firefox: Press F12 or Ctrl+Shift+I (Cmd+Option+I on Mac)
   - Safari: Enable developer tools in Preferences > Advanced, then press Cmd+Option+I
4. In the developer tools, go to the 'Application' tab (Chrome/Edge) or 'Storage' tab (Firefox)
5. In the left sidebar, expand 'Cookies' and select 'https://claude.ai'
6. Locate the cookie named 'sessionKey' and copy its value. Ensure that the value is not URL-encoded.
Please enter your sessionKey:
Please enter the expires time for the sessionKey (optional) [Sat, 28 Sep 2024 10:58:39 UTC]:
Received a 403 Forbidden error.

The latest version appears
Received a 403 Forbidden error.
Failed to retrieve organizations. Please enter a valid sessionKey.

m1 The latest version appears Received a 403 Forbidden error. Failed to retrieve organizations. Please enter a valid sessionKey.

Thank you for reporting this issue. To assist you effectively, please:

Complete the bug report form.
Provide the exact error message and your system details.
Confirm if you've followed the troubleshooting steps suggested to other users.

Without this information, I cannot diagnose or resolve the problem. If you need clarification on any point, please ask.


Refactor Popup

Related to #3040
Refactored logic and call of popups to be able to be reused for showing and selecting available commits.

good size PR, thanks 👍

Thanks, I hope I can keep it up^^ :)


Make NioEventLoop group not final

Motivation: I want to be able to subclass NioEventLoop so I can slightly tweak behavior or add functionality such as timing how long each event in the EventLoop takes.
Modification: Remove the final modifier from NioEventLoop

@rockwotj I would love to not make it non final honestly but better understand what exactly want to do and come up with a solution which will work for other eventloops as well. Could you show me how you planed to extend it ?

@normanmaurer totally. The whole idea is I really want to know if there are tasks that are slow and locking up the event loop, since the netty version we have pins a channel to a particular EventLoop. I don't know if that's changed in a newer version, as I've seen plans to do so.
This is what I'd like to do (in scala):
class MyEventLoop(parent: NioEventLoopGroup, factory: ThreadFactory, selector: SelectorProvider)
  extends NioEventLoop(parent, factory, selector) {
  override protected def newTaskQueue(): util.Queue[Runnable] = new TaskTimingQueue
}

private class TaskTimingQueue extends ConcurrentLinkedQueue[Runnable] {
  override def add(task: Runnable): Boolean = {
    super.add(new WrappedTimedTask(task))
  }
}

private class WrappedTimedTask(underlying: Runnable) extends Runnable {
  override def run(): Unit = NettyTimingInfo.timeTask(underlying.run())
}

// Use this as my childGroup
class MyEventLoopGroup(nThreads: Int, threadFactory: ThreadFactory)
  extends NioEventLoopGroup(nThreads, threadFactory) {
  override def newChild(threadFactory: ThreadFactory, args: AnyRef*): EventExecutor = {
    new FbEventLoop(this, threadFactory, args(0).asInstanceOf[SelectorProvider])
  }
}

Currently I can't do this at all and classes such as AbstractNioChannel check to see if the event loop is an instance of NioEventLoop, so I can't provide an wrapped implementation if I wanted to try and do this either.
Do you have better ideas for something like this? I feel very restricted by netty to add anything such as this.

@rockwotj how about at the event loop group thread factory level? I implemented something similar which essentially marks Netty threads as non blocking IO threads and if a DAO call tries to use one it blocks the invocation..
bossGroup = new EpollEventLoopGroup(1, new NonBlockingIOThreadFactory("Epoll"));
workerGroup = new EpollEventLoopGroup(0, new NonBlockingIOThreadFactory("Epoll"));
bootstrap.group(bossGroup, workerGroup).channel(EpollServerSocketChannel.class);

public class NonBlockingIOThreadFactory extends DefaultThreadFactory {

    public NonBlockingIOThreadFactory(String poolName) {
        super(poolName);
    }

    @Override
    public Thread newThread(Runnable r) {
        return super.newThread(() -> {
            BlockingIODetector.preventBlockingIOinThisThread();
            r.run();
        });
    }

    @Override
    protected Thread newThread(Runnable r, String name) {
        return super.newThread(() -> {
            BlockingIODetector.preventBlockingIOinThisThread();
            r.run();
        }, name);
    }
}

I can't do that for the NioEventLoopGroup because there is only a single thread that is executed, I want to know how long each task takes on the EventLoop, that solution doesn't quite work for me.

This has come up a few times [1][2] and we have found more preferred alternatives in both situations. Will the wrapping approach described in https://github.com/netty/netty/pull/6441#issuecomment-281994334 work for you?
[1] https://github.com/netty/netty/pull/6441
[2] https://github.com/netty/netty/pull/4819#issuecomment-179826173

@Scottmitch like I said before, I cannot do that, because there are places that expect the concrete implementation of NioEventLoop ie here and here

Agreed there are limitations with the current APIs and assumptions made in the implementations (as discussed in the referenced issues). However as long as the Netty code sees the unwrapped objects you can work around these limitations. As you can see these classes / interfaces were not designed with wrapping / extension in mind and making these classes non-final will likely expose other extensibility issues. I put a note in https://github.com/netty/netty/issues/5430#issuecomment-284551318 to improve this scenario in the next API breaking release but until then lets be sure we exhaust other options first.

For this specific use case, I can use a dirty reflection hack. But it makes me very sad.
package io.netty.channels.nio

class FbEventLoopGroup(nThreads: Int, threadFactory: ThreadFactory)
  extends NioEventLoopGroup(nThreads, threadFactory) {

  override def newChild(threadFactory: ThreadFactory, args: AnyRef*): EventExecutor = {
    val eventLoop = new NioEventLoop(this, threadFactory, args(0).asInstanceOf[SelectorProvider])
    // Dirty, dirty hack
    val eventLoopQueue = classOf[SingleThreadEventExecutor].getDeclaredField("taskQueue")
    eventLoopQueue.setAccessible(true)
    val currentQueue = eventLoopQueue.get(eventLoop).asInstanceOf[JQueue[Runnable]]
    eventLoopQueue.set(eventLoop, new TaskTimingQueue(currentQueue))
    eventLoop
  }
}

// Guava ForwardingQueue
private class TaskTimingQueue(override val delegate: JQueue[Runnable]) extends ForwardingQueue[Runnable] {
  override def add(task: Runnable): Boolean = {
    super.add(new WrappedTimedTask(task))
  }

  override def offer(task: Runnable): Boolean = {
    super.offer(new WrappedTimedTask(task))
  }
}

private class WrappedTimedTask(underlying: Runnable) extends Runnable {
  override def run(): Unit = NettyTimingInfo.timeTask { underlying.run() }
}

I can use a dirty reflection hack. But it makes me very sad.

Me too 😢
To clarify you want to collect metrics on everything submitted to EventLoop queue, not just your application stuff?  Instrumenting Runnables in combination with monitoring the queue lengths over queue drain operations (been meaning to add this) may generally useful for visibility. Not the best extensibility story, but would adding support for these use cases be "good enough" for now?

So I basically want percentiles of how long tasks take in the EventLoop queue. We sometimes have tasks that take a long time (and block other channel's traffic) and we want visibility into when this happens.
That would seem "good enough" for my specific use case.

ok sounds good @rockwotj ... I may not have cycles to get to this for a few weeks so maybe use the reflection hack for now if you need something urgent.

see https://github.com/netty/netty/issues/6524

Thanks @Scottmitch!


use lighter version of HtmlEncode

We can use stringbuilder to encode strings that is not part of markup, removing unnecessary allocations.
I registered almost 3x perf improvement in some scenarios on my machine.
Implemented as per RFC:
https://datatracker.ietf.org/doc/html/rfc1866#section-3.2.1

@nneeoo Can you please fix failing cases

I've also found that the perf is almost 2 times slower compared to WebUtility in the following benchmark:
    let testText = (Seq.init 10000 (fun _ -> "Some long error text")) |> String.concat ";"

    [<Benchmark>]
    member this.WebUtility() =
        let sb = StringBuilder()
        WebUtility.HtmlEncode testText
        |> sb.Append
        |> ignore

    [<Benchmark>]
    member this.Tools() =
        let sb = StringBuilder()
        Tools.HtmlEncode sb testText

| Method     | Mean     | Error   | StdDev  | Gen0     | Gen1     | Gen2     | Allocated |
|----------- |---------:|--------:|--------:|---------:|---------:|---------:|----------:|
| WebUtility | 174.1 us | 1.35 us | 1.06 us | 124.7559 | 124.7559 | 124.7559 | 410.34 KB |
| Tools      | 280.1 us | 5.47 us | 7.84 us |  51.7578 |  34.1797 |        - | 424.78 KB |

@Lanayx, i fixed failed test and found space for perf improvements, probably. Maybe. Idk. At least on my machine.
Same benchmark as yours.
BenchmarkDotNet v0.14.0, Windows 10 (10.0.19045.5011/22H2/2022Update)
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 8 logical and 8 physical cores
.NET SDK 8.0.403
  [Host]     : .NET 8.0.10 (8.0.1024.46610), X64 RyuJIT AVX2 DEBUG
  DefaultJob : .NET 8.0.10 (8.0.1024.46610), X64 RyuJIT AVX2

| Method     | Mean     | Error    | StdDev   | Median   | Gen0     | Gen1     | Gen2     | Allocated |
|----------- |---------:|---------:|---------:|---------:|---------:|---------:|---------:|----------:|
| WebUtility | 327.0 us | 11.48 us | 33.86 us | 337.6 us | 124.7559 | 124.7559 | 124.7559 | 410.34 KB |
| Tools      | 264.7 us |  2.49 us |  2.33 us | 264.4 us |  51.7578 |  34.1797 |        - | 424.78 KB |

Thanks! Here is how it looks on my machine:
BenchmarkDotNet v0.14.0, Windows 11 (10.0.22631.4391/23H2/2023Update/SunValley3)
AMD Ryzen 5 5600H with Radeon Graphics, 1 CPU, 12 logical and 6 physical cores
.NET SDK 8.0.403
  [Host]     : .NET 8.0.10 (8.0.1024.46610), X64 RyuJIT AVX2 DEBUG
  DefaultJob : .NET 8.0.10 (8.0.1024.46610), X64 RyuJIT AVX2

| Method     | Mean     | Error   | StdDev  | Gen0     | Gen1     | Gen2     | Allocated |
|----------- |---------:|--------:|--------:|---------:|---------:|---------:|----------:|
| WebUtility | 167.0 us | 1.13 us | 1.00 us | 111.0840 | 110.8398 | 110.8398 | 411.18 KB |
| Tools      | 434.0 us | 3.07 us | 2.56 us |  51.7578 |  34.1797 |        - | 424.78 KB |

I'll try to figure out why there is such a difference.

BTW, I've updated the test suite and it's still failing

@nneeoo I think it's because current algorithm is ineffective, haveUnencodedChars returns true with your code and false in WebUtility code. I recommend translating the library algorithm as is.


usinghomebridge-alexa-smarthome but schlage door doesn't appear in home

Describe The Bug:
homebridge sees schlage door but doesn't show up in home
To Reproduce:

Expected behavior:

Logs:
Show the Homebridge logs here, remove any sensitive information.

Plugin Config:
Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment:

Plugin Version:
Homebridge Version:
Node.js Version:
NPM Version:
Operating System:

{
"devices": [],
"excludeDevices": [],
"auth": {
"refreshInterval": 4,
"proxy": {
"clientHost": "<IP_ADDRESS>",
"port": 9000
}
},
"amazonDomain": "amazon.com",
"language": "en-US",
"performance": {
"cacheTTL": 60,
"backgroundRefresh": false
},
"debug": true,
"platform": "HomebridgeAlexaSmartHome"
}


Re-enable codecov

This change is

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.91%. Comparing base (9e9a26c) to head (d950acd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2025      +/-   ##
==========================================
- Coverage   80.17%   79.91%   -0.26%
==========================================
  Files          69       69
  Lines        9739     9693      -46
  Branches     9739     9693      -46
==========================================
- Hits         7808     7746      -62
- Misses       1471     1487      +16
  Partials      460      460

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


HEE-164: Change the navigation items to match IA 4.1

@MattBrooksManifesto @duncanheron Fyi - We have placed these SiteMenuItems under repository-data/site-development (as these are env specific configurations and we wouldn't want to manage/override them on brCloud higher env) and so these would be deployed to local and brCloud development environments only.
For Test, Staging and Prod brCloud env - These SiteMenuItems needs to be created and managed by us initially and then eventually by HEE Authors. Thanks!

@smanivasag Your point of adding remove action is nice which can help repository under local and brCloud being clean up automatically by the bootstrap. But It seem Bloomreach have limit or error when putting action on site-development module.
We have PathNotFoundException on the file org.onehippo.cm.engine.ConfigurationBaselineService line 1112.
From what I read from the code then it only supports on modules development and application

Ah Ok, thanks for checking @thojava. I reckon it's because part of /hst:hst/hst:configurations/lks/hst:workspace sits between site and site-development modules and so the bootstrap mechanism couldn't identify it as content.
Could we use Groovy Updater Script to automate these cleanups going forward in case if manually fixing them on local & brCloud isn't an option ?
Ref. https://documentation.bloomreach.com/14/library/concepts/update/update-hst-configuration.html#scroll_reloading-updated-hst-workspace-content and https://developers.bloomreach.com/blog/2020/creating-automated-scripts-to-update-the-workspace.html


/Pages/TenantManagement/Tenants/ConnectionStringsModal.js  file has been removed in version 4.3

"/Pages/TenantManagement/Tenants/ConnectionStringsModal.js"
This file has been removed in version 4.3

See https://github.com/wakuflair/Abp.AspNetCore.Mvc.UI.Theme.AdminLTE/issues/30


Importing adhoc 3rd party lib fail

Please provide us with the following information:

OS?  Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

angular-cli: 1.0.0-beta.4
node: 5.7.0
os: darwin x64

Versions. Please run ng --version. If there's nothing outputted, please
run in a Terminal:
node --version
And paste the result here.

Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.

App created with ng-cli
1 - npm install phoenix_js --save
2 - Update system-config.ts
const map: any = {
"phoenix_js": "vendor/phoenix_js/dist/phoenix.js"
};
const packages: any = {
"phoenix_js": {
"format": "cjs",
"defaultExtension": "js",
"main": "index",
}
3 - Update angular-cli-build.js
module.exports = function(defaults) {
return new Angular2App(defaults, {
vendorNpmFiles: [
...
'phoenix_js/dist/phoenix.js',
]
});
};
4 - Update main.ts
import { Socket } from 'phoenix_js'

The log given by the failure. Normally this include a stack trace and some
more information.

Error: Typescript found the following errors:
./tmp/broccoli_type_script_compiler-in
main.ts (6, 24): Cannot find module 'phoenix_js'.
at BroccoliTypeScriptCompiler._doIncrementalBuild (./node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:115:19)
at BroccoliTypeScriptCompiler.build (./node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:43:10)
...

Mention any other details that might be useful.

Thanks! We'll be in touch soon.

I did see the post about integrating 3rdparty libs but only includes moment and material -> No help for adhoc thirdparty lib inclusions.
Stuck! Thanks for your help.

I tried with d3. I am stuck in the same place. I am not able to import third party library.

Same over here with ng2-charts. Can't make this work, either.

use this link https://github.com/angular/angular-cli/wiki/3rd-party-libs that works perfectly
be sure that you've pointed correctly all necessary files in vendorNpmFiles in angular-cli-build.js
same for map and packages in system-config.ts

@SergeySolonko Clearly, that wiki page didn't help one bit. Was the first thing I read. Wouldn't be writing a comment here, otherwise.
For the record, after hours of pointlessly staring at my screen in bewilderment, I managed to make ng2-charts work. Here's a summary of what I did:
Configure URLs and packages
Edit system-config.ts and have it declare ng2-charts and all its dependencies. Manually. The only was of knowing which dependencies are those, AFAIK, is running your application and keep track of all 404 you'll get. Or dig out each package.json for a list. Once you do that, repeat the step for the dependencies of the dependencies.
After some trial and error, I figured out ng2-charts depends on color-name, color-convert and chart.js. In turn, chart.js depends on chartjs-color, chartjs-color-string and moment.
So, you need to follow all steps on the wiki guide for each one of those.
Also, bear in mind that each one of those deps may be bundled or distributed differently. So when configuring them, you need to specify their correct format.
In the end, my system-config.ts looked like this:
/***********************************************************************************************
 * User Configuration.
 **********************************************************************************************/
/** Map relative paths to URLs. */
const map: any = {
  'ng2-charts': 'vendor/ng2-charts',
  'chartjs': 'vendor/chart.js/dist/Chart.bundle.min.js',
  'color-name': 'vendor/color-name/index.js',
  'color-convert': 'vendor/color-convert/index.js',
  'chartjs-color': 'vendor/chartjs-color/dist/color.js',
  'chartjs-color-string': 'vendor/chartjs-color-string/color-string.js',
  'moment': 'vendor/moment/moment.js'
};

/** User packages configuration. */
const packages: any = {
  'ng2-charts': { defaultExtension: 'js', main: 'ng2-charts.js' },
  'chartjs': { defaultExtension: 'js', format: 'cjs' }
};

Update your CLI build
Add the following to the angular-cli-build.js file on the vendorNpmFiles array:
      'color-name/**/*.+(js|js.map)',
      'color-convert/**/*.+(js|js.map)',
      'chart.js/dist/Chart.bundle.min.js',
      'chartjs-color/dist/color.js',
      'chartjs-color-string/color-string.js',
      'ng2-charts/**/*.+(js|js.map)',
      'moment/moment.js'

Manually import `charts.js'
You need to import 'chartjs'; somewhere in your application to make System.js load Chart.js. I did that on my root component. Otherwise, ng2-chart will just fail silently.
So, all in all, the state of the art looks very bleak presently. At least for me. Unless I'm missing something important or doing something terribly wrong, this is right-down unusable. Whatever we are doing to Javascript needs to stop. Now.
(Ok, that was a joke... but really, this is very cumbersome).

in your example above https://github.com/angular/angular-cli/issues/845#issuecomment-221288257 where is the reference to phoenix_js ?

I tried the same steps at https://github.com/angular/angular-cli/wiki/3rd-party-libs with moment and d3. moment worked fine, however d3 failed with message Cannot find module 'd3'

A somewhat stupid issue, but I found that you need to run ng build or ng serve once before attempting to `import

I found that you need to run ng build or ng serve at least once before attempting to import the third-party lib in a component. This first run will actually copy the script file to /dist. The CLI probably needs to change the build order to copy those vendor files over before compiling.
Also I noticed that the wiki omits the fact that you also need to drop a


imx-6.1.55-2.2.0.xml / pico-imx6ul: u-boot configuration loops on Text Base (TEXT_BASE) []

Following the readme to compile an image for the pico-imx6ul machine, with the manifest imx-6.1.55-2.2.0.xml
repo init -u https://github.com/TechNexion/tn-imx-yocto-manifest.git -b mickledore_6.1.y-next -m imx-6.1.55-2.2.0.xml
repo sync -j4
WIFI_FIRMWARE=n DISTRO=fsl-imx-fb MACHINE=pico-imx6ul BASEBOARD=pi source tn-setup-release.sh -b build
bitbake -c menuconfig u-boot -v

ends in an infinite loop on u-boot configuration, which expects an input for the TEXT_BASE configuration item.
[...]
Text Base (TEXT_BASE) [] (NEW)
Text Base (TEXT_BASE) [] (NEW)
Text Base (TEXT_BASE) [] (NEW)
Text Base (TEXT_BASE) [] (NEW)
T
Summary: There were 3 WARNING messages.
Execution was interrupted, returning a non-zero exit code.

What is the expected value for this item ?
Regards,
Nelio

@nlarealti
Thanks for the feedback.
We currently only support EDM-G-IMX8MP. We're doing our best to get all platforms to support it as well. ARM32 is not expected to be completed until the second season. If you have business concerns, please contact TechNexion FAE or Sales.
Or you can refer to the modification of PICO-IMX6.
https://github.com/TechNexion/u-boot-tn-imx/commit/95499ee05cafc4ccbcff46265d28061068dbb288
https://github.com/TechNexion/u-boot-tn-imx/commit/c008d35581c725d363df0d086a43cb84b7c49ee9
https://github.com/TechNexion/u-boot-tn-imx/commit/de372c2c61390aacaef841e75b7cd4332071561a
https://github.com/TechNexion/u-boot-tn-imx/commit/6e222e7c42773c6161de5baf30ec802a369991a7
BR,
Ray


[APPM-1576] Backend error is thrown while browsing mobile app overview page in App Publisher

Reference: https://wso2.org/jira/browse/APPM-1576

Not related to IoT server, hence closing the issue.


Chisel does not like parameters in modules that are called width

This has been cropping up for a while now. Chisel gives really inscrutable error messages if you ever name a parameter to a module or bundle "width". It's easy to work around, but it does cause a lot of confusion when you encounter it. If you try to instantiate a module in Chisel that is declared as follows ...
class AdjustableWidth(width: Int) extends Module {
  val io = new Bundle {
    val out = UInt(OUTPUT, width=width)
  }

  io.out := UInt(1)
}

You get the error message
java.lang.reflect.InvocationTargetException
Caused by: java.lang.UnsupportedOperationException: empty.reduceLeft
    at scala.collection.TraversableOnce$class.reduceLeft(TraversableOnce.scala:178)
    at scala.collection.mutable.ArrayBuffer.scala$collection$IndexedSeqOptimized$$super$reduceLeft(ArrayBuffer.scala:48)
    at scala.collection.IndexedSeqOptimized$class.reduceLeft(IndexedSeqOptimized.scala:74)
    at scala.collection.mutable.ArrayBuffer.reduceLeft(ArrayBuffer.scala:48)
    at scala.collection.TraversableOnce$class.reduce(TraversableOnce.scala:206)
    at scala.collection.AbstractTraversable.reduce(Traversable.scala:104)
    at chisel3.core.Aggregate.width(Aggregate.scala:19)

However, just changing it by renaming the parameter makes it work just fine.
class AdjustableWidth(w: Int) extends Module {
  val io = new Bundle {
    val out = UInt(OUTPUT, width=w)
  }

  io.out := UInt(1)
}

Full example at https://github.com/zhemao/chiselbugs/blob/master/src/main/scala/WidthParameter.scala

It seems that the issue is with using a variable called "width" to declared the UInt. The following code works.
class AdjustableWidth(width: Int) extends Module {
  val io = new Bundle {
    val out = UInt(OUTPUT, width=8)
  }

  io.out := UInt(1)
}

This needs to be private[Chisel] :
https://github.com/ucb-bar/chisel3/blob/master/chiselFrontend/src/main/scala/chisel3/core/Data.scala#L69

Yeah, Steven is right. It's because Bundle has a method called width, so when you use "width" to declare the UInt, it uses that method instead of the parameter passed in.

"Needs?"  I disagree, unless we provide an isWidthKnown method instead.

That would easily be best because that width returns a Width which is defined in:
https://github.com/ucb-bar/chisel3/blob/bc3813ebd752646a92987c74136bb2adb476b687/chiselFrontend/src/main/scala/chisel3/internal/firrtl/IR.scala#L106
I said 'needs' because I was under the impression that internal package means people shouldn't be directly manipulating those classes. (Otherwise, i should be moved out of the folder and package marked internal.)

Yeah, I agree if the type Width is meant to be internal, the method width should be private.


Fix multi-step build handling process.

Stop listening for new step updates only after 'all done.' log message that is explicitly added to the file after build process is finished. Make sure that we don't delete file too soon, until listener had a chance to process the 'all done' message.
This is follow-up to https://github.com/flutter/flutter/pull/23932.
Fixes https://github.com/flutter/flutter/issues/18750

Mine just started hanging.


[HOLD for payment 2024-10-11] [Guided Setup Stage 3] Onboarding message not sent when VBBA selected

The original intent for the behavior of onboarding new users invited to NewDot by way of receiving an IOU or an Invoice was that we would send their onboarding message and tasks as soon as they chose to "Pay $n with Expensify" by either "Business bank account" or "Personal bank account" but when the feature was implemented, the calls to completeGuidedSetup  were placed inside of IOU.payMoneyRequest and IOU.payInvoice. This is particularly important for users selecting Business bank account because that is a pretty onerous task and we want them to receive the onboarding tasks and message early, at the same time we create their workspace and move the IOU to an expense report.
Let's update this flow so that we complete their onboarding when they select the payment type.
cc @cdOut
Issue OwnerCurrent Issue Owner: @JmillsExpensify

Hi, I'm Tymoteusz from Software Mansion and I worked on the guided setup 3 issues, you can assign me here and I'll raise a PR refactoring the VBBA flow.

I agree, a regression checklist isn't needed.

Processing this one now.

@allgandalf apologies I forgot to actually send you the offer. Just did so, please let me know when you've accepted and I'll issue payment.


3.x

PR tracking 3.x development branch

Hm, Behat/Transliterator is a bit heavy, and the original Text::Unidecode on CPAN has some issues. Gonna just build a seperate PHP module for transliteration. A couple issues I highlighted in a previous commit:
 * - Greek characters are romanized using ancient Greek or obsolete systems
 *   rather than a modern Greek standard (ϐ maps to b instead of v, χ to kh
 *   instead of ch, etc)
 * - Devanāgarī transliteration miss the implicit "a" required for
 *   consonants in all standards

Russian also uses some less common characters.

Furthermore, Behat/Transliterator is distributed under the "Artistic License", and I'm not sure how that will impact its use in commercial software, like the GPL. I'd like to keep everything MIT if possible.

Decided against using Behat/Transliterator in the end.


avoid cloning repo kuernetes-conjur-deploy as part of testing

(Srdjan's review: https://github.com/cyberark/secrets-provider-for-k8s/pull/21#discussion_r342091265, https://github.com/cyberark/secrets-provider-for-k8s/pull/21#discussion_r342612252)
Using a separate per-test branch from another repo is extremely liable to fail and would be a huge perpetual effort to maintain.

Set guidelines for working with dependencies
Prepare a design for the solution

Currently we will not proceed with this until a new feature will be required and then we shall consider the effort


Support for<EMAIL_ADDRESS>

Looks like the (breaking) changes in less v3 aren't supported.
Assetic\Filter\LessFilter.php @ line 112: less.writeError(error);
less.writeError() is no longer a function, and throws an error. Would be nice to work with the latest version of less, ie 3.10.3.

Try using the 2.0 branch of assetic-php/assetic. Until we tag 2.0, you can pull it in by using "assetic/framework": "dev-2.0/dev" in your composer.json files.

@josefguenther We've just released the 2.0 release that addresses a number of existing issues and dependency updates, see https://github.com/assetic-php/assetic/releases/tag/v2.0.0 for more information! Please try it out and let us know if you have any issues!


[BUG] CUSTOM Grave XP Setting Granting 100% XP (like ALL), rather than using the vanilla formula up to the specified cap

See title. Setting the XP setting to CUSTOM grants 100% XP to the cap, rather than using the vanilla formula to a custom cap as specified on the Modrinth page

Thanks for the heads up! I actually changed the functionality a while back and forgot to update the Wiki. I'll go ahead and update that now.
Once I'm finished wrapping up #53 I'll probably revisit the XP setting and add a couple options for it (and make things clearer). If you have any suggestions that you'd like to see, like a particular option for handling XP, feel free to let me know!

No worries, appreciate the support. I would definitely like to see a return of the old system as the option (7xlevel to cap) or a set % (which would be ideal), as while I love this mod, I can’t include it in my modpack without some further XP configuration. Would be great to be able to have it give you a % of your xp or use the vanilla formula uncapped, though an adjustable percentage would be preferable.

Yup, I was thinking a percentage based one will be good as well. I'm going to try and get #53 done this weekend and then I'll look into sprucing up the XP settings. What version are you on?

Currently on Fabric 1.19.2 for the foreseeable future. Thanks again for the communication, I greatly appreciate it


Try building on Windows again

The Windows build currently fails when it tries to find pkgconfig, which is not available.


apm not working with airsdk ver50.1.1

hi sir  today i want to create app using apm but somthing happen below like this :

any suggestion about that
thanks

Hi,
Can you elaborate as to what has changed for you ?


Saving a query in OFFLINE=true builds to incorrect directory

When I modify a query and save cargo sqlx prepare runs and builds a target/sqlx/query-<hash>.json file co-located at the top-level of my project rather than updating the sqlx-data.json file located inside my project.
Expectation

Project

src
sqlx-data.json

Actual

Project

src

target

sqlx

query-<hash>.json

When compiling in offline mode the macros save their data separately to target/sqlx/query-[hash].json and then cargo sqlx prepare should merge that data into sqlx-data.json. Is it not writing to sqlx-data.json at all?

I see... yes sorry it is overwriting the data in that file when I run cargo sqlx prepare manually. Should I gitignore the target/sqlx folder then? It doesn't remove it after I run the command.

That target/ folder should be the same one where Cargo stores all of its build artifacts so it should already be in your .gitignore. If that's the wrong target/ folder then that's something we need to address.

I believe it is the wrong folder.
Here is my directory structure.

And you're running cargo sqlx prepare in the project root or api/?

I've been running it from api/ which outputs portal/api/sqlx-data.json. When I save a file I get the target folder outside of api/.

You're using VSCode with Rust-Analyzer?

Yes

So I did a bit of testing this morning and it is only happening when nested inside another folder. For example, If I move api/ outside of portal/ or open api/ directly in VSCode it is working as expected.

I put my projects in a cloud-synced folder:
$HOME/cloud/project/
So I use the cargo config to put the build outside that.  I do that by having a file:
$HOME/cloud/.cargo/config.toml
which tells cargo to place build output in $HOME/build
When I run 'cargo sqlx prepare', it writes files into....
$HOME/cloud/project/target/sqlx
!
So the problem seems to be that the build offline mode doesn't respect the cargo output directory.


Validation script for me4

Is your feature request related to a problem? Please describe.
Validation for Powervault Me4

As code for powervault me4 has been merged closing the issue


Add debugging policy, update grading and a few other bits

Why did you cut Line 59 of the original, about how accommodations don't
apply to group work.  Perhaps it could be said more gently, with a direct
quote from the DRC policy?
On Mon, Aug 22, 2022 at 3:23 PM Jonathan Bell @.***>
wrote:

You can view, comment on, or merge this pull request online at:
https://github.com/neu-se/CS4530-Fall-2022/pull/4
Commit Summary

0b8c39b
https://github.com/neu-se/CS4530-Fall-2022/pull/4/commits/0b8c39b0a79fa5ee3e4ba888eaf33e591db09b3c
Add debugging policy, update grading and a few other bits

File Changes
(1 file https://github.com/neu-se/CS4530-Fall-2022/pull/4/files)

M policies.md
https://github.com/neu-se/CS4530-Fall-2022/pull/4/files#diff-c99a4648d2262392cbc18535506a57f50bdcecd134e2494b7eb8752cec9f0dd6
(37)

Patch Links:

https://github.com/neu-se/CS4530-Fall-2022/pull/4.patch
https://github.com/neu-se/CS4530-Fall-2022/pull/4.diff

—
Reply to this email directly, view it on GitHub
https://github.com/neu-se/CS4530-Fall-2022/pull/4, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAR3CMAPGNSEI2EC43IHUBDV2PHRNANCNFSM57I2BFPQ
.
You are receiving this because your review was requested.Message ID:
@.***>


Index bug when annotating segments in data browser

Description of the problem
Description
When annotating bad segments in the QtBrowser, we noticed that if the bad segment includes the very end of the recording, the last sample of the recording is not discarded, when running:
raw, times = raw.get_data(reject_by_annotation="omit", return_times=True)
On the rest of the bad segment it works fine, including the second to last sample (see code below) - it is simply the last sample that does not seem to be discarded. You can observe when plotting the raw data afterwards:

and when inspecting the last two samples of the times:

I included a code sample, but to reproduce the bug yourself, you have to manually shift the annotation in the raw browser so that it slightly "depasses" the end of the recording.
Proposal
I suspect that this might be related to indexing in a half-open interval (i.e. the last sample of the annotated segment in the data browser is not included in the raw.annotation, as in numpy.arange etc.). If this is the case, it would not be possible to annotate the last sample of the recording, which I would consider a bug worth fixing, even if it is obviously an edge case.
Discussion
Let me know if you think this would be desirable to fix. If you point me towards where in the source code the annotations in the data browser are translated to the annotations in the raw object, I can implement the changes myself, but unfortunately the plotting code is rather complex so I wasn't able to find the right spot in the source code myself.
Steps to reproduce
from matplotlib import pyplot as plt
from mne_bids import BIDSPath, read_raw_bids
import mne

bids_root = mne.datasets.epilepsy_ecog.data_path()

bids_path = BIDSPath(
    root=bids_root,
    subject='pt1',
    session='presurgery',
    task='ictal',
    datatype='ieeg',
    extension='.vhdr'
    )

raw: mne.io.Raw = read_raw_bids(bids_path=bids_path, verbose=False)

raw.load_data(verbose=False)

raw.set_annotations(None)

print(f"\n{raw.annotations = }")

last_time = raw.times[-1]

print(f"\nLast time point raw data: {last_time}")

data_bef, times_bef = raw.get_data(
    picks=None, start=0, stop=None, reject_by_annotation="omit", return_times=True
)

print(f"\nLast time point before: {times_bef[-1]}")
print(f"\n{len(times_bef) = }")

annotations = mne.Annotations(
    onset=[last_time - 0.999], duration=[1.1], description=["BAD_SEGMENT"],
    orig_time= raw.info['meas_date'], ch_names=[raw.info["ch_names"]]
    )

raw.set_annotations(annotations)

# Uncomment this to confirm the problem only occurs when manually shifting
# the annotation in a browser and not systematically when the annotation
# exceeds the recording duration
# raw._annotations = annotations

raw.plot(scalings="auto", block=True, verbose=True)

print(f"\n{raw.annotations = }")

data_aft, times_aft = raw.get_data(
    picks=None, start=0, stop=None, reject_by_annotation="omit", return_times=True
)

print(f"\nLast time point after: {times_aft[-1]}")
print(f"\n2nd to last time point after: {times_aft[-2]}")
print(f"\n{len(times_aft) = }")

plt.plot(times_aft[-1000:], data_aft[0,-1000:])
plt.show(block=True)

Link to data
No response
Expected results
Last time point before: 269.079

Last time point after: **268.079**

2nd to last time point after: 268.078

Actual results
Last time point before: 269.079

Last time point after: **269.079**

2nd to last time point after: 268.078

Additional information
Platform:         Windows-10-10.0.22621-SP0
Python:           3.10.8 | packaged by conda-forge | (main, Nov 22 2022, 08:16:33) [MSC v.1929 64 bit (AMD64)]
Executable:       C:..\anaconda3\envs\mnedev\python.exe
CPU:              Intel64 Family 6 Model 142 Stepping 12, GenuineIntel: 8 cores
Memory:           31.8 GB
mne:              1.3.dev0
numpy:            1.23.5 {unknown linalg bindings}
scipy:            1.9.3
matplotlib:       3.6.2 {backend=QtAgg}
sklearn:          1.2.0
numba:            0.56.4
nibabel:          4.0.2
nilearn:          0.9.2
dipy:             1.5.0
openmeeg:         2.5.5
cupy:             Not found
pandas:           1.5.2
pyvista:          0.37.0 {OpenGL 4.5.0 - Build <IP_ADDRESS>4 via Intel(R) UHD Graphics}
pyvistaqt:        0.9.0
ipyvtklink:       0.2.2
vtk:              9.2.2
qtpy:             2.3.0 {PyQt5=5.15.6}
ipympl:           0.9.2
pyqtgraph:        0.13.1
pooch:            v1.6.0
mne_bids:         0.12
mne_nirs:         Not found
mne_features:     Not found
mne_qt_browser:   0.4.0
mne_connectivity: Not found
mne_icalabel:     Not found

Hello @richardkoehler, do you observe the same problem when using the Matplotlib-based data browser instead?

@hoechenberger No, it seems not - I wasn't able to reproduce the issue with the matplotlib-based browser.


[VS Code] Cannot read property 'sessionId' of undefined

Error:
Cannot read property 'sessionId' of undefined
Steps to Reproduce:

Version Data

extensionName
VSLS

extensionVersion
0.3.954

protocolVersion
2.2

applicationName
VSCode

applicationVersion
1.29.1

platformName
MacOS

platformVersion
18.2.0

@igorp1 Thanks for reporting the issue, can you please attach liveshare logs to help us diagnose the issue. You can get the logs by running "Export liveshare logs" from VSCode command palette.

Dupe of #1172


Incoming update of EA

Hello Marcin,
Just to warn you something is moving on EA side:
https://github.com/EasyCorp/EasyAdminBundle/pull/6467
I'm just afraid that they will only harcode the entity name in the URL without getting as much flexible as your bundle.
If you can take a look/give some suggestion to @javiereguiluz

@marcin-jozwikowski I think you can update your composer.json to put a version constraint, EA implemented Pretty Urls:
https://github.com/EasyCorp/EasyAdminBundle/releases/tag/v4.14.0
You did a great job for Easy Admin Marcin, thank you for releasing this to the community !

Yeah, I'll have to.
Thanks a lot for your help here! I couldn't have done that just by myself!
I'm glad our work here gave EA people the idea to implement clean URLs into their solution.


Streaming LZMA

Would it make sense to keep two fixed size prefix tries (with counters)? Have to think how you could do NCD with hyperloglog. Loved Vitanyi's book, and the work his student Cilbrasi did on porting MPI bindings to Ruby!

Regarding the stream XZ, that would be a nice addition indeed. In that way we would avoid large arrays from being allocated.
Not sure about what you mean with size prefix tries, or the link to hyperloglog. But if you want, I welcome pull requests.


Download error

When I try to download the most recent version, I confirm the re-capcha, press download and it brings me to a blank page and no download. Please fix this, my server runs on rocket and is a major part of it.

Works for me. Try again...

Ive been trying every few hours... Just blank page.... No download options or anything. My servers been running vanilla since Friday, and its boring now.


The cursor as a changeable file

What feature do you want to get added on the base engine?
try adding a custom cursor to the engine
To test your sight, and reliability, please select the option of what should NOT be requested.
Proper credit that was forgotten

already possible to do in Lua but I might aswell make it easier


feat(archive-class): remove link to unarchived page + query only unarchived class by default

Notion ticket link

Remove archived class link to unarchived class details

Implementation description

Remove link to unarchived class details page in archived class tabs

Edit query to have option to include archived class (admin api only) @GodGreg you will need to enable this option for editing classes in case we are editing an archived class.

Steps to test

Link is removed, no longer clickable

What should reviewers focus on?

Design: correctness of removing the link from archived class page
Dev: query change

Checklist

[X] My PR name is descriptive and in imperative tense
[X] I have run the linter
[X] I have requested a review from the PL, and/or other devs who have background knowledge on this PR or who will be building on top of this PR

I'm gonna merge this for now to get #160 in


Add tmp volume

The Chromium module needs to be able to write to the /tmp directory of the container. When running the container with a read-only filesystem (securityContext.readOnlyRootFilesystem), this leads to the following Gotenberg error:
create request context: create working directory: create directory /tmp/6035cd1c-8e13-4e53-a871-c4c56d3e04bc: mkdir /tmp/6035cd1c-8e13-4e53-a871-c4c56d3e04bc: read-only file system
In oder to support running a read-only filesystem, it should be possible to configure a volume that is mounted at /tmp.
Tasks:

[ x ] I've made changes
[ x ] I've bumped chart's version in Chart.yaml
[ x ] I've added changes to charts CHANGELOG.md
[ x ] I've run helm-docs

Hi, I'll review this shortly. Overall looks ok.

My only concern is the default volume.
This is because now by default we're allocating up to 2Gb extra memory on the node.  I would prefer to just comment the default volume out and leave it as an example for whomever needs it as a template.
An alternative would be to place it behind a flag.
What do you think?

Sounds good. I have commented the default volume out and added the option to define volumeMounts.

Thanks for the PR. I think read-only rootfs is definitely the way to go.  Maybe it should be supported more explicitly among other hardening settings in the future.


Fix bucket setup in build-from-scratch instructions

Issue #, if available:
Description of changes:
This PR fixes an issue with the build from scratch instructions. Someone on the gitter channel brought this to my attention.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This is a trivial change so I'm skipping the code review.


Use luftdaten module

Description:

Use luftdaten for retrieving the data
Add attribution, attributes (incl. coordinates) and pressure
Give warning if initially not data is available
Make default name shorter

Related issue (if applicable): fixes #10951
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#4195
Example entry for configuration.yaml (if applicable):
sensor:
  - platform: luftdaten
    sensorid: 6401
    monitored_conditions:
      - temperature
      - humidity

Checklist:
If user exposed functionality or configuration variables are added/changed:

[x] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[x] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[x] New dependencies have been added to the REQUIREMENTS variable ([example][ex-requir]).
[x] New dependencies are only imported inside functions that use them ([example][ex-import]).
[x] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.

Breaking change:
The luftdaten sensor was migrated to use the third-party asyncio module luftdaten which interacts with the (Luftdaten API)[https://github.com/opendata-stuttgart/meta/wiki/APIs#api-luftdateninfo]. The option to use an URL of a random API endpoint was removed for now.


completion error after adding line break

Description
What steps will reproduce the problem?

There was a long line, so I added a line break and this error popped up
Traceback
  File "/home/aghriss/.local/lib/python3.9/site-packages/spyder/plugins/completion/snippets/actor.py", line 92, in handle_msg
    if language_snippets[current_word]:
  File "/home/aghriss/.local/lib/python3.9/site-packages/spyder/plugins/completion/snippets/trie.py", line 81, in __getitem__
    if len(sequence) == 0:
TypeError: object of type 'NoneType' has no len()

Versions

Spyder version: 4.2.0
Python version: 3.9.1
Qt version: 5.15.2
PyQt5 version: 5.15.2
Operating System: Linux 5.10.4-arch2-1

Dependencies

# Mandatory:
atomicwrites >=1.2.0            :  1.4.0 (OK)
chardet >=2.0.0                 :  3.0.4 (OK)
cloudpickle >=0.5.0             :  1.6.0 (OK)
diff_match_patch >=20181111     :  20200713 (OK)
intervaltree >=3.0.2            :  3.1.0 (OK)
IPython >=4.0                   :  7.19.0 (OK)
jedi =0.17.2                    :  0.17.2 (OK)
jsonschema >=3.2.0              :  3.2.0 (OK)
keyring >=17.0.0                :  21.5.0 (OK)
nbconvert >=4.0                 :  6.0.7 (OK)
numpydoc >=0.6.0                :  1.1.0 (OK)
parso =0.7.0                    :  0.7.0 (OK)
pexpect >=4.4.0                 :  4.8.0 (OK)
pickleshare >=0.4               :  0.7.5 (OK)
psutil >=5.3                    :  5.7.3 (OK)
pygments >=2.0                  :  2.7.3 (OK)
pylint >=1.0                    :  2.6.0 (OK)
pyls >=0.36.1;<1.0.0            :  0.36.2 (OK)
pyls_black >=0.4.6              :  0.4.6 (OK)
pyls_spyder >=0.1.1             :  0.3.0 (OK)
qdarkstyle >=2.8                :  2.8.1 (OK)
qtawesome >=0.5.7               :  1.0.2 (OK)
qtconsole >=4.7.7               :  5.0.1 (OK)
qtpy >=1.5.0                    :  1.9.0 (OK)
setuptools >=39.0.0             :  51.1.1 (OK)
sphinx >=0.6.6                  :  3.3.1 (OK)
spyder_kernels >=1.10.0;<1.11.0 :  1.10.0 (OK)
three_merge >=0.1.1             :  0.1.1 (OK)
watchdog >=0.10.3               :  1.0.1 (OK)
xdg >=0.26                      :  0.27 (OK)
zmq >=17                        :  20.0.0 (OK)

# Optional:
cython >=0.21                   :  None (NOK)
matplotlib >=2.0.0              :  3.3.3 (OK)
numpy >=1.7                     :  1.19.5 (OK)
pandas >=1.1.1                  :  1.1.5 (OK)
scipy >=0.17.0                  :  1.5.4 (OK)
sympy >=0.7.3                   :  None (NOK)

Solved!
I added
if sequence is None:             return self
before
if len(sequence) == 0:             return self
in spyder/plugins/completion/snippets/trie.py [Trie.__getitem__]

Solved!
I added
if sequence is None:             return self
before
if len(sequence) == 0:             return self
in spyder/plugins/completion/snippets/trie.py [Trie.__getitem__]

This is solved in 4.2.1, released on December 18th, by the way.

This is solved in 4.2.1, released on December 18th, by the way.

@ccordoba12 Do you - or anyone else from the Spyder developers - have any say in updating the main anaconda repos? The current version in their main branch is still 4.2.0. Only conca-forge has the latest release.

@ccordoba12 Do you - or anyone else from the Spyder developers - have any say in updating the main anaconda repos? The current version in their main branch is still 4.2.0. Only conca-forge has the latest release.

No, we haven't, sorry.

No, we haven't, sorry.


update of VMI object is restricted when update image in the containerDisk

Is this a BUG REPORT or FEATURE REQUEST?:
I don’t know if it is a bug or not. Maybe a bug
/kind bug
What happened:
I create a virtual machine using the following manifest:
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachineInstance
metadata:
  name: fedora
spec:
  terminationGracePeriodSeconds: 30
  tolerations:
  - operator: Exists
  domain:
    resources:
      requests:
        memory: 8Gi
        cpu: 4
    devices:
      disks:
        - disk:
            bus: virtio
          name: containerdisk
        - name: emptydisk
          disk:
            bus: virtio
        - disk:
            bus: virtio
          name: cloudinitdisk
    machine:
      type: "q35"
  volumes:
    - name: containerdisk
      containerDisk:
        image: kubevirt/fedora-cloud-container-disk-demo:v0.31.0
    - name: emptydisk
      emptyDisk:
        capacity: "2Gi"
    - name: cloudinitdisk
      cloudInitNoCloud:
        userData: |-
          #cloud-config
          password: fedora
          chpasswd: { expire: False }

Then I change the image in the contaierDIsk field (kubevirt/fedora-cloud-container-disk-demo:latest) and apply this. But getting the error:
The request is invalid: : update of VMI object is restricted

I tried using VirtualMachineInstanceReplicaSet, but nothing happens when the image is changed:
virtualmachineinstancereplicaset.kubevirt.io/fedora unchanged

What you expected to happen:
I expected the virtual machine to restart with a new image
Environment:

KubeVirt version (use virtctl version): v0.26.0
Kubernetes version (use kubectl version): 1.16.7
VM or VMI specifications:
Cloud provider or hardware configuration: Bare-metal (Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz)
OS (e.g. from /etc/os-release): Ubuntu 18.04
Kernel (e.g. uname -a): 4.18.0-25-generic

@identw hi, yes VMIs are basically our Pod. They are atomic and can't be change. Maybe later on some aspects when we will get e.g. hotplug support. VMIRS will not role out changes automatically. Only new instances would get the new change. We don't have right now virtctl rollout and we don't have right now a VirtualMachineInstanceDeployment which would do that for you.
You should see that if you delete a VMI managed by the VMIRS, it should create a new one, with the new spec.
Flagging this as a
/kind enhancement
if you agree.

@rmohr Thank you for answer.
Okay, I will delete the vmi to start it from another image. There is no other way now.

@identw if we talk about single VMs and not a group of VMs, consider using a VirtualMachine. It is basically a StatefulSet of size one for VMIs. It also has convenience methos like virtctl restart and so forth.


Fix missing color handling in color-mix()

It's not following the spec.
Ref Interpolating with Missing Components

WPT: https://wpt.fyi/results/css/css-color/parsing/color-computed-color-mix-function.html

See also [css-color-4] Computed value and serialization of Infinity and NaN in color functions · Issue #8629 · w3c/csswg-drafts


Use a worker per surface to generate lods

Improves performance of generating lods https://github.com/godotengine/godot/issues/64751
I have a new tool!!! with https://github.com/mstange/samply

old code https://share.firefox.dev/3YPsJdQ

Here's a different scene with a different load.
https://share.firefox.dev/3QOQEbv


Riff buttons should not be deactivated

Love the new buttons - just a minor improvement. When a riff-button is pressed it is deactivated. This is fine for upscaling but if I want to do another riff of the same image I have to fall back to the traditional copy-pasting.
Thank you for your work - huge improvement!!

Sure, I can change that.

Closed in https://github.com/AmericanPresidentJimmyCarter/yasd-discord-bot/commit/e55081b14c59982ea7799af5798a32c38383a394


RolemasterUnified Official: Make Vocational skills dynamic

Short list of updates this week.  However heeps of progress in getting treasure law ready for release.  In the mean time enjoy:

Bump sheet version to 5
Vocational skills are now dynamic specialisations.  No longer a fixed list.

Cleans up a lot of space on the sheet
Update the level up process to match
Automatically move old skills across

Submission Checklist
Required

[x] The pull request title clearly contains the name of the sheet I am editing.
[x] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[x] The pull request makes changes to files in only one sub-folder.
[x] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

New Sheet Details

The name of this game is: <   >  (i.e. Dungeons & Dragons 5th Edition, The Dresden Files RPG)

The publisher of this game is: <   > (i.e. Wizards of the Coast, Evil Hat)

The name of this game system/family is: <   > (i.e. Dungeons & Dragons, FATE)

[x] I have followed the Character Sheets Standards when building this sheet.

[x] I have authorization from the game's publisher to make this an official sheet on Roll20 with their name attached.
[ ] This game is not a traditionally published game, but a copy of the game rules can be purchased/downloaded/found at: <   >
[ ] This sheet is for an unofficial fan game, modification to an existing game, or a homebrew system.

Changes / Description

Character Sheet Info Roll20 Internal Use only.

I just want to call out this change actually made the sheet smaller.  I'm very happy about that.


Don't automatically truncate long index names

Postgres has a lexical limit of n characters for identifiers, which includes indexes:

The system uses no more than NAMEDATALEN-1 bytes of an identifier; longer names can be written in commands, but they will be truncated. By default, NAMEDATALEN is 64 so the maximum identifier length is 63 bytes. If this limit is problematic, it can be raised by changing the NAMEDATALEN constant in src/include/pg_config_manual.h.

ActiveRecord, for example, throws and warns of long names. This avoids issues like this:
table.index(["name", "nationality", "ethnicity", "culture", "age", "sexuality", "gender", "height"])
table.index(["name", "nationality", "ethnicity", "culture", "age", "sexuality", "gender", "weight"])

CREATE INDEX name_location_nationality_ethnicity_culture_age_sexuality_gender  ON profiles USING btree ("name", "nationality", "ethnicity", "culture", "age", "sexuality", "gender", "height")
CREATE INDEX name_location_nationality_ethnicity_culture_age_sexuality_gender  ON profiles USING btree ("name", "nationality", "ethnicity", "culture", "age", "sexuality", "gender", "weight")

Right now knex silently creates the truncated index.

I apologize in advance for the index name content if it bothers anyone, it was the best non-lorem ipsum example I could come up with that wouldn't sound made up. D:

Yes, this sounds good. I'm guessing it would need to be specified for each dialect?


Allowing date formatting for google chart tooltips via google.visualization.DateFormat

We're using chartkick for a project and we've come into the need of formatting the dates inside the tooltips.
Achieving this is as easy as adding a couple of lines to the following function using the formatter provided by google.
renderLineChart = function (element, series, opts) {
      waitForLoaded(function () {
        var options = jsOptions(series, opts);
        var data = createDataTable(series, "datetime");
        var formatter = new google.visualization.DateFormat({
             pattern: options.pattern
        });
        formatter.format(data, 0);
        var chart = new google.visualization.LineChart(element);
        resize(function () {
          chart.draw(data, options);
        });
      });
    };

In general you could add the option to send the formatter as a parameter and apply it in the required functions.

Cleaning up old issues


Finalise lifecycle report #1

@CroniD Can you please provide some information about this pull request? What is the context? Is it designed for a special use case or a specific workspace?

Hi @psurrey ,
sure. This pullrequest is based on a collaboration between our firms. @dominikrose-leanix knows about this.


fix: bluetooth adapter can now also be set for bluepy backend

previously the bluepy backend was ignoring the "adapter" parameter in the constructor. this is now fixed...

Changes Unknown when pulling 6852c654b4730b0ba37c5eba431864380057cd4a on ChristianKuehnel:set_bluepy_iface into ** on open-homeautomation:master**.

Changes Unknown when pulling 0421bdc5d58b0ca99f1cc6e716f6823d4db95889 on ChristianKuehnel:set_bluepy_iface into ** on open-homeautomation:master**.

Changes Unknown when pulling 0421bdc5d58b0ca99f1cc6e716f6823d4db95889 on ChristianKuehnel:set_bluepy_iface into ** on open-homeautomation:master**.

Changes Unknown when pulling 0421bdc5d58b0ca99f1cc6e716f6823d4db95889 on ChristianKuehnel:set_bluepy_iface into ** on open-homeautomation:master**.

Changes Unknown when pulling 0421bdc5d58b0ca99f1cc6e716f6823d4db95889 on ChristianKuehnel:set_bluepy_iface into ** on open-homeautomation:master**.


Godep restore does not restore from _workspace

I run "godep save ./..." and check in the _workspace to github. But when I run "godep restore ./...", it still tries to check out my private repo on github and fails. I thought it should restore from the _workspace instead of going to github

I misunderstood the restore command


version in console and ember inspector still 1.0.0

while npm ls --depth=0 gives me ├──<EMAIL_ADDRESS>I'm not sure why it isn't updating, maybe a bug? Can anyone else repro?

I have been noticing the same thing in my console as well
DEBUG: Ember Simple Auth : 1.0.0

Seems to already be identified in https://github.com/simplabs/ember-simple-auth/issues/750

@notmessenger Thanks.