text:
Remove condition for skipping RS on testJsonTruncationLimit

Dávám zpátky podmínku na omezení pro RS.

Len fyi, kludne na to mozes pouzit aj git revert - je to ciste a na nic sa nezabudne.

authors: ujovlado yustme

repo: keboola/storage-api-php-client


text:
KBC-2979 Update expectations with actual value from SNFLK

Jira: KBC-2979
Before asking for review make sure that:
Checklist

[ ] New client method(s) has tests
[ ] Apiary file is updated

Release

[ ] I gave the PR a proper label:

major (BC break)
minor (new feature)
patch (backwards compatible fix)
no release (just test changes)

Reálně to jen fixuje testy, aby se chovali podle toho, jak to jde ze SNFLK. Neřeší to, jestli to reálně něcorozbije.

SNFLK rolled back the release.

source: gharchive/pull-request

license: mit

license_type: permissive

license_source: bigquery


text:
Unable to connect to confluent kafka

I am trying to implement KEDA for Confluent Kafka.  I have tested out different scenarios but the error i get is
2020-10-12T14:39:02.788Z	ERROR	controllers.ScaledObject	Failed to ensure HPA is correctly created for ScaledObject	{"ScaledObject.Namespace": "keda", "ScaledObject.Name": "kafka-scaledobject", "error": "error getting scaler for trigger #0: error creating kafka client: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)"}
github.com/go-logr/zapr.(*zapLogger).Error
	/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128
github.com/kedacore/keda/controllers.(*ScaledObjectReconciler).Reconcile
	/workspace/controllers/scaledobject_controller.go:146
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:235
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:209
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:188
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
	/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:155
k8s.io/apimachinery/pkg/util/wait.BackoffUntil
	/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:156
k8s.io/apimachinery/pkg/util/wait.JitterUntil
	/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.Until
	/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:90
2020-10-12T14:39:02.796Z	ERROR	controller	Reconciler error	{"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject", "name": "kafka-scaledobject", "namespace": "keda", "error": "error getting scaler for trigger #0: error creating kafka client: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)"}
github.com/go-logr/zapr.(*zapLogger).Error
	/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:237
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:209
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:188
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
	/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:155
k8s.io/apimachinery/pkg/util/wait.BackoffUntil
	/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:156
k8s.io/apimachinery/pkg/util/wait.JitterUntil
	/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.Until
	/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:90

I deployed a scaled object as follows.
Scenario 1 without TriggerAuthentication
triggers:
- type: kafka
  metadata:
    bootstrapServers: kafka.svc:9092
    consumerGroup: my-group
    topic: test-topic
    lagThreshold: '5'

Scenario 2 with TriggerAuthentication
triggers:
- type: kafka
  metadata:
    bootstrapServers: kafka.svc:9092
    consumerGroup: my-group
    topic: test-topic
    lagThreshold: '5'
 authenticationRef:
      name: keda-trigger-auth-kafka-credential

apiVersion: v1
kind: Secret
metadata:
  name: keda-kafka-secrets
  namespace: keda
data:
  sasl: "plaintext"
  username: "My confluent kafka API key"
  password: "My confluent kafka API key secret"

apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
  name: keda-trigger-auth-kafka-credential
  namespace: keda
spec:
  secretTargetRef:
  - parameter: sasl
    name: keda-kafka-secrets
    key: sasl
  - parameter: username
    name: keda-kafka-secrets
    key: username
  - parameter: password
    name: keda-kafka-secrets
    key: password

Expected Behavior
After deploying the scaled object, it should get the hpa.
Actual Behavior
ERROR	controllers.ScaledObject	Failed to ensure HPA is correctly created for ScaledObject	{"ScaledObject.Namespace": "keda", "ScaledObject.Name": "kafka-scaledobject", "error": "error getting scaler for trigger #0: error creating kafka client: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)"}
Steps to Reproduce the Problem

Helm version is 3.3.x, Installed KEDA from https://github.com/kedacore/keda/releases/tag/v2.0.0-beta
Deployed ScaledObject as mentioned above
Checked the logs of KEDA operator and it errors out as mentioned above in the issue

Specifications

KEDA Version: 2.0.0-beta
Platform & Version: Azure Kubernetes Service
Kubernetes Version: 1.17.9
Scaler(s): Apache Kafka targeting Confluent Kafka

The API version on Scaledobject and TriggerAuthentication is keda.sh/v1alpha1
Scaledobjectsandtriggerauthentications.txt

I'm not a Confluent Kafka expert, does it run inside your cluster or do they manage it? From the looks of it, the address (kafka.svc:9092) points to a local service (which is also the one from our docs), is that correct?

Our confluent Kafka does not run on kubernetes cluster. Confluent Kafka bootstrap servers would look something like this pkc-xxxxx.eastus2.azure.confluent.cloud:9092

@harshik9 okay, so that's the value that should be in bootstrapServers section.

@zroubalik, yes. We tried by using that value in the bootstrapServers. What should be the sasl value when connecting to confluent Kafka.

Same issue here running a Kafka cluster locally, alongside with Keda installed on an on-premise K8s cluster. As a test, I created a Pod and was able to curl Kakfa topics from inside that Pod on my K8s. Apparently, Kafka cluster is reachable from inside my K8s cluster (initially I thought that that was the problem) but it feels like it is Keda that cannot reach Kafka endpoints.
Currently running Kafka without authentication, using Keda v2 and K8s 1.18!

Same issue here running a Kafka cluster locally, alongside with Keda installed on an on-premise K8s cluster. As a test, I created a Pod and was able to curl Kakfa topics from inside that Pod on my K8s. Apparently, Kafka cluster is reachable from inside my K8s cluster (initially I thought that that was the problem) but it feels like it is Keda that cannot reach Kafka endpoints.

The scenario you described here above, is Kafka with or without authentication?

Currently running Kafka without authentication, using Keda v2 and K8s 1.18!

Same issue here running a Kafka cluster locally, alongside with Keda installed on an on-premise K8s cluster. As a test, I created a Pod and was able to curl Kakfa topics from inside that Pod on my K8s. Apparently, Kafka cluster is reachable from inside my K8s cluster (initially I thought that that was the problem) but it feels like it is Keda that cannot reach Kafka endpoints.

The scenario you described here above, is Kafka with or without authentication?

Without authentication.

I was able to connect to confluent kafka with Authentication by going down on the KEDA version to 1.5.  https://keda.sh/docs/1.5/scalers/apache-kafka/
The authmode that I used is sasl_ssl_plain. I deployed all the files from here --> https://github.com/kedacore/keda/releases/tag/v1.5.0 from the deploy folder.

Hm that's strange, unfortunately I am not able to reproduce that. I am using in-cluster Kafka (instaled via Strimzi) and it is working (the same for our e2e tests that are passing).
Is there anything non standard in your Kafka config?

sasl_ssl_plain

@harshik9 for that you used the same configuration of ScaledObject and TriggerAuthentication?

I was able to connect to confluent kafka with Authentication by going down on the KEDA version to 1.5. https://keda.sh/docs/1.5/scalers/apache-kafka/
The authmode that I used is sasl_ssl_plain. I deployed all the files from here --> https://github.com/kedacore/keda/releases/tag/v1.5.0 from the deploy folder.

@harshik9 for that you used the same configuration of ScaledObject and TriggerAuthentication?

@zroubalik Our confluent Kafka is on azure. When we used the KEDA 2.0 BETA version. The Authentication parameters were sasl, Username and password. With sasl= plaintext, we were unable to connect but when I went down on the KEDA version 1.5, I had authentication parameters as authMode, username and password. The authMode that i gave was sasl_ssl_plain and this worked for me. I used the same scaledObject as in here --> https://keda.sh/docs/1.5/scalers/apache-kafka/ . But there was no necessity of providing a ca, cert and key. Username was our azure confluent kafka API key and password was our Confluent kafka API key secret.

I belive the issue was fixed by #1288 please reopen if the problem still persists

We are having the same issue over here. Can someone send some thoughts on how to fix it?
keda logs show the following:
{
   "ScaledObject.Namespace":"channels-integrations",
   "ScaledObject.Name":"ch-int-mercadolivre-orders-inbound-scaledobject",
   "error":"error getting scaler for trigger #0: error creating kafka client: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)"
}

And ScaledObject  status show 'Unknown' state.

keda version 2.4
apiVersion: v1
kind: Secret
metadata:
  name: keda-kafka-secrets
  namespace: my-namespace
data:
  sasl: "plaintext as b64"
  username: "username as b64"
  password: "password as b64"
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
  name: keda-trigger-auth-kafka-credential
  namespace: my-namespace
spec:
  secretTargetRef:
  - parameter: sasl
    name: keda-kafka-secrets
    key: sasl
  - parameter: username
    name: keda-kafka-secrets
    key: username
  - parameter: password
    name: keda-kafka-secrets
    key: password
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: my-scaled-object-name
  namespace: my-namespace
spec:
  scaleTargetRef:
    name: my-deployment-name
  cooldownPeriod: 30
  minReplicaCount: 0
  maxReplicaCount: 3
  pollingInterval: 10
  triggers:
  - type: kafka
    metadata:
      metricName: my-metric-name
      namespace: my-namespace
      bootstrapServers: our-broker-address.confluent.cloud:9092
      consumerGroup: consumer_group
      topic: my_topic
      lagThreshold: "10"
      offsetResetPolicy: earliest
    authenticationRef:
      name: keda-trigger-auth-kafka-credential

I was also facing the same issue with newer version of KEDA 2.4.
https://github.com/kedacore/keda/discussions/2125

@harshitak27 following approach might help you: https://github.com/kedacore/keda/issues/2101#issuecomment-924909906
Let us know and we can probably document this if it solves your issue.

@zroubalik Thank you for the solution. So here's what I changed in the scaledobject.

I added the parameter "tls" and set the value as "enable". This was not required with the older versions (1.4)
The value for sasl parameter was set as "plaintext"

Except for the above changes and few template changes, rest all remains same.
Also, wanted to know what does "ACTIVE" and "FALLBACK" mean? This shows up once we try to list the Scaledobjects once we deploy them.
Thanks again @zroubalik

Glad to hear that it works for you.
Active shows whether scaling is active - eg. some traffic in the trigger. Wrt Fallback you can read it in the docs: https://keda.sh/docs/2.4/concepts/scaling-deployments/

@harshitak27 Is there something that can be improved in the docs of our scaler / FAQ that could have helped you?
Otherwise I think we can close this issue.

It worked for me for confluent cloud

Just a question: is the broker hostname relative to the namespace the scaled object is in or the KEDA controller?
I'm having to put the full hostname of Kafka.kafkanamespace.svc.cluster.local:9092 to get connectivity despite the scaled object and broker being in the same namespace. I'd have expected Kafka:9092 to have worked like the documentation.

Hm that's strange, unfortunately I am not able to reproduce that. I am using in-cluster Kafka (instaled via Strimzi) and it is working (the same for our e2e tests that are passing).
Is there anything non standard in your Kafka config?

