Allow identical DimPlot 'Group By' and 'Split By' Selection

Attempting to group (color) and split by the same metadata results in the following error:
Invalid selections for DimPlot: "Group By" and "Split By" must be different.
But this isn't actually true, at least not for Seurat DimPlot(). Should change to allow.

When taking away the error handling for group by and split by selections, the following error is printed on the console
Warning: Error in Seurat::LabelClusters: Length of labels (10) must be equal to the number of clusters being labeled (4).
  193: stop
  192: Seurat::LabelClusters
  191: FUN
  190: lapply
  189: SCUBA::plot_reduction

Strangely, when a reduction plot is requested in the R console using the same variable for group_by and split_by, the plot prints without errors. This may suggest differing behavior in an interactive context.
SCUBA::plot_reduction(AML_Seurat, group_by = "condensed_cell_type", split_by = "condensed_cell_type")

To investigate sources of the error introduced by the browser, I modified the code in the reactive expression that creates the DimPlot, in the plot module. I replaced the shiny_umap code with a direct call to SCUBA::plot_reduction, and re-started the app with this modification. The expected plot was successfully generated in the app.
This suggests an error in the shiny_umap function, though it could still be an issue with SCUBA::plot_reduction when additional arguments are passed. I will rule this out by adding  the parameters that were used in shiny_umap to SCUBA::plot_reduction, if they apply.
plot <-
                     reactive(
                       label = glue("{plot_label}: Create Plot"),
                       {
                         # Only runs when the plot is enabled
                         req(plot_switch())

                         # Temp: simple reduction plot
                         SCUBA::plot_reduction(
                           object = object(),
                           group_by = plot_selections$group_by(),
                           split_by = plot_selections$split_by()
                           )

                         # Create a UMAP plot using shiny_umap()
                         # shiny_umap(
                         #   object = object(),
                         #   group_by = plot_selections$group_by(),
                         #   split_by = plot_selections$split_by(),
                         #   show_label = plot_selections$label(),
                         #   show_legend = plot_selections$legend(),
                         #   ncol = plot_selections$ncol(),
                         #   is_subset = is_subset(),
                         #   original_limits = plot_selections$limits(),
                         #   # Original x- and y- axis limits: use the values
                         #   # for the currently selected reduction
                         #   xlim_orig =
                         #     lim_orig()[[
                         #       plot_selections$reduction()]]$xlim_orig,
                         #   ylim_orig =
                         #     lim_orig()[[
                         #       plot_selections$reduction()]]$ylim_orig,
                         #   show_title =
                         #     # show_title controls how NULL values for
                         #     # plot_title are interpreted (NULL will remove the
                         #     # label by default, but plot_title will be NULL if
                         #     # a label is not set in the config file (want the
                         #     # default title to be used in this case))
                         #     if (input$title_settings == "none"){
                         #       FALSE
                         #     } else TRUE,
                         #   # Plot title: from 3.7.
                         #   plot_title = plot_title(),
                         #     # Human-readable plot title
                         #     # Depends on title_settings
                         #     # if (isTruthy(input$title_settings)){
                         #     #   if (input$title_settings == "default"){
                         #     #     # Default behavior is to use the `label` property
                         #     #     # for the category in the config file
                         #     #     metadata_config()[[
                         #     #       plot_selections$group_by()]]$label
                         #     #   } else if (input$title_settings == "custom"){
                         #     #     # Use the custom title entered by the user
                         #     #     # in this case
                         #     #     custom_title_single()
                         #     #   } else if (input$title_settings == "none"){
                         #     #     # NULL is passed to the title argument,
                         #     #     # removing it
                         #     #     NULL
                         #     #   }
                         #     # } else{
                         #     #   # Use default behavior if selection menu
                         #     #   # does not exist
                         #     #   metadata_config()[[
                         #     #     plot_selections$group_by()]]$label
                         #     # },
                         #   reduction = plot_selections$reduction(),
                         #   palette = palette(),
                         #   # Number of columns in legend
                         #   legend_ncol = plot_selections$legend_ncol(),
                         #   # Legend font size
                         #   legend_font_size =
                         #     plot_selections$legend_font_size(),
                         #   # Size of legend keys
                         #   legend_key_size =
                         #     plot_selections$legend_key_size(),
                         #   # Vertical spacing between each key
                         #   legend_key_spacing =
                         #     plot_selections$legend_key_spacing()
                         #   )
                     })

The issue was re-created when adding the label parameter to SCUBA::plot_reduction and connecting it to the value of the "label groups on plot" checkbox.
# Code inside reactive expression for DimPlot from previous comment
SCUBA::plot_reduction(
                           object = object(),
                           group_by = plot_selections$group_by(),
                           split_by = plot_selections$split_by(),
                           label = plot_selections$label()#,
                           #ncol = plot_selections$ncol(),
                           #reduction = plot_selections$reduction()
                           )

