don't print vacuous cofibrations

right now, given the input
def formation : {
  (A : dim -> univ) (a : A 0) (b : A 1) -> univ
} = {
  \A a b =>  -- normal lambda form
  path A a ?  -- this is the new form for paths
}

the pretty printer gives the following information for the hole
Emitted hole:
  A : (-> [_x : dim]  univ)
  a : (el (A 0))
  b : (el (A 1))
  _x : dim
  _x₁ : (prf (or (= _x 0) (= _x 1)))
  _x₂ : (prf (= _x 1))
  |- ? : (el (A _x)) [_x₃ : (= _x 0) => []]

This is correct but somewhat misleading. The constraint [_x₃ : (= _x 0) => []] is satisfied vacuously: _x = 1 is in the context and equality of dimensions is decidable, we know that _x cannot ever be zero. Therefore any el (A _x) will do because they all satisfy that constraint definitionally, which is to say any el (A 1) will do, including the one in the context b.
A better output might look like
Emitted hole:
  A : (-> [_x : dim]  univ)
  a : (el (A 0))
  b : (el (A 1))
  _x : dim
  _x₁ : (prf (or (= _x 0) (= _x 1)))
  _x₂ : (prf (= _x 1))
  |- ? : (el (A _x))

An even better output might even look like
Emitted hole:
  A : (-> [_x : dim]  univ)
  a : (el (A 0))
  b : (el (A 1))
  _x : dim
  _x₁ : (prf (or (= _x 0) (= _x 1)))
  _x₂ : (prf (= _x 1))
  |- ? : (el (A 1))

but that's a different issue.

Sage advice from Jon about tackling this:

https://github.com/jonsterling/cooltt/blob/path-code/src/lib/Refiner.ml#L27
This is the function that creates a top-level hole; the arguments (tp, phi, clo) are doing the following: tp is the type of the hole, phi is the cofibration you are constraining along, and clo is a closure representing a partial element “_ : phi !- p : tp”.
The thing you would want to do is check whether the cofibration phi is false (this can be done using some operations in the monad I believe), and if it is false, replace phi with Cof.bot before proceeding.

I suggest writing a function to "normalize" cofibrations (in the EM.m monad), and then this function can be called by make_hole as discussed above. Currently, this normalization function might just only look for vacuous cofibrations and replace them by Cof.bot (which will have the desired result of this ticket), but in the future we may even augment the function to produce equivalent-but-more-regular-or-more-optimized representatives of the same equivalence class.

How much of a rabbit hole do you think it is to do some kind of lightweight rewriting? Like the above instance of "oh i know that x=1 so i'll do [1/x] on the goal type" is itself kind of benign (and I think helpful to a user) but I don't know how much of a quagmire that really is. My hope is "some but not much" exactly because the theory of dimension equality is decidable in open contexts, but I don't know if I'm right or not.

Good question; for the case of choosing a more intuitive representative of the equivalence class, we can probably do this without too much difficulty by changing the implementation of quote_dim, specifically the DimVar clause.
The logic there could be changed to:
If we're looking at r === DimVar lvl, then let's fire off a query to the cofibration environment to find out if r=0 is true, and if so return 0 literally, and the same for r=1, and only otherwise quote the variable.

This line gives an example of how to branch on whether two dimensions are equal in the appropriate monad:
https://github.com/jonsterling/cooltt/blob/90ddfa6d457d0b3e29ef911b12725db26b65f0b7/src/lib/Nbe.ml#L1102

Related: should we have surface syntax for the true cofibration? (Right now we have some tests that explicitly mention 0=0.)

sure!

@cangiuli I think you're probably referring to this one?
def testing : {
  (Z : univ) (A : univ) (B : A -> univ) (p : Z -> (x : A) * B x) ->
  (z : Z) -> (x : sub A {0==0} {fst {p z}}) * B x
} = {
  \_ _ _ p => p
}

normalize testing

What would you want that to look like?

The Unicode name for 0=0 should be ⊤. I don't know what would be a good plain text name because it seems awkward to reserve true or T or the like; open to suggestions there.

What about #t / #f? 😎

@jonsterling at the line you pointed out, phi has type D.cof which makes me want to write norm : D.cof -> D.cof. I'm a little puzzled, though, because I feel like what I'm looking for is instances of CofAbort, though, because that's what prints as []. I guess said differently, just a cofibration being x = 0 isn't enough to know that it's OK to replace it with Cof.bot; it's that it's mapped* to an abort and I don't really know where that mapping is happening.
*"mapped" is probably the wrong word here but I am being led astray by your => notation in the output.

So, what is happening is: there are many cofibrations that are definitionally equal to Cof.bot but not literally Cof.bot. Anything that implies 0=1 for instance. Under all of these false cofibrations, the normal form of a term is [], but the printer cannot be expected to check if a cofibration is false. So, if we want the printer to do something smart in that case, we need to give it something that is obviously false (Cof.bot).

Yeah, I think I understand that strategy, but maybe I don't because I'm still confused. In the output (el (A _x)) [_x₃ : (= _x 0) => []], the cofibration is just (= _x 0), right? Represented by (roughly) Cof.Cof(Cof.eq(Var x, DomainData.Dom0))? That in and of itself contradictory, it's only because in the context of the hole we have (prf (= _x 1)) that we know that's impossible to satisfy.
So maybe a better question is: does normalization of a cofibration have type D.cof -> D.cof or ctx -> D.cof -> D.cof? And if it's the latter, I guess the context is being reified into the ∏ that's getting computed by traversing the cells in that function? (https://github.com/jonsterling/cooltt/blob/master/src/lib/Refiner.ml#L32)

Oh, now I see the thing I need to explain ;-)
You need D.cof -> D.cof m; the monad has enough state in it to let you literally ask whether phi implies 0=1. The relevant functions are EM.lift_cmp @@ CmpM.test_sequent [phi] (Cof.eq Cof.dim0 Cof.dim1) or something like this.

oh oh, ok. i see which tree you're barking up and it is not the same as the one i am.

everything discussed in here was addressed in a PR that's merged into master, so i will now close this issue.


slayer: Set streak and points when receiving first task

Fixes  #14286

bump, this will be handy for the current running league


Blank window frame on open/close

Windows Terminal version
1.15.2875.0
Windows build number
10.0.22621.819
Other Software
No response
Steps to reproduce
Open and close Windows Terminal and see the black window frame
Expected Behavior
No mysterious window frame
Actual Behavior
Video 0.5x speed
https://user-images.githubusercontent.com/7588612/204042035-3b099612-555d-4ea9-bfe2-f43b0c237dda.mp4

/dup #11561


TypeError: init() missing 2 required positional arguments: 'opm_first' and 'fuse_projection_weights'

