Google Fonts like Overpass not correctly rendered

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
If I import Overpass from Google fonts, and set it as default font with createMuiTheme, text is rendered with an incorrect space below the text.
Expected Behavior 🤔
To work like Roboto, so for example in a button seeing the text aligned in the center.
Steps to Reproduce 🕹
I have created a codesandbox for this issue, that you can find here
https://codesandbox.io/s/unruffled-vaughan-zvwq9
Also a Stackoverflow quesiton to grab some inputs (so far no helps)
https://stackoverflow.com/questions/68190709/issue-with-font-rendering-on-browser
As you can see from the images, text is not aligned in the center, as it should be. There is no padding and line-height is correctly set. It's just the font that has extra space below.
Steps:

Import font in index.html

<link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link
      href="https://fonts.googleapis.com/css2?family=Overpass:ital,wght@0,100;0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap"
      rel="stylesheet"
    />

put it in createMuiTheme

export const theme = createMuiTheme({
    typography: {
      fontFamily: [
        'Overpass',
        '"Helvetica Neue"',
        'Arial',
        'sans-serif',
        '"Apple Color Emoji"',
        '"Segoe UI Emoji"',
        '"Segoe UI Symbol"',
      ].join(','),
      ...
    }
  })

Render a button, or two elements in a row flex box, and you will see that the align-items: center property doesn't align items in the center.

See https://codesandbox.io/s/unruffled-vaughan-zvwq9 for the error
Context 🔦
I cannot use common used fonts, such as Overpass or Benne
Your Environment 🌎
Issue first seen on Brave Browser ( Version 1.26.67 Chromium: 91.0.4472.114 (Official Build) (64-bit) ) but also reproduced on Chrome (latest), and Firefox (latest)