Based on this, this issue is with the handling of the label parameter. This is set to TRUE by default, which will cause an error in the DimPlot function, for both Seurat and SCUBA:
> SCUBA::plot_reduction(AML_Seurat, group_by = "condensed_cell_type", split_by = "condensed_cell_type", label = TRUE)
Error in Seurat::LabelClusters(plot = plot, id = group, repel = repel,  :
  Length of labels (10) must be equal to the number of clusters being labeled (4).

> Seurat::DimPlot(AML_Seurat, group.by = "condensed_cell_type", split.by = "condensed_cell_type", label = TRUE)
Error in LabelClusters(plot = plot, id = x, repel = repel, size = label.size,  :
  Length of labels (10) must be equal to the number of clusters being labeled (4).

When split by and group by are the same for DimPlots in the app, the label parameter needs to be set to FALSE. The checkbox should be disabled to keep users from selecting TRUE, and a tooltip should be added over the disabled version of the checkbox to tell the user why the checkbox was disabled.


5-2. kuard-pod-health.yaml does not work

I have the following conf saved in kuard-prod-health.yaml
apiVersion: v1
kind: Pod
metadata:
  name: kuard
spec:
  containers:
    - image: gcr.io/kuar-demo/kuard-amd64:1
      name: kuard
      livenessProbe:
        httpGet:
          path: /healthy
          port: 8080
        initialDelaySeconds: 5
        timeoutSeconds: 1
        periodSeconds: 10
        failureThreshold: 3
      ports:
        - containerPort: 8080
          name: http
          protocol: TCP

However when I try to apply the conf:
kubectl apply -f kuard-prod-health.yaml
I get this error:

The Pod "kuard" is invalid: spec: Forbidden: pod updates may not change fields other than spec.containers[*].image, spec.initContainers[*].image, spec.activeDeadlineSeconds or spec.tolerations (only additions to existing tolerations)

Apparently, I can not apply the config if the pod is already running.


ensure_file_downloaded writes an empty file if the source URL is not found

Need to investigate this further, but I observed this behavior when dealing with #1930. This causes runs to fail until the user manually deletes the file. The correct behavior is that no file should be created.

I think this is related to behavior someone on discord is also seeing
https://hastebin.com/share/ebemaxesap.rust

Right now, ensure_file_downloaded fails silently when the file is not found; it should raise an exception instead.
It would be nice if we could auto-recover from corrupted downloaded files e.g. if json.loads doens't work on a downloaded JSON file, we should delete the file and retry downloading it once, and then error out if the retry also fails.

It would also be nice to do a pure-Python download and get rid of the dependency on wget and gdown and also the process fork, but I'm not sure how feasible that is.

@yifanmai this is my understanding of the distinct steps that need to be taken, please correct if I'm missing something or if you had something else in mind:

In ensure_file_downloaded(), if a file download does not end successfully (i.e., exit_code != 0), remove the file if one has been created. My assumption here is that if a file download has not been successful (via exit_code), we cannot safely claim the file has not been corrupted. Then, a second download attempt can be made. On a successful second attempt, we can return successfully, otherwise we can delete the file again and raise a custom exception.

After a file is downloaded in ensure_file_downloaded() and a successful exit_code of 0 is returned, check whether that file can be found. If it cannot, then raise a FileNotFound exception.

Ensure calls to ensure_file_downloaded() are modified to support exception handling.

Correct.
Should not be necessary.
Correct.


Mode collapse and batch normalization

Thanks for your implementation. I cloned this repo and saw the collapse during training tf-3dgan/src/3dgan_mit_biasfree.py, shown as below:

I tried to fix this problem by training lower dimension dataset (e.g. celebA) with the same model architecture. I found if I replace tf.contrib.layers.batch_norm with this batchnormalize function, my training result will be better. For example in celebA: (with batch size=100)

Even I replaced with tf.layers.batch_normalization, the result was bad similar to tf.contrib.layers.batch_norm.
I don't know why the Tensorflow BN layer doesn't work. Do you have any idea?
Thank you so much.

I think in the latest API docs, one needs to update the batch estimates as every minibatch is passed.
The docs say:
update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
  with tf.control_dependencies(update_ops):
    train_op = optimizer.minimize(loss)

So adding the above scope to these lines will solve the problem.

I add these lines and it really works in celebA!

But it doesn't have an obvious change in 3D generating.
Thanks for your help.

Hey thanks for the update!
I think it isn't working for 3D inputs because the tf.contrib.layers.batch_norm normalizes over all axis except the last because the default format is NHWC. I think changing the tf.contrib.layers.batch_norm to tf.layers.batch_norm will do the trick.
Also could you make a PR as well with the updates that you made, it would be great to have them here :)

Sorry for the late reply. Yes I used tf.layers.batch_normalization actually. Here is the training produce I got:

I also sent my branch to you. Thank you!

@meetshah1995 @BassyKuo Thanks for your great work. I run  tf-3dgan/src/3dgan_mit_biasfree.py, but results are much worse than what you post on Some sample generated chairs . And i couldn't get results as BassyKuo  got above.
Generated chairs during training(10000epochs totally):

Generated chairs using trained model(9500epochs):

another try:

Results are bad. And the network is unstable, it generates nothing but irregular clusters of points sometimes. Besides, we can see collapse as BassyKuo mentioned. It generates nearly same voxels.
Any suggestions to reproduce your results?
Thanks very much!


Fix for drafts getting deleted during IMAP sync

This is a possible fix for issue #2164. Specifically, the following scenario mentioned in that issue:

Create a draft email with text in the body.
Select "encrypt" or "encrypt if possible".
Save draft by selecting either "save draft" or by pressing back and "save draft".
Draft is gone after server sync.

As per the comment by @Valodim on Jan 7 in issue #1983, the intent, at least until draft encryption is implemented, is to save drafts of secure messages ("encrypt" / "encrypt if possible") locally only and not upload them to the server during IMAP sync. But, as mentioned above, such drafts are getting saved locally initially but then getting deleted during the sync. (As per my testing, the issue of drafts getting deleted during sync seems to have been there for a while. In releases 5.108 to 5.200 (which I tested), drafts of secure messages were getting copied to the server in plain text (issue #711) and normal drafts were getting deleted upon sync (opposite of the #2164 scenario mentioned above)).
Hope my fix addresses the issue adequately. Please let me know if any further changes are required.
(Note: I am planning to apply to k-9 as part of GSOC)

I will resolve the build issues and update.

Pull requests are automatically updated when you push to the branch. I'll close #2410

Hi,
Actually #2410 is a separate branch (from #2407). I rewrote things using new flag names etc. So it was not possible to simply continue #2407. Please review both and continue the process with whichever implementation is better and close the other. I think the implementation in #2410 is better but It is possible that I misunderstood the behaviour of cryptomode setting and so my implementation of that part (in #2410) may be wrong/unnecessary, in which case #2407 might be better and #2410 can be closed.
Thanks,
Vishnu
----- Original Message -----
From: "Philip"<EMAIL_ADDRESS>To: "k9mail/k-9"<EMAIL_ADDRESS>Cc: "Vishnu M"<EMAIL_ADDRESS>"Author"<EMAIL_ADDRESS>Sent: Monday, March 20, 2017 9:07:06 PM
Subject: Re: [k9mail/k-9] Fix for drafts getting deleted during IMAP sync (#2407)
Pull requests are automatically updated when you push to the branch. I'll close #2410
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/k9mail/k-9/pull/2407#issuecomment-287798119

Fixed via #3174
Fixed via #3174


KAB-179 queue drop workspace

Jira: KAB-179
KBC: N/A
Before asking for review make sure that:
Checklist

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

Release

[x] I gave the PR a proper label:

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

Ještě jedna věc tam chyběla, snad poslední ;)


Would you mind sharing a Arduino *.ino demo-code that shows how to use your xpt2046-driver ?

Hi Honeycrisis,
The title is already spot on:
Would you mind sharing an Arduino *.ino demo-code that shows how to use your xpt2046-driver ?
best regards Stefan

I sure will. The only issue is I just finished (re)building my main PC and I'm still putting everything together regarding my dev environment today. I'll stick a pin in it and get to it as soon as I'm able. it will be under an example folder after i get to it.

You know what? I realized I already have a demo of it. I'd add an example here, but it takes a lot of infrastructure to use due to the display itself.
Here you go.
https://github.com/codewitch-honey-crisis/color_picker


Optimize NFT loading with https://nft.storage/

Is your feature request related to a problem? Please describe.
Optimize NFT loading with https://nft.storage/

Version test:

https://drive.google.com/file/d/1bBF9j7Qpfx6zlGS6td4sszldf776ElMY/view?usp=sharing

Validation passed!


quill-util module

Introduce new module quill-utils which will have dependency of quill-core and optional dependencies of the other modules.
This module will contain most common user-defined structures, infixes, encodings etc.
Possible utils:

pagination util
date comparison operators
common string operators
cassandra datastax codec integration
dynamic query builder
???

@getquill/maintainers wdyt?

@mentegy I'm closing this issue, please feel free to re-open if you feel it's still relevant.


[SPARK-32878][CORE] Avoid scheduling TaskSetManager which has no pending tasks

What changes were proposed in this pull request?

This PR proposes to avoid scheduling the (non-zombie) TaskSetManager which has no pending tasks.
Why are the changes needed?

Currently, Spark always tries to schedule a (non-zombie) TaskSetManager even if it has no pending tasks. This causes notable problems for the barrier TaskSetManager: 1. calculateAvailableSlots can be called for multiple times for a launched barrier TaskSetManager; 2. user would see "Skip current round of resource offers for barrier stage" log message for
a launched barrier TaskSetManager all the time until the barrier TaskSetManager finishes, which is quite confused.
Besides, scheduling a TaskSetManager always involves many function invocations even if there're no pending tasks.
Therefore, I think we can skip those un-schedulable TasksetManagers to avoid the potential overhead.
Does this PR introduce any user-facing change?

No.
How was this patch tested?

Pass existing tests.

@tgravescs @jiangxb1987 @cloud-fan Any idea on this?

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/33282/
Test PASSed.

Test build #128660 has started for PR 29750 at commit 33dba15.

Test build #128660 has finished for PR 29750 at commit 33dba15.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/128660/
Test PASSed.

Merged build finished. Test PASSed.

Thanks all! I've addressed the comment.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/33312/
Test PASSed.

Test build #128689 has started for PR 29750 at commit 718590d.

Merged to master for Apache Spark 3.1.0 on December 2020.

Thank you, @Ngone51 and all!

Test build #128689 has finished for PR 29750 at commit 718590d.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/128689/
Test FAILed.


request: add kvpress

Hello,
Would it be possible to add https://github.com/NVIDIA/kvpress in this awesome list ?
Thanks !

Sure, thanks for the excellent work!
I've added it to this repository.

We added a reference to your repo in kvpress :)


Implement Adam's suggestions

Fixes: #42, fixes: #41

Oops I caused issues with the base, will recreate!


Make Configure support multiple interfaces

If you say eth0;eth1 it should generate the ethool stuff for both.

Can confirm semi-colon separated interfaces work.

Just did an upgrade on a Moloch box with the 0.17.1-3 .deb and using semi-colons and it did not work.
  Process: 12648 ExecStartPre=/sbin/ethtool -K em1;em2;em3;em4;p4p1;p4p2;p4p3 lro off (code=exited, status=1/FAILURE)
When doing a systemctl status molochcapture.service it shows all the  ethtool change attemps as FAILURE.
It's strange though, the moloch machine I did with the 0.17.1-1 .deb and using semi-colons worked fine even though the molochcapture.service file looks the same with the exception the interface names.

If you enter multiple interfacees into Configure, it will create the create config.ini however the systemd/upstart scripts will have incorrect commands in them currently.  They will still start, however what it is trying to do will not work.
This issue is here so someday it is fully supported.

Yeah, just noticed, even with a single interface it's not working. not a problem i'll add it back to the interfaces config. Thanks! Also if you find yourself in OKC USA, sorry, also theres a lot of people here that would like to buy you a beer.

Fixed in 0.18.2 - c47c784ae8f077e08fc441ac468f1e9a27a50843


fix(db): improve network / machine crash tolerance for replication

We have been having some problems with slaves rebooting (after kernel update) without shutting down replication properly. Sometimes, this lead to problems when resuming replication (binlog on slave was corrupted; last happened on Oct 3 at the lax-1.a.desec.io). This should solve this sort of problem.

We had replication resumption issues after a node reboot with improper shutdown, and I found indications on some mailing lists that the corresponding log messages are related to these settings. So I figured we could give it a try.


Use the global scope to store config

use the global scope to store the class cache, so the whole app uses the same set of loader instances
got it working on the web

avoid non-browser dependencies by declaring them as externals so that webpack does not package them

@gouniLee Okay, now this one...

When I execute open-cli ./test/testSuite.html  I've faced an error below.  Have you seen it before?
file:///usr/local/lib/node_modules/open-cli/cli.js:64
		const extension = cli.flags.extension ?? type?.ext ?? 'txt';
		                                       ^
SyntaxError: Unexpected token '?'
    at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
    at async link (internal/modules/esm/module_job.js:42:21)

yeah, the webloader is not implemented yet, so that part doesn't work yet


combination with pouchdb-find possible?

Hey Nolan,
thanks for the great bits! Is it possible to combine transform() with pouchdb-find?
Any tips or tricks?
Thanks a lot!
Alex

Unfortunately it's not implemented. I think probably the best course of action would be to add find() support to this plugin, and then require users to apply pouchdb-find before transform-pouch, but I admit it's tricky.

Any update on this enhancement?


Colored task name in log

The log is currently a bit hard to overview. Logs are prefixed with their task name. But when more then one task is running it's a bit difficult the see logs which belong together.
Each task should get a random color and whenever the task logs something, its name should be written in that color.

Can I take this one?

@wafendy Sure.
I imagined something like:
[task name] some log info