Hello,I put weights, csv and a3m in folders (Especially, a3m in /cluster/home/xxx/alphaflow/splits/6DS0_A/a3m/6DS0_A.a3m), and run following code:
python predict.py --mode alphafold --input_csv /cluster/home/xxx/alphaflow/splits/6DS0_test.csv --msa_dir /cluster/home/xxx/alphaflow/splits --weights /cluster/home/xxx/alphaflow/splits/alphaflow_pdb_base_202402.pt --samples 200 --outpdb /cluster/home/xxx/alphaflow/splits/output --self_cond --resample
then I meet the error:
2024-02-22 13:45:48,506 [node83:61063] [INFO] Loading the model
Traceback (most recent call last):
  File "/cluster/home/xxx/alphaflow/predict.py", line 132, in <module>
    main()
  File "/cluster/home/xxx/.conda/envs/alphaflow/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/cluster/home/xxx/alphaflow/predict.py", line 78, in main
    model = model_class(**ckpt['hyper_parameters'], training=False)
  File "/cluster/home/xxx/alphaflow/alphaflow/model/wrapper.py", line 496, in __init__
    self.model = AlphaFold(config,
  File "/cluster/home/xxx/alphaflow/alphaflow/model/alphafold.py", line 73, in __init__
    self.extra_msa_stack = ExtraMSAStack(
TypeError: __init__() missing 2 required positional arguments: 'opm_first' and 'fuse_projection_weights'

Could you offer me some help to solve it? Thanks.

This looks like an OpenFold version mismatch --- did you install OpenFold with the command provided in the README, or some other way?

Yes, I did it as in the README:
pip install 'openfold @ git+https://github.com/aqlaboratory/openfold.git@5484c38'
and get openfold 2.0.0, is this version right?

Ah, the commit is wrong; it should be
pip install 'openfold @ git+https://github.com/aqlaboratory/openfold.git@103d037'
The README has been updated.

Ok, I change the openfold version and it works. Thanks


do not set empty cookie when destroy

Coverage decreased (-0.07%) to 95.732% when pulling 3424c8662e1133ee60c961cd5841143679e4986a on destroy-not-set-cookie into b3215265effab1d1439eefd4668d53fd3803822a on master.


@LenaVinogradov -- can you open a separate issue with exactly what you're seeing and what you expect to see? That'd help us narrow it down. Thanks!

@LenaVinogradov -- can you open a separate issue with exactly what you're seeing and what you expect to see? That'd help us narrow it down. Thanks!
Originally posted by @brettsam in https://github.com/Azure/azure-functions-dotnet-worker/issues/760#issuecomment-1220962314
I have used new preview package and the sample code from the quoted PR:
"The preview "packages are now available: https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ApplicationInsights.
For usage and explanation, see the PR here (official docs will come when this is out of preview): https://github.com/Azure/azure-functions-dotnet-worker/pull/944."
Here is a code of our program.cs:
public class Program
{
	public static async Task Main()
	{
		var host = new HostBuilder()
			.ConfigureFunctionsWorkerDefaults(builder =>
			{
				builder.UseNewtonsoftJson();
				builder.AddApplicationInsights().AddApplicationInsightsLogger();
			})
			.ConfigureOpenApi()
			.ConfigureAppConfiguration(builder => Startup.ConfigureAppConfiguration(builder))
			.ConfigureServices(collection => Startup.Configure(collection))
			.Build();

		await host.RunAsync();
	}
}

With this package we can see dependencies in appinsights (we moved from Functions v3.0 a couple of month ago, so we are very unhappy to loose the telemetry functionality that we were heavily relying on for years), but this dependencies are not properly linked to parent. The have the correct operationId set, so we can see them together with the rest of telemetry objects for the same operation, but hierarchy is still lost as the parentId of the dependencies do not point to any object in appinsights.

here is an illustration. parent Id should be object id of the function request object, but it is not.

Thank you for the report!
Some questions:

Can you share what this looks like in 3.0 (if you have it?). I'm assuming the MICROSOFT.TABLES calls show up under that parent you've pointed to?
Are you using output bindings for the Table entries? Or are you using the Storage SDK directly in your function?

we moved away from using output bindings. Using storage clients from storage SDK
here is how it looked with Functions 3.1:

thank you!

Thanks @LenaVinogradov -- I think I have an improvement here. It'll be included in the next preview of the AppInsights package. Thanks for the report!

thank you for the good news!
I have one more issue to report though. We still see the multiple Trace messages logged for all dependencies (usually one for start request and one for stop)  in addition to the Dependency object in AppInsights. We were hoping the re-introducing the dependencies back in the preview package will eliminate the extra traces. Can you please advise how we can disable them?
Here is a segment of just one execution :

FYI -- preview2 is now available: https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ApplicationInsights/1.0.0-preview2

@brettsam I can confirm that with preview2 the dependecies are correctly nested. 👍


More detailed tracing

I wanted to looking to a method and tried to find what methods called it or what methods it called.
When tracer is set to filter certain class it wouldn't give the context;
E.g. ClassA.a called ClassB.b. When i trace the ClassB.b i don't know ClassA.a called it.
Also ClassB.b called ClassC.c then i don.t know ClassC.c is called.

Duplicate of #161


please consider migrating to go modules

Hi all,
I see that Kapacitor is still using Gopkg.* to manage dependencies.
Would you please consider converting to go modules (https://blog.golang.org/migrating-to-go-modules)? This is the internal dependency management system Go uses.
Thanks much for your time,
William

This is the plan, @williamh .  I've been on family leave, so I haven't gotten to it yet,
I've made a ticket to remind myself to do it.
Thanks for reminding me to make it.
https://github.com/influxdata/kapacitor/issues/2378


Add AmoebaMultipoleForce to disable_pbc

Description
Support AmoebaMultipoleForce in utils/openmm/disable_pbc
Todos
Notable points that this PR has either accomplished or will accomplish.

[x] Support AmoebaMultipoleForce

Status

[x] Ready to go

@mattwthompson can you look at this whenever you have a chance?


Addition of new article

Addition of new article and 4 supprting images.
Please use this template to ensure easier processing of your pull request
Category

[ ] Content fix
[x] New article
[] Example checked item (delete this line)

Related issues:

fixes #issuenumber
partially #issuenumber
mentioned in #issuenumber

If this fixes (aka: closes) or references an issue, please reference it here. This helps maintaining the issue list as it will (1) link the PR to the issue & (2) automatically close the issue when this PR is merged in.
(DELETE THIS PARAGRAPH AFTER READING)

What's in this Pull Request?

Please describe the changes in this PR. Sample description or details around bugs which are being fixed.
(DELETE THIS PARAGRAPH AFTER READING)

Guidance

Please update this PR information accordingly. We'll use this as part of our release notes in monthly communications.
Please target your PR to 'master' branch. Released documents are in live branch.
(DELETE THIS PARAGRAPH AFTER READING)

Docs Build status updates of commit 3964f24:
:warning: Validation status: warnings

File
Status
Preview URL
Details

Community/power-platform-DLP-policies-you-should-be-considering-on-Day-1.md
:warning:Warning
View
Details

Community/media/power-platform-DLP-policies-you-should-be-considering-on-Day-1/Image02.PNG
:white_check_mark:Succeeded
View

Community/media/power-platform-DLP-policies-you-should-be-considering-on-Day-1/Image03.PNG
:white_check_mark:Succeeded
View

Community/media/power-platform-DLP-policies-you-should-be-considering-on-Day-1/Image04.PNG
:white_check_mark:Succeeded
View

Community/media/power-platform-DLP-policies-you-should-be-considering-on-Day-1/Image05.PNG
:white_check_mark:Succeeded
View

Community/power-platform-DLP-policies-you-should-be-considering-on-Day-1.md

Line 77, Column 0: [Warning-hard-coded-locale] Link 'https://docs.microsoft.com/en-us/power-platform/admin/wp-data-loss-prevention' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

@aaronrendell - I don't want to be too picky, but when you submit a PR, could you please fill in the template so we know what we're getting?
I can fix that one warning and I'll get it posted after a quick review pass.

Reading through your article, I noticed we don't have DLP in the Glossary yet. I've added an entry without a definition. Want to add one? #265


Travis ci

Add current repo here https://travis-ci.org and you will can use build status badge for your project

Wow that's awesome! Thanks for the PR!


GH-36756: [CI][Python] Install Cython < 3.0 on verify-release-candidate script

Rationale for this change
Some of our verification tasks fail for 13.0.0
What changes are included in this PR?
Pin Cython to be less than 3.0
Are these changes tested?
Archery
Are there any user-facing changes?
No

Closes: #36756

@github-actions crossbow submit verify-rc-source-python-*

@github-actions crossbow submit verify-rc-source-python-*


Adding devise

In this project I fulfilled:

Remove current_user method in ApplicationController.

Install and setup devise.

Can register a new user.

User logs in with a combination of email and password.

Hashed password should be stored in the database.

Ask for confirmation of email.

Can reset password.

I implemented the design and also try to set sign in on running the app but due to it the problem is occuring. However I find that it is not in the requirement that login page should be rendered on running the app. I am repeating a module and last time the same project got approved. Now time is too short to troubleshoot but I will look at it and try to fix it

I implemented the design and also try to set sign in on running the app but due to it the problem is occuring. However I find that it is not in the requirement that login page should be rendered on running the app. I am repeating a module and last time the same project got approved. Now time is too short to troubleshoot but I will look at it and try to fix it
** Feel free to reach out **


Bootstrap 4 alpha 6 dependency update, error recovery for gulp.

Second attempt at this PR after a bad push ate my 8.5.0 branch. See here for the error recovery code (thanks to Nicolo_Sacchi and epiphron!). I didn't write it, I just turned it into a PR.

@retlehs sorry for the doubled PR. I managed to delete my own 8.5.0 branch which closed the previous PR. Not my finest moment.

Thanks! 👍 I have two commits I'd like to add to this PR though;

One that makes indentation and whitespace in gulpfile.js consistent again.
Another specifies that Travis CI should use Node 6.x and 7.x so the builds pass.

Should I do a separate PR with those commits? Or will you add them as a patch to this PR?

I just realized that Sage 8 only requires Node 4.x and that I set the $TRAVIS_NODE_VERSION env var to 6 and 7 in the commit mentioned above.
I know it's a minor detail but I went ahead and created a PR for it anyway (#1831)

This PR has been inactive for a while so I went ahead and made an updated PR with the error handling fix and the Bootstrap dependency bump (#1832). Hope everyone is okay with this?


Consider takeWhileF, etc.

#62 adds takeWhile and dropWhile enumeratees that take or drop values from a stream while a predicate E => Boolean holds. It may also be useful to have effectful versions of these enumeratees that use a predicate E => F[Boolean].

It might also be useful to be able to access the already accumulated values from takeWhile which would change the predicate to (Vector[E],E) => Boolean and (Vector[E],E) => F[Boolean] respectively.

@Crafter6432 Agreed, although we might want to allow a custom accumulator (Acc, E) => (Acc, Boolean) since in many cases holding on to all previous elements would be too expensive.

@travisbrown If we do that, we could move the predicate into the accumulator Acc => Acc and check
Acc.isDone and thus avoid to instantiate the tuple.

Added by @liff in #84 and #85.


[helm] - added global.cni.readCniConfFrom parameter

global.cni.readCniConfFrom allows you to specifiy the path to a CNI config to read from on agent start
This can be useful it you want to manage your CNI configuration outside of a Kubernetes.
This new parameter is mutually exclusive with the global.cni.configMap one

@nebril thanks for the review. To answer your question regarding CNI plugin management. I still rely on the daemonset to manage them. However I manage the config using cloud-init. The main purpose is to be able to have multiple ENI specs over a single cluster:

different security-groups
different subnets
different first-interface-index

Requesting review from @seanmwinn as he has expertise in helm best practices.

@mvisonneau I would like some more context about what is consuming this value and why it needs to be stored in the configmap for cilium? I can't see any part of Cilium that would consume this value, so it seems like a custom implementation detail for you.

@mvisonneau I'm trying to understand who the consumer of this value is. I fail to see where this would be used within Cilium, and therefore it appears to be implementation-specific. Can you explain why this value needs to be stored in the configmap and which part of Cilium will consume it?

@seanmwinn, would you prefer me to rename it to readCniConf ?

@mvisonneau i think the confusion here is not the naming, but how the cilium agent uses read-cni-conf value from the config map. it's quite possible it's simply the lack of knowledge on our part. it might help if you could add a bit more description in the commit message.

We can already read a CNI conf from a configmap, is that not suitable to solve your use case?

@mvisonneau I have no issue with the  naming. I'm failing to see where this is used inside of Cilium or by any part of it. You are essentially storing a configmap value in kubernetes, and assigning a default in the values file. Where is it consumed? Why do we need to add this to Cilium?

@seanmwinn the read-cni-conf option is already in the helm charts and agent:
$ git grep -i read[-]*cni[-]*conf {daemon,install,pkg}/
daemon/cmd/daemon.go:   if option.Config.ReadCNIConfiguration != "" {
daemon/cmd/daemon.go:           netConf, err = cnitypes.ReadNetConf(option.Config.ReadCNIConfiguration)
daemon/cmd/daemon_main.go:      flags.String(option.ReadCNIConfiguration, "", "Read to the CNI configuration at specified path to extract per node configuration")
daemon/cmd/daemon_main.go:      option.BindEnv(option.ReadCNIConfiguration)
daemon/cmd/daemon_main.go:      flags.String(option.WriteCNIConfigurationWhenReady, "", fmt.Sprintf("Write the CNI configuration as specified via --%s to path when agent is ready", option.ReadCNIConfiguration))
daemon/cmd/daemon_main.go:              input, err := ioutil.ReadFile(option.Config.ReadCNIConfiguration)
install/kubernetes/cilium/charts/config/templates/configmap.yaml:  read-cni-conf: {{ .Values.global.cni.confFileMountPath }}/{{ .Values.global.cni.configMapKey }}
pkg/option/config.go:                   ReadCNIConfiguration,
pkg/option/config.go:   // ReadCNIConfiguration reads the CNI configuration file and extracts
pkg/option/config.go:   ReadCNIConfiguration = "read-cni-conf"
pkg/option/config.go:   // ReadCNIConfiguration reads the CNI configuration file and extracts
pkg/option/config.go:   ReadCNIConfiguration string
pkg/option/config.go:   if c.WriteCNIConfigurationWhenReady != "" && c.ReadCNIConfiguration == "" {
pkg/option/config.go:           return fmt.Errorf("%s must be set when using %s", ReadCNIConfiguration, WriteCNIConfigurationWhenReady)
pkg/option/config.go:   c.ReadCNIConfiguration = viper.GetString(ReadCNIConfiguration)

👋 hey @seanmwinn, no worries here is a bit more context:

This appears to be implementation-specific. Why are we adding a new key-value pair to a configmap in Cilium when no part of Cilium will consume the value?

The read-cni-conf parameter is already being set if a ConfigMap is provided.
From what I understand, setting this value is a prerequisite (or at least a way) in order to load the desired ENI configuration during the creation/update of a CiliumNode resource by the agent.
The goal here is to allow end users to configure it with an arbitrary value other than the one currently enforced. As you said, I feel that we should be able to chose to manage it with any another possible fashion. eg: baked into an ENI, via another ConfigMap, managed through cloud-init or else.
Managing the config file itself is what we could qualify "implementation specific" and is not something that I am attempting here. Although, I reckon that being able to configure Cilium to consume it has to be dealt somehow within the chart 🤔

@seanmwinn, would you prefer me to rename it to readCniConf? 🤔

Thank you so much for taking the time to explain this in more detail. Now that I understand this change a lot better, yes I would rather see this name for the value.

no worries @seanmwinn, thanks for the review! :) I updated the parameter to global.cni.readCniConf

Coverage increased (+0.02%) to 36.938% when pulling 2ad247793a19f9414b47a41cfe1771daf42e6741 on mvisonneau:helm/readCniConfFrom into f5a7682bdefe98072175e2fd2571f986ac4815f5 on cilium:master.

test-me-please


Error when marking message as read

Getting this error when marking a ChatMessage as read.

Please provide the gist again.

Long gone, unfortunately.

Ok. Thanks for the reply


Move coerce method call before time creation

Hi,
I had a problem with type conversion on the @timestamp field. My config is as follows:
data_points =>
{
  "time" => "%{@timestamp}"
 "value" => "%{value}"
}
allow_time_override => true
coerce_values =>
{
  "time" => "integer"
}

which did not work because of an ordering problem in the code: the coerce method is executed after the initialization of the time field. As a consequence, the output would contain iso8601 timestamp representations and cause error messages from the database.
I have rearranged the order and now it works like a charm.

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then  say 'jenkins, test it'.


Python3 wsystests

I made changes so that dls_ade runs on Python 3 as well as Python 2. Sky then ensured that the system tests run as well.
Are we happy to merge these changes into master?

Coverage decreased (-0.4%) to 87.638% when pulling 36c2816efe660d9c573c5bf0506c69de3fdbadca on python3_wsystests into 56fab012d81663b49066000a4b249019cad94004 on master.

One thing I now remember is:

We need python-ldap 3.x for compatibility with Python 3
It is not easy to install python-ldap 3.x on RHEL6

So it's not straight-forward to reconcile these two things.

One thing I now remember is:

We need python-ldap 3.x for compatibility with Python 3
It is not easy to install python-ldap 3.x on RHEL6

So it's not straight-forward to reconcile these two things.

I don't expect we will attempt to support python3 on RHEL6 anyway... So we have  a choice: do we maintain a parallel python3 branch - or do we maintain a parallel RHEL6 branch? Of course only until we can finally ditch RHEL6 entirely...

All right, this now seems to work on Python 2 and Python 3 and RHEL6 and RHEL7 (Python3/RHEL6 is not necessary). I wouldn't be surprised if there are a few edge cases that need clearing up still.

Are we happy to merge this one while @ulrikpedersen's away? I think we're going to need these changes (specifically for the Python 3 deployment), so perhaps we merge and then fix any problems that are subsequently found.

I would like to merge #74 first and then rebase this one, if that isn't too painful to do.

Done! This can now be rebased on master.


Add my chart repo https://ruguodangshi.github.io

@ruguodangshi Thank you for the pull request. Helm uses a DCO which requires signoff on the commits. You can find directions on fixing the signoff on the checks tab of the pull request.

Closing this pull request as another added the same repository


how to hide the  Stock rest time  bar ？

In some markets, there are some Stock rest time，such as  weekend  ,  how could I hide the space area?  My data does not include these rest days

Did you figure this out ? I'm having the same issue

In some markets, there are some Stock rest time，such as weekend , how could I hide the space area? My data does not include these rest days

"chart": {
"type": "Candles",
"data": [],
"indexBased": true
}
just set indexBased to true


Web Interface: Upload your own schema/XSD

"The usage is simple but the fact that you do not have the ability to select your own XSD to test against, is a problem (we could not validate the level 2 of our profile)"

Not planned to do


Property detail: Only display violations table if we have violations

Currently, the table shows, even with 0 violations. Hide the violations in that case.

Added a No Property Violations message in place of the empty table.


README: add python_qt_bindings

See https://github.com/mottosso/Qt.py/issues/310

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

Thanks @machinekoder! (No need to sign the CLA for this)


authedClient.getFills does not return ETC-USD

The authedClient.getFills does not return ETC-USD

Fixed by #332, which still has to be published to npm.


Initialize STRtree with capacity of 10 items per leaf node

Previous initialization was creating a tree with all geometries on a single leaf node.
See: https://gis.stackexchange.com/questions/353619/shapely-with-rtree-versus-strtree

Hi! We are running into some performance problems because of this, having high hopes that this will be merged soon :)

Thanks @dbaston!


Updated picojson to version 1.3.1-dev.

In order to fix a compilation warning under recent gcc versions.
It also contains a patch which we used to maintain ourselves.
Note that since version 1.3.1 hasn't been released - picojson doesn't
seem actively maintained - this is really just the current master, and
I'm including the short commit hash in the version to indicate exactly
which version we're using.
Compilation warning:
../3rdparty/picojson-1.3.0/picojson.h: In member function ‘const T& picojson::value::get() const [with T = double]’:
../3rdparty/picojson-1.3.0/picojson.h:304:124: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  304 |   GET(double, (type_ == int64_type && (const_cast<value*>(this)->type_ = number_type, const_cast<value*>(this)->u_.number_ = u_.int64_), u_.number_))
      |                                                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../3rdparty/picojson-1.3.0/picojson.h:292:12: note: in definition of macro ‘GET’
  292 |     return var;       \

Fix for the compilation warning:
https://github.com/kazuho/picojson/commit/c8853367b0ad6ff6e76188e639a8e7f0706d4431
The patch we used to maintain ourselves:
https://github.com/apache/mesos/blob/master/3rdparty/picojson-1.3.0.patch
Upstream commit corresponding to this patch:
https://github.com/kazuho/picojson/commit/2f9d3cf33808615376493469c4be6942fc3c987a
And follow-up commit:
https://github.com/kazuho/picojson/commit/35ce0b6b03e0b60541258f5ad061003a696d9a34
@asekretenko @qianzhangxa

I see the fix in https://github.com/kazuho/picojson/commit/c8853367b0ad6ff6e76188e639a8e7f0706d4431 is pretty small, so can we just add it into our patch https://github.com/apache/mesos/blob/master/3rdparty/picojson-1.3.0.patch?
Bumping picojson to 1.3.1-dev will involve more changes which may have unknown impact.

OK I updated to just backport the specific change, let's get this merged!


Error message

Hi,
I'm getting the following error message:
Invalid response: {'auth_url': {'default': 'http://<IP_ADDRESS>:80/sony/webauth/auth_default', 'tv': 'http://<IP_ADDRESS>:80/sony/webauth/auth_tv'}, 'error': [403, 'Forbidden'], 'id': 1}
request path: sony/avContent
request params: {"method": "getContentList", "params": [{"source": "extInput:composite"}], "id": 1, "version": "1.0"}
I'm on the latest androidtv version, Oreo
Could you help?
Thanks, Ramon

Did you setup a PSK on the TV?
Can you share the relevant part of your config.yaml?

Sure... I have also the original Bravia component installed. Is that possible one of the problems?
Thank for trying to help me. Regards, Ramon

platform: braviatv_psk
host: <IP_ADDRESS>
psk: fakecode
amp: false
android: true
sourcefilter:

'NPO 1 HD'
'NPO 2 HD'
'NPO 3 HD'
'RTL 4 HD'
'RTL 5 HD'
'SBS6 HD'
'RTL 7 HD'
'Veronica HD / Disney XD'
'Net5 HD'
'RTL 8 HD'
'FOX HD'
'RTL Z HD'
'Ziggo TV HD'
'Ziggo Sport HD'
'Comedy Central HD'
'Spike HD'
'Discovery HD'
'National Geographic Channel HD'
'SBS9 HD'
'Eurosport 1 HD'
'TLC HD'
'BBC First HD'
'MTV HD'
'24Kitchen HD'
HDMI
name: 4KTV

I think I have found the issue. Placing the psk between '', 'fakecode', solved the problem for now at least. I'll keep you posted. Regards, Ramon

Hi,
I'm getting some problem of my Bravia, everything control are good, but just can't trun on TV on HA.
however when I turn on TV by remote control directly, HA also can syn the TV status。
Unfortunately, log report didn't have about related Bravia issue.
my Bravia model are KD-65X9000E with latest version

platform: braviatv_psk
host: <IP_ADDRESS>
psk: sony
mac: d8:0f:99:66:35:0b
amp: True
name: sony_bravia_tv

Could you help?
Thanks, Ramon

Hi,
I'm getting some problem of my Bravia, everything control are good, but just can't trun on TV on HA.
however, when I turn on TV by remote control directly, HA also can syn the TV status。
Unfortunately, log report didn't have about related Bravia issue.
my Bravia model are KD-65X9000E with latest version.
platform: braviatv_psk
host: <IP_ADDRESS>
psk: sony
mac: d8:0f:99:66:35:aa
amp: True
name: sony_bravia_tv
Could you help?
Thanks, Ramon

@ericliu1234567 guess you have an Android TV? Then you need to set Android: True in the config.

Hi,
I'm getting some problem of my Bravia, everything control are good, but just can't trun on TV on HA.
however, when I turn on TV by remote control directly, HA also can syn the TV status。
Unfortunately, log report didn't have about related Bravia issue.
my Bravia model are KD-65X9000E with latest version.
platform: braviatv_psk
host: <IP_ADDRESS>
psk: sony
mac: d8:0f:99:66
amp: True
name: sony_bravia_tv
Could you help?
Thanks, Ramon

problem solved, thanks!!

@ramonvanbiljouw My guess is that your PSK starts with a 0. Is that correct? That is probably the reason it needs to be between quotes in your case. Will update the readme if needed.
Everything else is working now?

Hi Gerard, you are exactly right; the psk starts with a zero. Everything is working great now. I would of like to have the knowledge to extend the code to add more commands besides the 20 something you have programmed. Is it that easy to just add the command like Num1 as you did. For example: AudioOutput_AudioSystem. It would be kind if you answer that, but I understand that could be the beginning of an endless FAQ. 😉 thanks for helping me. And yes, it would be useful to add the remark regarding the zero. Have a good one, Ramon.

Apparently it is that simple. You can add commands 👍


Laravel 10 support

Coverage: 45.965% (-1.6%) from 47.538% when pulling 511ae9cad281f9d2d8277142109770d7817ccca9 on laravel-10 into e25f60a8e62f83f36be0173be6272a918f1b0c2b on develop.


[network] Terminate inbound Noise handshake early when pubkey not in elligible peers set

🚀 Feature Request
Validators currently use authenticated and encrypted Noise channels to communicate with each other. In addition, when running as a Validator, we reject all connections that authenticate to a pubkey outside of the validator set (https://github.com/libra/libra/blob/master/network/src/transport.rs#L94). However, we only reject the connection after (1) fully negotiating the Noise protocol and (2) completing the full Noise handshake. For context, our current logic looks like:
# Protocol Negotiation
> /libra/protocol-interactive/1.0.0
> /noise_ix_25519_aesgcm_sha256/1.0.0
< /noise_ix_25519_aesgcm_sha256/1.0.0

# Noise_IX handshake
> e, s
< e, ee, se, s, es

# Reject unathenticated peers
if s not in validator_set { disconnect }

# ..

However, as an inbound listener, we can reject a connection as soon as we read the static pubkey, meaning we can save ourselves resources by not responding to the Noise handshake. This helps mitigate a potential DDoS vector where non-validators flood our inbound with slow connections that, while failing to authenticate, still waste our CPU + bandwidth. Our inbound protocol would then look like:
# Protocol Negotiation
> /libra/protocol-interactive/1.0.0
> /noise_ix_25519_aesgcm_sha256/1.0.0
< /noise_ix_25519_aesgcm_sha256/1.0.0

# Noise_IX handshake
> e, s                                  # if s not in validator_set { disconnect }
< e, ee, se, s, es

# ..

One issue with Noise IX is that a peer can still force our response by sending a real validator's s static pubkey in the first message. To combat this attack, we should move to Noise IK, which allows us to verify that the dialer actually controls the private key for s in the first message and then disconnect accordingly:
# Noise_IK handshake
> e, es, s, ss                          # if s not in validator_set { disconnect }
< e, ee, se

As a further optimization, we can remove the initial roundtrip from protocol negotiation with #1158. Our inbound protocol would approach optimal:
# Protocol Negotiation
> /libra/protocol-select/1.0.0
> /noise_ik_25519_aesgcm_sha256/1.0.0
# Noise_IK handshake
> e, es, s, ss                          # if s not in validator_set { disconnect }
< e, ee, se

# ..

cc @bothra90 @bmwill

https://github.com/libra/libra/pull/3951 terminates the connection after receiving the first handshake message if it does not recognize the key (if in the validator network).
For context, the PR moves from IX to IK:
IK:
  <- s
  ...
  -> e, es, s, ss
  <- e, ee, se

We could in theory abort the connection right after s and before the additional Diffie-Hellman key exchange ss, but note that this would mean modifying the behavior of the noise implementation. If others want to implement this, and rely on a noise library, they will have to modify the library's behavior as well.
 We can only realize this after doing ss and noticing that our derived secret doesn't match theirs (because they can't perform the key exchange).
For these reasons I don't think it makes sense to abort the handshake right after receiving the s key.

Closed by #3951
As described in the PR, we only decide to drop the inbound upgrade after fully parsing the client message. While this is slightly more work for the server than is optimal, it's also simpler and easier to maintain. Either way, we can avoid computing the response message for an unauthenticated peer and drop the connection immediately without sending any response bytes over-the-wire.


setting Hostname and HostnameItem causes a warning on agentd start

Hostname and HostnameItem are both set by default, this leads into this warning:
Shutting down Zabbix agent:                                [  OK  ]
Starting Zabbix agent: zabbix_agentd [3912]: Warning: both Hostname and HostnameItem defined, using [xxx]
HostnameItem should not set by default, and Hostname should be disabled when HostnameItem is set

one fix is to disable the HostnameItem when the Hostname is defined
<% if !@hostname -%>
HostnameItem=<%= @hostnameitem %>
<% end -%>
but the Hostname defaults to $fqdn, the HostnameItem is always disabled.
i think it should be no default for the hostname
hostname is not set -> defaults to hostnameItem (actual zabbix behaviour)
hostname is set -> hostname is used instead of HostnameItem (actual zabbix behaviour)


feat: add autoware_ prefix to lanelet2_extension

Description
This PR adds autoware_ prefix to lanelet2_extension.
ref. https://github.com/orgs/autowarefoundation/discussions/4097
Additionally, this PR also changed the autoware_lanelet2_extension to pull from https://github.com/autowarefoundation/autoware_lanelet2_extension not from https://github.com/autowarefoundation/autoware_common.
ref. https://github.com/orgs/autowarefoundation/discussions/4671
See also https://github.com/autowarefoundation/autoware/pull/4909.
Tests performed

Not applicable.
Effects on system behavior

Not applicable.
Interface changes

Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@youtalk
Could you please adding any test result? (e.g. psim, lsim, evaluator)
For exmple, we often execute planning test on evaluator and compare with daily test result.
Please refer internal documentation to test with evaluator.

I've tested the planning simulator with local colcon build binaries.
https://autowarefoundation.github.io/autoware-documentation/main/tutorials/ad-hoc-simulation/planning-simulation/#basic-simulations
@kosuke55 Thank you for your suggestion. I'm trying to check.

To smoothly migrate, I modified to accommodate both the deprecated lanelet2_extension and the new autoware_lanelet2_extension. The autoware_common remains but was changed a branch that removes autoware_cmake, autoware_lint_common, and autoware_utils.
Once the Autoware Evaluator passed https://evaluation.tier4.jp/evaluation/reports/558069d2-166a-5c29-9815-e98bcc98fa8d?project_id=prd_jt, it would be mergable.

@mitsudome-r @xmfcx
Since https://evaluation.tier4.jp/evaluation/reports/558069d2-166a-5c29-9815-e98bcc98fa8d?project_id=prd_jt was passed, please review and merge by your bypass permission if approved.

😭

/usr/bin/ld: final link failed: No space left on device
https://github.com/autowarefoundation/autoware.universe/actions/runs/9705460481/job/26787572608?pr=7640#step:12:28511

I'm trying to fix the space issue here:

https://github.com/autowarefoundation/autoware.universe/pull/7669

For now since this has passed the non-cuda test, I will merge it bypassing the restriction.

@xmfcx Thank you so much!

I was just testing the build on local machine with cuda and confirmed that it builds fine.

Next time you can use the workflow dispatch to validate too:

It will take time but it will validate with cuda.


feat(tutorial): complete step 5

Bluemix App URL:
https://carbon-tutorial-sakillin.mybluemix.net

@kellychurchill Sorry, I missed that piece.  I have added a link to the Bluemix application.  Also, whenever I tried to deploy, it was not acknowledging the buildpack specified in the manifest.yml file.  I had to specify it explicitly in the cf command like this:
cf push -f manifest.yml -b https://github.com/cloudfoundry/staticfile-buildpack.git

If I didn't specify with the -b switch, it would try and run it as a node application.

👍  Looks good!
Feel free to stop this running application on IBM Cloud to avoid the possibility of incurring any charges 💵
Please see the wrapping up step to apply for your badge!
https://www.carbondesignsystem.com/tutorial/wrapping-up

@zero298 That deploy issue is because you have a typo in your manifest file.
buildback instead of buildpack


Upgrade Bond to 7.0.2

Updated to the 7.0.2 release of Bond.
Regenerated patches.

Thanks for the update!
We've made a bunch of toolchain improvements since the first addition of bond, so it's no longer needed to patch out Boost_USE_STATIC_LIBS :)


how to use this package for ground rover?

Hi,
I am simulating a ground robot along with other objects in gazebo. I want to use a motion capture system that provides me with its position and orientation. How can I use this package? I am confused how to use the IP address in this case?
pleas help.

Hi@Angit16 IP address is base base on your gazebo server ip, if it's in same machine is <IP_ADDRESS>,you can use for ground rover, just change your data interface from dronekit to other?


Test CRUD actors

Description
As a part of This thread, We need to design and automate test cases for the CRUD actors
Deliverables

Design test cases in TestQuality linked to the testing sheet
Automate the test case
Integrated with ZeroCI

Estimation Time

Do the exploratory testing and set the estimation time..

original issue
https://github.com/threefoldtech/home/issues/381

CRUD actors is removed, so this is obsolete


Quest book in inventory won't detect the items

Hello as I've been playing it completly awsome and fun on single player. But it goes wrongly badly for multiplayer when I made a dedicated and private server. The quest book didn't open I had to close game and log back. Then It worked but when I started doing the first quest "an end and beggining" and "read me first" they didn't complete. Even though my advancements did. The quest of the wand won't complete and won't unlock the rest of quests.
I am trying to find witch mod has the config for trying to fix this issue. Please help me. Bay.

Similar for me.
I play with a friend on a dedicated server. He has no problems but for me, every once in a while I can't finish "collect" quests cause the modpack doesn't realize I got all items.

Hey ! Try to use /tofe forcesync, it should works.


implement dapper stores

hi @AndrewTriesToCode,can implement dapper stores.dapper is a very popular lite orm.

hi @mingyangzhu
It might be possible. I'll take a look. Tenant resolution and per-tenant options will work with any other code -- a multitenant "context" for dapper (similar to for EFCore) might be doable.

it`s great！！ tks for your reply.


Supporting more than 100 ingresses

Situation
We have a microservice application consisting of ~20 services that we want to deploy for multiple customers. To save some costs, we use  one AKS (with one namespace per customer) and one Application gateway (with a dedicated subdomain per customer) resource. That has proven to work for the first few customers.
Problem
Now, with more customer it looks like we are approaching some limitations of Application gateway. Mainly we are struggling with the fact, that AppGW only allows to create 100 backend pools per instance. As most of the services do expose an ingress currently, we get also one additional backend pool for each such ingress, leaving is roughly with #customers x #services backend pools. As there seems to be a 1:1 relation between ingresses and backend pools created by AGIC, that currently limits us to having 5 customers on one AKS and AppGW, and severely limits our future capacity to add new services.
Question
As the limits can't be raised for AppGW via support ticket and seem to be rather fixed, Im asking if there is an alternative solution on the AGIC level here? I'm not too familiar with all the concepts and would just be open to any kind of solutions to remedy the situation.

Also massively hitting this issue!

We have a similar problem too. This 100 limit for most of application gateway configuration (backend pools, listeners, etc) is so low if you want to offer a multitenant service using AKS and the Application gateway. And if you want to use WAF is worse, because the limit is reduced to 40.
One thing we use to mitigate (only a little bit) the problem is the undocumented (https://github.com/Azure/application-gateway-kubernetes-ingress/issues/1263#issuecomment-919668462) annotation appgw.ingress.kubernetes.io/hostname-extension, which allow to use multiple hostnames for one listeners (up to 5). If you use multiple hostnames for the same backend, it could be useful to you.
I don't know how we can push and make Microsoft realize how necessary is to increase this limit.

We have the same issue. We already talked with Microsoft for a possible solution here. They kindly asked us to create Microsoft Support tickets in the Azure portal to create visibility and transparency. Other than this I did not really find a solution other than scaling the App Gateway instances and the AGIC charts per cluster.
Maybe you could host a dedicated ingress controller in each application's namespace and do a sort of cascading load balancing? So the App Gateway only needs one route (e.g. my-app-hostname.com/) pointing to the namespace's load balancer, which is capable of doing the path-based routing per application (e.g. /api -> backend-service, /billing -> billing-service, ...)?


Nvidia CUDA driver broken link

Encountered broken link:
NVIDIA CUDA enabled driver for WSL
under section "Install the GPU driver"

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

ID: 0fdfa117-e801-0df5-3c81-3151a97f431d
Version Independent ID: ee755d20-17c2-3d18-0c5c-b9ed31135218
Content: Enable NVIDIA CUDA on WSL 2
Content Source: docs/directml/gpu-cuda-in-wsl.md
Product: machine-learning
GitHub Login: @stevewhims
Microsoft Alias: stwhi

Thanks, @bjarkebrodin. I've published a fix now.


allow space in input string to container

What does this pull request change?
allow space in container input string, instead of using the "space to %20" conversion"
Why is this pull request needed?
Issues related to this change:
closes #1084

@soofstad looks like adding " before $APPLICATION_INPUT in init.sh was enough to fix the problem
--application-input="$APPLICATION_INPUT"


Check the real possibility to work from Italy

I was looking at Hasura and on their career page it simply says We hire across all states in the US. You can work remotely from anywhere in the US or in our office in San Francisco.

Thanks for raising an issue @mfirry. I'll track down when it was added to see if it was made by an employee directly.

I see that @NoriSte added the company in #148, he was interviewed directly from them so unless the policy changed in the last year it should be good. I would say that unless someone has a newer interview with them stating they no longer hire in italy we can leave it. Happened quite a few times that hiring policies were not aligned on the career page of a company.

Fair enough. It's just that if I go to a career page that states that, I would not apply. Anyhow, totally up to you to leave it there based on your info. Thanks.

From the career page, I see:
Our team is spread across 18 countries and we’re a remote workforce. For some of us who love working together in an office, or need to catch up for high-bandwidth discussions over a whiteboard and snacks, we have office spaces in SF and Bangalore!

So it's also possible this is a requirement for a specific position

I was working there but now it's not the case. Anyway: even if they remain fully distributed, I also know they fired a lot of people and lot of them were European. I don't think they changed their policy but I just wanted you all to be aware of that.

Without more information I'm more for keeping the entry for now, feel free to add info if you have some


Invert the dependency of domain sheet to output sheet

Now the domain sheet knows output sheet via the export method.
Ideally domain sheet would not have a dependency on output sheet, the relation should be inverted

Reflection could be a used to invert this relation. Although it feels a bit nasty, we could try to explore the implications


How do I import a pre-trained VIT model into the TransUnet interface?

Looking forward to your reply

I added a parameter to pass your own transformer here:  https://github.com/The-AI-Summer/self-attention-cv/blob/main/self_attention_cv/transunet/trans_unet.py#L9
Please note that you have to use the input vit channels also. to the best of my knowledge, they used a vit type transformer in the paper with patch_size 1 and something like 128*8 channels and not 3 as in a vit trained in rgb images
So l'm not sure if it fits your solution. let me know


Fix build error

Build was failing with 'err' undefined.
Fix linting

@mortent @nan-yu

/lgtm

/approve

/retest

@barney-s my PR was merged. You can rebase yours to retrigger the travis build

/lgtm

@mortent  please LGTM again. re-ran the travis test.

/lgtm


temperature and humidity

Hi, thanks for the excellent work and explanation on the code. I've managed to implement your code with BME280 and 0-10v GP8403 component to control whirlybird fans.
Trying to modify the code to use with both temperature and humidity but so far no luck. Any chance for the guidance in the right direction? Coffee on me to keep u up!
Thank you

Thank you for the compliment, I'm happy to hear my project was/is useful to you.
It's unclear what help you are looking for and I'd need some more info:
-- What have to done so far
-- What, if any, errors are you getting
-- How have you configured the new components

Also, is this for DAC you are using?

What I'm trying to achieve is Lambda automation based on temperature and humidity. For example in the morning temperature drops and the  fan turns off. But at the same time humidity rises and it would be nice to get automation based on two readings.
BME280 provides both temperature and humidity.
I'm using Dfrobot dac and it works perfectly on your Lambda code and temperature from bme280.
I hope it's little bit clear.
Cheers
George

Take PCT of temperature as u did before,
Take PCT of humidity, combine them together and use that for the automation.

Yep, I get what you're trying to do.
Please send me your code (minus any passwords etc), I'll take a look at where you're at and try to add the humidity for you.

` substitutions:
name: "Redia Centre" # Location and Entity Names (Capitals and Spaces Allowed)
max_temp: "65" # Threshold for MAX Fan Speed and Alarm
max_humd: "85"
esphome:
name: "fan-redia-centre"
esp32:
board: esp32dev
framework:
type: arduino
preferences:
flash_write_interval: 10000s
Enable logging
logger:
logs:
dallas.sensor: none
number: none
sensor: none
light: none
fan: none
level: DEBUG
Enable Home Assistant API
api:
ota:
password:
wifi:
ssid:
password:
Optional manual IP
Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid:
password:
captive_portal:
spi:
mosi_pin: GPIO23
clk_pin: GPIO18
miso_pin: GPIO19
display:

platform: ili9xxx
model: TFT 2.4
cs_pin: GPIO5
dc_pin: GPIO32
reset_pin: GPIO33
rotation: 270
lambda: |-
it.printf(0, 20, id(bold), Color(255, 0, 0), " %.1f", id(temp_sensor_1).state);
it.print(150, 20, id(bold), Color(255, 255, 255), "/");
it.printf(200, 20, id(bold), Color(0, 0, 255), " %.1f", id(rpm_1).state);
auto red = Color(255, 0, 0);
auto green = Color(0, 255, 0);
auto blue = Color(0, 0, 255);
auto white = Color(255, 255, 255);

color:

id: my_red50
red: 100%
green: 3%
blue: 5%

font:
gfonts://family[@weight]

file: "gfonts://Roboto"
id: roboto
size: 80

file:
type: gfonts
family: Roboto
weight: 900
id: bold
size: 60

file: "gfonts://Oswald"
id: oswald
size: 30

animation:

file: "fan.gif"
id: my_animation
resize: 50x50

Testing 2 Channel 0-10v I2C DAC GP8403
external_components:

source: github://pr#4495
components: gp8403
refresh: 1min

i2c:

id: bus_a
sda: 3
scl: 1
scan: true
frequency: 400000Hz
id: bus_b
sda: 21
scl: 22
scan: true

Set voltage of 0-5v or 0-10v
gp8403:
i2c_id: bus_b
id: gp8403_hub
voltage: 10v
address: 0x58
number:
Slider to set Min Temperature to start fan

platform: template
id: set_temp
name: $name Set Temp
optimistic: True
min_value: 25
max_value: 65
initial_value: 25
step: 1
restore_value: true # Restore setting between reboots
platform: template
id: set_temp_1
name: $name Set Temp 1
optimistic: True
min_value: 25
max_value: 65
initial_value: 25
step: 1
restore_value: true # Restore setting between reboots
platform: template
id: set_humidity
name: $name Set Humd
optimistic: True
min_value: 45
max_value: 85
initial_value: 45
step: 1
restore_value: true # Restore setting between reboots

sensor:

platform: ina219
i2c_id: bus_a
address: 0x45
shunt_resistance: 0.01 ohm
current:
name: "Roof_fan_current"
power:
name: "Roof_fan_power"
bus_voltage:
name: "Roof_fan_voltage"
max_voltage: 32 v
max_current: 8 amp
update_interval: 30sec

platform: bme280
i2c_id: bus_b
address: 0x76
humidity:
name: roof humidity
id: humid
on_value:
- lambda: !lambda |
auto pct = map(x, id(set_humid).state, $max_humid, 1, 85);
if (pct>1) {
auto call = id(the_fan).turn_on(); call.set_speed(pct); call.perform();
} else {
auto call = id(the_fan).turn_off(); call.set_speed(1); call.perform();
}
temperature:
name: $name Temperature
id: temp_sensor
accuracy_decimals: 0
oversampling: 16x
Adjust fan speed(1-100%). Else, turn it off and set the speed to 1
on_value:
- lambda: !lambda |
auto pct = map(x, id(set_temp).state, $max_temp, 1, 100);
if (pct>1) {
auto call = id(the_fan).turn_on(); call.set_speed(pct); call.perform();
} else {
auto call = id(the_fan).turn_off(); call.set_speed(1); call.perform();
}

platform: bme280
i2c_id: bus_b
address: 0x77
humidity:
name: roof humidity 1
id: humid_1
temperature:
name: $name Temperature 1
id: temp_sensor_1
accuracy_decimals: 0
oversampling: 16x
Adjust fan speed(1-100%). Else, turn it off and set the speed to 1
on_value:
- lambda: !lambda |
auto pct = map(x, id(set_temp_1).state, $max_temp, 1, 100);
if (pct>1) {
auto call = id(the_fan_1).turn_on(); call.set_speed(pct); call.perform();
} else {
auto call = id(the_fan_1).turn_off(); call.set_speed(1); call.perform();
}

Reports RPM by pulse_counter

platform: pulse_counter
pin:
number: 27
mode: INPUT_PULLUP
name: $name RPM
unit_of_measurement: 'RPM'
filters:

multiply: 0.333
count_mode:
rising_edge: INCREMENT
falling_edge: DISABLE
update_interval: 10s

platform: pulse_counter
pin:
number: 26
mode: INPUT_PULLUP
name: $name RPM 1
id: rpm_1
unit_of_measurement: 'RPM'
filters:

multiply: 0.333
count_mode:
rising_edge: INCREMENT
falling_edge: DISABLE
update_interval: 10s

switch:
Fan power (MOSFET)

platform: gpio
pin: 2
id: fan_power

fan:

platform: speed
id: the_fan
output: gp8403_0
name: $name Fan
speed_count: 100
restore_mode: ALWAYS_OFF
platform: speed
id: the_fan_1
output: gp8403_1
name: $name Fan 1
speed_count: 100
restore_mode: ALWAYS_OFF

light:
On-Board LED

platform: monochromatic
id: d4_light
output: d4_light_pwm
effects:

pulse:
name: flashfast
transition_length: 0.0s
update_interval: 0.04s

platform: monochromatic
name: $name Fan
output: gp8403_0
gamma_correct: 1.2

platform: monochromatic
name: $name Fan 1
output: gp8403_1
gamma_correct: 1.2

output:

platform: gp8403
channel: 0
id: gp8403_0

platform: gp8403
channel: 1
id: gp8403_1

platform: ledc
id: d4_light_pwm
pin:
number: GPIO16
inverted: true`

Looking at your code:
line 174: - Calling "id(set_humid).state" but there's no "set_humid" ID
It's unclear why you are using two BME sensors, two fans and two i2c busses yet setting and checking the temperature twice and humidity only once.

Sorry, line 140 should be "humid". This is just the tryout code to work out humidity and temperature combined logic.
Esp is in the server rack and two fans in different parts of the house with separate sensors to get more accurate reading.

So with that correction, is it working now?

I've sent you an email with my Discord ID - Let's continue on there.

Help continued directly on Discord


⚠ : Clear cache folder while upgrading v.1.5.8

Is your feature request related to a problem? Please describe.
I'm always frustrated when there are residual cache issues after upgrading the application. These cache issues often lead to unexpected behavior and bugs that are hard to trace.
Describe the solution you'd like
I would like a clear and automated process for clearing cache when upgrading to version 1.5.8. Ideally, this process should be documented and perhaps integrated into the upgrade script to ensure it happens automatically.
Describe alternatives you've considered
I've considered manually clearing the cache following the upgrade steps each time, but this is prone to human error and can be easily overlooked.
Additional context
Here is a reference to the need for clearing the cache while upgrading to version 1.5.8: GitHub Issue Comment
Contributor: @DH-555
If you want speed up process of this issue, please send 🚀 as a reaction.

I can delete the tables with this comment: https://github.com/appwrite/appwrite/issues/7887#issuecomment-2079677799
it is ok but;
@DH-555 Do you know how we can delete cache folder, or where it is located ?


Problem with utf-8 file encoding

Describe the bug
While runing find_dupes.py encounterd error with file reading. Charmap codec can't decodes some characters.
To Reproduce
Steps to reproduce the behavior:

Go to motivate/motivate/find:dupes.pc
Run it
See error: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 2890: character maps to

Expected behavior
Read character.
Desktop (please complete the following information):

OS: Win 10
Version 2004

Additional context
Tried on multiple machines, same resault
Possible Solution
Add utf-8 support

[x] You want to solve it.

Is this bug resolved or still needs some work?

Is this bug resolved or still needs some work?
Resolved, already send pr request.


add #include "IncludeWindowCpp.h" to each platform

Including window.cpp using a #include at the end of each platform implementation.

Please use squash merge for this PR. Thanks.


[WIP] Hierarchical dissolve for block-level assignments

Merging blocks is slow.

Incorporated in @58.


Reflect model/field comments into generated schema typings

Problem
Comments that are written into the Prisma schema are not reflected in the TypeScript typings leaving them undocumented. Having comments in the schema reflected in the typings could prove quite useful for development.
Suggested solution
Have model/field comments in the schema be reflected in the generated types.
With that being said, copying all comments might end up pulling comments with database only concerns into the typings so perhaps comments that should be copied in should be explicitly decorated with an attribute?
Alternatives

Additional context

I think this was already implemented via https://github.com/prisma/prisma/pull/10248, can you confirm @millsp? (Related: https://github.com/prisma/prisma/issues/319)
If so, just close this issue. Other related use cases are tracked via https://github.com/prisma/prisma/issues/8703 or https://github.com/prisma/prisma/labels/topic%3A comments

I checked - #10248 does implement comment documentation for columns/fields, which is great! What's remaining, though, is comments before models and enums. Ideally something like
/// Test comment
enum GlobalRole {
  X
  Y
}

Will produce a doc comment for the generated GlobalRole enum type.


rust api in nextjs app?

Hi all, is there any normal way to have rust api within nextjs app?
In nextjs all the APIs are supposed to be in /pages/api/
If I try to add /api alongside with /pages/api
/api - works, but /pages/api doesn't
If I try to place rust code in /pages/api and in vercel.json set:
{
  "functions": {
    "pages/api/**/*.rs": {
      "runtime"<EMAIL_ADDRESS>    }
}

it doesn't work, rs file is not compiling.
If I try to move everything under /api from /pages/api - multiple issues with webpack/fetch/next-XXX plugins appear.
Maybe there is some more vercel or nextjs configs I can use?
Or wasm is only option in my case? (except creating separate API project only for Rust)

I also encountered this issue. I tested a non-nextjs app and ran it with vercel dev and it worked. I could not get a rust api to work in nextjs at all even when trying to relocate the /api dir.

Hey we released a new runtime in https://github.com/vercel-community/rust/pull/80 which now also provides examples to integrate with Next.js. Happy about every feedback.

Just did a quick smoke test. Much better, good job, thanks!

On Mar 13, 2023, at 04:09, ecklf @.***> wrote:
Hey we released a new runtime in #80 https://github.com/vercel-community/rust/pull/80 which now also provides examples to integrate with Next.js. Happy about every feedback.
—
Reply to this email directly, view it on GitHub https://github.com/vercel-community/rust/issues/69#issuecomment-1465940784, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ4NZ2MGAESGQSG4A5JGRTW3356ZANCNFSM54QDVZ7A.
You are receiving this because you commented.


Fix cocurrent upload package

When inserting failed, then check if the record does exist, if yes, then just return the record duplicated.

And this doesn't fix the current problem because the error does not occur in these methods but when the transaction is committed.

And this doesn't fix the current problem because the error does not occur in these methods but when the transaction is committed.

Although I haven't looked into the problem, I think using transaction correctly will resolve the concurrency problem.
Database transactions will acquire write lock for all DML (insert/update/...) statements

Will be replaced by

https://github.com/go-gitea/gitea/pull/21862
https://github.com/KN4CK3R/gitea/pull/3


Mention default envs for each notebook

Call out which default env folks should use for running the notebooks -- probably in the overview section.

We should also add conda-lock files to the repo


Compile code and docs on npm publish

Once #9 is finished, add a hook to npm publish that runs build and docs to automatically always have the latest version of the compiled code and documentation available. For the build task, there's an example of how it is done in a-simbol that uses a config file for Rollup
https://docs.npmjs.com/misc/scripts Information here about this.

This was done in https://github.com/wearesimbol/simbol/releases/tag/v1.0.0-alpha.8


[SPARKR-224] The serialized flag in a PipelinedRDD is not set correctly.

The issue reported in https://sparkr.atlassian.net/browse/SPARKR-224 was fixed by https://sparkr.atlassian.net/browse/SPARKR-228. Here I add a new test case to unionRDD(), which helped to catch the issue.

LGTM. Thanks @sun-rui Merging this and cherry-picking to sparkr-sql


MarkLogic representation and handling of "Undefined" values

The QScript data model includes Undefined values which need a representation in MarkLogic as well as handling of the MapFuncs Undefined and IfUndefined.
Other functions may need modification to deal with undefined values as well once the semantics of undefined have been clarified.

Minor niggle, but technically, Undefined isn’t part of the data model. It shouldn’t need to be represented in MarkLogic, but the MapFuncs do need to be handled.

Undefined is an error resulting from applying an operation to the wrong type. It's sole purpose in runtime values is to enable error recovery / exception handling via IfUndefined. Semantically, undefined values are invisible to operations except for IfUndefined.

@sellout @jdegoes Thanks for the clarification, though it would seem the presence of IfUndefied implies some sort of representation, no?

@wemrysi Well, the thing is there’s no way to store an undefined value. I.e., the representation of a map with an entry whose value is undefined is a map without that entry. Statically known things are handled by the compiler (deleting entries that are always undefined, propagating undefineds, etc.), but of course, you might find that in a particular record, you end up trying to 4 + "3", and then you end up with that result being undefined. So, the planner (at the MapFunc level) does need some way to say “ok, I’m holding onto a bad value”, but that is really the lack of a value. In Spark this could be modeled by Option[Data] => Option[Data] (although currently isn’t). In most cases it would be simply handled with (a1 ⊛ a2)(op(_, _)).join, but Option can’t be the M in the fold, because in the cases of things like MakeMap and IfUndefined, you have to make an empty map, and return the second value instead.
tl;dr So, yeah, you need some representation of an exceptional state while processing, but not anything that can end up in a data store.


Update README.md

Added two public identity requests for bsnoot and prophesied.

Thanks guys.  Temporarily closing until there is a process map & documentation ready for PRs -- I'll reopen (+/- with requests from change) when ready.


Polygon path format is reverse of GeoJSON coordinate format

The GeoJSON coordinate format is structured as [longitude, lattitude], while the input expected in ng-map polygon paths is [lattitude, longitude].
Is there a reason for this? It's confusing (I couldn't understand why my GeoJSON coordinates weren't working when applied to a polygon path) and means all GeoJSON data has to be re-formatted before it can be used.
From GeoJSON spec:

Point coordinates are in x, y order (easting, northing for projected coordinates, longitude, latitude for geographic coordinates)

GeoJSON Bermuda triangle:
{
"type": "Polygon",
 "coordinates":[[
[-80.190262, 25.774252],
[-66.118292, 18.466465],
[-64.75737, 32.321384],
[-80.190262, 25.774252]
]]
}

ng-map Bermuda triangle:
  <ng-map zoom="5"
    center="24.886436490787712, -70.2685546875"
    map-type-id="TERRAIN">
   <shape name="polygon"
     paths="[
       [25.774252, -80.190262],
       [18.466465, -66.118292],
       [32.321384, -64.75737],
       [25.774252, -80.190262]
     ]"
     stroke-color="#FF0000"
     stroke-opacity="0.8"
     stroke-weight="2"
     fill-color="#FF0000"
     fill-opacity="0.35">
   </shape>

(From https://ngmap.github.io/#/!polygon-simple.html)
Great project, thanks!

I dug into this further, and it seems that virtually all GIS applications use the cartesian order (X,Y / Long,Lat), though the maritime standard is indeed Lat,Long. (http://stackoverflow.com/a/7368086/165673). So from a programming perspective the ng-map coordinate order is unusual, and will cause headaches for anyone familiar with the more common GIS approach (it definitely ate up my morning).
This is especially true when it comes to path data, because as far as I know every vector path format uses [x,y] cartesian order for plotting points.
Maybe introduce a directive property that allows users to set point coordinate format?

Apparently Google Maps API does advocate the [lattitude,longitude] approach for all their APIs (See https://developers.google.com/maps/documentation/static-maps/intro#Locations), so I'm going to close this, though I do think it would be helpful to mention this issue in the docs so that others don't get burned.


customize direnv executable args

Customizing direnv executable args allows running scripts instead of the raw
direnv command.
For example calling:
  (let ((direnv--executable (executable-find "nix-shell"))
        (direnv--executable-args '("--run" "jq -n env"))
        (direnv-always-show-summary nil))
    (direnv-update-environment))

will allow extracting environment variables from nix-shell without actually
running direnv. This is useful when you want to apply environment variables
provided by nix shell to current emacs session.

why separate ‘export args’ and ‘enable args’? sounds complex 🤔

What I wanted was to be able to run a replacement command instead of the direnv export json. In my case nix-shell --run 'jq -n env' gives the same json output and I can use it to apply the nix-shell environment to my emacs session which is nice since I can reuse all the direnv code.
Without separating the args I don't have good way to replace the command line used by emacs-direnv. I can in theory just replace the executable direnv--executable with some direnv-wrapper.sh script that will augment the original arguments (in my case just ignore them) but I wanted to avoid maintaining another script.
I do realize that what I suggest complicates the code a little bit so maybe this is not a good candidate for merge and I am not sure if this will be useful for someone else who is not using nix-shell

would my earlier suggestion to

perhaps allowing a list of strings (instead of a single string) for direnv-executable is a simpler approach?

solve all of your problem? see also my question about ‘direnv export args’ vs direnv allow args?


PushNotification undefined (line 6225)

Expected Behaviour
I am having problems with the plugin as it throws a white screen of death on my emulator when I inlcude PushNotification in my app. An error was reported that PushNotification is undefined on line 6225.
Actual Behaviour
Here is line 6225 generated from my Android project folder ( I am using Ionic)
angular.module('ngCordova.plugins.push_v5', [])
.factory('$cordovaPushV5',['$q', '$rootScope', '$timeout', function ($q, $rootScope, $timeout) {
/global PushNotification/
var push;
return {
  initialize : function (options) {
    var q = $q.defer();
//line 6225 //
    push = PushNotification.init(options);
    q.resolve(push);
    return q.promise;
  },

So I tried to change it following the previous old PushNotification with $windows.plugins.PushNotification but when I do cordova emulate android, it overwrites this can puts back push=PushNotification.init, which obviously is not declared as a dependency.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Cordova CLI version and cordova platform version
cordova --version     6.3.1                               # e.g. 6.0.0
cordova platform version android       5.2.2             # e.g. 4.1.1

Plugin version
Plugin version 1.8.1
cordova plugin version | grep phonegap-plugin-push   # e.g. 1.5.3
Sample Push Data Payload
Sample Code that illustrates the problem
Logs taken while reproducing problem

Update: further reading and understanding of problem is that PushNotification is supposed to have been defined in push.js.
So for some reason maybe push.js is not loaded.

Ok, tried to compile it on another machine. Works. So I guess it has to do with my Android Studio settings on different machines.  Sorry for the distraction. Will figure out what went wrong with my other machine's setup.

Ok, for those who encounter this problem, I finally realise what went wrong. NOTHING to do with Android or Cordova or this plugin (Great job, by the way.)
I did a blind copy of the example in the ngCordova docs WITHOUT understanding.
module.run(function($http, $cordovaPushV5) {
// rest of sample code is here
}
It ran on my other machine because it is a freakin' fast MacPro, but doesn't run on my iMac or Redmi Note 3.
I then realise the PushNotification is undefined because it hasn't loaded yet. I forgot to wait for device to be ready. So, in my Ionic app.js, I added to the line:
.run(function ($ionicPlatform){
});
So, it ended up like this:
.run(function ($ionicPlatform, $http, $rootScope,$cordovaPushV5, UserService) {
//code for windows plugin keyboard stuff
//define the options here
var options = {
android: {
senderID: "295998469081"
},
ios: {
alert: "true",
badge: "true",
sound: "true"
},
windows: {}
};
if(window.cordova && $cordovaPushV5) {
//put the sample code here!
}
}
Key principle : Wait for device to be ready before you call PushNotification.init.


How to bump version without range type when in pre release

Affected Packages
@changesets/apply-release-plan
Problem
When  I have a pre release in the monorepo, how I can bump dependencies version without range type.
Because my packages's user only install one package, but I want to install all dependencies that is pre version

example: https://github.com/caohuilin/monorepo-changeset-demo

when I use pre release to bump version, in @modernjs-test/module-2 packages will change @modernjs-test/module-1 to "workspace: ^0.1.1-canary.0", and publish will change to "^0.1.1-canary.0"

This is correct, right? Nothing wrong about it - or are you saying that this should be behave differently?

user only install @modernjs-test/module-2 in his project. when want to use pre release version, the @modernjs-test/module-1 version will install 0.1.1, not 0.1.1-canary.0

Could you rephrase? From what I can tell if somebody installs<EMAIL_ADDRESS>the<EMAIL_ADDRESS>will be installed with it. And that is correct.
A separate note is that in this situation the published dependency range for @modernjs-test/module-test-1 in @modernjs-test/module-test-2 should lose the ^ modifier. Otherwise we are kinda risking invalid installs in the future as potentially incompatible<EMAIL_ADDRESS>(that would be created by a future release) could be installed instead of the correct<EMAIL_ADDRESS>That conversion is lossy though and I haven't figured out how to best "bring it back" when exiting the pre mode


Feature/escrow contract

Test case failure is throwing exception on
Test suite failed to run
Cannot find module 'chai' from 'contracts/test/escrow.test.js'

> 1 | const { expect } = require('chai');
    |                                    ^
  2 | const Escrow = artifacts.require('Escrow');
  3 |
  4 | const BigNumber = require('bignumber.js');

Looks like it's getting confused between the different package.json files. Let me see if I can update this with package module

blocked by #16


feat(Dropdown): Add placement and alignment props

This simplifies the process of aligning the dropdown menu items without having to know anything about absolute positioning.
Now you can place the popup anywhere around the origin.
I don't know if this counts as a breaking change since I changed the placement type?

This makes absolute sense! Thanks for the work!


💾 feat: Anthropic Prompt Caching

Summary
Closes #3661
This PR introduces prompt caching functionality for the Anthropic API, significantly reducing costs for longer, multi-turn conversations using Claude 3.5 Sonnet and Claude 3 Haiku models (Anthropic states that Opus will be added later).
The implementation is an adaptation of Anthropic's cookbook for Multi-turn Conversation with Incremental Caching
With this change comes much more accurate transaction recording for Anthropic API, as the stream usage metadata is being leveraged for provider counts of input tokens, cache input costs, and output tokens.
Furthermore, this PR also introduces a more accurate token counting method for message payload building, which is also possible through stream usage metadata, with some caveats highlighted below.
Stream usage should only be used for user message token count re-calculation if:

The stream usage is available, with input tokens greater than 0,
the current provider client (anthropic only atm) provides a function to calculate the current token count,
files are being resent with every message (default behavior; or if false, with no attachments),
the promptPrefix (custom instructions) is not set (also default behavior, unless the user is using presets).

In these cases, the legacy token estimations would be more accurate. The reason is, instructions and files can be removed if these conditions are met, which would cause token counts to be inaccurate earlier in the thread.
Revisiting conversations before this change was also considered, and it was reasoned that this is fine since the stream usage metadata would make those conversations more accurate provided the above caveats are not met.
In any case, transaction data is more accurate than before for all anthropic models, and none of the token accounting affects prompt caching other than the models being used, and that the messages payload meets the requirements of Anthropic API.
TODO:
In light of the caveats, adding system messages to the orderedMessages token accounting could help us create accurate counts in these cases, potentially as a separate message in the UI. ChatGPT does this through "hidden" system messages, and we could add an option to toggle them as well as view their current placements.

More details

Added a new addCacheControl function to handle the addition of cache control to user messages.
Updated the AnthropicClient to support prompt caching for compatible models.
Implemented logic to determine if a model supports cache control and apply it when appropriate.
Added new types and updated existing ones to support structured token transactions.
Modified the token spending logic to account for cache write and read operations.
Created unit tests for the addCacheControl function to ensure proper functionality.
Updated transaction handling to support structured token usage recording.
Adds logic for calculating the correct user message token count off of stream usage metadata, allowing us to discard estimations

Change Type

[x] New feature (non-breaking change which adds functionality)
[x] This change requires a documentation update

Checklist

[x] My code adheres to this project's style guidelines
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

To understand: This is always enabled per default and there is no UI-Switch?

@danny-avila Wow, you're fast. Was a question, I don't know if really needed, discussion.
Discussion : If I understand correctly, there is according to this Page a minimum of 1024 token for caching to work. Also according to that page cache writes cost 3,75 and reads 0,30 compared to 3 of normal input. So worst case would be 4,05 compared to 3. So it should always be good if at least one Cache usage is done. When the chat has already 1024 tokens, it is probable that there alrwady was multi turn converasation. This makes it probable for further conversation. There is only one exception: the chat is only used from time to time (>5 min cache time). But even then multi turn is towards probable. So statstically here after one cache usage it should  already pay out. And would be faster too (cache makes response faster).
I don't know about images in cache though.
The crucial question is : Is the assumption that in a e.g. 4 minute chat, every chat part apart from the last response is only written one time to cache (only one time cache write price for each text part)? So can a cache be "extended" effectivly or how does this work for a chat?
If this is the case and images are no problem and the implementation does work without problems i would lean regarding there is no ui-switch needed. But there probably should be an info somewhere (which the ui-switch , per default on, would effectivly be, so it would be a good solution even for that, if that is not to much maintaining work).
Tl,Dr : If not much maintaining work, ui-switch is good, one way or the other. What's important, is the question above, because it decides if cache use is recommandable per default.
_
Other thing about caching functionallity:
What would be very nice, would be an option to extend caching time "Keep cache alive for further x times" or "keep cache alive longer" and then a choice for 10, 15, ... minutes (cache read 15 seconds or so before cache time end).  E.g. i might use e.g. 1 or 2 Times, last one would be 10 minutes( +basic 5 minutes; total 15 minutes). Because caching read costs 1/10 of normal input, this is a good heuristic.

But even then multi turn is towards probable. So statstically here after one cache usage it should already pay out. And would be faster too (cache makes response faster).

Yes I agree, that's why I decided to make it true as default.

I don't know about images in cache though.

Images are not cached in my implementation. This is due to the limit of 5 cache "blocks", and each image costs one block. It's difficult to wrap my head around, and maintaining image caches adds complexity.
But I'm also not sure, I wonder if they do get cached once they are no longer the most recent user messages (the current user message and the one prior, which act as cache "stamps").

ui-switch is good

it's nice to have, for that reason i will include it, it's a quick implementation.

What would be very nice, would be an option to extend caching time "Keep cache alive for further x times" or "keep cache alive longer" and then a choice for 10, 15, ... minutes (cache read 15 seconds or so before cache time end). E.g. i might use e.g. 1 or 2 Times, last one would be 10 minutes( +basic 5 minutes; total 15 minutes). Because caching read costs 1/10 of normal input, this is a good heuristic.

Can't do this, it's an API thing on their end. From my understanding, it seems to be kept active as long you use the same cache in 5 minute intervals. Something programmatic to keep the cache "warm" is a bit complex and costly, defeats the purpose (it's only kept warm if you keep the turns going).
Honestly I speak with some confidence here but needs some rigorous testing. The debug logs offer information to this end, but have not had time to evaluate. From my own experience, and judging from the transaction records, it is saving me a lot of money on those longer context conversations.

Caching mechanism and implementation

Images are not cached in my implementation. This is due to the limit of 5 cache "blocks", and each image costs one block. It's difficult to wrap my head around, and maintaining image caches adds complexity.

I'm currently using Claude Pro and 5 images (and in general attachments) are also the maximium to use there. (After reading the message again: 4 cache blocks are the limit, so that has nothing to do with it).

But I'm also not sure, I wonder if they do get cached once they are no longer the most recent user messages (the current user message and the one prior, which act as cache "stamps").

"Prompt Caching references the entire prompt - tools, system, and messages (in that order) up to and including the block designated with cache_control."
In their chat example in their doc they use an additional cache-mark for the system, which, according to the sentence above, isn't needed for just one example conversation they show. This is because the caching in the messages would also implicitly cache the system prompt according to that sentence. I understand it that way, that it's just useful for new chats with the same system prompt, that's why the used it here (i think they tried to oultine that with "... long system prompt").
According to that understanding of the sentence above i find the sentence
"Each of these elements [Tools/system messages/messages/images/tool use and tool results] can be marked with cache_control to enable caching for that portion of the request."
a bit missleading.
"Note that changes to tool_choice or the presence/absence of images anywhere in the prompt will invalidate the cache, requiring a new cache entry to be created."
This can be also a bit missleading, because they just mean image changes and not that presence itself invalidates the cache.
Tl;Dr.: To my understanding, marking the new user prompt (for new cache write) and the last user prompt (for cache read), and maybe as a bonus, the system prompt if someone uses a large one, is completley sufficient (and will cache images also).

"Images are not cached in my implementation"

So they probably are cached already :).
Logging cache activity

Honestly I speak with some confidence here but needs some rigorous testing. The debug logs offer information to this end, but have not had time to evaluate. From my own experience, and judging from the transaction records, it is saving me a lot of money on those longer context conversations.

Do you log cache_read_input_tokens and cache_creation_input_tokens?
Holding Cache alive

What would be very nice, would be an option to extend caching time "Keep cache alive for further x times" or "keep cache alive longer" and then a choice for 10, 15, ... minutes (cache read 15 seconds or so before cache time end). E.g. i might use e.g. 1 or 2 Times, last one would be 10 minutes( +basic 5 minutes; total 15 minutes). Because caching read costs 1/10 of normal input, this is a good heuristic.

Can't do this, it's an API thing on their end. From my understanding, it seems to be kept active as long you use the same cache in 5 minute intervals. Something programmatic to keep the cache "warm" is a bit complex and costly, defeats the purpose (it's only kept warm if you keep the turns going).

Keeping the cache "warm" is exactly what i meant in the other response. It would work by sending exactly the same last request again but with "max_tokens": 1 (e.g. 4min 45 sec after idle from last request). And the rationale is similar to the rationale why prompt caching use is recomandable: Because one cache read costs very less than one cache write (only 8% read cost compared wo cache write). So when someone gets an input, thinks about it, searches something and returns after 7 min, the cache is still warm and cheap. So even if this only happens 1/10 of all cases, it's still cheaper. (How many times someone will want to further keep the cache live is indiviually, so that's why i spoke about an option in settings to set for how many times the cache should be hold alive).

To understand: This is always enabled per default and there is no UI-Switch?

Adding a UI switch as we speak

hi, where can I find the UI switch? thx!

To understand: This is always enabled per default and there is no UI-Switch?

Adding a UI switch as we speak

hi, where can I find the UI switch? thx!

right-hand side panel, under parameters


remove broken sugar

#238 caused (cury same %&) to lose its meaning, so this desugars the instances of it in clay.hoon.
@juped, can we get this merged quickly?  Master is currently broken.

Will do, new kernel coming soon. How did it break?

As I understand it, new pills solided with master don't boot (crash in clay).


feat: you can now use both fastAPI and NextJS in the backend

Thought I would share this in case you weren't aware it was possible.

https://github.com/digitros/nextjs-fastapi already uses fastapi

https://github.com/digitros/nextjs-fastapi already uses fastapi

Yeah but it doesn't use the NextJS backend API which is what the PR is about

This is great. This way you can use both, the power of FastAPI and the power of NextJS API at the same time.

yup

great!

cool!