`npx @material-ui/envinfo`
  npx: installed 2 in 5.659s

  System:
    OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa)
  Binaries:
    Node: 14.17.1 - /usr/bin/node
    Yarn: 1.22.10 - /usr/bin/yarn
    npm: 6.14.13 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 89.0.2
  npmPackages:
    @material-ui/core: ^4.11.4 => 4.11.4
    @material-ui/icons: ^4.11.2 => 4.11.2
    @material-ui/styles:  4.11.4
    @material-ui/system:  4.11.3
    @material-ui/types:  5.1.0
    @material-ui/utils:  4.11.2
    @types/react: ^17.0.0 => 17.0.9
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
    styled-components: ^5.3.0 => 5.3.0
    typescript: ^4.1.2 => 4.3.2 ```
</details>

Thanks for the feedback.
This sounds like an issue with the font not Material-UI. Could you create a repro that compares Material-UI with a normal <button /> that's using the font?

Hi @eps1lon
What I did was trying to import Overpass from a different source than Google Fonts (see code here)
https://codesandbox.io/s/nervous-sanderson-villz
And it works. So appears to be a bug with the font files on Google Fonts. Pretty absurd, but looks like this.

And it works. So appears to be a bug with the font files on Google Fonts. Pretty absurd, but looks like this.

Thanks for the confirmation. Since this isn't actionable for us, I'm closing.

More info for who's interested: that's an issue of the Overpass font. If you clone their repo, fix is there. Not sure why they're not re-building the release, even if lots of people are asking for it ( https://github.com/RedHatOfficial/Overpass/issues/75 ). I think google fonts is just getting the latest release and not the actual files in the repo.


[ASR] Replace dist.spawn with dist.launch

对 ASR 和 ST 同时进行了修改，将 dist.spawn 多进程启动多卡训练方式改为了 dist.launch 的方式，为以后开发多机训练做准备。

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.root seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Document userns remapping

userns remapping and running privileged containers are incompatible:

docker: Error response from daemon: privileged mode is incompatible with user namespaces. You must run the container in the host namespace when running privileged mode.

It'd be nice to document that we're using userns remapping, and the privileged caveat, and that there is an option to disable it. I wasn't quite sure where and how this might belong in the README — any ideas @lox?

I am increasingly tempted to ditch user namespace remapping.

What is the point of user namespace remapping? Why is it enabled by default ?


KAFKA-6101 Reconnecting to broker does not exponentially backoff

For reconnection, share the nodeState if one exists.
Only update its state and lastConnectAttemptMs.

retest this please

Thanks for the PR. Can we please add a test?

I ran thru NetworkClientTest but the tests didn't exercise the code path I modified.
Suggestion on how to emulate the scenario is appreciated.

None of the clients tests references ClusterConnectionStates.
I can add a counter which is incremented in the if block below:
    public void connecting(String id, long now) {
        if (nodeState.containsKey(id)) {

Some test can assert that the counter is greater than one.
Is that acceptable for test ?

KafkaProducer doesn't expose getter for Sender.
Still looking for way(s) to access ClusterConnectionStates from test.

Ran the following using Java 8 which passed:
./gradlew -PscalaVersion=2.12 -Dtest.single=ResetIntegrationTest streams:test

Hi @tedyu, you are indeed right, there are no tests covering this code, however I'd argue that there should be. I've created some test cases in a pull request to cover the basic workings of this class as I understand it. I've left out a test for the code you fixed for now, as it'd fail anyway.
I've also created a pull request against your fork with the skeleton of the test class, so you should be able to add your test cases in there and everything should merge later on, regardless of the order it may be applied in.

Thanks, @soenkeliebau
Please give Sönke credit since the test came from him.

Hi @tedyu - I may have phrased my last comment badly, the test I referenced does not test proper backoff behavior but only the maximum backoff value, to test your code we need a test case that checks for the backoff to be within the proper range for a few reconnect attempts. I've sent you a new pull request with a proposal of how a test case like that could look.

retest this please

@tedyu, can you please rebase against trunk? Thanks.

Let me open a new PR.


Updated Spatial Awareness Parent Object Transform to fix teleporting

XRTK - Mixed Reality Toolkit Change Request
Overview
Parented the SpatialAwarenessParent under the playspace to ensure that the spatial mesh stays in the same place when teleporting
Target of the change:
Is this enhancement for:

Core (core framework, interfaces and definitions)

Changes:

Moved the Spatial Awareness system's root GameObject reference under the Playspace.

I've tested this on Magic Leap but not HoloLens yet.

Please don't merge until tested on HoloLens

Testing on HoloLens in a minute

@StephenHodgson tested on HoloLens, works as expected.


Mailtime not working when deployed

Mailtime is working on local but when I deploy using google appengine (nodejs standard environment) and mongodb atlas it doesn't work at all, no collection is created in mongodb.
What could be the cause of this?
Thanks

Hello @yusufola ,

Tell us what versions of nodejs, mongo, node-mongodb-native driver, and nodemailer you're on?
Does local dev environment matches your deployment?
With could computing (like Heroku, App Engine, Azure), e.g. everything not managed, dedicated, or virtual machine has no solid/continuous runtime, from google appengine docs:

Your instances with manual and basic scaling should run indefinitely, but there is no uptime guarantee. Hardware or software failures that cause early termination or frequent restarts can occur without warning and can take considerable time to resolve.

You might want to:

schedule cron task
use web-cron
pick environment with continuous runtime

@yusufola any news on your end?

Closed due to silence at issue owner end.
Feel free to reopen it in case if the issue still persists on your end.


QG X checks (Release 1.3.0)

QG checks
Please keep this issue open until QG X is concluded and will be managed by the Issue Creator!
We will inform you about finding and proposals in separated issues, this issue here is for the Overview of the Checks!
Please keep this issue open until QG4 is concluded!
Product Name:
Product Owner:
Dev SPOC:
Helm Chart Version:
App Version:
QG4 Approval: yes/no
TRG 1 Documentation
TRG 1.01
https://eclipse-tractusx.github.io/docs/release/trg-1/trg-1-1

[x] an appropriate README.md file

TRG 1.02
https://eclipse-tractusx.github.io/docs/release/trg-1/trg-1-2

[x] an appropriate INSTALL.md

TRG 1.03
https://eclipse-tractusx.github.io/docs/release/trg-1/trg-1-3

[x] an appropriate CHANGELOG.md

[x] the versioning itself follows semantic versioning

TRG 2 Git
TRG 2.01
https://eclipse-tractusx.github.io/docs/release/trg-2/trg-2-1

[x] default branch is named main

TRG 2.03
https://eclipse-tractusx.github.io/docs/release/trg-2/trg-2-3

[x] /docs directory contains detailed product related documentation for the Tractus-X product
[x] /charts directory contains the Helm chart for the Tractus-X product IF available
[x] AUTHORS.md file (optional)
[x] CODE_OF_CONDUCT.md file
[x] CONTRIBUTING.md file
[x] DEPENDENCIES file(s) with up to date content (Dash tool generated)
[x] LICENSE file
[x] NOTICE.md file
[x] SECURITY.md file

TRG 2.04
https://eclipse-tractusx.github.io/docs/release/trg-2/trg-2-4

[x] a Leading product repository
[x] repository name must be productname without prefix or suffix
[x] should contain the release
[x] references/urls to the product's other repositories
[x] might contain product helm chart
[x] README.md: contains the urls for the backend and frontend applications

TRG 2.05
https://eclipse-tractusx.github.io/docs/release/trg-2/trg-2-5

[x] .tractusx metafile is present in the root of the repository
[x] file has a proper format

TRG 3 Kubernetes
TRG 3.02
https://eclipse-tractusx.github.io/docs/release/trg-3/trg-3-2

[x] if data persistence is needed in Kubernetes the use of PersistentVolume and PersistentVolumeClaim resource

TRG 4 container
TRG 4.01
https://eclipse-tractusx.github.io/docs/release/trg-4/trg-4-1

[x] All images must be tagged following semantic versioning
[x] container is labeled correctly additionally to the latest tag

TRG 4.02
https://eclipse-tractusx.github.io/docs/release/trg-4/trg-4-2

[ ] must add a section to your top level README.md file, that contains information about the used base image
[ ] Java, Kotlin, ... if JVM based language use base image from Eclipse Temurin

TRG 4.03
https://eclipse-tractusx.github.io/docs/release/trg-4/trg-4-3

[x] image has USER command to specify a non-root user to run the container
[ ] deployment.yaml has runAsUser and allowPrivilegeEscalation: false properly set

TRG 4.05
https://eclipse-tractusx.github.io/docs/release/trg-4/trg-4-5

[ ] released image must be present on GitHub Package registry or Dockerhub

TRG 5 Helm
TRG 5.01
https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-01

[ ] Helm chart must be released
[ ] appropriate semantic versioning for version and appVersion has to be used in Chart.yaml
[ ] must not contain any environment specific values-xyz.yaml
[ ] values.yaml file must contain proper default values/placeholders
[ ] No hostname provided for ingress
[ ] Ingress is disabled
[ ] No references to any secret engine service (e.g.: Hashicorp Vault)
[ ] Dependencies should be prefixed with the nameOverride and/or fullnameOverride properties
[ ] Image tag is set to the Chart.yaml appVersion property
[ ] must be deployable to any environment without overwriting default values with a simple helm install command
[ ] dependencies have to be declared in Chart.yaml NOT requirements.yml

TRG 5.02
https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-02

[ ] Helm chart location inside Git repository in /charts directory
[ ] chart file structure

charts/
    chartNameA/
      Chart.yaml
      ...
    chartNameB/
      Chart.yaml
      ...
AUTHORS.md
DEPENDENCIES.md
LICENCE
README.md

[ ] each file must contain the Apache 2.0 Licence
[ ] latest tag is not used in helm chart be default

TRG 5.04
https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-04

[ ] CPU and memory limits and requests are properly set

TRG 5.06
https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-06

[ ] every startup configuration aspect of your application must be configurable through the Helm chart (ingress class, tls, labels, annotations, database, secrets, persistence, env variables)

TRG 5.07
https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-07

[ ] if dependencies are present in the Chart.yaml they are properly configured

TRG 5.08
https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-08

[ ] a product has a single deployable helm chart that contains all components (backend, frontend, etc.)
[ ] name of the Chart should be just the product-name without prefix or suffix
[ ] values file should contain all available variables (even from subcharts) with default values and comments about what they do
[ ] helm install command should successfully install the chart to any supported Kubernetes version cluster (without overwriting default values)
[ ] helm test runs without errors

Testing

[ ] installed and running on pre-prod without errors

Hints
Information Sharing

You can do chmod in your copy command: https://github.com/catenax-ng/tx-portal-frontend-registration/blob/main/.conf/Dockerfile#L28

You can hardcode things like the securityContext ( https://github.com/eclipse-tractusx/portal-cd/blob/main/charts/portal/values.yaml#LL587C1-L587C16 ) if you are sure that this is never needed. Makes the values.yaml smaller as this something normally no one needs to change escpeically because you already do what others might want to configure.

https://github.com/eclipse-tractusx/portal-cd/blob/main/charts/portal/templates/deployment-frontend-registration.yaml#L75 You need to split this up: One resources block per service. It doesn't make sense to configure cpu and memory for all pods (fe, backend and registration)

I extracted the helm resources hint into its own issue on portal-cd.
Please also see the hint on moving 'basically static stuff' out of the values.yaml.
Will close this now


Upgrades fail with 'No X with the name Y found', despite there existing X objects with Y name

Output of helm version:
Client: &version.Version{SemVer:"v2.8.2", GitCommit:"a80231648a1473929271764b920a8e346f6de844", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.8.2", GitCommit:"a80231648a1473929271764b920a8e346f6de844", GitTreeState:"clean"}

Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.2", GitCommit:"bdaeafa71f6c7c04636251031f93464384d54963", GitTreeState:"clean", BuildDate:"2017-10-24T19:48:57Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"9+", GitVersion:"v1.9.4-gke.1", GitCommit:"10e47a740d0036a4964280bd663c8500da58e3aa", GitTreeState:"clean", BuildDate:"2018-03-13T18:00:36Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.):
GKE, 1.9.4+
When running helm upgrade, I now frequently get errors like:
Error: UPGRADE FAILED: no ConfigMap with the name "egress-proxy-config" found

However, on inspecting the namespace, you'll see that the configmap does exist:
23:27 $ kubectl --context=gke_data8x-scratch_us-central1_staging-cluster-alpha --namespace=hub-alpha-01  get cm
NAME                  DATA      AGE
egress-proxy-config   1         15m
hub-config            33        5d

In the tiller logs, I see:
[tiller] 2018/03/29 06:24:48 warning: Upgrade "hub-alpha-01" failed: no ConfigMap with the name "egress-proxy-config" found

If I manually delete the configmap and re-run helm upgrade, it works.
I've run into this problem with configmap, secret and service account objects so far. They seem to occur randomly, but get stuck on a release once they do occur. This has screwed our CD pipeline, unfortunately :(

In #3791 I also had the same issues but with service accounts and roles.

I ran into this upgrading helm from 2.7.2 to 2.8.2 and became suspicious that it might be related to #2941 - multiple deployments marked as deployed, because helm ls showed multiple entries for the same deployment. After upgrading helm to 2.8.2, it no longer showed these, but sure enough in the tiller logs:
[kube] 2018/04/30 08:36:33 building resources from updated manifest
[kube] 2018/04/30 08:36:33 checking 80 resources for changes
[kube] 2018/04/30 08:36:33 Looks like there are no changes for Secret "hub-secret"
[kube] 2018/04/30 08:36:33 Looks like there are no changes for Secret "binder-secret"
[kube] 2018/04/30 08:36:33 Looks like there are no changes for ConfigMap "staging-grafana-dashs"
[kube] 2018/04/30 08:36:33 Looks like there are no changes for ConfigMap "staging-nginx-ingress-controller"
[tiller] 2018/04/30 08:36:33 warning: Upgrade "staging" failed: no ConfigMap with the name "proxy-patches-nginx-config" found
[storage] 2018/04/30 08:36:33 updating release "staging.v271"
[storage] 2018/04/30 08:36:33 updating release "staging.v419"

After running
kubectl edit configmap --namespace=kube-system staging.v271

to set status: SUPERSEDED (it was incorrectly marked as DEPLOYED) and running the upgrade again, it failed in the same way. On looking at the logs, it did the same thing, but with another duplicate release. Repeating twice, fixing the remaining configmaps for the wrong-state deployments resulted in a successful deploy.
So I think there's still something not quite right in 2.8.2's handling of the unclean state where multiple revisions have been marked as deployed, but at least cleaning up that state seems to resolve the issue.

I am getting the same issue with 2.9.1 despite the existing deployment running in that namespace.
Error: UPGRADE FAILED: no Namespace with the name "foo" found

Is there an update on this issue? I'm experiencing the same issue...

We are experiencing this issue, too.
It seems to happen with different types of resources (seen pods, services, ingresses), but for us only in one specific release, with two specific characteristics:

the release is is sometimes upgraded in parallel,
it has a post-install,post-upgrade hook (a job).

The failure then blocks any subsequent upgrades, also on other releases. Not sure if #4223 might workaround this issue.
Helm version is v2.9.0

+1 (happens with helm v2.8.2 and ConfigMap ... same example as the issue-starter had. and, with me also kubectl get configmaps <map_name> --namespace <namespace_name> gives the correct output)

Is there an update here?
I've encountered this a couple of times with 2.8.1, The first time it was caused because pods had failed to be deployed by kubernetes (no node had enough resources).  However I've encountered this error again today with no obvious cause.
Client: &version.Version{SemVer:"v2.8.1", GitCommit:"6af75a8fd72e2aa18a2b278cfe5c7a1c5feca7f2", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.8.1", GitCommit:"6af75a8fd72e2aa18a2b278cfe5c7a1c5feca7f2", GitTreeState:"clean"}

I believe this is a duplicate of https://github.com/kubernetes/helm/issues/1193, of which I think I've managed to find the behavior that causes this bug. Haven't heard of any good solutions to the problem so far, though.

long write-up on the bug's behavior and the attempted solutions can be found here: https://github.com/kubernetes/helm/pull/4223#issuecomment-397413568

dupe of #1193

--force option helped for me


Create sofean318816

This is how are pull requests handled by FreeRDP

Every new pull request needs to build and pass the unit tests at https://ci.freerdp.com
At least 1 (better two) people need to review and test a pull request and agree to accept

Preparations before creating a pull

Rebase your branch to current master, no merges allowed!
Try to clean up your commit history, group changes to commits
Check your formatting! A astyle script can be found at ./scripts/format_code.sh
Optional (but higly recommended)

Run a clang scanbuild before and after your changes to avoid introducing new bugs
Run your compiler at pedantic level to check for new warnings

To ease accepting your contribution

Give the pull request a proper name so people looking at it have an basic idea what it is for
Add at least a brief description what it does (or should do :) and what it's good for
Give instructions on how to test your changes
Ideally add unit tests if adding new features

What you should be prepared for

fix issues found during the review phase
Joining IRC #freerdp to talk to other developers or help them test your pull might accelerate acceptance
Joining our mailing list<EMAIL_ADDRESS>may be helpful too.

Please remove this text before submitting your pull!

4cef6a01dd0258861400778c9d0e3aa557391174


Custom Directives

Hi, I have a question ,how to make custom directive is this  posible?
Something like this:
Moon.directive('blue',(el) => {
  el.style.color = 'blue';
});

<p m-blue>{{title}}</p>

Yes, that is possible, refer to [the docs](http://moonjs.ga/api/global-api.html#-directive-]

Ahh, thanks for reporting the error! It was an issue with the compiler not generating correct code. Next time, use the developer version of Moon for a helpful error message.
This will be fixed in v0.11.0.

OK, Awesome project bro :+1:

Thank you! :smile:


Multiple dialogs support

Can I display more than one dialog at the same time?

@leslieharland was you able to show more than one dialog at the same time ?

This library does not allow multiple dialogs


Market Values are all immediately set to $0.04 upon opening settings

Hm. I'm sure it's due to one of my 775 other mods, but just incase it's obvious to you why this would happen and is an easy fix without me bisecting a 30-minute game-load ~7 times ...
... but when opening the settings for this mod (v1.3.6) and selecting, specifically, the "Market Value" tab; every single item in the list immediately drops down (animated) to $0.04 (and is, of course, marked 'green' because it's been modified.)
Hitting "Reset" resets them to vanilla ... after which they immediately zoom back down to $0.04.

Hard to say, Id look for any other mod affecting the market-value or prices of items.

Ran into this again, and didn't realize until halfway into the playthrough why all my quests were offering 6,000 steel as a reward, and my gold was worth cents on the dollar instead of $10. 😅
Finally bisected it down - it's an incompatibility. Modified the OP with more info. (=


ubsan fails with unsigned integer overflow

While running "make check" with ubsan (the undefined behavior sanitizer), the fuzzers are failing with:
/src/zlib-ng/adler32.c:91:19: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long')
/src/zlib-ng/adler32.c:136:19: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long')
/src/zlib-ng/arch/x86/deflate_quick.c:233:22: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned int'
/src/zlib-ng/arch/x86/fill_window_sse.c:52:28: runtime error: unsigned integer overflow: 1 - 8192 cannot be represented in type 'unsigned int'
/src/zlib-ng/inflate.c:972:32: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned int'

These seem false positives... in while loops 0 equals false and such stops the loop.

easy fix for the while loops.  The other two need more attention.

I assume the one in deflate_quick.c is caused by dist being 0... as such dist - 1 = -1, which can be avoided by testing if dist = 0 or (dist - 1) < (s->w_size - 1)...
fill_window_sse.c error is most likely caused by s->match_start being 1 ... so it needs to be rewritten as
s->match_start = (s->match_start >= wsize) ? s->match_start - wsize : 0;

s->match_start = (s->match_start >= wsize) ? s->match_start - wsize : 0;

After this change it started failing with
MemorySanitizer: use-of-uninitialized-value
    #0 0x4e8193 in fill_window_sse /src/zlib-ng/arch/x86/fill_window_sse.c:52:30

That stack trace is too short to deduct how to fix the issue... obviously match_start needs to be initialized when the struct is originally allocated.

Here is a longer trace:
    #0 0x4e8193 in fill_window_sse /src/zlib-ng/arch/x86/fill_window_sse.c:52:30
    #1 0x4e9254 in deflate_quick /src/zlib-ng/arch/x86/deflate_quick.c:220:13
    #2 0x4ad375 in zng_deflate /src/zlib-ng/deflate.c:951:18
    #3 0x49fef1 in test_large_deflate /src/zlib-ng/test/example.c:264:11
    #4 0x4a3232 in main /src/zlib-ng/test/example.c:536:5


Volume IO-size drilldown

Customer is requesting capability to look at IO profile (R/W etc) along with IO size (1k, 4k, 64 etc etc)

@jmg011 could you please take a look and answer the questions above?

Closing. We believe this is covered.
Please reopen with details if we missed anything


Demisto class docs

Status
In Progress
Related Issues
https://github.com/demisto/etc/issues/26399
Description
using Pydoc-Markdown to generate Demisto class docs out of demistomock.py
still working on the template and format of the article (need to add our header to it, improve markdown formatting, etc..)

Can we do the same with CommonServerPython ?

thats the plan

@Itay4 given that we want to also do commonserver and maybe also pwsh and JS in the future, I think it will be better to move the doc to the Reference section under the Articles.  When we get more stuff we can create a API Reference section.

Looks good.
You can use the following overview:

All Python integrations and scripts have available as part of the runtime the demisto class object. The object exposes a series of API methods which are used to retrieve and send data to the Cortex XSOAR Server.
Note: The demisto class is a low level API. For many operations we provide a simpler and more robust API as part of the  Common Server Functions.


[IOTDB-2010] fix incomplete show timeseries result

See: https://issues.apache.org/jira/browse/IOTDB-2010

Coverage increased (+0.03%) to 67.293% when pulling 3958b4063c4444ac17465fa273176e0e82271559 on cornmonster:fix/show_timeseries into c4d73e89cc413e73be5fac1f5325ba2515c51860 on apache:master.

Coverage decreased (-0.03%) to 67.231% when pulling 3958b4063c4444ac17465fa273176e0e82271559 on cornmonster:fix/show_timeseries into c4d73e89cc413e73be5fac1f5325ba2515c51860 on apache:master.

@JackieTien97 Hi, could u please help review this PR? Thanks!

@LebronAl Hi, could u please help review this PR? Thanks!


tf.keras.utils.plot_model no longer supports layers with list as output

tf.keras.utils.plot_model(model, show_shapes=True, to_file=file, show_layer_names=True)
In verstion 2.15.0 I had result like this

UnStack_7
input:
(None, 12, 4)

UnStackLayer
output:
[(None, 12,), (None, 12,), (None, 12,), (None, 12,)]

but with the 2.16.1 this error occurred
File ~/.local/lib/python3.10/site-packages/keras/src/utils/model_visualization.py:108, in make_layer_label(layer, **kwargs)
    106 shape = None
    107 try:
--> 108     shape = layer.output.shape
    109 except ValueError:
    110     pass

AttributeError: 'list' object has no attribute 'shape'

Is it possible to add a verification like
import collections
shape = layer.output.shape if not isinstance(layer.output.shape, collections.Iterable) else str([_.shape for _ in layer.output])

or

shape = str([_.shape for _ in x])[1:-1] if x.__class__ == list else x.shape

Do you have a code snippet to reproduce this?

not now but it was something like that (I will edit when I have the code)
class UnStackLayer(tf.keras.layers.Layer)
  def __init__(self, axis=-1, **kargs):
    super().__init__(**kargs)
    self.axis=axis
  def call(self, input)
    return tf.unstack( input, axis=self.axis)
)

class StackLayer(tf.keras.layers.Layer)
  ...

v = tf.keras.Input((12, 4), name = 'v')
us = UnStackLayer(name='us')(v)
tl = Danse(unit=12)
cl = Danse(unit=12)
t = tl(us[0])
x = cl(us[1])
y = cl(us[2])
z = cl(us[3])
v_= StackLayer(name='us')((t,x,y,z))
model = keras.Model(inputs=v, outputs=v_)
tf.keras.utils.plot_model(model, show_shapes=True, to_file=file, show_layer_names=True)

I was able to reproduce the issue with this code:
import keras

class SplitLayer(keras.Layer):
    def call(self, x):
        return list(keras.ops.split(x, 2, axis=1))

class ConcatLayer(keras.Layer):
    def call(self, xs):
        return keras.ops.concatenate(xs, axis=1)

inputs = keras.Input((2,))
a, b = SplitLayer()(inputs)

a = keras.layers.Dense(2)(a)
b = keras.layers.Dense(2)(b)

outputs = ConcatLayer()([a, b])
model = keras.Model(inputs, outputs)
keras.utils.plot_model(model, show_shapes=True, show_layer_names=True)

This is now fixed at HEAD.

Ok but is it also posible to add the posibility to show the input shape as now we can only see the output shape with show_shapes=True


docs: Add documentation for stages

This is in relation to the new stages feature being added.

Will be reviewed before next CLI released and merged after.


Ensure we have stats data stored in correct places

This is a placeholder ticket for our Statistics epic admin#849.
In order to facilitate the download of statistics data it is expected we will refine where our stats counts and reports are stored. We already have #419 to ensure diversity data is kept in our applicationRecords and we have #328 to ensure eligibility issues are also stored in the applicationRecord.
It is expected there will be additional changes/improvements needed.

No further changes needed at this time so closing this placeholder ticket


Support Newtonsoft.Json.JsonProperty fields

Such as Required, PropertyName, NullValueHandling. I don't know how to use other properties.

PropertyName is already suppoerted...

Support for Required makes sense...

I think NullValueHandling is not relevant for the schema..

https://github.com/NJsonSchema/NJsonSchema/commit/143ade60c301a180dce184c2d35637e546015216


Permanent Redirect caused by recent privacyIDEA installations

With current privacyIDEA installations, we see this in the IdP logs:

Host: privacyIDEA host
GET /token?user=test1
...
<< HTTP/1.1 308 PERMANENT REDIRECT
<< Location: privacyIDEA host/token/?user=test1

Note the slash "/" preceding the "?user=test" in the permanent Redirect.
This can be fixed by patching src/main/java/ca/ab/concordia/privacyIDEAtfa/piConnection.java: replace the occurences of "/token" with "/token/" (also note the trailing slash).

Thanks.  Fixed.


Care too big numbers

Currently, msgpack does not handle too big numbers.
It should treat as String, like: https://github.com/treasure-data/kafka-fluentd-consumer/commit/c7d1f72e2ab262401f43795d5fcfe33540bf62ec

Hmm, current implementation always treats Flume events as String (UTF-8).
No need to care about it.... :<


WIP: NIRISS APT interface

This is the first functional version that supports processing a basic NIRISS APT file (#73).
This needs careful review because many changes were made and I did not have an easy way to verify that they don't break the use for NIRCam.
Because NIRISS and NIRCam reference files are located in different locations and have different names, changes to the SimInput init method were made, which imply that mirage can only work on the observations of one instrument at the time (instrument can be 'WFSC', 'NIRCam', ' NIRISS').
If needed I can make the example driver script and the APT file available (eventually we want to have this as a test case).

I think it's good to get NIRISS working here, and then later we can think about APT files that include multiple instruments. For now, if there are multiple instruments, then all inputs should be generated by running the APT file through the code once for each instrument, right?
I can try running a NIRCam APT file using this branch and make sure the outputs look ok. I don't think I've ever generated an APT file with prime and parallel instruments, but assuming I can do that, I can test that case as well.

The answer to your question is yes.
It would be great if you test this branch in the way you suggest, which bridges the gap to the tests that Lauren is setting up (#64)

Yes, please send me that NIRCam APT file and I will fix that.

The NIRCam example files that Bryan gave me now pass successfully. Note that the fix does not yet include any NIRCam template other than the basic imaging one. I deferred additional changes until we decide if/how to restructure read_apt_xml.
@laurenmarietta if you want to keep the current structure of read_apt_xml for the time being, I am happy to implement the fix in all the read_template functions. However, this will be a blind change, as I don't have a way to test.

Even if currently only very basic modes of NIRISS are supported, I think this is ready to merge (from my side).
More advanced and complex use cases will be much easier to develop in new branches ones we have the test infrastructure set up.

Rebasing seemed overkill given the minor merge conflict. I resolved it by using the master branch code. I believe your changes to the master also solved the problem with identifying the WebbPSF library file for NIRISS. I will test this after the merge.


Make timeout durations configurable

Description
Different environments or tools might have different performance expectations for parts of the tool. In this case, frequent warnings about slowness do more harm than good.
Related Issues
Replace this paragraph with a list of issues related to this PR from our issue database. Indicate, which of these issues are resolved or fixed by this PR.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] My PR includes tests for all changed/updated/fixed behaviors (See Test Coverage).
[x] All existing and new tests are passing.
[x] I updated/added relevant documentation (doc comments with ///).
[x] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (Please read Handling breaking changes).
[x] No, this is not a breaking change.

cc @gamebox

This one is specifically for google3, since blaze is so :fire:

Just wanted to say thanks for this @jonahwilliams


Expiration time on oauth acess_token is incorrect

We have defined an oauth2 policy for an API:
{
"api_id": "2a47bd39-59dd-4a5c-918a-e3fd8ab99c40",
"id": "42f54ebf-d772-4617-ad18-2e9bdfbe1010",
"created_at":<PHONE_NUMBER>000,
"enabled": true,
"name": "oauth2",
"config": {
"mandatory_scope": true,
"token_expiration": 7200,
"enable_implicit_grant": true,
"scopes": [
"basic",
"extended",
"full"
],
"hide_credentials": false,
"enable_password_grant": false,
"accept_http_if_already_terminated": false,
"provision_key": "2c731c2439da46a5961ba7c0ed6b4ae1",
"enable_client_credentials": false,
"enable_authorization_code": true
}
},
The default expiration_time applies.
Later when we grant a user, using implicit grant, the access_token never expires. When we verify this (on the http://konggateway:8001/oauth2_tokens) we see:
{
  "scope": "basic extended full",
  "access_token": "9a0e511ceae94d6889ef2cfa4710377e",
  "authenticated_userid"<EMAIL_ADDRESS>  "id": "f3f493fd-a793-44ef-9efe-08c0c1ae6670",
  "token_type": "bearer",
  "credential_id": "948d1c0c-caab-4833-a809-9406690b76cf",
  "created_at":<PHONE_NUMBER>000,
  "expires_in": 0
},

When we look in the source code:
(in access.lua, oauth2 plugin)
-- TODO: Expire token (using TTL ?)
local function generate_token(conf, credential, authenticated_userid, scope, state, expiration, disable_refresh)
local token_expiration = expiration or conf.token_expiration
local token, err = dao.oauth2_tokens:insert({
credential_id = credential.id,
authenticated_userid = authenticated_userid,
expires_in = token_expiration,
scope = scope
})
Should it work? I notice that 'expires_in = token_expiration', and in our case it's 0 even if we added 7200 as default to the Oauth2 policy on the API.
thank you in advance

Some additional info, in the RFC for OAuth2 - implicit grant:
expires_in
RECOMMENDED.  The lifetime in seconds of the access token.  For
example, the value "3600" denotes that the access token will
expire in one hour from the time the response was generated.
If omitted, the authorization server SHOULD provide the
expiration time via other means or document the default value.
Can we assume the expiration time is always 0 for this profile?

This was a bug and has been closed. Expect the fix to be shipped in the next release.

thanks!


Project description has a typo in "python"

It reads pyhton currently.

Thank you @dwvisser, It is fixed :)


Created Contribution.md

Do check other contribution guide. ref:-  https://github.com/HubGenixx/Ignite

@kartikbh6614 are you working on #9 ?


Fetch economy currency sign from Vault/other provider in messages

Hey, would be nice to have it in order not to hard-code it in messages 🙂.

Added in the next update 👍

As for the other/custom provider, I won't be able to get the variables, since I would need to import other packages.
I made it non-hardcoded, so you can change the {CURRENCY} value to your wishing.


Added Edith Clarke to techwomen.json as entry no. 6 - Hacktoberfest

When I cloned the repo, there were five entries so I labeled this entry with id 6.
There was nothing about Edith Clarke in the Britannica (!).
Sorry, forgot to mention: I am participating in Hacktoberfest, have added that

Thanks for contributing. PR #9 👍


Cordova can't read files with FileRead

I'm using JavaScript's FileReader API to try to get the blob of a file inside a Cordova application.
My code is like the example below:
originalLocation = 'content://com.android.externalstorage.documents/document/primary%3ADownload%2F1671641692909.jpg';

window.FilePath.resolveNativePath(originalLocation, function (newFilepath) { resolveFilePath(newFilepath) });

function resolveFilePath(location) {
    window.resolveLocalFileSystemURL(location, function (fileEntry) {

        fileEntry.file(function (file) {

            let reader = new FileReader();

            reader.onload = function (event) {
                console.log(reader.result);
                console.log(event);
            }
            reader.onloadstart = function (event) {
                console.log(reader.result);
                console.log(event);
            }
            reader.onloadend = function (event) {
                console.log(reader.result);
                console.log(event);
            }
            reader.onprogress = function (event) {
                console.log(reader.result);
                console.log(event);
            }
            reader.onerror = function (event) {
                console.log(reader.result);
                console.log(event);
                const error = reader.error;
                console.log(error);
            }
            reader.onabort = function (event) {
                console.log(reader.result);
                console.log(event);
            }
            console.log(file);
            reader.readAsArrayBuffer(file);
        });
    });
}

<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
       <application requestLegacyExternalStorage="true" />
</edit-config>

<preference name="AndroidExtraFilesystems" value="files,files-external,documents,sdcard,cache,cache-external,assets,root" />
<preference name="AndroidPersistentFileLocation" value="Internal" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />

When reading an image, the API works correctly, obtaining the content, but with files that are not images, the FileReader's onerror event always returns the message "FileError {code: 1}". I already tried to read using all possible ways (readAsArrayBuffer, readAsBinaryString, readAsDataURL,readAsText).
The location of files on the smartphone.

Image before resolveLocalFileSystemURL: content://com.android.externalstorage.documents/document/primary%3ADownload%2F1671641692909.jpg
Image after resolveLocalFileSystemURL: file:///storage/emulated/0/Download/1671641692909.jpg - Success
File before resolveLocalFileSystemURL: content://com.android.externalstorage.documents/document/primary%3ADownload%2FExample.pptx
File after resolveLocalFileSystemURL: file:///storage/emulated/0/Download/Example.pptx - Error

What could possibly be happening?
Environment, Platform, Device
Android 12 - Samsung A 53
Version information
Cordova: 11.1.0
Cordova-Android:  10.1.2
Checklist

[X] I searched for existing GitHub issues
[X] I updated all Cordova tooling to most recent version
[X] I included all the necessary information above

"FileError {code: 1}".

This is the error code for file not found, which may be returned by the underlying filesystem API even if the file exists but your app doesn't have permission to read it.
Some files that are in external storage are not readable via filesystem APIs as of API 29. Also note that is obsolete (and ignored) when targeting API 30 or later as the scoped storage rules are enforced. Scoped storage in API 29 devices specifically had no filesystem API, thus it is impossible to read external storage files using this plugin.
Files that are not owned by your application usually needs to go through SAF (Storage Access Framework), which is a non-filesystem like API so it's not implemented as part of this plugin.
Generally speaking this plugin works best for internal storage, or external storage operations where you only read/write files that you control.
I don't use external storage in my apps so I don't have extensive experience, but if you need to access files that aren't owned by your application, then I'd try giving SAF plugin a try, such as cordova-plugin-saf-mediastore (not an endorsement, just picked a random one from NPM search)

The files I'm trying to open are on the device itself and not on external storage.
These files were downloaded via browser.
The strange thing is that only images are successfully read, any other file in the same folder as the images generates the error.
And all files are in content://com.android.externalstorage.documents/document/primary:Download/
I don't know if it could be the filepicker I use to choose the files that generates a wrong address.
I still use this one though:
https://www.npmjs.com/package/cordova-plugin-filechooser

The files I'm trying to open are on the device itself and not on external storage.

Android has 2 storage mediums, internal and external storage. Both can be on the device. External storage are generally attached to an SD card (will have a /sdcard/... path, however most devices will also emulate external storage if the sdcard is not present, or not supported (generally uses a /storage/emulated/0/... path).
So a filepath like file:///storage/emulated/0/Download/1671641692909.jpg tells me that you're working with external storage, and thus Scoped Storage rules applies.
Documents have stricter rules than media files, so if the app has READ_EXTERNAL_STORAGE permission granted (and this plugin will request it when appropriate), you may read media off the external storage (subject to permissions set my the app who wrote that media file). However, I don't READ_EXTERNAL_STORAGE applies to document files, such as those that are generally found in Downloads/ or otherwise. I believe the only way to read document files is via the native MediaStore APIs which the file plugin does not implement (they aren't really friendly to file-like API cause they don't really share the same concepts). This is also kinda further enforced that in API 33 and later READ_EXTERNAL_STORAGE becomes obsolete in favour of 3 new permissions, READ_MEDIA_IMAGES, READ_MEDIA_AUDIO, READ_MEDIA_VIDEO, however there is no explicit READ` permission for documents.
This is why I suggested something like https://www.npmjs.com/package/cordova-plugin-saf-mediastore which contains APIs like readFile(uri:string):Promise<ArrayBuffer>, so the plugin not only provides the way to choose files via MediaStore & the file picker, but to also read and get the contents of the files, or write/overwrite... whereas https://www.npmjs.com/package/cordova-plugin-filechooser looks like only allows you to select files and returns a content URL, which thie cordova-plugin-file can only use if it leads to a file that is readable using filesystem APIs.