I am having the same issue with my kafka cluster deployed with Strimzi. I am not sure what I am doing wrong. I use the keda version 2.9.1. I want to authenticate using "scram_sha512".
I have the following CRs:
kind: Secret apiVersion: v1 metadata:   name: keda-kafka-secrets   namespace: demo data:   sasl: c2NyYW1fc2hhNTEy   ca: >-     LS0tLS1CR ... QxM2dyQkg=   username: <demo base64> # org.apache.kafka.common.security.scram.ScramLoginModule required username="demo" password="demo;   password: <demo base64> type: Opaque
`apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: kafka-scaledobject
namespace: demo
spec:
advanced:
restoreToOriginalReplicaCount: true
horizontalPodAutoscalerConfig:
behavior:
scaleDown:
stabilizationWindowSeconds: 30
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: consumer-demo
minReplicaCount: 0
maxReplicaCount: 10
pollingInterval: 5
cooldownPeriod:  10
triggers:

type: kafka
metadata:
bootstrapServers: dev-kafka-bootstrap-kafka.apps...com:443
consumerGroup: demo
topic: demo
Optional
lagThreshold: 2
authenticationRef:
name: keda-trigger-auth-kafka-credential`

`apiVersion: keda.k8s.io/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth-kafka-credential
namespace: demo
spec:
secretTargetRef:

parameter: sasl
name: keda-kafka-secrets
key: sasl
parameter: username
name: keda-kafka-secrets
key: username
parameter: password
name: keda-kafka-secrets
key: password
parameter: ca
name: keda-kafka-secrets
key: ca`

Did you configure something specific for strimzi? or am I missing a parameter for scram_sha512?

What do you see in KEDA operator logs?

I get the following error message: "2023-10-11T13:14:40Z ERROR scalehandler Error getting scalers {"object": {"apiVersion": "keda.sh/v1alpha1", "kind": "ScaledObject", "namespace": "demo", "name": "kafka-scaledobject"}, "error": "error creating kafka client: kafka: client has run out of available brokers to talk to: EOF"}
I currently removed tls for my internal listener, but it doesn't change anything. As soon as I specify scram_sha512 for sasl I get this error message.
When you test with Strimzi, which kafka version did you use? Did you have authentication set? Also did you specify a specific version in the ScaledObject metadata?

Ok I manage to make it work with scram_sha512 and tls. I will post my CRs and I hope it will help some people:
ScaledObject
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: kafka-scaledobject
  namespace: demo
spec:
  advanced:
    horizontalPodAutoscalerConfig:
      behavior:
        scaleDown:
          stabilizationWindowSeconds: 30
    restoreToOriginalReplicaCount: true
  cooldownPeriod: 10
  maxReplicaCount: 10
  minReplicaCount: 1
  pollingInterval: 5
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: consumer-demo
  triggers:
    - authenticationRef:
        kind: TriggerAuthentication
        name: keda-trigger-auth-kafka-credential
      metadata:
        bootstrapServers: 'dev-kafka-bootstrap-kafka.apps.cluster-....com:443'
        consumerGroup: demo
        lagThreshold: '5'
        topic: demo
      type: kafka

TriggerAuthentication
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
  name: keda-trigger-auth-kafka-credential
  namespace: demo
spec:
  secretTargetRef:
    - key: username
      name: keda-kafka-secrets
      parameter: username
    - key: password
      name: keda-kafka-secrets
      parameter: password
    - key: sasl
      name: keda-kafka-secrets
      parameter: sasl
    - key: tls
      name: keda-kafka-secrets
      parameter: tls
    - key: ca
      name: keda-kafka-secrets
      parameter: ca

Secret
kind: Secret
apiVersion: v1
metadata:
  name: keda-kafka-secrets
  namespace: demo
data:
  ca: >-
    LS0tLS1CRUd ... hZUG9nVXBEeGE5WnhYCktLS0=
  password: T1VMekkd ... 2dyQkg=
  sasl: c2NyYW1fc2hhNTEy
  tls: ZW5hYmxl
  username: aGVsd ... w==
type: Opaque

@edubois10 thanks for sharing. So the problem was in missing tls setting, right?

i am facing the same issue again where in i have confluent kafka on prem with security protocol as sasl_ssl and sasl mechanism is plain therefore using in ssl section of triggerauth yaml as sasl_plaintext and also setting tls to enable but still see the below errors...keda version 2.8 is installed on k8s cluster(v 1.18)....any help would be greatly appreciated.
errors::::::::::
ERROR   Reconciler error        {"controller": "scaledobject", "controllerGroup": "keda.sh", "controllerKind": "ScaledObject", "scaledObject": {"name":"kafka-scaledobject","namespace":"crm-pmo-aswatson-sit"}, "namespace": "crm-pmo-aswatson-sit", "name": "kafka-scaledobject", "reconcileID": "e92dfdeb-a9a9-439d-9ed9-7278a69cb1f3", "error": "error creating kafka client: kafka: client has run out of available brokers to talk to: 2 errors occurred:\n\t* unexpected EOF\n\t* unexpected EOF\n"}
apiVersion: v1
kind: Secret
metadata:
name: kafka-secret
namespace: crm-pmo-aswatson-sit
type: Opaque
data:
sasl: cGxhaW50ZXh0
tls: ZW5hYmxl
saslUsername: cG..O
saslPassword: cG1....Q3JldDU0JA==
kafka-ca-cert.pem: LS0t......S0tCg==
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: kafka-trigger-auth
namespace: crm-pmo-aswatson-sit
spec:
secretTargetRef:
- parameter: saslUsername
name: kafka-secret
key: saslUsername
- parameter: saslPassword
name: kafka-secret
key: saslPassword
- parameter: sasl
name: kafka-secret
key: sasl
- parameter: tls
name: kafka-secret
key: tls
- parameter: caCert
name: kafka-secret
key: kafka-ca-cert.pem
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: kafka-scaledobject
namespace: crm--sit
spec:
scaleTargetRef:
name: consumer-new--keda
kind: Deployment
pollingInterval: 10
minReplicaCount: 1
maxReplicaCount: 10
triggers:
- type: kafka
metadata:
bootstrapServers: uatgit11:9095,uatgi12:9095
topic: public....personalOffer
consumerGroup: pmo....loffer_new
lagThreshold: "3"
authenticationRef:
name: kafka-trigger-auth

source: gharchive/issue

repo: kedacore/keda

license_source: github-api


text:
Add Semgrep as static analyser for CI

Proposal
We are already using go linters and also CodeQL for detecting code smells and potential code vulnerabilities. Semgrep is another interesting tool that can help us with this job as it has some interesting rules that we can extend.

[x] Introduce analyser https://github.com/kedacore/keda/blob/main/.github/workflows/static-analysis.yml#L55 🤞
[x] Update docs https://github.com/kedacore/keda/blob/main/SECURITY.md?plain=1#L25
[ ] Fix alerts

Use-Case
No response
Anything else?
No response

This is still in progress ( and I hope that it will be finished soon)

We are blocked by https://github.com/returntocorp/semgrep/issues/7121


text:
Kafka Scaler: Allow disabling Kerberos FAST negotiation to allow use with KDCs that don't support FAST

Proposal

Using the Kafka scaler + Kerberos against a KDC that doesn't support FAST currently fails with this unfortunate error, and a user can't do anything about it without re-configuring their KDC:

"error creating kafka client: kafka: client has run out of available brokers to talk to: [Root cause: KRBMessage_Handling_Error] KRBMessage_Handling_Error: AS Exchange Error: AS_REP is not valid or client password/keytab incorrect < KRBMessage_Handling_Error: KDC did not respond appropriately to FAST negotiation"}

The sarama Kafka client we are using in the Kafka scaler actually does have a setting GSSAPIConfig.DisablePAFXFAST that can be used to disable kerberos/GSSAPI FAST negotiation and "fix" this, but the Kafka scaler doesn't currently have any plumbing to read that setting out of the auth config to configure it -- so a user can't use it because it's not exposed.

As such, the current state of affairs prevents users from using the Kafka scaler against against some configurations of KDCs -- like Active Directory -- that don't use FAST.