Where "task name" is the task specific color.
Maybe just predefine about 10 different colors and pick one for each task. (by index in the config file)


fix: more boss issues

(I hope this is the last pr fixing things related to the boss)
This pr fixes:

The boss was not displaying the death animation when dying.
The boss was taking damage randomly when doing the charge attack or the missiles attack.
Adapt a bit the cooldowns so the boss does not patrol too much.
The seeking shockwave wasn't being triggered as expected.

Everything is fixed correctly. What I think could be better is this time during the battle, when the boss is patrolling, because she is too far from the player after doing the charge attack, she is there in one coner and I'm not even in the other half. It takes me out of the battle. I don't know if we can delete that state or reduece the times she is patrolling, maybe making bigger her detection.
https://github.com/Horizons-Games/Axolotl-Engine/assets/62140600/83190ffd-23cc-4cc6-8f32-fd4361a2f887

Sadly, now is too late to implement those changes as they would change too much the boss battle and we are closing in to the final deadline, but the feedback is much appreciated!


feat: add fordefi signer to aa-signers

Pull Request Checklist

[x] Did you add new tests and confirm existing tests pass? (yarn test)
[x] Did you update relevant docs? (docs are found in the site folder, and guidelines for updating/adding docs can be found in the contribution guide)
[x] Do your commits follow the Conventional Commits standard?
[x] Does your PR title also follow the Conventional Commits standard?
[x] If you have a breaking change, is it correctly reflected in your commit message? (e.g. feat!: breaking change)
[x] Did you run lint (yarn lint:check) and fix any issues? (yarn lint:write)
[x] Did you follow the contribution guidelines?

PR-Codex overview
This PR updates the FordefiSigner functionality, adds new methods, and enhances the documentation.
Detailed summary

Updated node version to >=18.16
Added FordefiSigner methods and types
Introduced @fordefi/web3-provider dependency
Enhanced FordefiSigner documentation
Added new methods for signing messages and typed data
Improved authentication process for FordefiSigner

The following files were skipped due to too many changes: packages/signers/src/fordefi/signer.ts, site/packages/aa-signers/fordefi/introduction.md, site/smart-accounts/signers/fordefi.md, packages/signers/src/fordefi/__tests__/signer.test.ts, yarn.lock

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

There are major diffs between development and main, seems like the reason checks fail are the significant difference.
Please guide me if I am missing anything.
For example the node version on development is older than in main.

main: >=16
development: >=18.16

Since our dependency supports >=18 and this will eventually arrive to main I have edited package.json to reflect the same engine on main to avoid unnecessary adjustments just for the temporary development branch.
Another error I encountered which seems unrelated:
➜  alchemy-aa-sdk git:(gil/fordefi-signer-to-development) ✗ yarn build
yarn run v1.22.22
$ lerna run build --ignore=alchemy-daapp --ignore=aa-simple-dapp
lerna notice cli v6.6.2
lerna notice filter excluding ["alchemy-daapp","aa-simple-dapp"]
lerna info filter [ '!alchemy-daapp', '!aa-simple-dapp' ]
lerna info run Using the "ignore" option when Nx targets are configured will exclude only tasks that are not determined to be required by Nx. See https://lerna.js.org/docs/lerna6-obsolete-options#--ignore for details.

    ✔  docs:build  [existing outputs match the cache, left as is]

    ✖  @alchemy/aa-core:build
$ ts-node-esm ./inject-version.ts
       TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/gilmeir/projects/alchemy-aa-sdk/packages/core/inject-version.ts

Hi Team @moldy530 @rthomare @dancoombs @mokok123
Could you kindly approve gh actions run and review the PR please?
I initially branched out of main to gain certainty the feature would work once merged to main.
When I applied the changes to the development  branch (per the contribution guide) I noticed it is 4 months behind main and required backporting the changes. Let me know if I could target main directly instead and save the extra hop.

Hey @gilmeir-arnac, I need to update the contribution guide since it's out of date. Using main as your base branch is the correct approach, sorry for the confusion

Created #665 that targets main instead.


Example of using Web Worker for FaceLandmarker

MediaPipe Solution (you are using)
FaceLandmarker
Programming language
Javascript
Are you willing to contribute it
Yes
Describe the feature and the current behaviour/state
In the guide, it mentioned the use of Web Worker but it doesn't seem like an easy task
Will this change the current API? How?
No response
Who will benefit with this feature?
Anyone who is learning to use Mediapipe
Please specify the use cases for this feature
Having the face detection without blocking the UI thread.
Any Other info
No response

Hello @edankwan
We understand web workers can be difficult to configure in any app. Please allow us sometime to create an example app with web worker usage. We believe this request can serve other users as well, so will try to create a vanilla Javascript example for easier follow ups.

Hi @edankwan,
Due to limited bandwidth, this is not our top priority right now. However, we are sharing this with the team to ensure it is on our radar. We may be able to address it later.
Thank you!!


Dealing with complex and real values

I think a good way to deal with complex values in the same file is a few overloads for real valued numbers:

real(x) just returns x
imag(x) returns 0
'conj(x)returnsx`.

I think that at that point, we can just always write our code as we are writing it for complex numbers, and i'll work for real numbers as well.
The compiler is very likely going to optimize those values away for real values so there should be no performance hit.

Hi Thijs.
Thanks for the comment. I agree!
We are trying to apply these overloads whenever possible.

The code currently uses std::real and std::imag that, since from C++11, already accept non-complex values.
conj(x) returns x. In this case, we currently use the same strategy from BLAS++. See on utils.hpp:

/** Extend conj to real datatypes.
 *
 * @usage:
 *     using blas::conj;
 *     scalar_t x = ...
 *     scalar_t y = conj( x );
 *
 * @param[in] x Real number
 * @return x
 *
 * @note C++11 to C++17 returns complex<real_t> instead of real_t. @see std::conj
 *
 * @ingroup utils
 */
template< typename real_t >
inline real_t conj( const real_t& x )
{
    // This prohibits complex types; it can't be called as y = blas::conj( x ).
    static_assert( ! is_complex<real_t>::value,
                    "Usage: using blas::conj; y = conj(x); NOT: y = blas::conj(x);" );
    return x;
}

Sometimes the algorithm changes considerably from real to complex, then I would argue that separate versions are clearer. This is the case of rotg.

Ah that's great, I had no idea it was already implemented.


Add function htmlEntities into template ticket_list.html

htmlentities() is a function which converts special characters. This allows you to show to display the string without the browser reading it as HTML.
Fix bug Cross-site Scripting (XSS) - Stored in django-helpdesk/django-helpdesk
Disclosure: https://huntr.dev/bounties/745f483c-70ed-441f-ab2e-7ac1305439a4/
CVE: CVE-2021-3945

thanks!

You are welcome! ^^


Added an interactive test called unloadingTest.html

The test currently fails. See Issue #694 for details.

I just squashed several commits with changes to the test and force pushed them to be a single commit (in case anyone is tracking this).

As mentioned in a later comment to issue #694, if it is decided that the "correct" behavior when mounting/unmounting any Mithril top-level component is that all other mounted components should be rebuilt (or at least their nested subcomponents should be rebuilt) reflecting a "route change", then the text on the test page would need to be changed to reflect that fact as to the expected behavior.

I do believe that this would be the expected behavior, so I'm going to merge it now. It needs implementation, though.


Fix PilotHoursAwards

!is_int was causing the check always return false even when user enters a proper value like 6000 or 30000 in admin/award settings.
We should use !is_numeric instead to see if it is a valid numeric value.

Nice catch. Weird that the tests passed, though. I'll have to look into that

Nice catch. Weird that the tests passed, though. I'll have to look into that


Overhaul update mechanism

https://hydraulic.software/blog/10-flutter.html
https://github.com/aguilaair/updat/ (an alternative I worked on some time ago for updating Flutter apps)

https://github.com/shorebirdtech/shorebird -- New and VERY interesting

@leoafarias wdyt of shorebird?


suppressApplicationTitle will suppress initial application title

Summary of the Pull Request
Fixed bug where suppressApplicationTitle didn't suppress initial title from application

References

PR Checklist