Thanks @breautek ,
The use of this plugin allowed reading the ArrayBuffer of the file in question.

Hi there,
This post has lot of usefull informations.
Just wanting to add a bunch of infos:

https://github.com/customautosys/cordova-plugin-saf-mediastore work as expected (see later for details on various SDK version specs, the only thing in my configuration (cordova android@12) was to add implementation "androidx.documentfile:documentfile:1.0.1" to "build.gradle (:app)" on "dependencies {" section

SAF Mediastore it's made to work as "standalone": You need to use a file picker or another user initiated action for obtaining an content URI wich contain the correct authorization (read/write etc). This mean that You can use this plugin in combination with a "sharing" intent, if Your app it's configured for opening a specific file type this works pretty well thus on SDK 33 You will need to use SAF Mediastore as well for getting the content URI

Tested on these SDK's on emulators and real devices (targetSdkVersion 33):
SDK V 24 - 28 (Android 7.0-9.0): use standard cordova-plugin-file as usual the plugin SAF Mediastore does not work correctly
SDK V 29 - 32 (Android 10.0-12.0): use SAF Mediastore only or mixed SAF Mediastore (to get the arraybuffer) and then use cordova-plugin-file to write the blob from file
SDK V 33 (Android 13.0): use only SAF Mediastore
In AndroidManifest.xml i've modified a little reading and writing permissions:

Thanks!
Rob

How could I get the correct content-URI for "ile:///storage/emulated/0/Pictures/cpcp_capture_65e7de6f.jpg"?
I installed the saf-medidastore plugin but I still dont get it to work yet.
I appreciate any help, thank youu!

Hi there, This post has lot of usefull informations.
Just wanting to add a bunch of infos:

https://github.com/customautosys/cordova-plugin-saf-mediastore work as expected (see later for details on various SDK version specs, the only thing in my configuration (cordova android@12) was to add implementation "androidx.documentfile:documentfile:1.0.1" to "build.gradle (:app)" on "dependencies {" section
SAF Mediastore it's made to work as "standalone": You need to use a file picker or another user initiated action for obtaining an content URI wich contain the correct authorization (read/write etc). This mean that You can use this plugin in combination with a "sharing" intent, if Your app it's configured for opening a specific file type this works pretty well thus on SDK 33 You will need to use SAF Mediastore as well for getting the content URI

Tested on these SDK's on emulators and real devices (targetSdkVersion 33):
SDK V 24 - 28 (Android 7.0-9.0): use standard cordova-plugin-file as usual the plugin SAF Mediastore does not work correctly SDK V 29 - 32 (Android 10.0-12.0): use SAF Mediastore only or mixed SAF Mediastore (to get the arraybuffer) and then use cordova-plugin-file to write the blob from file SDK V 33 (Android 13.0): use only SAF Mediastore
In AndroidManifest.xml i've modified a little reading and writing permissions:
Thanks! Rob