I'm proposing we add plumbing at least for the AuthConfig so we can expose this piece of client config as an authentication parameter so users can shut off FAST for their connections if they need to.
Use-Case
This would let us successfully use the Kafka scaler against KDCs that don't support FAST.
In a lot of cases the kerberos infrastructure was set up for other purposes and not just to auth our keda scaler, so modifying the KDC configuration itself is often out of reach of our users -- right now they just don't get to use kerberos with the kafka scaler. :sad
Is this a feature you are interested in implementing yourself?
Yes
Anything else?
( sarama uses gokrb5 under the hood, i.e. https://github.com/jcmturner/gokrb5/blob/master/v8/USAGE.md#active-directory-kdc-and-fast-negotiation. I was hoping for a "try and fallback" method but it doesn't look like there is one, it looks like all we get is "turn it off before you login plzkthx" )

Hi, is there news about this issue?
I expected it to be a cosmetic change being the FAST negotiation flag already supported by the sarama client.
Many thanks

authors: jkyros satand


text:
Create a blog post about Kedro Viz architecture

This may be the basis of a a nice blog post to create about the architecture of Viz: https://github.com/kedro-org/kedro-viz/blob/main/ARCHITECTURE.md

More links (some of them internal):

https://mckinsey.box.com/s/ye0vow4v30r7p7ofks0j0x4f4mdv87ui
https://github.com/kedro-org/kedro-viz/tree/main/package/kedro_viz/docs
https://miro.com/app/board/uXjVOktl9TY=/
https://github.com/kedro-org/kedro-viz/pull/432#issue-870498032

authors: astrojuanlu stichbury

repo: kedro-org/kedro-devrel


text:
Reduce compile time

Description
Build is currently quite slow, mainly due because of a large number of dependencies.
We should investigate if we can improve build time. Some tips from this article can be applied.

It seems we cannot use cargo-udeps to find unused dependencies on the project.
cargo udeps command fails with:
error: failed to run custom build command for `kaioshin-runtime v0.1.0-dev (/Users/abdel/dev/stark-rocket/kaioshin/crates/runtime)`

Caused by:
  process didn't exit successfully: `/Users/abdel/dev/stark-rocket/kaioshin/target/debug/build/kaioshin-runtime-abbeb7e2b1bd93c8/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at '`cargo metadata` can not fail on project `Cargo.toml`; qed: CargoMetadata { stderr: "error: Found argument 'metadata' which wasn't expected, or isn't valid in this context\n\nUSAGE:\n    cargo <SUBCOMMAND>\n\nFor more information try --help\n" }', /Users/abdel/.cargo/git/checkouts/substrate-7e08433d4c370a21/ba87188/utils/wasm-builder/src/wasm_project.rs:96:10

Measure build time: https://doc.rust-lang.org/cargo/reference/timings.html
Use: cargo build --timings.

repo: keep-starknet-strange/kaioshin

license: MIT


text:
Example notebook doesn't work for me with xarray 2023.06.0

On cell 10
new_arr.sel(indexers)

I get
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[10], line 1
----> 1 new_arr.sel(indexers)

File [~/gh/xarray/xarray/core/dataarray.py:1550](https://file+.vscode-resource.vscode-cdn.net/Users/rabernat/gh/earth-mover/xarray-vector-index/notebooks/~/gh/xarray/xarray/core/dataarray.py:1550), in DataArray.sel(self, indexers, method, tolerance, drop, **indexers_kwargs)
   1440 def sel(
   1441     self: T_DataArray,
   1442     indexers: Mapping[Any, Any] | None = None,
   (...)
   1446     **indexers_kwargs: Any,
   1447 ) -> T_DataArray:
   1448     """Return a new DataArray whose data is given by selecting index
   1449     labels along the specified dimension(s).
   1450
   (...)
   1548     Dimensions without coordinates: points
   1549     """
-> 1550     ds = self._to_temp_dataset().sel(
   1551         indexers=indexers,
   1552         drop=drop,
   1553         method=method,
   1554         tolerance=tolerance,
   1555         **indexers_kwargs,
   1556     )
   1557     return self._from_temp_dataset(ds)

File [~/gh/xarray/xarray/core/dataset.py:2667](https://file+.vscode-resource.vscode-cdn.net/Users/rabernat/gh/earth-mover/xarray-vector-index/notebooks/~/gh/xarray/xarray/core/dataset.py:2667), in Dataset.sel(self, indexers, method, tolerance, drop, **indexers_kwargs)
   2664                 query_results.drop_coords.append(k)
   2665     query_results.variables = no_scalar_variables
-> 2667 result = self.isel(indexers=query_results.dim_indexers, drop=drop)
   2668 return result._overwrite_indexes(*query_results.as_tuple()[1:])

File [~/gh/xarray/xarray/core/dataset.py:2507](https://file+.vscode-resource.vscode-cdn.net/Users/rabernat/gh/earth-mover/xarray-vector-index/notebooks/~/gh/xarray/xarray/core/dataset.py:2507), in Dataset.isel(self, indexers, drop, missing_dims, **indexers_kwargs)
   2505 indexers = either_dict_or_kwargs(indexers, indexers_kwargs, "isel")
   2506 if any(is_fancy_indexer(idx) for idx in indexers.values()):
-> 2507     return self._isel_fancy(indexers, drop=drop, missing_dims=missing_dims)
   2509 # Much faster algorithm for when all indexers are ints, slices, one-dimensional
   2510 # lists, or zero or one-dimensional np.ndarray's
   2511 indexers = drop_dims_from_indexers(indexers, self.dims, missing_dims)

File [~/gh/xarray/xarray/core/dataset.py:2553](https://file+.vscode-resource.vscode-cdn.net/Users/rabernat/gh/earth-mover/xarray-vector-index/notebooks/~/gh/xarray/xarray/core/dataset.py:2553), in Dataset._isel_fancy(self, indexers, drop, missing_dims)
   2550 valid_indexers = dict(self._validate_indexers(indexers, missing_dims))
   2552 variables: dict[Hashable, Variable] = {}
-> 2553 indexes, index_variables = isel_indexes(self.xindexes, valid_indexers)
   2555 for name, var in self.variables.items():
   2556     if name in index_variables:

File [~/gh/xarray/xarray/core/indexes.py:1478](https://file+.vscode-resource.vscode-cdn.net/Users/rabernat/gh/earth-mover/xarray-vector-index/notebooks/~/gh/xarray/xarray/core/indexes.py:1478), in isel_indexes(indexes, indexers)
   1474 def isel_indexes(
   1475     indexes: Indexes[Index],
   1476     indexers: Mapping[Any, Any],
   1477 ) -> tuple[dict[Hashable, Index], dict[Hashable, Variable]]:
-> 1478     return _apply_indexes(indexes, indexers, "isel")

File [~/gh/xarray/xarray/core/indexes.py:1462](https://file+.vscode-resource.vscode-cdn.net/Users/rabernat/gh/earth-mover/xarray-vector-index/notebooks/~/gh/xarray/xarray/core/indexes.py:1462), in _apply_indexes(indexes, args, func)
   1460 index_args = {k: v for k, v in args.items() if k in index_dims}
   1461 if index_args:
-> 1462     new_index = getattr(index, func)(index_args)
   1463     if new_index is not None:
   1464         new_indexes.update({k: new_index for k in index_vars})

AttributeError: 'dict' object has no attribute 'isel

I'm not sure why that is, and I can't reproduce: in my environment, the creation of the pandas indexes for x and y fail (this can be fixed by passing options={} to the from_variables call), but then the sel in cell 9, the isel in cell 10 and even the copy in cell 15 succeed.
For reference, this is how I set up the environment:
mamba create -n test python=3.11 jupyterlab xarray numpy scipy

(plus a pip install 'xarray==2023.06.0', since the package on conda-forge does not seem to be available yet)

authors: keewis rabernat

repo: keewis/xarray-custom-indexes


text:
Proposal to add fromProperty static function

I find myself wanting to throttle/debounce properties quite often. One example where it seems absolutely necessary – SSR. You need to wait until your state somehow stabillizes to make a snapshot of it for rendering.

state$.throttle() / state$.debounce() don't fit because they pass initial value through a time-based gateways. I mentioned that here https://github.com/kefirjs/kefir/issues/278

state$.changes().throttle(), etc. don't fit because they lose initial value completely.

I propose to add the following function to the standard toolkit:
function fromProperty(prop$) {
  return K.merge([K.later(0, prop$.take(1)).flatMap(), prop$.skip(1)])
}

Demo case:
let K = require("kefir")

let makeStore = (seed, action$) => {
  return action$
    .scan((z, fn) => fn(z), seed)
    .skipDuplicates()
}

let action$ = K.later(250, z => z + 1) // also try: K.never()

let state$ = makeStore(1, action$)

function fromProperty(prop$) {
  return K.merge([K.later(0, prop$.take(1)).flatMap(), prop$.skip(1)])
}

fromProperty(state$)
  .throttle(500, {leading: false}) // ---2| or ---1|
  .log("state$") // both async and initial values are throttled / debounced properly

I'd have to think about this a bit more, but it certainly seems a bit weird to me that you wouldn't want to get the current value immediately. Then it's not really a "Property" because the whole point of a Property is its current value. If you debounce its current value, it's not really "current" anymore.
FWIW, the implementation of that can probably be simplified by using withHandler instead of creating all those child streams to combine everything.

(I'm assuming a lot about your use case, so please correct me where I'm wrong.)
Thinking about this more, if you're determining that you state has stabilized as a factor of time, it feels a bit Doing It Wrong™. Expressing it as "state has stabilized after receiving no updates after Xms" doesn't capture the relationship between a "stable state" & whatever other tasks are responsible for stabilizing it. You're expressing the relationship implicitly through time, rather than directly through the streams themselves.
I would approach the issue one of two ways (I'm assuming your approach is Redux-like, which I have a decent amount of experience in):

Express the dependency directly via flatMap and friends. When all of them end, emit the single value that results.

Express the dependency through the state itself, e.g. if you have 4 tasks that need to finish before emitting the state, then having state.tasks.competed = 0 and incrementing that as they complete, then doing something like:
state$.filter(state => state.tasks.completed >= 4).take(1)

would express that as well.

Thoughts?

Then it's not really a "Property" because the whole point of a Property is its current value. If you debounce its current value, it's not really "current" anymore.

The function is called fromProperty, not toProperty. You say "I'm losing the features of property" and yes, that's exactly my goal. What I'm getting of this function is just a stateful stream (vs property) which is affected by time. Such streams are at the core of RxJS and MostJS and it's hard to argument they are all "doing it wrong".

Thinking about this more, if you're determining that you state has stabilized as a factor of time, it feels a bit Doing It Wrong™. Expressing it as "state has stabilized after receiving no updates after Xms" doesn't capture the relationship between a "stable state" & whatever other tasks are responsible for stabilizing it. You're expressing the relationship implicitly through time, rather than directly through the streams themselves.

I don't think it's necessary wrong. It's just the worst case where you don't have better metrics to depend upon. Think of a scraping script. It should stop when it visited all links on all pages. You can't or won't like to have an event for "links are ended" because negative events (like "something DIDN'T happen", the abscense of events) are pretty hard or hairy to express or emulate in general.
So you will stop this scraper on some debounce event – that will be simple and work pretty well (to my experience wich such systems). I write a lot of reactive code which is not SPA and that's at least what I think of it.

state$.filter(state => state.tasks.completed >= 4).take(1)

I definitely use those events. But they don't start immediately. And you don't know WHEN they start.
So if you just .take(1) you just pick the initial state.

Think of a scraping script. It should stop when it visited all links on all pages. You can't or won't like to have an event for "links are ended" because negative events (like "something DIDN'T happen", the abscense of events) are pretty hard or hairy to express or emulate in general.

Kefir's end events fit that pretty well, as long as all of your changes are being delivered by streams that emit some values and then end when they're done. If you merge multiple streams (or flatMap one stream into many that are then merged together), then the merged stream doesn't end until all of its contained streams have ended. (Sorry if you're familiar with all of this and this is a bit of a tangent. I'm just a little surprised because I think that scenario is actually a great example of the strength of a more purely reactive solution, and it makes me suspicious that there are good solutions with the existing Kefir API to your main situation.) Here's an example of a mock scraping script that makes use of end events. If the scraping script instead ended by a debounce event or some kind of timer, then the script could end early if a single fetch took too long, or the script would wait unnecessarily long before determining that it's finished. This strategy here also has the bonus that unsubscribing from the stream returned by fetchRecursively automatically causes the scraping to end and even for the in-progress fetches to abort themselves if the fetch function is coded to abort on unsubscription.

This code will pick the initial state unless tasks are started synchronously. Or you should start with some "blocker" task – but WHO will unblock it and WHEN?! Then simple solutions end.

If you have a startTasks() function that returns a 1-item stream that emits once the tasks are started, then you could do this:
startTasks().flatMap(() => state$).filter(state => state.tasks.completed >= state.tasks.started).take(1)

About fromProperty specifically as proposed: it feels a bit like a hack in that it delays the first event in an arbitrary hard-coded way unlike other built-in Kefir functions. I don't expect to see setTimeout/later called in any Kefir functions that aren't specifically timing related. And doing it without the delay instead seems like a big change since as far as I know, Kefir chooses to treat synchronously-emitted values and a property's current value as the same concept. Maybe there could be an option to timing-related functions like throttle and debounce to make them not pass current events through immediately, but that's still a little dirty (do all timing functions get that option?) and I'm not convinced at the moment that even if that feature were present that it would be the best solution to your situation.

@AgentME thanks, what can you say about the reactive version of the following:
state.set("loading.x", true)
let x = await fetch(f(q))
state.set("x", x)
state.set("loading.x", false)

state.set("loading.y", true)
let y = await fetch(g(x))
state.set("y", y)
state.set("loading.y", false)

state.set("loading.z", true)
let z = await fetch(g(y))
state.set("z", z)
state.set("loading.z", false)

I think it's pretty obvious what this code is meant to do so I sustain from over-exlaining.
All my attempts to make a short and readable implementation of this failed.

The function is called fromProperty, not toProperty. You say "I'm losing the features of property" and yes, that's exactly my goal. What I'm getting of this function is just a stateful stream (vs property) which is affected by time. Such streams are at the core of RxJS and MostJS and it's hard to argue they all are doing it wrong.

Fair enough; as a minor nit, I probably wouldn't call it fromProperty, as I don't see that as descriptive, but that's beside the point. FWIW, MostJS doesn't have the concept of properties by default (they have an external package called @most/hold that would produce something similar). Quick testing suggests debouncing RxJS's BehaviorSubject would debounce its initial value, so there is that.

As for your imperative example, there are a couple things: First, in your reactive version, you're error handling the Promise but not doing so in the imperative version as well as doing some data manipulation on said promise result. There's also three separate start streams, whereas the imperative version is presuming those things are happening in order. So the comparison is not so apples-to-apples. I'd probably do it a bit more like this (assuming we can emit functions to set state):
let start$ = // a condition to start
const action$ = start$.flatMap(() => K.concat([
    K.constant(s => setLoading(s)),
    K.fromPromise(A.get('/api/...')).map(d => s => setData(d, s)),
    K.constant(s => unsetLoading(s)),
    K.constant(s => setLoading(s)),
    K.fromPromise(A.get('/api/...')).map(d => s => setData(d, s)),
    K.constant(s => unsetLoading(s)),
    K.constant(s => setLoading(s)),
    K.fromPromise(A.get('/api/...')).map(d => s => setData(d, s)),
    K.constant(s => unsetLoading(s)),
]));

which actually reads pretty closely to the imperative version. There are some error-handling niceities you get doing this way, but it's ultimately not that different. I followed your initial reactive example, but we could also pass setLoading directly, rather than in an arrow, and if we curried setData, we could do the same thing there, making this whole thing point-free:
let start$ = // a condition to start
const action$ = start$.flatMap(() => K.concat([
    K.constant(setLoading),
    K.fromPromise(A.get('/api/...')).map(setData),
    K.constant(unsetLoading),
    K.constant(setLoading),
    K.fromPromise(A.get('/api/...')).map(setData),
    K.constant(unsetLoading),
    K.constant(setLoading),
    K.fromPromise(A.get('/api/...')).map(setData),
    K.constant(unsetLoading),
]));

which I like a lot.
Whether it's advantageous to write it this way vs imperative depends more on the overall architecture of your application. A lot of Observables' power comes from an "Observables all the way down" mindset; if you're just using them here and there, you're probably going to find the burden not worth it.

All of that said, we're getting away a bit from the salient question: Should the current event of a Property be affected by time-based operators? If we say yes, that's 100% a breaking change, so we'd have to slate it for a hypothetical 4.0. I strongly dislike muddying up the API itself to provide an option to time-based operators, nor would I be in favor of adding a method to do this conversion, as it feels sloppy and unprincipled to say "we think this should emit synchronously, but if you don't, we'll give you a way out".
However, I introduced the thru method (and am working on the pipeline operator) for situations exactly like this; you could easily write a function to the effect of:
const toTimeableProperty = s$ => s$.withHandler((emitter, event) => {
    switch (event.type) {
        case 'value':
            if (event.current) {
                setTimeout(emitter.value, 0, event.value)
            } else {
                emitter.value(event.value)
            }
            break;
        default:
            emitter.emitEvent(event);
            break;
    }
})
    .setName(s$, 'toTimeableProperty');

const state$ = // create state Property

// and use it thus:
state$.thru(toTimeableProperty).debounce(200)

So the behavior you want is definitely implementable in userland, so I'm even less inclined to think we need to include this in Kefir proper.

As another aside, I'm not really in love with how Cycle.js handles side effects. Losing the connection between input & output is pretty weird. I generally handle side effects by flatMap'ing over Observables that do the side effect, so the connection between input and output is retained. I think they do a lot of interesting things, but that's pretty core to how the framework functions and I think is a bit of a failing. You get this nice pure function at the cost of readability because you can't actually tell what happens to the request once it gets sent because it's handled elsewhere.

As another aside, I'm not really in love with how Cycle.js handles side effects. Losing the connection between input & output is pretty weird. I generally handle side effects by flatMap'ing over Observables that do the side effect, so the connection between input and output is retained. I think they do a lot of interesting things, but that's pretty core to how the framework functions and I think is a bit of a failing. You get this nice pure function at the cost of readability because you can't actually tell what happens to the request once it gets sent because it's handled elsewhere.

I agree 💯 percent. The initial promise of reactivity to me was to SEE causally related things in the same file, on the neighboring lines of code. In CycleJS the cause and the effect are separated too far too often which kinda breaks the point.

All of that said, we're getting away a bit from the salient question: Should the current event of a Property be affected by time-based operators?

I didn't say I want a timeable property in this thread. I wanted a way to convert Kefir's property to a stream with initial value being handled differently than in changes. Anyway, as we all come with different working solutions, and you guys were against the idea of having such method in the library, I guess I can close the issue. I have no problem with keeping it in the app.

let start$ = // a condition to start
const action$ = start$.flatMap(() => K.concat([
    K.constant(setLoading),
    K.fromPromise(A.get('/api/...')).map(setData),
    K.constant(unsetLoading),
    K.constant(setLoading),
    K.fromPromise(A.get('/api/...')).map(setData),
    K.constant(unsetLoading),
    K.constant(setLoading),
    K.fromPromise(A.get('/api/...')).map(setData),
    K.constant(unsetLoading),
]));

which I like a lot.

Hmm, I also like this layout! Need to give it a go. Thank you!

I didn't say I want a timeable property in this thread. I wanted a way to convert Kefir's property to a stream with initial value being handled differently than in changes.

No, I know, and I understand the ask; I just don't think we should expose that in Kefir's API directly, but I do think it's worth exploring the more fundamental question, especially in light of RxJS's BehaviorSubject. I'm assuming you prefer Property's default behavior?

In CycleJS the cause and the effect are separated too far too often which kinda breaks the point.

Yeah, definitely prefer redux-observable over Cycle.js here. I did something similar in brookjs with Kefir as well, plus some things with React, redux, & Kefir, if you're interested.

I'm assuming you prefer Property's default behavior?

Yes!

I did something similar in brookjs with Kefir as well, plus some things with React, redux, & Kefir, if you're interested.

I have to confess I hate everything about Redux. I like to dispatch functions, not actions. The latter feels very OOP-ish to me (the close set of behaviors/actions/functions).

I like to dispatch functions, not actions.

Hah, to each their own; this feels uncontrolled to me, vs centralizing all the logic in the reducer.

The latter feels very OOP-ish to me (the close set of behaviors/actions/methods).

This coupling is part of what I'm trying to solve. I don't love actions being coupled to the change they're supposed to induce, so I split them conceptually into "Events" (what just happened) & "Commands" (what should happen). If the reducer responds to Events but returns a [State, Command] tuple, then you get to centralize all the logic in (essentially) one giant pure function.

This coupling is part of what I'm trying to solve. I don't love actions being coupled to the change they're supposed to induce, so I split them conceptually into "Events" (what just happened) & "Commands" (what should happen). If the reducer responds to Events but returns a [State, Command] tuple, then you get to centralize all the logic in (essentially) one giant pure function.

Sound interesting, I need to take a closer look at your project despite my prejudice against Redux.

let start$ = // a condition to start
const action$ = start$.flatMap(() => K.concat([
    K.constant(setLoading),
    K.fromPromise(A.get('/api/...')).map(setData),
    K.constant(unsetLoading),
    K.constant(setLoading),
    K.fromPromise(A.get('/api/...')).map(setData),
    K.constant(unsetLoading),
    K.constant(setLoading),
    K.fromPromise(A.get('/api/...')).map(setData),
    K.constant(unsetLoading),
]));

I've tried this one and I think it doesn't have the features of the original code. It provides the same sequence, yes, but it does not provide the data dependency I wanted:
let x = await fetch(f(q))
...
let y = await fetch(g(x)) // !! depends on x

The only way K.fromPromise(A.get('/api/...')).map(setData), and the next K.fromPromise(A.get('/api/...')).map(setData) can communicate in this version is through the state.
And that's not always a valid option. For example
Request-1: fetch all model ids on some index page
Request-2: fetch those models by ids
In the second fetch you don't know WHICH ids were fetched unless you pass them explicitly between requests. You can not use state which contains other, extra ids in the collection object or array.
The second problem is error passing. I can shortcut the whole sequence with error event but I can not handle event in the next handler (unless I put this event in the state and marked it in some unique way to make it recognizable for a particular command which is unrealistic).

The only way K.fromPromise(A.get('/api/...')).map(setData), and the next K.fromPromise(A.get('/api/...')).map(setData) can communicate in this version is through the state.

Maybe this?
let start$ = // a condition to start

const action$ = start$.flatMap(() => {
    const first$ = K.fromPromise(A.get('/api/...'));
    const second$ = first$.flatMap(res => K.fromPromise(A.get('/api/...', res)));
    const third$ = second$.flatMap(res => K.fromPromise(A.get('/api/...', res)));

    return K.concat([
        // These shenanigans can also be wrapped in a function
        K.constant(setLoading),
        first$.map(setData),
        K.constant(unsetLoading),
        K.constant(setLoading),
        second$.map(setData),,
        K.constant(unsetLoading),
        K.constant(setLoading),
        third$.map(setData),
        K.constant(unsetLoading),
    ])
);

You fixed both with this version. But you see how it starts to fall off the sequence because there's no built-in scoping solution with promises/streams like there is with async-await. I admit this is still better than my version because everything looks more grouped so I'll keep experimenting. Thank you!

If you like the imperative version better, you could also just do that:
const action$ = start$.flatMap(() => Kefir.stream(async emitter => {
    emitter.value(setLoading)
    let x = await fetch(f(q))
    emitter.value(unsetLoading)
    emitter.value(setData)

    emitter.value(setLoading)
    let y = await fetch(g(x))
    emitter.value(unsetLoading)
    emitter.value(setData)

    emitter.value(setLoading)
    let z = await fetch(g(y))
    emitter.value(unsetLoading)
    emitter.value(setData)
    emitter.end()
}));

replacing the calls to emitter.value as needed. I often use Kefir.stream to wrap imperative code like this as well.

Hmm, another very interesting idea. I totally forgot about this possibility. More kudos to you!

authors: AgentME ivan-kleshnin mAAdhaTTah

repo: kefirjs/kefir


text:
Optimized shader version

I made a lot of changes that make bloom shader 1.5-2 times faster. But the resulting code is very dirty for further support. I'll leave it here, maybe somebody will need it.
Bloom.zip

thanks

authors: keijiro viruseg

repo: keijiro/KinoBloom


text:
Fix the Safari iOS bug on the Add Stall screen

Check commit history. Did we already quickly patch this?
And I think the email field requirement is tripping folks up. Handle required fields failing validation in the browser better if they're at the bottom of the screen.

Done - we've added better validation of form fields on Add Stall and moved email to the bottom.

repo: keithamoss/demsausage


text:
Manhwas.net si not working

Source information
1.4.11
Source language
Spanish
Steps to reproduce
1 if you enter in the app this don't work
2 if yo uses webview it doesnt work
3 if you use a internet bowser it works
Expected behavior
Im trying to read manga
Actual behavior
It doesnt works :(
Mihon/Tachiyomi version
Beta r6876
Android version
Android 12
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] I have updated the app to version 0.15.3.
[X] I have updated all installed extensions.
[X] I have tried the troubleshooting guide.
[X] If this is an issue with the app itself, I should be opening an issue in the app repository.
[X] I will fill out all of the requested information in this form.

their ssl certificate expired, wait for them to fix / renew it

the site fixed the issue

repo: keiyoushi/extensions-source


text:
Generating classes and methods at run time using Reflection

Are there any plans to implement the reflection system in the project, if so, do you have any idea how it will work to generate methods and classes at runtime, and execute this code?
For exemple, if we have this code:
    static void Main(string[] args)
    {
        const string AssemblyName = "HelloWorld.dll";
        var assembly = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName(AssemblyName), AssemblyBuilderAccess.RunAndCollect);
        var module = assembly.DefineDynamicModule(AssemblyName);
        var methodBuilder = module.DefineGlobalMethod("HelloWorld", MethodAttributes.Final | MethodAttributes.Public | MethodAttributes.Static, typeof(void), new Type[0]);
        var ilGenerator = methodBuilder.GetILGenerator();

        var writeline = typeof(Console).GetMethod("WriteLine", BindingFlags.Public | BindingFlags.Static, Type.DefaultBinder, new[] { typeof(string) }, null);
        ilGenerator.Emit(OpCodes.Ldstr, "Hello World");
        ilGenerator.EmitCall(OpCodes.Call, writeline, new[] { typeof(string) });
        ilGenerator.Emit(OpCodes.Ret);

        module.CreateGlobalFunctions();
        var helloWorld = module.GetMethod("HelloWorld");
        helloWorld.Invoke(null, null);
        Console.ReadLine();
    }

How would IL2C handle this?
Would it be necessary to implement an 'interpreter'?

@bencz Unfortunately IL2C doesn't support any reflection API's include emits, but I'm interesting for dynamic emitter :)
In IL2C scope, we have to make native binary emitter or call native binary compiler in the runtime environment. For example, IL2C can use in non-OSes IoT environment and likes. The problems are how to invoke gcc and another compiler toolchains onto these platforms, or we can dynamic emitting the native binary onto these platform if IL2C's runtime library include it.
(It's too large and difficult embedding it...)
Are you thinking about where your apps build onto?

.net 5, .net 6 will integrate a code generator, and it will be simple to implement static reflection. Dynamic reflection can be considered from the long time(Not now).

@sgf I feel the code generator manipulates at only a compile time, so we can use it different situation how use informations about.
I think bencz says about emitting, so it means about runtime interpreter if possible. I have a concept for IL bytecode interpreter implementation, but currently not implemented on IL2C runtime...

@kekyo maybe (just an idea), using the Mono MSIL interpreter, is something viable

@bencz Sure, we can enable emitter with few ideas:

Native IL interpreter: mono interpreter or like
Native IL translator: Aggressive and challenging, but it can be implemented only rich environment (maybe can't bare-metals)
(Bit compromise) LINQ expression reducer, but it can't handle generate new type metadata.

IL interpreter and translator have very difficult topics (related how to resolve and fixup another assembly metadata at runtime time on multi platform included bare-metals rather than code generator. I feel we also have to decline some features...)
I feel better choice for IL2C is LINQ expression reducer, because it makes practical and (maybe) easier implementations. Even so consider  have to how to implement reflection ability on multi-platform at runtime time. I have no idea now, do you think about it?

@kekyo Take a look in this project that I'm developing https://github.com/bencz/IronNet/tree/master/source
I started this project because I want to be able to run .net programs on big iron servers, and on 'different' operating systems, such as IBM i, AS/400, s/390 and z/OS ...
Unlike DotNetAnywhere, IronNet came up with the idea of being bi-endian and with support for operating systems of 31, 32 and 64 bits .... in addition to being developed in the C99 standard (unfortunately, I will have to review this, because on IBM i, some errors occur because of the declaration of the variable ...)
Here, a simple .net exe decompilation running on ILE on IBM i

I am still implementing the interpreter .... IronNet has a translator, which generates an IR from MSIL, which translates to machine code using a JIT or performs the interpretation ... so, it may be possible to use parts of this mine project, to solve this problem ....
One detail, I'm testing IronNet on the following OS and architectures:
Windows x86 and x64
Linux Debian x86 and x64
Linux Debian powerpc and powerpc64 (big endian)
Linux Debian ppc64le
Linux Debian m68k
IBM s/390
IBM z/OS
IBM i
IBM AS/400

Alternatively, DotNetAnywhere can be used ... but, corrections must be made to support Big Endian and x64 architectures ... currently DotNetAnywhere, works only on Little Endian and 32bits systems
I fixed the DotNetAnywhere for B.E architectures...: https://github.com/bencz/IronNet/tree/master/DotNetAnywhere

I surprised great your project IronNet! Is IR meaning iron servers opcodes declared this?
I think your solution focusing to be neutralizing different endians and instruction bits in translating process, it's very interesting.
Perhaps maybe we hope to need a abstract basis translator framework between CIL/MSIL and others when making translators...
How IronNet fixup another assembly method bodies? I found the System.String.[ch], these types/methods are declared hardcoded by you (and IL2C has similar solution), it crawl up recursively another arbitrary assemblies?
IL2C has to do it, but it will have to big problem, because translation process is made a long time. So I think have to split and turns to library (*.lib, *.a) each assemblies. (and the problem includes how to fixup  building mechanism and packaging...)
When talking back, a runtime CIL/MSIL interpreter has to fixup these topics:

Opcode interpreting (Light side, we know about it perfectly ;)
Metadata interpreting (Dark side, it contains to fixup between targeting platforms)

Nop, the IR is the intermediate representation, the system converts the MSIL to the IR that I created, so it is possible to make optimizations in the IR, and then later, direct the result of the generated IRs to be interpreted or converted by the JIT
This file you found (System.String.[ch]) is for the DotNetAnywhere project ( oficial project page:  https://github.com/chrisdunelm/DotNetAnywhere/ )...
Anyway, I will use the same ideia on IronNet!
About the metadata parsing, this is complex, but, not so much... it's just tedious to implement hahahahaha
You can have some ideia of how this is made, based on my project or on dotnetanywhere... and, it's possible to have some ideia of this, from this another project: https://github.com/LADSoft/DotNetPELib
This lib. was developed to be used in the new OrangeC compiler backend: https://github.com/LADSoft/OrangeC

These project and your project is interesting.
My concern is where and how to split between ahead compilation and interpretation at both user-side and runtime (included from larger systems to bare metal systems) with balancing topics, between easier user developing platform, automated building (CI/CD, lacks many IoT devs now), can port and adapt minor platforms easier (It's truly multi platform, isn't it? :)
Thank you suggested, I'll make better way (huh, the topics too large for me, maybe advance with incremental...)
off topics:
I feel Orange C is similar to web-assembly targetted compilers. The web-assembly environment have strongly limitation for processing resource-access and memory-managements, but they are succeeded it.

authors: bencz kekyo sgf


text:
Result does not match

Hi Kellen,
I am trying your solution for a C++ application but I am not getting the right result.
I wrote a simple code that encrypts the message I LOVE 2 ENCRYPT WORDS WITH AES with the key AAAAAAAAA0AAAAAA as follows:
#include <iostream>
#include "AES.hpp"

using namespace std;

int main()
{

    unsigned char msg[(AES_FIXED_BLOCK_SIZE * 2) + 1] = { "I LOVE 2 ENCRYPT WORDS WITH AES" };
    unsigned char key[AES_FIXED_BLOCK_SIZE] = { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x30, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 };

    cout << msg;
    aes_ecb_encrypt(msg, key, 31);
    cout << " --> ";
    for (int i = 0; i < (AES_FIXED_BLOCK_SIZE * 2) + 1; i++) {
    	printf("%02X", msg[i]);
    }
    cout << endl;

    return 0;
}

This code prints I LOVE 2 ENCRYPT WORDS WITH AES --> 969F85D527CB9AB6497C4B8ACBFD8DA89085C5AAF7BF511B4B8C7AE0DA7A14A000
However, I compared this result with one obtained from an online calculator (https://www.devglan.com/online-tools/aes-encryption-decryption) and they are different: 969F85D527CB9AB6497C4B8ACBFD8DA84FE5DBD43E515B28198B8DAA989B892F
Am i doing something wrong?
Thanks,
Oscar

Hi again,
I made a concept mistake checking the results. I am a beginner with AES so I am not familiar with it. The result is right, but both results do not match because the online calculator is adding a padding.


text:
Parameter settings for example ss_prog_power enters multiples of values instead of 1000 enters 10 000

Hello, the problem is in the value of the setting parameters!
Parameter settings for example ss_prog_power
any parameter 1 - 6 value is entered in multiples or kW but HA displays W! Or there is an error in the semicolon value.
If you enter 1000W into the inverter, 10000W is entered, see photo
Please correct

Hi, what inverter do you have?
You can try to use custom sensors and add a factor parameter
SENSORS += (
    # The max power that can be used from the battery
    NumberRWSensor(256, "Prog1 power", WATT, max=RATED_POWER, factor=10),
    NumberRWSensor(257, "Prog2 power", WATT, max=RATED_POWER, factor=10),

I'll add
In the previous version it was fine. ( I change the mentioned value in automation)
Only yesterday I updated to version b092637 and shortly afterwards I found that the Prog power parameter is written to the inverter with 10 times the value.
My inverter is SUN-30K-SG01HP3-EU-BM3
I've been using your add-on for several months and until the update to version b092637 everything was fine, including the Prog power value.
Would you have to guide me how to create a custom sensor with parameters ideally a video how to with a tutorial I didn't understand.
Thank you

Ahoj, jaký máš invertor?
Můžete zkusit použít vlastní senzory a přidat parametr faktoru
SENSORS += (
    # The max power that can be used from the battery
    NumberRWSensor(256, "Prog1 power", WATT, max=RATED_POWER, factor=10),
    NumberRWSensor(257, "Prog2 power", WATT, max=RATED_POWER, factor=10),

I'll add
In the previous version it was fine. ( I change the mentioned value in automation)
Only yesterday I updated to version b092637 and shortly afterwards I found that the Prog power parameter is written to the inverter with 10 times the value.
My inverter is SUN-30K-SG01HP3-EU-BM3
I've been using your add-on for several months and until the update to version b092637 everything was fine, including the Prog power value.
Would you have to guide me how to create a custom sensor with parameters ideally a video how to with a tutorial I didn't understand.
Thank you

I tracked down the release history.
Originally the definition of Phase 3 VN was
SENSORS += (
NumberRWSensor(154, "Prog1 power", WATT, 10, max=RATED_POWER),
NumberRWSensor(155, "Prog2 power", WATT, 10, max=RATED_POWER),
NumberRWSensor(156, "Prog3 power", WATT, 10, max=RATED_POWER),
NumberRWSensor(157, "Prog4 power", WATT, 10, max=RATED_POWER),
NumberRWSensor(158, "Prog5 power", WATT, 10, max=RATED_POWER),
NumberRWSensor(159, "Prog6 power", WATT, 10, max=RATED_POWER),
)
New from version b092637 you have
NumberRWSensor(154, "Prog1 power", WATT, max=RATED_POWER),
NumberRWSensor(155, "Prog2 power", WATT, max=RATED_POWER),
NumberRWSensor(156, "Prog3 power", WATT, max=RATED_POWER),
NumberRWSensor(157, "Prog4 power", WATT, max=RATED_POWER),
NumberRWSensor(158, "Prog5 power", WATT, max=RATED_POWER),
NumberRWSensor(159, "Prog6 power", WATT, max=RATED_POWER),
there's a missing , 10
Will you fix it for the next version?

#289

@JanKraslice please test with the fix @rixxxx submitted

authors: JanKraslice kellerza rixxxx

repo: kellerza/sunsynk


text:
当初大师说离开码坛 我是极力反对的！

当初大师说离开码坛 我是极力反对的！

放屁，当初就你叫的最欢

@thebelowavarage @kelseyhightower  Trump: Nobody👆knows☝nocode👌better than🤲code👐

authors: hhjie thebelowavarage

repo: kelseyhightower/nocode


text:
Frames are out of sync after a while

Hey,
Thanks for this awesome tool. I tried making an animation for my song, the beginning fits perfectly but the more it goes into the song, the more off-sync it becomes. I checked the animation png and the y coordinates, they match nicely, so it  must be an issue with the code itself. What could cause this and how do I solve the problem?

It sounds like you may be playing the animation with the wrong frame rate. Have you tried adjusting millisecondsPerFrame in the json file?

Yes. I create the animation in Vegas Pro 18, set the video framerate to 50 frames per second (so that's 20ms per frame), export that as PNG images (frames) of 260x1 size (I have 260 LEDs) and then glue them into a final image. In the config I also set the millisecondsPerFrame to 20.

I have reduced the framerate to 40fps so the millisecondsPerFrame is now 25. It seems like thats the highest framerate possible.

authors: kendfrey nedasoo

repo: kendfrey/syncstrip

license: WTFPL


text:
Theme is stored in localStorage but not applied when returning to the site

Steps to Recreate

Set site to dark theme
Go to a different site/close the tab
Head on back to koamar.com

Expected Result
Site is displayed in dark theme
localStorage.getItem('theme') = 'dark'
Actual Result
Site is back to the default of light theme
This is true though: localStorage.getItem('theme') = 'dark'

Looks like I'm not looking in localStorage before going out and getting the default theme. Need to look in my notes to fix this!


text:
Allow being installed as an antigen bundle

https://github.com/zsh-users/antigen

Turns out, it already works :smile:

repo: kennethreitz/autoenv


text:
KeyError 'LoadImageFromFile'

I got the following error when running the code results = inference_recognizer(model, fake_anno) in demo_skeleton.py:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py", line 3331, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-39-3ad26ccbf498>", line 1, in <module>
    results = inference_recognizer(model, fake_anno)
  File "/data/video_action_detection/pyskl/pyskl/apis/inference.py", line 163, in inference_recognizer
    test_pipeline = Compose(test_pipeline)
  File "/data/video_action_detection/pyskl/pyskl/datasets/pipelines/compose.py", line 23, in __init__
    transform = build_from_cfg(transform, PIPELINES)
  File "/usr/local/lib/python3.6/dist-packages/mmcv/utils/registry.py", line 62, in build_from_cfg
    f'{obj_type} is not in the {registry.name} registry')
KeyError: 'LoadImageFromFile is not in the pipeline registry'

My dependencies:
MMCV full: 1.6.1
MMDet: 2.25.1
MMPose: 0.28.1
Any help or suggestions would be greatly appreciated!

Hi, hthanhle,
Guess you wrongly used a detection config for training in PYSKL, PYSKL doesn't have the LoadImageFromFile component. Please only use the detection config for demo and inference.

authors: hthanhle kennymckormick

repo: kennymckormick/pyskl


text:
Update gremlin emit output tests

Address comment here

Make these emit output tests use the test schema

Add in missing tests (i.e. here we had a test for MATCH but not its counterpart for Gremlin even though both backends handle it).

If you can fix the merge conflicts here, this is fine by me.

repo: kensho-technologies/graphql-compiler


text:
Fix validation of list member type; add test

Currently, only using the to_native schematics function to check list members for ListType. This schematics method converts the data type, catching some conversion errors, but it's not the full validation.

Coverage increased (+0.3%) to 89.326% when pulling 38b11d72a459e13d803adc7eebd59bdfe3d8b83c on cranti:list_fix into 45b80f51209f2c280501a12e3b1a4064f822f70a on kensho-technologies:dev.

Coverage increased (+0.3%) to 89.326% when pulling 501783c6242630966862a9c5f2be685ad29968cb on cranti:list_fix into d05f66c3f2ecacebd0c4dd012052cd9b57b70e4c on kensho-technologies:dev.

authors: coveralls cranti

repo: kensho-technologies/grift


text:
chore(travis): fix node version in the build using nvmrc

build was using node version 4 instead of 6, using nvmrc we don't need to specify node version and because node 6 comes with npm 3 by default remove it from before install in the build.
see:
https://github.com/travis-ci/travis-ci/issues/3644
https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Using-.nvmrc

Current coverage is 100% (diff: 100%)

Merging #28 into master will not change coverage

@@           master   #28   diff @@
===================================
  Files           1     1
  Lines          10    10
  Methods         0     0
  Messages        0     0
  Branches        0     0
===================================
  Hits           10    10
  Misses          0     0
  Partials        0     0

Powered by Codecov. Last update 2e6bb71...ac1bc7c

Thanks!

authors: Fetz codecov-io kentcdodds

repo: kentcdodds/starwars-names


text:
Cannot resize carousel slides in a flexbox layout.

I am trying to get slick carousel working with the flexbox, which has a footer. even thought the slick carousel covers 100% of the remaining space there is no way to make the height of each slide span the whole height assigned to the carousel. Using height: 100% doesn't work.
Any ideas?
My fiddle is here https://jsfiddle.net/qxkqzjow/7/

I had the very same question today and finally got it resolved by listening to the window resize event and setting there the height of '.slick-slide' to the available height within the container.

How about using calc and vh units? Subtract the height of your footer from the height of the viewport.
.carousel__item {
    height: calc(100vh - 100px);
}

IE9+

My footer is variable in height, based on how much text goes in it. torfranz@ Can you elaborate your solution?

I guess you already managed with your flex approach to get the .slick-slider to occupy the available height. But the .slick-slide will keep their initial height which is probably based on the content.
If I guessed this to be correct you could listen to (please ignore any syntax issues, I usually use TypeScript)
$(window).resize(function () {
$(.slick-slide).height($("").innerHeight()) });
In addition you need to make this height setting once at start when the page is shown, otherwise only after the first window resize the height is modified.

@pmeissner I was not able to get your solution to work with this. Sorry.

authors: jdmagic21 pmeissner torfranz vaidehichhajer

repo: kenwheeler/slick


text:
Slider does not show item in it's correct position

using these options:
 options = {
                infinite: true,
                slidesToShow: 2,
                slidesToScroll: 2,
                vertical: true,
                verticalSwiping: true,
                nextArrow: "

",
                prevArrow: "

"
            };

I'm getting:

the transform: translate3d(0px, -454px, 0px); line is wrongly created as it should be -422px so the items could be shown as:

What am I doing wrong? how can I tell slick what the height of each item?
tried with CSS on my own carousel-item but it does not care that much about it :/

Hey can you make a reduced test case in a fiddle or codepen?
Closing pending test case

authors: balexandre leggomuhgreggo


text:
[feature]: Accepting/Normalise Test Case in a Test-Run

Is there an existing feature request for this?

[X] I have searched the existing issues

Summary
One should be able to mark a test-case behavior as "expected". This will update the expected behavior of the test case going forward.
One should be able to multi-select testcases and normalise them as well.
Why should this be worked on?
It'll help deal with false positives quickly.
It'll help in improving the quality of the test-cases recorded/audited.

Normalizing multiple test cases blocked on keploy/keploy Issue 5

Single test case can be normalised/updated.
Pending : Support to multi-select test cases and accept as normal.

repo: keploy/ui


text:
Selecting Metal (MPS) as the GPU in MacOS (torch backend)

First off, congratulations on keras-core: keras is awesome, keras-core is awesomer!
Using a Mac, I was trying to manually set a keras-core more with torch backend to benefit from the Metal GPU acceleration, which works on both Apple silicon and AMD GPUs. I noted this was not possible due to:

get_device(), which reads from a threading global state.
the default device is CUDA

As can be seen here, in MacOS systems using the GPU can be as easy as setting the device to "mps". So I would like to ask if there would be an opportunity for a PR that implements some version of the snippet below that wouldn't fail on non-Apple machines:
# keras_core/backend/torch/core.py
if torch.cuda.is_available():
    DEFAULT_DEVICE = "cuda"
elif:
    if torch.backends.mps.is_available():
    DEFAULT_DEVICE = "mps"
else:
    DEFAULT_DEVICE = "cpu"

The goal is to have Keras-core seamlessly choose MPS as the default GPU in PyTorch backends, just as it already does for tensorflow implementations using the Metal pluggable device.

What about for TensorFlow backends?

If you are like me and just look for the way to use GPUs with Tensorflow and/or Keras, just refer to this official Apple documentation.
# Uninstall all tensorflow dependencies
# The only things to install are:

# Tensorflow
python -m pip install tensorflow

# IMPORTANT: The plugin of Tensorflow made to use mps capabilities
python -m pip install tensorflow-macos

Basically, when installing the normal tensorflow dependency, you still need to install the plugin which allows using your mps devices. This will be called GPU and you can verify it is correctly installed by typing:
import tensorflow as tf

tf.config.list_physical_devices('GPU')

Which should now return something like:
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]

source: https://developer.apple.com/metal/tensorflow-plugin/

@mehtamansi29
It seems this issue was completed here ? https://github.com/keras-team/keras-core/pull/750

repo: keras-team/keras


text:
model output inconsistent on tensorflow and theano backends

model.zip
problem
I trained a model on both TensorFlow and Theano backends, saving the outputs of all layers for comparison. The outputs of the second layer and beyond differ between the two implementations. Attached you will find the model file (tensorflow.h5), dataset directory (containing data and ground truth), weight directory (containing weights for all layers), and layer outputs directory.
version
keras: 2.3.1
tensorflow: 2.0.0
theano: 1.0.4
python: 3.6

Thanks for the report. The Theano backend has been deprecated since 2019 and we do not process Theano related issues. I suggest you upgrade to Keras 3.

authors: cheyennee fchollet


text:
keras adamw optimizer failed with callable parameters in TensorFlow2.16

When we were working on upgrading keras 2 to keras 3 in TensorFlow plugin, one of our adamw related unit test failed, which is a sub unit test using callable  lambda as learning_rate argument. We also found this ut failed in TensorFlow2.16 official docker image. The error log is :

"""Tests for adam optimizer with weight decay."""

import numpy as np
import keras
import tensorflow as tf
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import constant_op
from tensorflow.python.platform import test
from tensorflow.python.framework import test_util

from keras.src.optimizers import adamw

DATA_TYPES = [
    dtypes.float32
]

WEIGHT_DECAY = 0.1

def adamw_update_numpy(
    param, grad_t, slot_vars, learning_rate, beta_1, beta_2, epsilon, weight_decay, amsgrad
):
    """Numpy update function for AdamW."""
    lr, beta1, beta2, eps, wd = (
        v() if callable(v) else v
        for v in (learning_rate, beta_1, beta_2, epsilon, weight_decay)
    )
    t = slot_vars.get("t", 0) + 1
    lr_t = lr * np.sqrt(1 - beta2 ** t) / (1 - beta1 ** t)
    slot_vars["m"] = beta1 * slot_vars.get("m", 0) + (1 - beta1) * grad_t
    slot_vars["v"] = beta2 * slot_vars.get("v", 0) + (1 - beta2) * grad_t ** 2
    if amsgrad:
        slot_vars["v_hat"] = slot_vars.get("v_hat", 0)
        slot_vars["v_hat"] = np.maximum(slot_vars["v_hat"], slot_vars["v"])
        param_t = param * (1 - wd * lr) - lr_t * slot_vars["m"] / (np.sqrt(slot_vars["v_hat"]) + eps)
    else:
        param_t = param * (1 - wd * lr) - lr_t * slot_vars["m"] / (np.sqrt(slot_vars["v"]) + eps)
    slot_vars["t"] = t
    return param_t, slot_vars

class AdamWeightDecayOptimizerTest(test_util.TensorFlowTestCase):

    def doTestBasic(self, use_callable_params=False, do_sparse=False, do_amsgrad=False):
        for dtype in DATA_TYPES:
            # Initialize variables for numpy implementation.
            np_slot_vars0, np_slot_vars1 = {}, {}
            var0_np = np.array([1.0, 2.0], dtype=dtype.as_numpy_dtype)
            grads0_np = np.array([0.1, 0.1], dtype=dtype.as_numpy_dtype)
            var1_np = np.array([3.0, 4.0], dtype=dtype.as_numpy_dtype)
            grads1_np = np.array([0.01, 0.01], dtype=dtype.as_numpy_dtype)

            # Create Tensorflow variables.
            itex_var0 = tf.Variable(var0_np)
            itex_var1 = tf.Variable(var1_np)

            # Adapt callable parameters
            learning_rate = lambda: 0.01
            beta_1=lambda: 0.9
            beta_2=lambda: 0.999
            if not use_callable_params:
                learning_rate = learning_rate()
                beta_1 = beta_1()
                beta_2 = beta_2()

            # Adapt sparse
            if do_sparse:
                grads0_np_indices = np.array([0, 1], dtype=np.int32)
                grads0 = tf.IndexedSlices(
                    tf.constant(grads0_np), tf.constant(grads0_np_indices), tf.constant([2])
                )
                grads1_np_indices = np.array([0, 1], dtype=np.int32)
                grads1 = tf.IndexedSlices(
                    tf.constant(grads1_np), tf.constant(grads1_np_indices), tf.constant([2])
                )
            else:
                grads0 = constant_op.constant(grads0_np)
                grads1 = constant_op.constant(grads1_np)

            adamw_opt = adamw.AdamW(weight_decay=WEIGHT_DECAY, learning_rate=learning_rate, amsgrad=do_amsgrad)

            # Run 3 steps of the optimizer
            for _ in range(3):
                adamw_opt.apply_gradients(
                    zip([grads0, grads1], [itex_var0, itex_var1])
                )
                var0_np, np_slot_vars0 = adamw_update_numpy(
                    var0_np, grads0_np, np_slot_vars0, weight_decay=WEIGHT_DECAY, learning_rate=learning_rate,
                    beta_1=beta_1, beta_2=beta_2, epsilon=1e-7, amsgrad=do_amsgrad)
                var1_np, np_slot_vars1 = adamw_update_numpy(
                    var1_np, grads1_np, np_slot_vars1, weight_decay=WEIGHT_DECAY, learning_rate=learning_rate,
                    beta_1=beta_1, beta_2=beta_2, epsilon=1e-7, amsgrad=do_amsgrad)
                # Validate updated parameters
                self.assertAllCloseAccordingToType(itex_var0.numpy(), var0_np)
                self.assertAllCloseAccordingToType(itex_var1.numpy(), var1_np)

    def testCallableParamsAdamW(self):
        '''ResourceApplyAdamWithWeightDecay is a DPCPP op, don't have cpu registration
            TODO: waiting for CPU registration of ResourceApplyAdamWithWeightDecay then enable
            this test case on CPU'''
        if not test.is_gpu_available():
            self.skipTest("No GPU available")
        self.doTestBasic(use_callable_params=True)

if __name__ == "__main__":
    test.main()

https://github.com/keras-team/keras/blob/6c591d7d34c3ffaa50e805fd75c83d9c2a23414f/keras/optimizers/base_optimizer.py#L560
Here is the root cause. If learning_rate is a callable object, then it doesn't need any arguments.

I might give this one a stab if no one picks it up.

@kapoor1992 , You can create a PR

@sachinprasadhs Will do :)


text:
Can't load a saved model, Keras 3.4 regression

When I create a model
base_model = keras.applications.ResNet50V2(include_top=False, weights='imagenet')
base_model.trainable = False
model = keras.Sequential()
model.add(layers.Input(shape=image_size+(3,)))
model.add(layers.RandomFlip("horizontal"))
model.add(layers.RandomRotation(0.1))
model.add(layers.Rescaling(scale=1/127.5, offset=-1))
model.add(base_model)
model.add(layers.GlobalAveragePooling2D())
model.add(layers.Dense(384, activation='relu'))
model.add(layers.Dropout(0.25))
model.add(layers.Dense(7, activation='softmax'))

train it, and finally save it to a ".keras" file (in my case using keras.callbacks.ModelCheckpoint), when I try to load it back with
keras.models.load_model("filename.keras")

The load_model fails, saying that a "Dense" layer expects one tensor input and got two.
Exactly the same code works on Keras 3.3.3.
Interestingly, when I saved the model on Keras 3.4.1 and then downgraded to Keras 3.3.3, it could read the saved model just fine.
There is a three-month old issue complaining about a similar problem on the Tensorflow github - https://github.com/tensorflow/tensorflow/issues/63853 - but interestingly, on my system I can only reproduce the problem on Keras 3.4 (released just two weeks ago) and Keras 3.3.3 works just fine.

Thanks for the report. Looking into it.

Fixed the bug. The fix will be in the next release. Until then you can keep using 3.3.3, or otherwise refactor your model so that it isn't subject to the bug (e.g. use a Functional instead of a Sequential model).

authors: fchollet nyh


text:
ValueError: No model config found in the file at C:\Users\gnanar.deepface\weights\age_model_weights.h5.

I am trying to convert the age_model_weights.h5 to onnx .But it give me the following error
ValueError: No model config found in the file at C:\Users\gnanar.deepface\weights\age_model_weights.h5.
This is my code:
import tensorflow as tf
import tf2onnx
import onnx
from tensorflow.keras.models import load_model
Load the Keras model (.h5 file)
model = load_model("age_model_weights.h5")
Convert Keras model to ONNX format
onnx_model, _ = tf2onnx.convert.from_keras(model)
onnx.save(onnx_model, 'age_model.onnx')
print("Model successfully converted to ONNX format!")

Hi @Gnanapriya2000, thanks for reporting this. Could you provide some sample code to reproduce this issue? It's possible that you’re trying to load the model with age_model_weights.h5 where the model weights are being saved. You could try saving the model using model.save then loading and converting it to ONNX format.

Actually now I ma trying to convert facenet_weights.h5 to onnx ,but it contains only weights and no architecture how can i convert to onnx ?

Hi @Gnanapriya2000,
It seems like you can’t convert a file containing only model weights to ONNX. ONNX requires a model architecture definition in addition to the weights. You can use facenet_weights.h5 and load them to your new model, provided the new model's architecture is the same as when the weights were saved, then convert your new model to ONNX. You can read more about saving and loading weights here and about converting tensorflow models to onnx here
Attaching a gist for reference.


text:
Update and delete namespace secrets failed when namespace name contains underscores

Expected Behavior
Namespace ID and secret key should be got whatever the separator between Namespace ID and secret key in secret ID.
Or theses informations should be got in another ways.
Actual Behaviour
Namespace ID and secret key are retrieved from secret ID, namespace ID is equals to the first part before the first underscore and the secret key is equals to the other part.
When the namespace ID contains underscores, parsing these informations is not done correctly.
Steps To Reproduce
Create a namespace secret in a namespace containing underscores in its name, and try to update the secret.
Environment Information

Kestra Version: 0.9.4
Kestra provider version: 0.7.0

Example flow
resource "kestra_namespace_secret" "secret_test" {
namespace    = xxxx.yyyy.my_fake_namespace
secret_key   = "kestra"
secret_value = "rocks"
}

fix in v0.10.0

authors: soulbah tchiotludo

repo: kestra-io/terraform-provider-kestra


text:
Add type annotations

Running mypy on code that uses the latest version of vcrpy fails with the error message "module is installed, but missing library stubs or py.typed marker".  Please add type annotations to this project and include a py.typed file in the package to indicate typing support to mypy.

Is there a particular reason why the py.typed isn't added?

Is there a particular reason why the py.typed isn't added?

Unfortunately, that's not sufficient. Type annotations need to be added throughout the code as well.

authors: chuckwondo isFakeAccount jwodder


text:
🛑 Curriculum Vitae is down

In 8ebd1b0, Curriculum Vitae (https://cv.kevinbrechbuehl.ch) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Curriculum Vitae is back up in 86f1a8f after 12 minutes.

repo: kevinbrechbuehl/upptime


text:
Save metadata in files

Probably not the default, but it would be pretty cool to edit metadata in-file.

Some useful looking this:

ffprobe to see what's in files while under development
This looks interesting: https://github.com/parshap/node-ffmetadata
Check out issues for some stuff about how to include ffmpeg with the distribution...

Some useful looking this:

ffprobe to see what's in files while under development
This looks interesting: https://github.com/parshap/node-ffmetadata
Check out issues for some stuff about how to include ffmpeg with the distribution...

repo: kevinfrei/EMP


text:
🛑 FX corretor (kty) is down

In 983d2e5, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in c3bcea8 after 6 minutes.

repo: keviocastro/upptime


text:
🛑 FX corretor (kty) is down

In 85ceae8, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in 0489bb2 after 6 minutes.


text:
🛑 FX corretor (kty) is down

In 1b397d5, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in cd3537a after 6 minutes.


text:
🛑 FX blog (kty) is down

In 1447f0a, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in a832aea after 11 minutes.


text:
🛑 FX blog (kty) is down

In 946459f, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in 0761f12 after 8 minutes.


text:
🛑 FX blog (kty) is down

In 8c89695, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in 7a93fbd after 7 minutes.


text:
🛑 FX corretor (kty) is down

In f5eff1d, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in d5b5f74 after 8 minutes.


text:
🛑 egali site (kty) is down

In 7cf64c9, egali site (kty) (https://egalite.com.br) was down:

HTTP code: 404
Response time: 362 ms

Resolved: egali site (kty) is back up in 31417cd.


text:
🛑 FX corretor (kty) is down

In a699dd9, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in bbcad84 after 10 minutes.


text:
🛑 FX blog (kty) is down

In a68131f, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in 920d259 after 14 minutes.


text:
🛑 FX corretor (kty) is down

In e520a4d, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in b29c1da after 9 minutes.


text:
🛑 FX corretor (kty) is down

In 36d093c, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in c81ee70 after 6 minutes.


text:
🛑 FX corretor (kty) is down

In d5b9dd5, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in e21c78b after 6 minutes.


text:
🛑 FX corretor (kty) is down

In e7306cc, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in c1b8175 after 6 minutes.


text:
🛑 FX blog (kty) is down

In 86c92f4, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in ad57ae5 after 44 minutes.


text:
🛑 FX corretor (kty) is down

In 96a6405, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in c17adcc after 22 minutes.


text:
🛑 FX blog (kty) is down

In 70a3b4a, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in bb8583f after 7 minutes.


text:
🛑 FX blog (kty) is down

In 3f05082, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in 232ba27 after 6 minutes.


text:
🛑 FX corretor (kty) is down

In ba63004, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in f7050ed after 6 minutes.


text:
🛑 FX blog (kty) is down

In 859df35, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in 0afdf8f after 6 minutes.


text:
🛑 FX blog (kty) is down

In a63cae7, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in c6d5147 after 12 minutes.


text:
🛑 FX blog (kty) is down

In d35bf21, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in 5e2e6a6 after 6 minutes.


text:
🛑 FX net (kty) is down

In b2c60a2, FX net (kty) (https://foxter.net.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX net (kty) is back up in d9d2899.


text:
🛑 FX blog (kty) is down

In c81a40b, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in fee5a6a after 6 minutes.


text:
🛑 FX blog (kty) is down

In 025e57d, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in ee0e90f after 8 minutes.


text:
🛑 FX corretor (kty) is down

In 63d0be9, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in 43fc85b after 8 minutes.


text:
🛑 FX corretor (kty) is down

In 6edfe79, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in c288dd5 after 40 minutes.


text:
🛑 FX blog (kty) is down

In 2e129b8, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in dcc4a18 after 8 minutes.


text:
🛑 FX apps (kty) is down

In 00684d9, FX apps (kty) (https://foxter-apps.konecty.com) was down:

HTTP code: 404
Response time: 303 ms

Resolved: FX apps (kty) is back up in e9aa6ec.


text:
🛑 FX blog (kty) is down

In e31db79, FX blog (kty) (https://blog.foxterciaimobiliaria.com.br) was down:

HTTP code: 503
Response time: 354 ms

Resolved: FX blog (kty) is back up in 4287bf3 after .


text:
🛑 FX blog (kty) is down

In 46f9155, FX blog (kty) (https://blog.foxterciaimobiliaria.com.br) was down:

HTTP code: 503
Response time: 238 ms

Resolved: FX blog (kty) is back up in 947e71f after .


text:
proposal: adopt probot for issue management

At 1,937 issues, there are too many to manage effectively. I recommend adopting Stale for Probot as Travis CI has done.

https://blog.travis-ci.com/2018-03-09-closing-old-issues

It's a good idea!

authors: bootstraponline maxtaco

repo: keybase/client


text:
Web identity proof failure

I'm not seeing the web identity proof succeed for http://trevor.caira.com/keybase.txt (my username is toc).

OK Proof for trevor.caira.com failed: No server-given hint for sig=ac405d5580edfdc7f81c994a4c1303e160715489344f7f2be8fcb3a0314fd3d20f (code=306)

same.
Do you finalfy fix the problem ? and how to ?

authors: 5h4d0ww0lf jerome-diver trevorc


text:
--no-self-encrypt is not doing what I would expect

Hi there,
Maybe I'm missing something but I have the feeling that the --no-self-encrypt flag is doing nothing:
┌─[john]
└─▪ keybase encrypt --no-self-encrypt -i fixtures/hello.txt -o /tmp/hello.txt.enc chris
┌─[john]
└─▪ keybase decrypt -i /tmp/hello.txt.enc
Message authored by johnraz
Hey! Hello!!
┌─[john]
└─▪ keybase encrypt -i fixtures/hello.txt -o /tmp/hello.txt.enc chris
┌─[john]
└─▪ keybase decrypt -i /tmp/hello.txt.enc
Message authored by johnraz
Hey! Hello!!

I'm going to give the code a look but figured I would still post that here too.

Hi! Thanks for reporting this... I can reproduce it, and it is not the expected behavior.
The bug was probably introduced in the latest version, we are in a transition phase with respect to which keys are used to encrypt saltpack messages.
Will put in a fix for the next release.

Fixed! Thanks again for letting us know!

Splendid!

authors: AMarcedone johnraz


text:
I tried editing Chris's public files in Sublime Text and all I got was a crummy beach ball.

Probably very much expected, but wanted to log and place here.
Viewed @malgorithms's whoa it worked.txt file in Sublime Text using OS X. Added a new line and hit save, just because I hadn't done this and was curious what would happen.
Was prompted for my account credentials, went ahead because YOLO, and was presented with a spinning beach ball for about 3 minutes before I finally force quit Sublime Text.
my log id: 68c4f4f671e601a3a932061c

Hi @CameronBanga, thanks for the report.  Sublime acts very strangely with the file system.  We've run into similar problems before, though I've never seen the epic 3-minute beach ball.
As far as I can tell, when sublime sees that you don't have permissions to edit a particular file, it tries to run as root (hence being prompted for your account credentials), since of course root should be able to edit any file on the computer.  But in KBFS, that isn't the case -- not even root can edit someone else's public files.  So, when Sublime tries to edit the file as root, KBFS sends an error back.  Unfortunately, Sublime appears to just ignore all errors when in root mode.  At least, the last time I tested this, Sublime actually seemed to succeed when editing the file.  (I didn't get the beach ball, just a success.)
In your log, I see KBFS returning the correct error:
97426 2016-03-11T11:49:53.337099 ▶ [DEBU kbfs(FBO 7f4f5b66) folder_branch_ops.go:3542] 37f3 Truncate 0xc82ee5c820 0 [tags:FID=wugIXgBdSYtKInFGZMBYJA]
97427 2016-03-11T11:49:53.337821 ▶ [DEBU kbfs(FBO 7f4f5b66) folder_branch_ops.go:3543] 37f4 Done: cameron does not have write access to directory /keybase/public/chris [tags:FID=wugIXgBdSYtKInFGZMBYJA]
97428 2016-03-11T11:49:53.338602 ▶ [DEBU kbfsfuse file.go:113] 37f5 cameron does not have write access to directory /keybase/public/chris [tags:FID=wugIXgBdSYtKInFGZMBYJA]
97429 2016-03-11T11:49:53.338641 ▶ [DEBU FUSE serve.go:838] 37f6 -> [ID=0x9] Setattr error=permission denied: cameron does not have write access to directory /keybase/public/chris

After that, I see a bunch of periodic Access and some Getxattr calls to the file, but it doesn't look like KBFS ever hangs.  I guess Sublime is just really not happy about something, but hard to know what.  I suspect it just isn't coded to handle errors in root mode, and unpredictable things happen.
Sorry about the bad experience!  We should probably file a bug against Sublime at some point, if we can narrow it down a little more.

authors: CameronBanga strib


text:
Account appears to have been locked by Keybase staff

Hi, my keybase account @bitcoinmandem has suddenly been inaccessible for around 10 days now. I've tried logging in on all of my devices and using my paper key as well but every attempt to log back in has failed. I have been using this application a great deal over the past couple years, and if this is not resolved I will be losing many extremely important conversations and contacts. Please fix this issue, or at least let me know why this has happened.

Are you getting a 202 error 'bad session' and asking if your device is revoke?
If so, I am getting the same.

Yep, error 202 bad session on all devices, even when using the paper key - interestingly, I still receive an email that the paper key has been used whenever I attempt to log in

authors: RincewindTVD bitcoinmandem


text:
undefined: NullChatSyncer

When trying to install keybase client on a chromebook I get the following error:
baron@localhost ~/pkgs/go-path $ go get github.com/keybase/client/go/keybase
baron@localhost ~/pkgs/go-path $ go install -tags production github.com/keybase/client/go/keybase
github.com/keybase/client/go/libkb
src/github.com/keybase/client/go/libkb/globals.go:190: undefined: NullChatSyncer
It's a chromebook, ARM, running crouton with Ubuntu Yakkety.
baron@localhost ~/pkgs/go-path $ go version
go version go1.7.1 linux/arm

Sorry about this, we have a PR in the works.

Fixed in #6568. Thanks for the report.

Great, that works for me. Thank you for the quick response!

authors: maxtaco redshodan


text:
libkb: fix osx mount dir by joining it to the home dir

Issue: KBFS-2766

Merging without sloooow circle.


text:
add placeholder text type

Adds a new placeholder type so we can visualize gaps in chats

In order to test edit the go code:
diff --git a/go/chat/server.go b/go/chat/server.go
index 3484c3e270..55394fe816 100644
--- a/go/chat/server.go
+++ b/go/chat/server.go
@@ -71,15 +71,17 @@ var _ chat1.LocalInterface = (*Server)(nil)

 func NewServer(g *globals.Context, store *attachments.Store, serverConn ServerConnection,
        uiSource UISource) *Server {
+       delay := 10 * time.Second
        return &Server{
-               Contextified:  globals.NewContextified(g),
-               DebugLabeler:  utils.NewDebugLabeler(g.GetLog(), "Server", false),
-               serverConn:    serverConn,
-               uiSource:      uiSource,
-               store:         store,
-               boxer:         NewBoxer(g),
-               identNotifier: NewCachingIdentifyNotifier(g),
-               clock:         clockwork.NewRealClock(),
+               Contextified:      globals.NewContextified(g),
+               DebugLabeler:      utils.NewDebugLabeler(g.GetLog(), "Server", false),
+               serverConn:        serverConn,
+               uiSource:          uiSource,
+               store:             store,
+               boxer:             NewBoxer(g),
+               identNotifier:     NewCachingIdentifyNotifier(g),
+               clock:             clockwork.NewRealClock(),
+               remoteThreadDelay: &delay,
        }
 }

diff --git a/go/service/main.go b/go/service/main.go
index 933aeb8fc3..84c42e2183 100644
--- a/go/service/main.go
+++ b/go/service/main.go
@@ -350,14 +350,14 @@ func (d *Service) startChatModules() {
                uid := d.G().Env.GetUID().ToBytes()
                g := globals.NewContext(d.G(), d.ChatG())
                g.MessageDeliverer.Start(context.Background(), uid)
-               g.ConvLoader.Start(context.Background(), uid)
+               //g.ConvLoader.Start(context.Background(), uid)
                g.FetchRetrier.Start(context.Background(), uid)
        }
 }

 func (d *Service) stopChatModules() {
        <-d.ChatG().MessageDeliverer.Stop(context.Background())
-       <-d.ChatG().ConvLoader.Stop(context.Background())
+       //      <-d.ChatG().ConvLoader.Stop(context.Background())
        <-d.ChatG().FetchRetrier.Stop(context.Background())
 }

@keybase/react-hackers this is ready

cc: @mmaxim