[x] Closes #3743
[x] CLA signed. If not, go over here and sign the CLA
[ ] Tests added/passed
[ ] Requires documentation to be updated
[x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

One last thing -- and this might actually fix the Azure Cloud Shell issue (!) -- is that you could set the _title to be _startingTitle if _suppressApplicationTitle is enabled in the Terminal::CreateFromSettings function. If you do that, it will get set to the correct value on creation!

Done!


Undefined type error. Make sure you are providing an explicit type for the "alerts" of the "AlertType" class.

Describe the bug
So it is fairly simple, just have a 1:N relation between alert and alert type. Need to allow users to fetch:

An alert with its alert type.
An alert type with its alerts.

Have you read the Contributing Guidelines?
Yup.
To Reproduce
Clone my repo: https://github.com/kasir-barati/nestjs-materials

cd typeorm.
pnpm i --frozen-lockfile.
nx serve botprobe-nest

Expected behavior
Just start like it was before adding this piece of code in my alert-type.entity.ts:
https://github.com/kasir-barati/nestjs-materials/blob/0b712a5de535c7cb8204aa8eac5d9344af9afaa3/typeorm/apps/botprobe-nest/src/alert-type/entities/alert-type.entity.ts#L41-L45
Screenshots

Desktop (please complete the following information):

Node Version: 22.12.0
Nestjs-query Version: 8.0.0

Additional context
Error message in text:

/home/kasir/projects/nestjs-materials/typeorm/node_modules/.pnpm/@nestjs+graphql@12.2.2_@nestjs+common@10.4.15_class-transformer@0.5.1_class-validator@0.14.1__zsrjvl6g7tdfe2t3vnfusw45sm/node_modules/@nestjs/graphql/dist/utils/reflection.utilts.js:17
            throw new undefined_type_error_1.UndefinedTypeError((0, lodash_1.get)(prototype, 'constructor.name'), propertyKey, index);
                  ^

Error: Undefined type error. Make sure you are providing an explicit type for the "alerts" of the "AlertType" class.
    at reflectTypeFromMetadata (/home/kasir/projects/nestjs-materials/typeorm/node_modules/.pnpm/@nestjs+graphql@12.2.2_@nestjs+common@10.4.15_class-transformer@0.5.1_class-validator@0.14.1__zsrjvl6g7tdfe2t3vnfusw45sm/node_modules/@nestjs/graphql/dist/utils/reflection.utilts.js:17:19)
    at applyMetadataFn (/home/kasir/projects/nestjs-materials/typeorm/node_modules/.pnpm/@nestjs+graphql@12.2.2_@nestjs+common@10.4.15_class-transformer@0.5.1_class-validator@0.14.1__zsrjvl6g7tdfe2t3vnfusw45sm/node_modules/@nestjs/graphql/dist/decorators/field.decorator.js:31:107)
    at singleCallFunctionWrapper (/home/kasir/projects/nestjs-materials/typeorm/node_modules/.pnpm/@nestjs+graphql@12.2.2_@nestjs+common@10.4.15_class-transformer@0.5.1_class-validator@0.14.1__zsrjvl6g7tdfe2t3vnfusw45sm/node_modules/@nestjs/graphql/dist/schema-builder/storages/lazy-metadata.storage.js:67:13)
    at /home/kasir/projects/nestjs-materials/typeorm/node_modules/.pnpm/@nestjs+graphql@12.2.2_@nestjs+common@10.4.15_class-transformer@0.5.1_class-validator@0.14.1__zsrjvl6g7tdfe2t3vnfusw45sm/node_modules/@nestjs/graphql/dist/schema-builder/storages/lazy-metadata.storage.js:41:44
    at Array.forEach (<anonymous>)
    at LazyMetadataStorageHost.load (/home/kasir/projects/nestjs-materials/typeorm/node_modules/.pnpm/@nestjs+graphql@12.2.2_@nestjs+common@10.4.15_class-transformer@0.5.1_class-validator@0.14.1__zsrjvl6g7tdfe2t3vnfusw45sm/node_modules/@nestjs/graphql/dist/schema-builder/storages/lazy-metadata.storage.js:41:26)
    at getFieldsAndDecoratorForType (/home/kasir/projects/nestjs-materials/typeorm/node_modules/.pnpm/@nestjs+graphql@12.2.2_@nestjs+common@10.4.15_class-transformer@0.5.1_class-validator@0.14.1__zsrjvl6g7tdfe2t3vnfusw45sm/node_modules/@nestjs/graphql/dist/schema-builder/utils/get-fields-and-decorator.util.js:16:49)
    at PartialType (/home/kasir/projects/nestjs-materials/typeorm/node_modules/.pnpm/@nestjs+graphql@12.2.2_@nestjs+common@10.4.15_class-transformer@0.5.1_class-validator@0.14.1__zsrjvl6g7tdfe2t3vnfusw45sm/node_modules/@nestjs/graphql/dist/type-helpers/partial-type.helper.js:18:107)
    at /home/kasir/projects/nestjs-materials/typeorm/node_modules/.pnpm/@ptc-org+nestjs-query-graphql@8.0.0_@apollo+gateway@2.9.3_encoding@0.1.13_graphql@16.9.0__@ne_fbjnmutqxhqvoxqdmvnas6ncgu/packages/query-graphql/src/resolvers/delete.resolver.ts:100:48
    at DeleteResolver (/home/kasir/projects/nestjs-materials/typeorm/node_modules/.pnpm/@ptc-org+nestjs-query-graphql@8.0.0_@apollo+gateway@2.9.3_encoding@0.1.13_graphql@16.9.0__@ne_fbjnmutqxhqvoxqdmvnas6ncgu/packages/query-graphql/src/resolvers/delete.resolver.ts:227:89)

 NX  Process exited with code 1, waiting for changes to restart...

I am kinda wondering if I am experiencing what they are talking about it here: https://stackoverflow.com/a/72300528/8784518

I also read this issues but it seems that no one actually has experienced this issue, i.e. except me :sweat_smile:.
https://github.com/TriPSs/nestjs-query/issues/301
https://github.com/TriPSs/nestjs-query/issues/307

You can see that it works just fine in normal setup with NestJS: https://github.com/kasir-barati/bugs/tree/normal-one-to-many-rel

I am trying to debug this issue with an example, but I am having a bit of trouble. It does not make sense to me that although I have said in my entities (written in TypeORM) that I wanna have a camelCase table name + column name but in reality when I go to database container I can see it is in snake_case.
What in the world is happening here?

Took a quick look, but relations are not defined with @Field / @FilterableField, please check these docs

I am trying to debug this issue with an example, but I am having a bit of trouble. It does not make sense to me that although I have said in my entities (written in TypeORM) that I wanna have a camelCase table name, and column name but in reality when I go to database container I can see it is in snake_case.
What in the world is happening here?

I had to define my models like so that it uses the camelCase. But this goes against what is normal and how TypeORM usually with a default setup works:
import { Field, GraphQLISODateTime, ObjectType } from '@nestjs/graphql'
import { FilterableField } from '@ptc-org/nestjs-query-graphql'
import { Column, CreateDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'
import { AlertType } from '../alert-type/alert-type.entity'

@ObjectType()
@Entity()
export class Alert {
  @Column('uuid', { name: 'userId' })
  @Field({ description: "Who's the creator of this alert" }) // well this is not how TypeORM works by default: https://stackoverflow.com/a/56311250/8784518
  @FilterableField()
  userId: string

You lost me here? If I understand you this is a issue with TypeORM and not this lib?

If you ask me I would say some configuration somewhere is making this to behave this way. But let's ignore it right now since it is not directly related to this issue.

Thanks to this comments I was able to pin point the issue and solve it (RTFM, I did not read it completely). This was a lesson I learned. First read the docs completely.
https://github.com/kasir-barati/nestjs-materials/commit/4755f6a5ca5ea2f65a56ba654504088b58aab20f


text classification model

TODO list:
 1-  text classification model:

[x]  build dataset()
[x]  train()
[x]  deploy()
[x]  predict() using API

 2. use Arabic language datset

[ ]  build dataset()
[ ]  train()
[ ]  deploy()
[ ]  predict() using API

BUGS:
 New bugs to be fixed

[ ]  bug1: TODO : ...

Text sentiment analysis
The first model is implemented and tested using a Twitter corpus of 1,600,000 tweets.
:1st_place_medal:


How create subdomains routes in Nuxt 3 ?

Describe the feature
Is it currently possible to implement subdomain routing as it was in Nuxt 2 via @nuxt/router ?
Additional information

[x] Would you be willing to help implement this feature?
[x] Could this feature be implemented as a module?

Final checks

[X] Read the contribution guide.
[X] Check existing discussions and issues.

Please refer to the discussions we have about the topic.


React-native link and no CocoaPods required?

@charlires
react-native-segment-analytics is the only package that requires CocoaPods and this causes several issues on our workflow. We do not want to use CocoaPods.
Now we see that a "react-native link" commit has been made:
6c9bdd3
Is CocoaPods still necessary for some reason? If not can the instructions show what needs to be done with plain "react-native link"?
Thanks!

Yes it is still needed. Segment themselves recommend/show how to integrate only via CocoaPods


Exoplayer hangs under Android 13

I have made my own patch for Alcinoe and fmx such that I am able to use your components under Delphi 11.1 and 11.2. Now I observe an issue that only shows up under Android 13. There, any video starts playing just for a second and then the player freezes. I have no idea what the reason is, presuemably it is necessary to update exoplayer to a more recent release. I am posting this issue because
a) I want to ask if you -- during updating alcinoe to Delphi 11.2 -- or anyone else has made the same experience and if yes, how you resolved the problem, and
b) hint to that problem in case you did not observe it yourself.

share your patch please

Hi can you update the alcinoe repository to the very last one? now we use the very last version of exoplayer. please look the demo https://github.com/MagicFoundation/Alcinoe/tree/master/Demos/ALFmxControls


com.sun.proxy.$Proxy cannot be cast with latest version

Reopen of ticket #331
Hi @sdeleuze I am still seeing this error with the same previous one with spring graalvm 0.8.3, graalvm 20.3, and spring cloud deps 2020.0.0-SNAPSHOT follow the example in samples. Log build with agent + test.txt is attached. I am not sure if I can reproduce this on a minimal because I tried to run a minimal config on the discovery client sample but it gave me error like log discoveryclient sample error.txt. I am not sure how to reopen this ticket as well since I don't have permission
update:
I ran it with agent + SpringBootTest and get the error as log 1.
If I commented the test class, it build successfully but I get the same error at startup.
I also tried cloud dep Hoxton.SR9 with the agent but apprently the spring boot test in there use old cloud context so agent weren't able to introspect class org.springframework.cloud.context.properties.ConfigurationPropertiesBeans and org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata
build with agent + test.txt
build with agent successful but startup failed log.txt
discoveryclient sample error.txt
discoveryclient.zip
Hoxton.SR9 log.txt

Potentially related to the fact we force JDK proxies in all circumstances as pointed out by @aclement.

Ok I wait till the beta for this issue to be fixed. Thank you

Should be fixed by #355.

Should be fixed by #355.


Minification from Vite

Hello @JorgenVatle
We recently optimized the project and wanted to get rid of unnecessary dependencies. I thought that since Vite builds the client, the standard-minifier-js and standard-minifier-css packages are no longer needed (after all, they are only needed to minify the client). But it was not so.
As I understand it, the meteor-vite plugin does not minify third-party client code (packages folder, etc.).
Moreover, as I understand it, meteor-vite generally ignores the minification settings, since nothing changed when these settings were changed:

How much do you think it makes sense to bypass the built-in minification (that is, minify the client code after the meteor build stage)? Will this give any advantage in build speed? or will the benefit be minimal due to the complexity of the assembly process and the structure of the assembled meteor code?

With the way Meteor-Vite is currently set up, I'm not sure if there would be much benefit to running a Vite minification step after the Meteor build.

The full Meteor-Vite build process looks something like the following:

Analyze all module imports starting from Vite entrypoint file configured in vite.config.js
Substitute any imports for Atmosphere packages with a lightweight ESM shim that calls the require() function shipped to browsers in Meteor's client bundle. Essentially, the source code for those packages is omitted from the Vite bundle, it's handled something like an externalized dependency.
Attempt to compile everything from your Vite client entry into a single module. Dynamically imported modules will be split into separate chunks that'll be served to your users when needed by Meteor's dynamic import implementation.
Transpile the Vite bundle's .js files for Meteor using Meteor's default Babel config.

Judging from the to-dos left by Akryum, this could potentially be replaced by esbuild. I'll see if I can include some timings for this build step so we can determine whether there's any build time to be saved there.

Feed the transpiled sources and any non-CSS/JS assets into the Meteor production bundle using a compiler plugin and let Meteor do the rest. This would be where your minification plugins like standard-minifier-js and standard-minifier-css take over if I'm not mistaken.

When I first got into working on Meteor-Vite I was thinking it could act as a replacement to the Meteor build system. But it doesn't seem like Vite would be a good fit for that. Optimally, we would have Vite take care of both the client and server-side builds. But from what I can gather, Vite isn't really intended to be used as a build tool for the server. I imagine esbuild would be the better option here.
Assuming most of the build time is spent after the Meteor-Vite build step has completed, the best solutions I can think of would be to either;

Lean into Meteor's build system - using a separate build plugin to take over after the Vite compilation stage, something like an esbuild-powered standard-minifier package.
Just build the client bundle independently of Meteor. Which should be totally doable now that the meteor-vite  npm package ships with a Vite plugin to that takes care of most of the work previously done by the vite:bundler Atmosphere package. Then it kind of is up to how long Meteor takes to build the server bundle.

One important thing to check would be the Meteor client mainModule file referenced in your package.json. This file should ideally be empty,
apart from some Atmosphere package imports to ensure lazy-loaded packages won't be omitted from your client bundle.
If your Meteor client entry does have imports for application code, it's easy to end up with code that's included twice - once in your Meteor client bundle, and another in your Vite client bundle. Which will naturally slow down the build process and bloat your final production bundle.


Rearrange import

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

Project coverage is 99.53%. Comparing base (c037f91) to head (2a04c19).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #293   +/-   ##
=======================================
  Coverage   99.53%   99.53%
=======================================
  Files          23       23
  Lines         214      214
  Branches       65       65
=======================================
  Hits          213      213
  Misses          1        1

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


Support for Vivaldi & Brave browsers for "openChrome.applescript"

Is your proposal related to a problem?
No, it is a new feature that is currently non-existing.

Currently there react-dev-utils package has an applescript "openChrome" which tries to reload a pre-existing webpack dev server tab in Chrome rather than opening a new tab. However in fairly recent times the Vivaldi and Brave browsers have gained a lot of popularity in the dev communities, at least those that I frequent. As a user of Vivaldi myself I would really appreciate it if the React dev server would also check for Vivaldi / Brave for the similar behaviour.
Describe the solution you'd like
The script should be modified or any such other modification made so that Vivaldi and Brave browsers are also supported

Describe alternatives you've considered

There are no alternatives to this problem, other than forcibly using Chrome exclusively for Dev but this would mean having to change default browser every time I and my peers would work on a React app which is extremely unreasonable.
Additional context

N.A.

There are no alternatives to this problem

Have you tried the BROWSER environment variable?

@heyimalex, I have and this does not work.
This being because the BROWSER env arg is not being used in the references applescript (see here: https://github.com/facebook/create-react-app/blob/master/packages/react-dev-utils/openChrome.applescript). Furthermore, simply changing all occurrences of "chrome" / "google chrome" in the applescript and the openBrowser.js files with their respective vivaldi versions also doesn't seem to work. Whether that is because Vivaldi simply doesn't support this behaviour and my changes are valid, or because my changes are not valid I do not know and so that would require further investigation.

Ok, I think I misunderstood. So you can absolutely get create-react-app to launch Vivaldi and Brave, it'll just open a new tab every time you run start? And you want it to open in the same tab.

That's correct, that's the behaviour it has for Chrome and since Vivaldi and Brave are Chromium based browsers I would assumed that it should be possible.


Remove Clutter: Hide Reply, Like, Zap, and Viewed/Engaged Icons of Quoted Notes

Is your feature request related to a problem? Please describe.
The display of quoted notes is cluttered and may cause confusion to viewers when they are looking at multiple quotes to a quoted note. There are multiple reply, like, zap, and viewed/engaged with icons.
Describe the solution you'd like
Please remove the reply, like, zap, and viewed/engaged with icons from the display of all of the prior notes after they are quoted. This change would make the feed look cleaner and easier to navigate.

So users shouldn't interact with boosted notes?

So users shouldn't interact with boosted notes?

That's not what I'm trying to communicate. I'll attach a screenshot of the clutter. It gets worse with every additional boost.

This looks like a quoted post, not a boost. Is that correct? Otherwise there might be a bug somewhere.
In this case, the user can choose to interact with the inner post or with the outer one. They can like both or boost just the internal one. Same for zaps and reports.
Removing the inner post's reaction line with block users from reacting to them.

I'm sorry, you're correct; they are quoted notes. I made edits to the original post. I believe that my suggestion would improve the appearance of the feed. Do you agree?

Do you agree?

I don't know.. It might be something for the simplified mode in the settings. Usually I like seeing how many likes, boosts and replies inner posts have and having the buttons allow me to reply to the inner post directly and skip the quote author.

Adding this to the simplified mode would be a good compromise.


Deepgram Transcriber Language Support Issue

I encountered an issue with the Deepgram transcriber when configuring it to use a Spanish language. Below is a snippet of the code used and the resulting error:
**from vocode.streaming.models.transcriber import DeepgramTranscriberConfig
transcriber_config = DeepgramTranscriberConfig.from_telephone_input_device(
language="es",
model="nova-2"
)
transcriber_factory = DefaultTranscriberFactory()**
Error:
vocode.streaming.utils.create_task:log_if_exception:12 - Vocode wrapped logger; exception raised by task <Task finished name='Task-16' coro=<DeepgramTranscriber._run_loop() done, defined at C:\Users\path\to\file\deepgram_transcriber.py:171> exception=AssertionError()>:
NoneType: None
Issue:
It appears that the Deepgram transcriber is not functioning with languages other than English. This issue prevents the use of the transcriber for other languages as intended.

I'm also experiencing the same issue when trying to configure the Deepgram transcriber for the Spanish language. The AssertionError appears when I set the language parameter to "es" with the model set to "nova-2". Has anyone found a workaround or solution for this? Any guidance would be appreciated.

While setting up the Deepgram transcriber for French, I'm running across a similar problem. I get error an  when I use the model "nova-2" and change the language option to "fr". Has someone found a fix or a workaround for this issue? Any advice or insights would be very valued.I have also modified language and model in transcriber,py
class DeepgramTranscriberConfig(TranscriberConfig, type=TranscriberType.DEEPGRAM.value):  # type: ignore
language: Optional[str] = "fr"
model: Optional[str] = "nova"
tier: Optional[str] = None
version: Optional[str] = None
keywords: Optional[list] = None
api_key: Optional[str] = None
on_prem: bool = False
ws_url: str = DEEPGRAM_API_WS_URL
Exception raised by task <Task finished name='Task-16' coro=<DeepgramTranscriber._run_loop() done, defined at C:\Users<username>\CT\vocode-core-updated\vocode-core-3\vm\vocode\streaming\transcriber\deepgram_transcriber.py:171> exception=InvalidStatusCode(400, Headers([('content-type', 'application/json'), ('dg-error', "Invalid 'tier' value of 'nova'."), ('content-length', '136'), ('access-control-allow-credentials', 'true'), ('vary', 'origin'), ('vary', 'access-control-request-method'), ('vary', 'access-control-request-headers'), ('access-control-expose-headers', 'dg-model-name,dg-model-uuid,dg-char-count,dg-request-id,dg-error'), ('dg-request-id')>: server rejected WebSocket connection: HTTP 400
NoneType: None

@arpagon, can you please help?


MINOR: [Java] Bump com.google.errorprone:error_prone_core from 2.4.0 to 2.24.0 in /java

Rationale for this change
This is a draft PR for fixing the dependabot PR https://github.com/apache/arrow/pull/39409
What changes are included in this PR?
Upgrading com.google.errorprone to 2.24.0 for JDK11+ and restricting com.google.errorprone to 2.10 to JDK8.
Are these changes tested?
N/A. CIs are implicitly testing this including existing test cases.
Are there any user-facing changes?
No

@github-actions crossbow submit java

@lidavidm does this change make sense?


Synchronize Changes: merges between wrong branches

Issue Type: Bug
Habitually I do a lot of git commands via the CLI. I do however like to use "Git: Sync" (Synchronize Changes) in VSCode. I recently pushed changes to master on accident though due to using this feature. Here's how to reproduce:

change to a feature branch (for these purposes, some branch other than main)
run git checkout main
before the checkout process completes (because busy developers often are in a rush and who wants to wait) run "Git: Sync"

this often causes changes from the feature branch to get merged into the main branch! 😬
I only noticed this today because there was a merge conflict; normally I don't get conflicts so it silently puts commits on my main branch and then if I run "Git: Sync" again later while on my main branch those commits get pushed!
I've also confirmed that this same issue occurs when changing branches is done via VSCode's Command Pallete instead of the terminal
I believe/hope this will be able to be fixed by adding which branch to explicitly fetch and merge to/from to any git calls that "Git: Sync" uses so that even if a user has recently changed branches and/or changes during the sync that the process will either succeed normally and only make changes to the branch for which the sync was initiated or fail with some helpful message that the sync could not be completed due to a change in the checked out branch
VS Code version: Code 1.56.2 (054a9295330880ed74ceaedda236253b4f39a335, 2021-05-12T17:44:30.902Z)
OS version: Darwin x64 20.4.0

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 x 2600)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
3, 3, 3

Memory (System)
32.00GB (0.97GB free)

Process Argv
--crash-reporter-id 5107bba3-5f6e-41ca-a504-fc77d9711dbd

Screen Reader
no

VM
0%

Extensions: none
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
pythonvspyt678:30270856
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
vspre833cf:30267465
pythonptprofiler:30281270
vshan820:30294714
pythondataviewer:30285071
vscus158cf:30286554
vscgsv2ct:30301613
vscorehovct:30302760
bridgeflightcf:30302070
vscod805cf:30301675

#60630 could be a potential fix to this issue but this issue reports the bug and I think there are various other solutions that might be worth exploring. A failure to complete the sync if the branch has changed along with an error message would be a huge improvement over the current functionality that leads to unintentional commits.

/duplicate #60630


Missing icon even with power line installed.

I'm seeing most of the icons display except the git icon. I followed a few guides on installing resulting in the same missing icon.

I'm on OS X Cat. Terminals are iTerm2 and Hyper.
EDIT:
It has to be a setting--PHPStorm's terminal shows the missing icon.

I'm seeing most of the icons display except the git icon. I followed a few guides on installing resulting in the same missing icon.

I'm on OS X Cat. Terminals are iTerm2 and Hyper.
EDIT:
It has to be a setting--PHPStorm's terminal shows the missing icon.

The fix for me if anyone has this issue was to simply checkbox Use built-in Powerline glyphs.

I was able to resolve this by changing my font to Fira Code under the preferences -> text -> font


Down?

Is this down?

It seems to be working for me. Can you give more information about the problem you're having?

Resolving for inactivity

It gave me an 404 on https://oneclickapps.caprover.christopherkapic.com

So there isn't actually a website to see at the root path, but it still works when you add the domain to your one-click-apps third party repositories on CapRover. Let me know if you still have problems.


convert weights error ,anyone successed on tensorflow-1.4.0

i want to run this code on tensorflow-1.4.0 ,and i convert the pre-train model weights, but some error come out:

shape is None,

anyone know this ? please ,thanks!!!

This is not an error. The output shape varies with input shape, and Keras takes it as None.


Use reusable Bump Version workflow

Commit SHA:80e13e4401224b981e69d1886d36e5e3dbe7475a
No changes to code coverage between the base branch and the head branch


LICENSE file doesn't contains year and author name

The LICENSE.txt file contains the MIT License which requires to complete year and author name.
This is the third line:
Copyright (c) [year] [fullname]

Resolved


EmbeddingStore: implement addAll(ids, embeddings, segments)

Issue
Closes #2106
Contributes to #2160
Change
Added method addAll(**ids**, embeddings, embedded)
General checklist

[x] There are no breaking changes
[ ] I have added unit and integration tests for my change
[x] I have manually run all the unit tests in the module I have added/changed, and they are all green
[x] I have manually run all the unit and integration tests in the core and main modules, and they are all green
[ ] I have added/updated the documentation
[ ] I have added an example in the examples repo (only for "big" features)
[ ] I have added/updated Spring Boot starter(s) (if applicable)

Checklist for changing existing embedding store integration

[ ] I have manually verified that the {NameOfIntegration}EmbeddingStore works correctly with the data persisted using the latest released version of LangChain4j

@VictorZZZZ thanks a lot!
Could you please add a test to EmbeddingStoreWithoutMetadataIT that tests the new method?

@langchain4j
New method addAll(ids, embeddings, embedded) now is used inside addAll(embeddings, embedded)
I think it's covered by existing tests. Is there a need to cover it separately?

@VictorZZZZ yes, please implement a test. Each public API method should be covered with a test, as each integration can re-implement it and we need to make sure it works as expected.

@VictorZZZZ yes, please implement a test. Each public API method should be covered with a test, as each integration can re-implement it and we need to make sure it works as expected. Thank you!

@langchain4j done


DAC6-1724 - fixed redirect

Thank you for submitting a pull request on this HMRC repository. A member of the HMRC team will review your changes and action accordingly.
HMRC reviewer: please reference this runbook for guidance on how to proceed.


antineoplastic

remove any mention of 'anti-neoplastic' from result cards (@yanyangfeng), front page filter(@yanyangfeng), and static text pages (@kcotto).

#262 addresses static text pages (news page and api documentation page)


route like A-B-A, Page A getController be null

log
[GETX] "GetMaterialController" has been initialized
[GETX] "SplashController" has been initialized
I/ExoPlayerImpl( 4627): Init b78a6f4 [ExoPlayerLib/2.11.7] [generic_x86_arm, AOSP on IA Emulator, Google, 28]
I/OMXClient( 4627): IOmx service obtained
I/ACodec  ( 4627): codec does not support config priority (err -2147483648)
I/flutter ( 4627): ferry link create
I/flutter ( 4627): token null
[GETX] REPLACE ROUTE /
[GETX] NEW ROUTE /SignupScreen
[GETX] "SignupController" has been initialized
[GETX] "SplashController" onClose() called
[GETX] "SplashController" deleted from memory
D/AudioTrack( 4627): stop() called with 219456 frames delivered
[GETX] GOING TO ROUTE /SigninScreen
[GETX] "SigninController" has been initialized
[GETX] GOING TO ROUTE /SignupScreen
[GETX] REMOVING ROUTE /SigninScreen
[GETX] REMOVING ROUTE /SignupScreen
[GETX] "SigninController" onClose() called
[GETX] "SigninController" deleted from memory

into Splash
Get.off SignupPage
Get.to SigninPage
Get.offAll SignupPage

then GetController of SignupPage is null

ATTENTION: DO NOT USE THIS FIELD TO ASK SUPPORT QUESTIONS. USE THE PLATFORM CHANNELS FOR THIS.
Fill in the template. Issues that do not respect the model will be closed.
Describe the bug
A clear and concise description of what the bug is.
Reproduction code
NOTE: THIS IS MANDATORY, IF YOUR ISSUE DOES NOT CONTAIN IT, IT WILL BE CLOSED PRELIMINARY)
example:
void main() => runApp(MaterialApp(home: Home()));

class Home extends StatelessWidget {
  final count = 0.obs;
  @override
  Widget build(context) => Scaffold(
      appBar: AppBar(title: Text("counter")),
      body: Center(
        child: Obx(() => Text("$count")),
      ),
      floatingActionButton: FloatingActionButton(
        child: Icon(Icons.add),
        onPressed: () => count.value++,
      ));
}

To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Flutter Version:
Enter the version of the Flutter you are using
Getx Version:
Enter the version of the Getx you are using
Describe on which device you found the bug:
ex: Moto z2 - Android.

see code at getx_test
bug
getxController be null
Reproduce step

click to other page button
click offAll to my home page button

flutter doctor
PS C:\WINDOWS\system32> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Version 10.0.19042.685], locale zh-CN)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[√] Android Studio (version 4.0)
[√] VS Code (version 1.52.0)
[√] Connected device (1 available)

• No issues found!
PS C:\WINDOWS\system32>

get version
dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.0
  get: 3.23.1

i find
#701
may be same reason


fix(twitter): inverse nickname & username

Closes https://github.com/adonisjs/adonis-ally/issues/39

Coverage remained the same at 55.044% when pulling b1c5bb820371681e0d3c7e74a11be6b6e3168f45 on RomainForks:fix/twitter-user into 65bc465e537b213b0acd5c1a3f2a61ddc8d90a16 on adonisjs:develop.

Coverage remained the same at 55.044% when pulling b1c5bb820371681e0d3c7e74a11be6b6e3168f45 on RomainForks:fix/twitter-user into 65bc465e537b213b0acd5c1a3f2a61ddc8d90a16 on adonisjs:develop.

I believe we may have to update docs as well

Where would you want me to change the doc?
This was a bug, we aren't changing a feature here.

Maybe doc also had the same bug?

Doc seems correct to me 👌


Add a way to find unused variables

Currently there is no automated way to find unused variables, it would be handy to have one.
One way to go about this would be a command line tool that tracks all variables provided and reports back on which don't get used by any of the template styles.
This might be part of a more complete linting tool that would check for other issues such as variables used in templates that aren't defined.

Success criteria
Be able to run a script that names all of the variables not being used in a given stylesheet. Definition "unused varibles": we mean something defined in the build system but not used in the stylesheets.


How to make Vertical Text Dataset?

Hello, I'm used your code for generating OCR dataset in many case. Thanks for your efforts really :D
But, I want to make vertical text image..
https://github.com/ankush-me/SynthText/blob/master/text_utils.py#L165
this section would decide "text mask" rendering.. but It's hard to make vertical text data. At present, only horizontal characters are made.
on this line : https://github.com/ankush-me/SynthText/blob/master/text_utils.py#L219
original code :
newrect = font.get_rect(ch)
newrect.y = last_rect.y
if i > mid_idx:
newrect.topleft = (last_rect.topright[0]+2, newrect.topleft[1])
            else:
                newrect.topright = (last_rect.topleft[0]-2, newrect.topleft[1])
            newrect.centery = max(newrect.height, min(fsize[1] - newrect.height, newrect.centery + curve[i]))
            try:
                bbrect = font.render_to(surf, newrect, ch, rotation=rots[i])
            except ValueError:
                bbrect = font.render_to(surf, newrect, ch)
            bbrect.x = newrect.x + bbrect.x
            bbrect.y = newrect.y - bbrect.y
            bbs.append(np.array(bbrect))
            last_rect = newrect

my code :
newrect = font.get_rect(ch)
            # newrect.y = last_rect.y
            newrect.x = last_rect.x
            if i > mid_idx:
                # print(ch, " <- right")
                # newrect.topleft = (last_rect.topright[0] + 2, newrect.topleft[1])
                # newrect.topleft = (last_rect.topright[0], newrect.topleft[1] + 2)
                # newrect.topleft = (newrect.topright[0], last_rect.topleft[1] + 2)
                # newrect.topright = (newrect.bottomright[0], last_rect.bottomright[1] + 3)
                newrect.topleft = (newrect.bottomleft[0], last_rect.bottomleft[1] + 2)
            else:
                # print(ch, " <- left")
                # newrect.topright = (last_rect.topleft[0] - 2, newrect.topleft[1])
                # newrect.topright = (last_rect.topleft[0], newrect.topleft[1] - 2)
                # newrect.topright = (newrect.topright[0], last_rect.topleft[1] - 2)
                newrect.bottomright = (newrect.topright[0], last_rect.topright[1] - 2)
            newrect.centery = max(newrect.height, min(fsize[1] - newrect.height, newrect.centery + curve[i]))
            # newrect.centerx = max(newrect.width, min(fsize[0] - newrect.width, newrect.centerx + curve[i]))
            try:
                bbrect = font.render_to(surf, newrect, ch, rotation=rots[i])
            except ValueError:
                print("render error, without rotation..")
                bbrect = font.render_to(surf, newrect, ch)
            bbrect.x = newrect.x + bbrect.x
            bbrect.y = newrect.y - bbrect.y
            bbs.append(np.array(bbrect))
            last_rect = newrect

sample result :

sample result with annotation :

The possibilities are there, but they are not perfect.
I really need your help..
Thanks.

Hi @SSUHan, see #111 and probably get in touch with @Shun14.
Short answer, modify render_multiline instead of render_curved.

@ankush-me Can you think about what the problem is?
modified code :

multiline modified gen sample image :

Yes, you need to switch the width and height of the canvas, i.e., swap 1,2 arguments of fsize.

you mean
from
fsize = (round(2.0 * line_bounds.width), round(1.25 * line_spacing * len(lines)))

to
fsize = (round(1.25 * line_spacing * len(lines)), round(2.0 * line_bounds.width))

??

Struggle with Upside part :(

How much of the text is missing? You can try initializing y to a number > 0.

@ankush-me

How much of the text is missing?

about 20% of upside..

You can try initializing y to a number > 0.

I tried but it doesn't work..

@ankush-me I found what is problem.
I think surf_arr crop problem.
Here is horizontal case
"surf_arr_pixel_alpha.png" from pygame.surfarray.pixels_alpha(surf) :

"surf_arr.png" from self.crop_safe(surf_pixels_alpha, rect_union, bbs, pad=5) :

"surf_arr_swapaxes.png" from surf_arr.swapaxes(0, 1) :

Now, This is Vertical Case
"surf_arr_pixel_alpha.png" from pygame.surfarray.pixels_alpha(surf) :

"surf_arr.png" from self.crop_safe(surf_pixels_alpha, rect_union, bbs, pad=5) :

"surf_arr_swapaxes.png" from surf_arr.swapaxes(0, 1) :

Now we can infer that there is a problem in the crop_safe process.

It's hard to explain but
ch_bounds = font.render_to(surf, (x, y), ch)

ch_bounds.y didn't act like horizontal case.  So, one character of upside was always missing.
Sample Result :
"surf_arr_pixel_alpha.png" from pygame.surfarray.pixels_alpha(surf) :

"surf_arr.png" from self.crop_safe(surf_pixels_alpha, rect_union, bbs, pad=5) :

"surf_arr_swapaxes.png" from surf_arr.swapaxes(0, 1) :

Anyway, the function: render_multiline(self, font, text) for vertical text would be below
    def render_multiline(self, font, text):
        """
        renders multiline TEXT on the pygame surface SURF with the
        font style FONT.
        A new line in text is denoted by \n, no other characters are
        escaped. Other forms of white-spaces should be converted to space.

        returns the updated surface, words and the character bounding boxes.
        """
        # get the number of lines
        lines = text.split('\n')
        lengths = [len(l) for l in lines]

        # font parameters:
        line_spacing = font.get_sized_height() + 1

        # initialize the surface to proper size:
        line_bounds = font.get_rect(lines[np.argmax(lengths)])
        print("line bounds : ", line_bounds, type(line_bounds))
        # horizontal
        # fsize = (round(2.0 * line_bounds.width), round(1.25 * line_spacing * len(lines)))
        # fsize = (round(2.0 * line_bounds.height), round(1.25 * line_spacing * len(lines)))

        # vertical
        fsize = (round(1.5 * line_spacing * len(lines)), round(2.0 * line_bounds.width))
        # fsize = (round(1.25 * line_spacing * len(lines)), round(2.0 * line_bounds.height))
        surf = pygame.Surface(fsize, pygame.locals.SRCALPHA, 32)
        print("surf.get_size() : ", surf.get_size())

        """
        https://www.pygame.org/docs/ref/freetype.html#pygame.freetype.Font.render_to
        """
        bbs = []
        space = font.get_rect('O')
        print("space height : ", space.height)
        # print("space height : ", space.height)
        x, y = 0, 0
        # horizontal
        # for l in lines:
        #     x = 20  # carriage-return
        #     y += line_spacing  # line-feed
        #     print(l)
        #
        #     for ch in l:  # render each character
        #         if ch.isspace():  # just shift
        #             x += space.width
        #         else:
        #             # render the character
        #             print("{} : x, y : ".format(ch), x, y)
        #             ch_bounds = font.render_to(surf, (x, y), ch)
        #             print("{} : before ch_bounds : ".format(ch), ch_bounds, end='\t')
        #             ch_bounds.x = x + ch_bounds.x
        #             ch_bounds.y = y - ch_bounds.y
        #             print("after ch_bounds : ", ch_bounds)
        #             x += ch_bounds.width
        #             bbs.append(np.array(ch_bounds))

        # vertical
        for l in lines:
            # x = 0  # carriage-return
            # y += line_spacing  # line-feed
            print(l)
            y = 1.5 * space.height
            x += line_spacing

            for ch in l:  # render each character
                if ch.isspace():  # just shift
                    # x += space.width
                    print("is space : ", space.height)
                    y += space.height
                else:
                    # render the character
                    print("{} : x, y : ".format(ch), x, y)
                    ch_bounds = font.render_to(surf, (x, y), ch)
                    # ch_bounds.x = x + ch_bounds.x
                    print("{} : before ch_bounds : ".format(ch), ch_bounds, end='\t')
                    ch_bounds.y = y + ch_bounds.y - 1.5*space.height
                    ch_bounds.x = x - ch_bounds.x
                    # ch_bounds.y = y - ch_bounds.y
                    print("after ch_bounds : ", ch_bounds)
                    # x += ch_bounds.width
                    # y += ch_bounds.height
                    y += 1.25 * ch_bounds.height
                    bbs.append(np.array(ch_bounds))

        # get the union of characters for cropping:
        r0 = pygame.Rect(bbs[0])
        print("r0 : ", r0)
        rect_union = r0.unionall(bbs)
        print("rect_union : ", rect_union, type(rect_union))

        # get the words:
        words = ' '.join(text.split())

        # crop the surface to fit the text:
        bbs = np.array(bbs)
        surf_pixels_alpha = pygame.surfarray.pixels_alpha(surf)
        cv2.imwrite('surf_pixels_alpha.png', surf_pixels_alpha)
        surf_arr, bbs = self.crop_safe(surf_pixels_alpha, rect_union, bbs, pad=5)
        # print("surf arr : ", surf_arr, type(surf_arr), surf_arr.shape)
        cv2.imwrite('surf_arr.png', surf_arr)
        surf_arr = surf_arr.swapaxes(0, 1)
        cv2.imwrite('surf_arr_swapaxes.png', surf_arr)
        # self.visualize_bb(surf_arr,bbs)
        return surf_arr, words, bbs

Final Result :

Thanks for sharing. It seems you are still missing some chars on the left in the sample image above?

@ankush-me Yes. It's not totally complete because of this logic :
y = 1.5 * space.height

oh,I met some mistake just like  @SSUHan said and change the ch_bounds's width etc.

A new line in text is denoted by \n, no other characters are
escaped. Other forms of white-spaces should be converted to space.
    returns the updated surface, words and the character bounding boxes.
    """
    # get the number of lines
    lines = text.split('\n')
    # remove those font not supported
    for l in lines:
        text_size = font.get_metrics(l)
        supported = len(filter(lambda t: t is None, text_size)) == 0
        if not supported:
            lines.remove(l)

    lengths = [len(l) for l in lines]

    # font parameters:
    line_spacing = font.get_sized_height() + 2

    # initialize the surface to proper size:
    line_bounds = font.get_rect(lines[np.argmax(lengths)])

    # fsize = (round(2.0*line_bounds.width), round(1.25*line_spacing*len(lines)))

    fsize = (round(1.5 *line_spacing*len(lines)), round(3.0 * line_bounds.width))
    surf = pygame.Surface(fsize, pygame.locals.SRCALPHA, 32)
    width, height = surf.get_size()
    bbs = []
    space = font.get_rect('O')
    x, y = space.width/5, 0
    for l in lines:
        # carriage-return
        y = 1.5*line_spacing # line-feed
        for ch in l: # render each character
            if ch.isspace(): # just shift
                y += space.height
            else:
                # render the character
                ch_size = font.get_metrics(ch)[0]
                ch_bounds = font.render_to(surf, (x,y), ch)
                if ch_size[0] <= 3:
                    if ch_size[0] == 0:
                        ch_bounds.x = x - ch_bounds.x + 1
                        ch_bounds.width = ch_size[1] - ch_size[0]
                    else:
                        ch_bounds.x = x - ch_bounds.x + ch_size[0] *2
                        ch_bounds.width = ch_size[1] - ch_size[0]
                else:

                    ch_bounds.x = x - ch_bounds.x + ch_size[0]*1.8 + 1
                    ch_bounds.width = ch_size[1] - ch_size[0] * 0.5

                ch_bounds.y = y - ch_bounds.y
                y += ch_bounds.height
                bbs.append(np.array(ch_bounds))
        x += line_spacing

    # get the union of characters for cropping:
    r0 = pygame.Rect(bbs[0])
    rect_union = r0.unionall(bbs)

    # get the words:
    words = ' '.join(lines)
    #words=words.decode('utf-8')
    # crop the surface to fit the text:
    bbs = np.array(bbs)

    surf_arr, bbs = crop_safe(pygame.surfarray.pixels_alpha(surf), rect_union, bbs, pad=5)
    surf_arr = surf_arr.swapaxes(0,1)

    # self.visualize_bb(surf_arr,bbs)
    return surf_arr, words, bbs

`def render_multiline(self,font,text):
"""
renders multiline TEXT on the pygame surface SURF with the
font style FONT.
A new line in text is denoted by \n, no other characters are
escaped. Other forms of white-spaces should be converted to space.
    returns the updated surface, words and the character bounding boxes.
    """
    # get the number of lines
    lines = text.split('\n')
    # remove those font not supported
    for l in lines:
        text_size = font.get_metrics(l)
        supported = len(filter(lambda t: t is None, text_size)) == 0
        if not supported:
            lines.remove(l)

    lengths = [len(l) for l in lines]

    # font parameters:
    line_spacing = font.get_sized_height() + 2

    # initialize the surface to proper size:
    line_bounds = font.get_rect(lines[np.argmax(lengths)])

    # fsize = (round(2.0*line_bounds.width), round(1.25*line_spacing*len(lines)))

    fsize = (round(1.5 *line_spacing*len(lines)), round(3.0 * line_bounds.width))
    surf = pygame.Surface(fsize, pygame.locals.SRCALPHA, 32)
    width, height = surf.get_size()
    bbs = []
    space = font.get_rect('O')
    x, y = space.width/5, 0
    for l in lines:
        # carriage-return
        y = 1.5*line_spacing # line-feed
        for ch in l: # render each character
            if ch.isspace(): # just shift
                y += space.height
            if ch.isdigit() == True:
                ch_size = font.get_metrics(ch)[0]
                ch_bounds = font.render_to(surf, (x,y), ch, rotation=90)
                ch_bounds.x = x - ch_bounds.x + 1
            else:
                # render the character
                ch_size = font.get_metrics(ch)[0]
                ch_bounds = font.render_to(surf, (x,y), ch)
                if ch_size[0] <= 3:
                    if ch_size[0] == 0:
                        ch_bounds.x = x - ch_bounds.x + 1
                        ch_bounds.width = ch_size[1] - ch_size[0]
                    else:
                        ch_bounds.x = x - ch_bounds.x + ch_size[0] *2
                        ch_bounds.width = ch_size[1] - ch_size[0]
                else:

                    ch_bounds.x = x - ch_bounds.x + ch_size[0]*1.8 + 1
                    ch_bounds.width = ch_size[1] - ch_size[0] * 0.5

                ch_bounds.y = y - ch_bounds.y
                y += ch_bounds.height
                bbs.append(np.array(ch_bounds))
        x += line_spacing

    # get the union of characters for cropping:
    r0 = pygame.Rect(bbs[0])
    rect_union = r0.unionall(bbs)

    # get the words:
    words = ' '.join(lines)
    #words=words.decode('utf-8')
    # crop the surface to fit the text:
    bbs = np.array(bbs)

    surf_arr, bbs = crop_safe(pygame.surfarray.pixels_alpha(surf), rect_union, bbs, pad=5)
    surf_arr = surf_arr.swapaxes(0,1)

    # self.visualize_bb(surf_arr,bbs)
    return surf_arr, words, bbs`

@ankush-me I also have some issue.If I want to generate some straight text rather than curved text, how can I try? I changed some code but get no difference.

another idea: you can change the font rather than the code, generate the font that is vertical. Some apps can do this.

Final Result :

I just changed render_multiline and render_sample in text_utils.py
`    def render_multiline(self,font,text):
"""
renders multiline TEXT on the pygame surface SURF with the
font style FONT.
A new line in text is denoted by \n, no other characters are
escaped. Other forms of white-spaces should be converted to space.
    returns the updated surface, words and the character bounding boxes.
    """
    # get the number of lines
    lines = [c for c in text]
    lengths = [len(l) for l in lines]

    # font parameters:
    print("get_sized_height: ", font.get_sized_height())
    line_spacing = font.get_sized_height() + 1
    # line_spacing = font.get_sized_height() + 1

    # initialize the surface to proper size:
    line_bounds = font.get_rect(lines[np.argmax(lengths)])
    fsize = (round(2.0*line_bounds.width), round(line_spacing*len(lines)))
    # fsize = (round(2.0*line_bounds.width), round(1.25*line_spacing*len(lines)))
    surf = pygame.Surface(fsize, pygame.locals.SRCALPHA, 32)

    bbs = []
    space = font.get_rect('O')
    x, y = 0, 0
    idx = 0
    for l in lines:
        idx += 1
        x = 0 # carriage-return
        # y += line_spacing # line-feed
        y += round(line_spacing * 0.8) # line-feed
        if idx == 5 or idx == 11:
            y += round(line_spacing * 0.2)

        for ch in l: # render each character
            if ch.isspace(): # just shift
                x += space.width
            else:
                # render the character
                ch_bounds = font.render_to(surf, (x,y), ch)
                ch_bounds.x = x + ch_bounds.x
                ch_bounds.y = y - ch_bounds.y
                # todo 修改字符间距
                # x += ch_bounds.width
                x += ch_bounds.width + 5
                bbs.append(np.array(ch_bounds))

    # get the union of characters for cropping:
    r0 = pygame.Rect(bbs[0])
    rect_union = r0.unionall(bbs)

    # get the words:
    words = ' '.join(text.split())

    # crop the surface to fit the text:
    bbs = np.array(bbs)
    surf_arr, bbs = crop_safe(pygame.surfarray.pixels_alpha(surf), rect_union, bbs, pad=5)
    surf_arr = surf_arr.swapaxes(0,1)
    #self.visualize_bb(surf_arr,bbs)
    return surf_arr, words, bbs`

in render_sample function, I just change  text = self.text_source.sample(nline,nchar,text_type) to
# text = self.text_source.sample(nline,nchar,text_type)             text_arr = random.sample('ABCDEFGHIJKLMNOPQRSTUVWXYZ',3)             text = ''.join(text_arr) + 'U'             text2 = random.sample('0123456789',7)             text2 = ''.join(text2)             text = text + text2