How did you get the saf-mediastore plugi nto work?
I struggle getting the right folder path to use for "getUri". I only have a file-URI: "file:///storage/emulated/0/Pictures/cpcp_capture_65e7de6f.jpg". This is basically the Pictures folder but I have no clue how to get thsis path to work with the plugin

@MauriceFrank use the readFile function

var arrayBuffer = await cordova.plugins.safMediastore
.readFile(contentUri)
// find a function to convert to base64 online
var base64Result = _arrayBufferToBase64(arrayBuffer);
var uploadFileName = await cordova.plugins.safMediastore.getFileName(contentUri)
var params = new Object();
params.data = base64Result;
params.filename = fullFileName;
var contentUri = await cordova.plugins.safMediastore
.writeFile(params)

How to use both standard cordova-plugin-file and SAF Mediastore together.
I mean how to make cordova-plugin-file work with SDK 24 to 28 and Mediastore work with SDK 29 and later, both in the same app?

@oudoken How to use both standard cordova-plugin-file and SAF Mediastore together. I mean how to make cordova-plugin-file work with SDK 24 to 28 and Mediastore work with SDK 29 and later, both in the same app?

The native Mediastore API has been a concept since API 1, while specific features might require higher API levels, the general API should be usable across all API devices. MediaStore was always the recommended/preferred approach over direct filesystem access, it's just being enforced now since API 29 (generally speaking).
You could do version tests (should be able to get the API/android version from the cordova-plugin-device) and conditionally use the file plugin on API 24-28, and SAF plugin on API 29+ but personally I'd simplify the logic and use SAF plugin across all android versions, not just for API 29+.

@El-Tommy ,
Sorry to post this here, but I'm kinda lost since there are no examples or further documentation about cordova-plugin-saf-mediastore on its repository. I have the same target as you, to read the content of a file chosen by the user and the file plugin stopped working on cordova 12.
I got to prompt the file chooser with it and get the file's URI, but the readFile function just throws an "Uncaught" on the console without any information.
Could you share your example of how to use this function?

@etcho,
pt-BR: Eu vou postar todo o meu código desde a parte que o app dispara a escolha de arquivos. Dependendo do local ou gerenciador de arquivos usados no Android, ele pode apresentar problema. É uma confusão.
en-US: I'm going to post all my code from the part where the app triggers the choice of files. Depending on the location or file manager used on Android, it may have problems. It's a mess.
fileChooser.open($scope.selectFileAndUpload, error);

$scope.selectFileAndUpload = function (data) {
    var location;

    if (data.url === undefined) {
        location = data;
    } else {
        location = data.url;
    }

    if (location.indexOf('content://') === 0) {

        window.FilePath.resolveNativePath(location, function (newFilepath) {
            resolveFilePath(newFilepath);
        }, function (error) {
            if (error.code === 0) {
                console.log('Não foi possível ler este arquivo.')
            } else if (error.code === 1) {
                console.log('Problema no Google Drive.',)
            }
        });
    } else {
        resolveFilePath(location);
    }

}

function resolveFilePath(location) {
    window.resolveLocalFileSystemURL(location, function (fileEntry) {

        fileEntry.file(function (file) {

            let fileType = file.type;

            let reader = new FileReader();

            reader.onloadend = function (e) {
                let imgBlob = new Blob([this.result], { fileType });

                $scope.filesToUpload.forEach(element => {
                    if (element.url === location) {
                        element.blob = imgBlob;
                    }
                });

            }

        }, function () {
            console.log('Ocorreu um erro ao ler o arquivo.');
        });
    }, function (e) {
        console.log('Ocorreu um erro ao ler o arquivo.');
    });
}

@El-Tommy,
You just saved my life. I had to install cordova-plugin-filepath. Maybe all I needed was this, I'm not sure. Now with this plugin installed and adapting your code, the permission to access the file system is prompted before the file reading, which my previous code didn't do.
Thank you very much.
PS: se vc for BR, vlw mais ainda.

@etcho
You are welcome.
Because of this, we ended up changing the apps language to Flutter. Lots of headaches with Cordova.
Ps.: Sim, totalmente BR.

when i use cordova-plugin-saf-mediastore, i got new issue..

and this is my code :
function getDocValue()
{
window.fileChooser.open(contentURI => {
console.log(JSON.stringify(contentURI));
  var uriParams = {
    folder: 'Documents',
    filename: 'example.pdf'
};
  cordova.plugins.safMediastore.getUri(uriParams).then(function(uri) {
	if (uri) {
		console.log('File URI:', uri);

		// Example parameters for writeFile function
		var writeParams = {
			uri: uri,
			content: 'Hello, world!'
		};
	}
})
});

}


package.json exports should have types entry I guss..

When importing 'ts-jose' package, types does not work in VS Code.
import {} from 'ts-jose'

Typescript shows error on hover:

Could not find a declaration file for module 'ts-jose'. '/home/mk/github/lib/auth/node_modules/ts-jose/dist/mjs/index.js' implicitly has an 'any' type.
There are types at '/home/mk/github/lib/auth/node_modules/ts-jose/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'ts-jose' library may need to update its package.json or typings.ts(7016)

Updating package.json with:
{
  "exports": {
    "types": "./dist/index.d.ts",
    "import": "./dist/mjs/index.js",
    "require": "./dist/cjs/index.cjs"
  }
}

solves the problem.

fixed in the commit as above shown but the new package only update after new jose release
If you need a new bump to use, tell me.


Support exporting resources from kam

Is your feature request related to a problem? Please describe.
kubectl and oc have deprecated and removed the --export option. In OpenShift it's common to use tools like oc new-app or odo to bootstrap an application. However when you want to GitOps the application you need to export those resources and remove all of the cruft (managedFields, status, etc) from the result.
It would be nice if kam could handle exporting resources and even nicer if kam could do it based on the schema for the selected object to export only the relevant fields.
Describe the solution you'd like
Exporting to pure yaml at a minimum would be very useful but being able to bootstrap resources to a kustomize base or a helm chart would be totally awesome as well.
Describe alternatives you've considered
Using a bash script which pipes the resource through yq to strip unneeded fields.

/assign

We could consider how https://github.com/itaysk/kubectl-neat works (which is a plugin for kubectl to do this).


XSS vulnerable

https://marmelab.com/admin-on-rest/Authentication.html

Tip: It’s a good idea to store credentials in localStorage, to avoid reconnection when opening a new browser tab. But this makes your application open to XSS attacks, so you’d better double down on security, and add an httpOnly cookie on the server side, too.

How does this make the application vulnerable to XSS? The linked article explains React avoids XSS vulnerabilities by not manipulating the DOM directly.

Because any XSS vulnerability lets the attacked execute JS on the page, and grab credentials from localStorage.
The formulation may be misleading. What it should say is: if your application is open to XSS attacks, storing credentials in localStorage makes intrusions catastrophic.

Thanks for clearing it up for me! :)


Normalization

Need all the normalization algorithms

We need to first look at rfc396 and see what the spec says. And we can look at other libraries to see what they do. We can collect the notes here.


There is truncated text in the faliing text for valid_glyphnames

Observed behaviour
When running
fontbakery check-universal -c com.google.fonts/check/valid_glyphnames -n jam8.ttf

and the check fails I see
    * FAIL: The following glyph names do not comply with naming conventions: .version and

 such as the special character ".notdef". The glyph names "twocents", "a1", and "_" are all valid, while "2cents" and ".twocents" are not. [code: found-invalid-names]

Expected behaviour
The text starting "such as the special" appears from the middle of nowhere. It's in the source code like that too.
I did some digging and found that the longer and more useful has been (accidentally?) cropped in a change earlier this year: https://github.com/googlefonts/fontbakery/commit/294c3d3ddc0a632119477db7cf041b6597dfdcb5#diff-b713212316016e2c07a81da38641522c
Resources and exact process needed to replicate
This version of my jam8.ttf file shows this bug: https://gitlab.com/drj11/jam8/-/blob/931d961c90297803cf7035ac3523a6b122bca39d/jam8.ttf

thanks!


Suggest a New Feature

Description
Change of the "Feedback" section to "Suggest a New Feature" section, emphasizing feature suggestions on GitHub.

Approved, not merging as tests haven't run yet, but feel free to once they do


Add self hosted runner

a worker token can be obtained via
 curl -X POST -H "Authorization: Bearer $PAT" https://api.github.com/orgs/PTB-MR/actions/runners/registration-token | jq -r '.token' (PAT is a personal access token)

@schuenke @ckolbPTB
This seems to work with our proxy. The worker is currently running on e....30.
As long as we don't need artifacts etc that would require access to domains blocked by our firewall.
I am currently for testing using the latest mrpro image as base, so no cuda driver.
Also, we should decide when we run this. either only triggered via a comment by a maintainer or only after the merge to main.
And only approved workflows should be allowed to run on the self-hosted worker (setting in the organisation/settings/actions/worker pane)
It should not be possible to make our worker run code via forking without us approving it. We don't want to provide a crypto miner ;)


feat: add a new pipeline to parse nginx log

Add a complex pipeline example

Do we need to modify the data source?

Do we need to modify the data source?

Do you want to create a real nginx log source ？

Yes, can we change the python script to produce some randomized log input in nginx log format (and randomized metrics as well)? It would be great to keep this demo lean while diverse in data.

Generating a real Nginx log with Nginx is not a problem. The main problem is writing the Nginx log to Kafka. This may require an additional component. Using an existing vector to read the file is not a problem, but it is a bit more complicated.


Missing git installation in "Setup your machine" section

Git installation and configuration is missing in the "Setup your machine" section.
Just in case git is not installed cloning of the generator will fail because it is a core requirement for Yeoman.

We do not have generator source code available. You shouldn't be needing to install git unless you are using it as your version control system.

Yeoman lists it as a prerequisite before you install yeoman.
In fact I know many scenarios where packages will be directly fetched from github that eventually fail without git.
For this it does't matter if you have published your source code or not.

That requirement listed on that page is if you want to build your own generator, which is not the case, right?

To use the generator, you do not need git. I would like to know more which component of yeoman requires that.

First there is no QA involved in NPM. You can publish there whatever you want. An no one will check what you pulish there.
Second you can add depenedecies to git repositories directly to package.json and you will never know when this happens nor can guarantee that this will not happen. In this case parts of a package will be downloaded directly from github and not from NPM.
It is valid in NPM packages.
You can simply try it out using the trash-xyz-stfbauer.
You can simply install it with
npm install trash-xyz-stfbauer
and will install express via github and not via NPM.
Sometimes you are unable to download directly from NPM in this case also the github url will be used based on the information available in the package.json.
To guarantee everthing is working in most cases you should have git installed even if you don't use it for your development.

Would adding an entry to the Optional Tools section w/ a description of why it is useful?   We've gotten a fair amount of feedback on the list of pre-reqs, so we've been attempting to pare them down to the minimum.

Updated machine setup docs.


different inputs cannot go through the same embedding layers in a graph.

Hi. all.
I have a problem to make different inputs go through the same/shared embedding layer. Is there any good workaround?
'''
shared_embedding_layer = Embedding(max_features, embedding_size, weights=[W2V], W_regularizer=l2(50.), mask_zero=False)
graph = Graph()
graph.add_input(name='input1_story', ndim=3, dtype='int64')  # story_input: nb_story * nb_sentence * nb_words
graph.add_input(name='input2_question', ndim=2, dtype='int64')  # question_input:  nb_story*4 * nb_words
graph.add_node(shared_embedding_layer, name='story_word_embedding',
input='input1_story')  # nb_batch * nb_sentence * nb_words * embedding_size
graph.add_node(shared_embedding_layer, name='question_word_embedding', input='input2_question')
'''
The problem is if you use a shared_embedding_layer, shared_embedding_layer.previous will change.
But I also don't want to multiple embedding with the same weights.
Thanks

@fchollet Can you give some suggestion to the above problem?

Sure. Instantiate your two Embeddings, then on the second one, set embed2.params = embed1.params. Then add them to your network.
You're creating two embeddings with shared weights.
(Untested, let me know if it worked).

This is interesting. If you set x1.params = x2.params you're forcing them to share the weights?
Because they will point to the same memory space? The params won't just get copied over and things trained separately?

Thinking about it, the real solution would be a tad more involved. You would also have to set the weights pointer of the new Embedding to be the same as that of the old Embedding (otherwise your new Embedding would have different weights, and they would never be trained).
embed2.W = embed1.W
embed2.params = embed1.params

Basically, you only want one Theano tensor underlying the operations of both layers.

In case someone searches for this (like I did), here's a worked-through example that seems to work:
dense_dim_1 = 10
dense_dim_2 = 1

model = Graph()
model.add_input(name='x1',input_shape=(d,))
model.add_input(name='x2',input_shape=(d,))
model.add_input(name='x3',input_shape=(d,))

D11 = Dense(dense_dim_1, activation='relu')
D12 = copy.deepcopy(D11)
D12.params = []
D13 = copy.deepcopy(D11)
D13.params = []

model.add_node(D11,name='D11', input='x1')
model.add_node(D12,name='D12', input='x2')
model.add_node(D13,name='D13', input='x3')

model.add_node(Dense(dense_dim_2, activation='relu'),
               name='dense_merge', merge_mode="concat",
               inputs=['D11','D12','D13'])

model.add_output(name='output', input="dense_merge")

rmsprop = RMSprop(lr=0.001)
model.compile(optimizer=rmsprop, loss={"output": 'mse'})

data = {'x1':X1, 'x2':X2, 'x3':X3, 'output':y}
model.fit(data)

Hi Sergey.
I don't think this is going to work. Since you are using deep copy, D12
will have its own parameters, which will be constant.
But the parameters in D11 can update.
BTW, you don't have to set D12.params = [], you can set .trainable =
False.
On Thu, Oct 29, 2015 at 6:56 PM, Sergey Feldman<EMAIL_ADDRESS>wrote:

In case someone searches for this (like I did), here's a worked-through
example that seems to work:
dense_dim_1 = 10
dense_dim_2 = 1
model = Graph()
model.add_input(name='x1',input_shape=(d,))
model.add_input(name='x2',input_shape=(d,))
model.add_input(name='x3',input_shape=(d,))
D11 = Dense(dense_dim_1, activation='relu')
D12 = copy.deepcopy(D11)
D12.params = []
D13 = copy.deepcopy(D11)
D13.params = []
model.add_node(D11,name='D11', input='x1')
model.add_node(D12,name='D12', input='x2')
model.add_node(D13,name='D13', input='x3')
model.add_node(Dense(dense_dim_2, activation='relu'),
name='dense_merge', merge_mode="concat",
inputs=['D11','D12','D13'])
model.add_output(name='output', input="dense_merge")
rmsprop = RMSprop(lr=0.001)
model.compile(optimizer=rmsprop, loss={"output": 'mse'})
data = {'x1':X1, 'x2':X2, 'x3':X3, 'output':y}
model.fit(data)
—
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/783#issuecomment-152350985.

--
Jeff Ye.

Hi. Francois.
For layers that only very few parameters, we can just do embed2.W =
embed1.W, but what if I want to share parameters for gru or lstm for
different inputs?
On Thu, Oct 8, 2015 at 1:14 PM, François Chollet<EMAIL_ADDRESS>wrote:

Thinking about it, the real solution would be a tad more involved. You
would also have to set the weights pointer of the new Embedding to be the
same as that of the old Embedding (otherwise your new Embedding would have
different weights, and they would never be trained).
embed2.W = embed1.W
embed2.params = embed1.params
Basically, you only want one Theano tensor underlying the operations of
both layers.
—
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/783#issuecomment-146627655.

--
Jeff Ye.

Ah, interesting. How would you recommend I do it then?
On Tue, Nov 10, 2015 at 3:05 PM, Jeffery Ye<EMAIL_ADDRESS>wrote:

Hi. Francois.
For layers that only very few parameters, we can just do embed2.W =
embed1.W, but what if I want to share parameters for gru or lstm for
different inputs?
On Thu, Oct 8, 2015 at 1:14 PM, François Chollet<EMAIL_ADDRESS>
wrote:

Thinking about it, the real solution would be a tad more involved. You
would also have to set the weights pointer of the new Embedding to be the
same as that of the old Embedding (otherwise your new Embedding would
have
different weights, and they would never be trained).
embed2.W = embed1.W
embed2.params = embed1.params
Basically, you only want one Theano tensor underlying the operations of
both layers.
—
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/783#issuecomment-146627655.

--
Jeff Ye.
—
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/783#issuecomment-155596209.

I would do a copy.copy(a_layer), but still ugly. But I don't want to change
the core of keras.
On Tue, Nov 10, 2015 at 8:08 PM, Sergey Feldman<EMAIL_ADDRESS>wrote:

Ah, interesting. How would you recommend I do it then?
On Tue, Nov 10, 2015 at 3:05 PM, Jeffery Ye<EMAIL_ADDRESS>wrote:

Hi. Francois.
For layers that only very few parameters, we can just do embed2.W =
embed1.W, but what if I want to share parameters for gru or lstm for
different inputs?
On Thu, Oct 8, 2015 at 1:14 PM, François Chollet <
<EMAIL_ADDRESS>
wrote:

Thinking about it, the real solution would be a tad more involved. You
would also have to set the weights pointer of the new Embedding to be
the
same as that of the old Embedding (otherwise your new Embedding would
have
different weights, and they would never be trained).
embed2.W = embed1.W
embed2.params = embed1.params
Basically, you only want one Theano tensor underlying the operations of
both layers.
—
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/783#issuecomment-146627655.

--
Jeff Ye.
—
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/783#issuecomment-155596209.

—
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/783#issuecomment-155621213.

--
Jeff Ye.

Hi @jeffzhengye
That doesn't seem to work if a_layer is the first layer of your network. The issue seems to be the input variable: if a is an Embedding layer (for example), and b = copy.copy(a), then b.input is the same as a.input and this messes up the data input.
I think the right thing to do is to set b.input = K.placeholder(a.input_shape) after calling copy.
 Are all copies of the weights stored? Does the model architecture serialize correctly with model_to_json if you do this trick?
I tried to implement this idea, but got:
AttributeError: 'Embedding' object has no attribute 'W'

Hi, is there any update on this post?
I failed to run this command embed2.params = embed1.params, which showed embedding layer do not have "params". Does anyone know what is the corresponding field in the embedding layer class for current version?

Is this what you are looking for? https://stackoverflow.com/questions/42122168/keras-how-to-construct-a-shared-embedding-layer-for-each-input-neuron?rq=1


translation:/content/docs/reference/config/authorization/_index.md

Chinese translation about /content/docs/reference/config/authorization/_index.md

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: rootsongjc
If they are not already assigned, you can assign the PR to them by writing /assign @rootsongjc in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

content_zh/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Hi @zy475459736. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ci/circleci

/ok-to-test

/assign @rootsongjc

/approve
/lgtm

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: fleeto
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

content_zh/OWNERS [fleeto]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Add vendor check

Add  dep check to verify  Gopkg.lock is in sync with Gopkg.toml and the imports
Fixes  out of  sync issue

@ShyamsundarR @poornimag PTAL.


Fixed bug where sheet.json linked to wrong file names.

Apologies.

@clevett  I would appreciate it if you could merge this, its a minor change and I'm not sure what effect it being wrong would have on the last commit.

@Kirintale
Hey there. I left you a message on the previous merge request. The differences in the sheet.json halted our pull & I had to fix it manually. You'll want to go pull the updated json from the repo.

You are fantastic. Thank you. Having had a look at your changes they look ace. Apologies for the difficulty it caused.


40/add page

What is the context of this PR?
Adds components that constitute the Canvas for designing Pages. This adds only the presentational components, and fakes the rest to allow for testing.
How to review
Create a new questionnaire, when redirected to the design page, edit the text on the Canvas
NOTE
Originally the components were going to be called PageCanvas, PageSection etc but we decided the Page and Section were overloaded terms in our vocabulary. We have a concept of pages and sections, yet a PageSection related to neither. Therefore PageCanvas was named Canvas, and PageSection CanvasSection

 Create PageSection component (3)

 Create PageField component (2)

 Create PageCanvas component (2)

@hamishtaplin i'm able to tab into the properties pane, but I notice the focus (styling only) stays on the final CanvasSection when you tab to the sidebar.

@WickyNilliams LGTM apart from the focus thing I mentioned?


Proofs about nat to bitvector conversion

Addresses #53
Proofs for:
Lemma bits_of_nat_sized: forall n bv, nat_to_bitvec_sized n (bitvec_to_nat bv) = bv.
Lemma nat_of_bits: forall v, bitvec_to_nat (nat_to_bitvec v) = v.
Lemma nat_of_bits_sized: forall (v : nat),
      bitvec_to_nat (nat_to_bitvec_sized (N.size_nat (N.of_nat v)) v) = v.

Still to think about:
Lemma nat_of_bits_sized_n: forall n (v : nat),
      bitvec_to_nat (nat_to_bitvec_sized n v) = v.
Admitted.

Attempting a proof of:
Lemma nat_of_bits_sized_n: forall n (v : nat),
      bitvec_to_nat (nat_to_bitvec_sized n v) = v.

with an appropriate context had made me think we should deal with bit-growth differently. For example:

Specify to result of addition in terms of N.size_sat or N.size
Always require the size of the addition result to be explicitly specified by the instantiation of the adder circuit, and define the semantics of the adder in terms of addition and modulus.

Well attempting that proof made me think that this is not the right way to deal with bit-growth. The theorem as stated might not be proveable depending on how nat_to_bitvec_sized n v  is defined because we have to worry about values of n which are not large enough to represent v.


SPI byte sending error.

Hi i am trying to get this code running.
issue 1: Unable to send single byte say byteSent giving me error can't sent spi byte.
But if i populate the tx[] with hello world string then its getting passed to arduino.
if the number of bytes less then 8 in tx[] then it gives error can't send spi byte.
Amy help pls.

Hi,
can you give me some more details on where/when does this error happen ?
SPI is a protocole that exchange data between slave and master at the same time (3 wires interface), if the tx is empty, I assume that nothing can be sent and thus nothing retrieved.
If you want to send less than 8 bit, fill up the useless ones with 0.
Regards,
Vincent

hi,
thanks for the reply and sorry for the delay.
Here is the quad_pilot.log output.
rm: cannot remove `quadpilot.log': No such file or directory
QuadCopter Pilot v2.0
Initializing I2C devices...
Testing device connections...
MPU6050 connection successful
Initializing DMP...
Success! DMP code written and verified.
Success! DMP configuration written and verified.
Current FIFO count=0
Waiting for FIFO count > 2...
Current FIFO count=42Enabling DMP...
DMP ready!
Initializing IMU...

In the SPIClass.cpp
If i fill it up the tx[] with (Hello World string)
uint8_t tx[] = {
0x48, 0x45, 0x4C, 0x4C, 0x4F,
0x20,
0x57, 0x4F, 0x52, 0x4C, 0x44,
0x0A
};
and call ArduSPI.wirteByte once after disableing  Timer.start();
i am able to get the string Hello World in the SPI port (Arduinio with SPI to Serial print sketch)
if i fill the tx[] with anything less then 8 bytes will always gives error "SPI readByte : can't get spi message"
Note :
used this url for testing : http://mitchtech.net/raspberry-pi-arduino-spi/
int SPI::writeByte(uint8_t byteSent)
{
int ret;
//uint8_t tx[1] = {byteSent};
uint8_t tx[] = {
0x48, 0x45, 0x4C, 0x4C, 0x4F,
0x20,
0x57, 0x4F, 0x52, 0x4C, 0x44,
0x0A
};
uint8_t rx[ARRAY_SIZE(tx)] = {0,};
struct spi_ioc_transfer tr;
tr.tx_buf = (unsigned long)tx;
tr.rx_buf = (unsigned long)rx;
tr.len = ARRAY_SIZE(tx);
tr.delay_usecs = _delay;
tr.speed_hz = _speed;
tr.bits_per_word = _bits;
ret = ioctl(_fd, SPI_IOC_MESSAGE(1), &tr);
if (ret < 1) {
printf("SPI writeByte : can't send spi message\n");
}
return ret;
}

This reminds me something : do you launch the quad_pilot program with sudo ?
You need to be root to r/w not the /dev/spi* hardware file.
I'll check tonight if the repo is up to date with my own quad. It has been a little while since I worked on it.
Cheers,
Vincent

Yes. I am launching with Sudo.
I am able to send the "Hello World" string as i mentioned in the previous message.
This confirms that i have no permission issue.

hi vincent,
any help?...
i am still struck at spi routine...
if possible can you pls share some pics or videos of your quad.
tks.

Hi,
Sorry I have been very busy these days.
I am still confused. Are you trying to send a packet with less than 8 bits via SPI ? Or any other 8 bits array else than "Hello World" bugs ? If you want to send less than 8 bits, you need to fill the remaining one by zero, so that you send 8 bits.
Anyway, can you make the simplest program that reproduces the error and send it to me ?
Cheers,
Vincent

Tks for the reply and really sorry to take your time.
Sorry for the below lengthy post. Might be useful for other beginners like me.
At first i compiled and started the quad_pilot through launch_pilot.sh
Added LED and pushbutton as per the sh script.
i have integrated 6channel receiver with arduino pro mini and tested with debugging.
then i uploaded the final sketch and connected to Rpi.
LED and pushbutton works fine.
Checked i2c ok  for mpu6050
initialization completed successfully
spi initialization successful....
Then i am getting error spi can't send byte or spi can't read byte.
i thought Rpi not able to send bytes through spi ports to arduino. So i tryed a simple program hellow world to test the Rpi to arduino without changing and hardware connections. And it worked. (Arduino with spi to serial sketch loaded)
This confirms the all hardware connection ok. But i only struck up with spi::writeByte function.
So i try to debug the spi::writeBtye function with the tx[] loaded with hellow world string and called arduSPI.writeByte multiple times and it is working.
(After disabling timer function in main.cpp)
Now i am confused why normal sequence of bytes not working in spi port for rc channel info and esc data out Towards arduino.

I mean why i am getting the error : SPI writeByte : can't send spi message.

I don't think the issue is in the SPI class. I feel like it is more related to what happens in the arduino.
Don't you have too many Interrupts going on ? Could be that the SPI transfer is interrupted by your PWM measurements.
Please, post a version of your code in your github so that we can have a look. It si too difficult to debug without any piece of your code.
Regards,
Vicnent

Dear vincent
Dont worry about arduino sketch. As byte is sent from rpi spi port we will get successful otherwise it will through the error.
So far what i have found is
ArduSPI.writeByte/ .readByte /rwByte are working fine within main() function.
If ArduSPI.writeByte is called anywhere other than main() it shows the error byte not sent.
Is it due to the ArduSPI.initialize in main function.
Will you available for live chat sometime?
I am really breaking my head for last 1 week.
Sent from Yahoo Mail on Android
From:"vjaunet"<EMAIL_ADDRESS>Date:Wed, Sep 2, 2015 at 5:47 PM
Subject:Re: [QUADCOPTER_V2] SPI byte sending error. (#3)
I don't think the issue is in the SPI class. I feel like it is more related to what happens in the arduino.
Don't you have too many Interrupts going on ? Could be that the SPI transfer is interrupted by your PWM measurements.
Please, post a version of your code in your github so that we can have a look. It si too difficult to debug without any piece of your code.
Regards,
Vicnent
—
Reply to this email directly or view it on GitHub.￼

Hi vincent,
yes. you are wright there is no issue with SPIClass as it works when sending debug message.
The Arduino sketch and RPI programs are same in the repo. (I have just changed arduino sketch to SPI to serial for debuging. But when running the  I use the same Arduino sketch as yours).
So I can confirm that I have the exact clone of your repo.
to summarize ......
when launching ---sudo ,/launch_pilot.sh

pi@pi ~/git/test/QUADCOPTER_V2/RPI/PILOT $ sudo ./launch_pilot.sh
Waiting for button ...
Button pressed : stay pressed for shutdown
Restarting Pilot
Waiting for button ...
Quad_pilot.log output

rm: cannot remove `quadpilot.log': No such file or directory
QuadCopter Pilot v2.0
Initializing I2C devices...
Testing device connections...
MPU6050 connection successful
Initializing DMP...
Success! DMP code written and verified.
Success! DMP configuration written and verified.
Current FIFO count=0
Waiting for FIFO count > 2...
Current FIFO count=42Enabling DMP...
DMP ready!
Initializing IMU...
IMU init done; offset values are :
yaw = -167.500650, pitch = 51.526670, roll = 14.009199, n= 1981
SPI initialization finished
Setting PID constants
Rate PID :
Kp = 1.400000, Ki = 0.010000, Kd = 0.020000
Rate PID :
Kp = 2.500000, Ki = 0.010000, Kd = 0.500000
Yaw Rate PID :
Kp = 5.000000
SPI writeByte : can't send spi message
SPI readByte : can't get spi message
SPI readByte : can't get spi message
SPI writeByte : can't send spi message
SPI readByte : can't get spi message
SPI readByte : can't get spi message
SPI writeByte : can't send spi message

When I try to debug
sending the below commands within main() after ArduSPI.initialize
ArduSPI.writeByte('S');
ArduSPI.writeByte(0x0A);
No errors
sending the below commands other than main()
example:
void Blink_led(){
// use gpio to blink an led on pin 0
for(int i=0;i<30;i++){
system("/usr/local/bin/gpio write 0 0");
usleep(50000);
system("/usr/local/bin/gpio write 0 1");
usleep(50000);
}
ArduSPI.writeByte('S');
ArduSPI.writeByte(0x0A);
}
I am getting SPI writeByte : can't send spi message
So I assume SPIClass is working fine but not able to send the ArduSPI.writeByte other than main() That's why periotic timer function running in timer.cpp with ArduSPI.writeByte throwing  SPI writeByte : can't send spi message continuously
(infact this error is for  ArduSPI.writeByte, ArduSPI.readByte and ArduSPI.rwByte)
Can you please help in confirming the repo is upto date and it is working for you.
I am really in urgency to complete this project. Kindly help.
If Possible can you please upload  it with your setup and confirm.

I am Running RPI B with Noobs with RASPBIAN
Linux pi 3.18.11+ #781 PREEMPT Tue Apr 21 18:02:18 BST 2015 armv6l GNU/Linux
and GCC version
gcc (Debian 4.6.3-14+rpi1) 4.6.3
If possible can we have any online chat at your convenient time.

I made un update of the repo. But the changes seems cosmetic. Not sure this can help.
Really sorry but I definitely have no time for a chat those days.
Regards,
Vincent

Dear vincent
Can you pls confirm the code is running in your rpi without any issues?
If possible pls send me some pics or videos of your quad. Just to gave feeling and how you stacked the rpi and arduino stuff.
Whats you quad config? BL, ESC and battery.
Sent from Yahoo Mail on Android
From:"vjaunet"<EMAIL_ADDRESS>Date:Thu, Sep 3, 2015 at 12:27 AM
Subject:Re: [QUADCOPTER_V2] SPI byte sending error. (#3)
I made un update of the repo. But the changes seems cosmetic. Not sure this can help.
Really sorry but I definitely have no time for a chat those days.
Regards,
Vincent
—
Reply to this email directly or view it on GitHub.￼

Got the hw config. You already mentioned it in readme file.

Did you go through my ealier post... the complete summary Of the satus.
Any clue why ArduSPI.writeByte only works in main() and not in the timer.cpp or any where else?
This is the only issue left now to get my quad to test.

Hi vincent
I have verified that SPI::readByte() function is not used anywhere so removed the SPI::readByte() both in SPIClass.cpp and SPIClass.h.......
Now SPI error message has completely  stoped...:-)
Now I am trying to test the complete hardware setup with ESC and BL. Will update.
Mean while can you please send some Pics or videos...
Is your quad is stable with this setup and flying fine?

Glad you found a solution, but it is really strange. For sake of curiosity, can you put back the readByte function and recompile? Could be some compilation related stuff. Are you using the makefile ?
The quad is stable, but you will have to finetune the PID constants to fit your set-up... This is harsh and must be done with care, preferably on a stand with the quad solidly attached.

You may also face signs inversion, depending on how your MPU is attached (face up or down) and what direction your motor spins.
Do not hesitate to limit artificially the ESC output value, either in the Servo class or the timer.cpp, to ensure that the motor won't spin too fast if the PID goes hell.
On top of that you have some sensitivity constants that you may need to adjust in the beginning of the timer.cpp.

I'll see what I can do for the pics. Cheers Good luck !
Vincent

I updated the repo to the exact version that is in the quad rigth now. The one that has flown ;-)
Cheers
Vincent

Hi vincent,
I have replaced the SPIClass.cpp functions with out class. seems to working good in RPI side without any issue. I could See the RC details going smooth and sent back from RPI with PID correction.
Now in the arduino side once started after a couple of secs it is getted struck and the started LED is continuously blinking.
I try to do debug print. it shows the RC details sent and received correctly for few sec then started showing junk and getting reset.
Is it because Arduino not able to handle fast SPI com from RPI?

Hi,
I don't think so, but you can try to increase the SPI Baudrate on the RPI side.
Did you add any channels on the Arduino side ? I remember that I tried to add a 5th one and it messed up everything.
Check that your pwm signal are in the range expected (800us-1800us), could be a division by 0 or an unexpected negative value hanging around. I made some test in the quad_pilot but they are not universal and may not be adapted to you RC receiver.
Could also be your PID that winds-up, you can use gnuplot to plot the logfile values over time.
Cheers,
Vincent

Hi vincent
I am using arduino pro mini. As per connection Pitch output of receiver connected to Pin 10 of arduino which is slave select.
#define PITCH_IN_PIN 10
In slave mode when the SS pin goes high SPI will shutdown and dropout all on going communications.
I have re-mapped the pins of motor out and receiver and every thing is normal and SPI is running with zero errors. i am getting the corrected pwm values nicely from RPI
(i have made free all 4 SPI pins now to use only for SPI com)
Now i am getting the PWM in all 4 motor out pins verified with DSO.
When connecting all motors one motor is working fine and all of a sudden one other ESC got burnt.
I am troubleshooting the motor and ESC parts with PWM tester....will update.
Mean while can you please confirm any other parameter to be checked like the range of calibrated IMU data and Attitude values,
Whats PID value should i pass with the launch_poilt.sh to start with?

Sure, if you used the SPI pins for PWM that could not work ! :-)
For PID tunning, have  a look here: http://blog.oscarliang.net/quadcopter-pid-explained-tuning/.
It is very well explained. Actual values depends on you own set-up, but start low.
No need to the calibrate the IMU since we already use the DMP that is inside. Be simply aware that the Pilot code don't use quaternions and is therefore sensitive to the gimbal lock issue, when the angle is close to 180deg.
BTW, here is a video of a quad flying with the Pilot v1 code (almost the same as v2) :
https://www.youtube.com/watch?v=cc01GgzKo0c
Cheers,
Vincent


Mac M1,  compute type is float32 . how can we transform a float32 model?

At this time we only support float32 computation on Apple M1 and M2.

At this time we only support float32 computation on Apple M1 and M2.

"A Whisper model should be first converted into the CTranslate2 format", so we also should convert the model with command below :

If you want to save the model in float32, you can just remove the --quantization option:
ct2-transformers-converter --model openai/whisper-medium --output_dir whisper-medium-ct2

However, the type that is used when converting and when loading the model can be different. For example, you can convert with float16 and when the model is loaded on Mac M1 it is automatically converted back to float32.


CARDS-2002 - PREMs: display a landing page to the patient before they start filling out their surveys & CARDS-2001 - PREMs: the first question in each survey sounds awkward

Includes:

CARDS-2001 - PREMs: the first question in each survey sounds awkward
CARDS-2002 - PREMs: display a landing page to the patient before they start filling out their surveys

Testing:

PREMs - as a patient test the surveys for all 4 clinics from beginning to end
PROMs - regression testing, nothing should have changed with the exception of the layout of the start screen (with the survey list) - check the start screen is still fitting for PROMs
Administration > Survey instructions - test the newly introduced "Survey draft info"

Reviewing

commit by commit is recommended

Small remark: now after trying to submit incomplete surveys the screen looks a bit empty. Can we make it look more like the landing page? At least we should list the hospital name. e.g. Good evening John Doe. The survey answers about your recent stay at ABC Hospital are incomplete.

I don't think that's necessary. We definitely shouldn't say "Good evening" again as we just did on an earlier screen, minutes before. This is technically an error screen, and in my opinion it has all the info it really needs. Moreover, if we manage to implement CARDS-1375 - Add an option to block saving a form if not all required fields have been filled out as is the plan, this screen will become unreachable.

Changes in the last 2 commits:

better formatting of the bottom message on the landing page
simplified the expiration date display - @sashaandjic it needs to be tested when the expiration is days away, hours away, minutes away (the token expires 30 days after the discharge time, at midnight)


Fix bug when using conversation with async call

Reference:

https://github.com/simonw/llm/issues/674

This fixes the bug reported in the above issue where there was an error while using async conversation.
As stated here With llm-gemini, the request body is built here, which in turn tries to get the text from previous responses in the conversation here. But because the response is an instance of AsyncResponse, we get the error coroutine 'AsyncResponse.text' was never awaited.
Code to test that fix works is

import asyncio
import llm

model = llm.get_async_model("gemini-2.0-flash-exp")

conversation = model.conversation()

async def run():
    response = await conversation.prompt("joke")
    text = await response.text()
    response2 = await conversation.prompt("again")
    text2 = await response2.text()
    print(text, text2)

asyncio.run(run())

Thanks for this!

Thanks for the STR. This:
python -c '
import asyncio
import llm

model = llm.get_async_model("gemini-2.0-flash-exp")

conversation = model.conversation()

async def run():
    response = await conversation.prompt("joke")
    text = await response.text()
    response2 = await conversation.prompt("again")
    text2 = await response2.text()
    print(text, text2)

asyncio.run(run())
'

Produced this error:
Traceback (most recent call last):
  File "<string>", line 16, in <module>
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "<string>", line 12, in run
  File "/Users/simon/.local/share/virtualenvs/llm-gemini-XpPcBrzz/lib/python3.10/site-packages/llm/models.py", line 425, in _force
    async for _ in self:
  File "/Users/simon/.local/share/virtualenvs/llm-gemini-XpPcBrzz/lib/python3.10/site-packages/llm/models.py", line 413, in __anext__
    chunk = await self._generator.__anext__()
  File "/Users/simon/Dropbox/Development/llm-gemini/llm_gemini.py", line 272, in execute
    async with client.stream(
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/Users/simon/.local/share/virtualenvs/llm-gemini-XpPcBrzz/lib/python3.10/site-packages/httpx/_client.py", line 1560, in stream
    request = self.build_request(
  File "/Users/simon/.local/share/virtualenvs/llm-gemini-XpPcBrzz/lib/python3.10/site-packages/httpx/_client.py", line 358, in build_request
    return Request(
  File "/Users/simon/.local/share/virtualenvs/llm-gemini-XpPcBrzz/lib/python3.10/site-packages/httpx/_models.py", line 338, in __init__
    headers, stream = encode_request(
  File "/Users/simon/.local/share/virtualenvs/llm-gemini-XpPcBrzz/lib/python3.10/site-packages/httpx/_content.py", line 214, in encode_request
    return encode_json(json)
  File "/Users/simon/.local/share/virtualenvs/llm-gemini-XpPcBrzz/lib/python3.10/site-packages/httpx/_content.py", line 177, in encode_json
    body = json_dumps(json).encode("utf-8")
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type coroutine is not JSON serializable
sys:1: RuntimeWarning: coroutine 'AsyncResponse.text' was never awaited

But after applying this fix it works:
Okay, here's a joke:

Why don't scientists trust atoms?

Because they make up everything!
 Alright, here's another one:

What do you call a lazy kangaroo?

Pouch potato!


[IOTDB-348] add show plan

Hi, @jt2594838  merge if no comments.
By the way, it is better to make the branch Cluster_new passing the CI ASAP.