Ergonomics could be improved

After trying out the library for a bit, I've found some places in the API that are a bit painful to work with at the moment. Number one is the (lack of) interop with dense matrices and vectors. It would be very nice to be able to construct a sparse array from a Vec<N>, for example, or dot product a sparse vector with a Vec<N>. I won't mention too much more about dense storage interop since you've got some issues opened about this.
One set of very useful things that is missing is support for per-element operations between matrices/vectors. For example if I want to multiply one vector by a constant and add it to another. I think the most practical way for the time being of supporting per-element operations would be to add some functions with differing numbers of arguments that take some borrowed matrices/vectors, and a closure to operate on them to produce the result, or maybe write into an existing matrix/vector. For example, something like
fn per_element1<N, F: FnMut(N) -> N>(a: CsVecView<N>, f: F) -> CsVecOwned<N>;
fn per_element2<N, F: FnMut(N, N) -> N>(a: CsVecView<N>, b: CsVecView<N>, f: F) -> CsVecOwned<N>;
fn per_element3<N, F: FnMut(N, N, N) -> N>(a: CsVecView<N>, b: CsVecView<N>, c: CsVecView<N>, f: F) -> CsVecOwned<N>;

(If this is to support dense vector/matrix interop, it may be worth considering a trait for vector views that dense vectors/matrices can implement as well as sparse ones)
(Edit: There may need to be two sets of functions - ones for operation only on non-zero elements, and ones that operate on all elements, so that it is possible to have sparse usage of the function f)
Another more basic set of things that is missing is more operations on elements of matrices/vectors. E.g. retrieving and setting a value at a particular position just like a normal matrix. The implementation should handle the case of whether a value is zero or not and act appropriately, including insertion of indices into the storage vectors. To better support this kind of usage you may want to add support for mutable views, and think more carefully about the internal representation.
Speaking of views, it would be very nice to have views that are arbitrary sub-regions of the matrix/vector, as well as regions that extend past the boundaries of the original matrix/vector, returning zeroes for out-of-bounds locations.
Another thing that would need some careful thought would be support for reusing allocated storage and preallocating. This would would improve performance for cases where a particular routine must operate several times, and could eliminate repeated heap (de)allocations.
I'll add more thoughts to this issue if I think of anything else.

After trying out the library for a bit, I've found some places in the API that are a bit painful to work with at the moment. Number one is the (lack of) interop with dense matrices and vectors. It would be very nice to be able to construct a sparse array from a Vec, for example, or dot product a sparse vector with a Vec. I won't mention too much more about dense storage interop since you've got some issues opened about this.

Indeed these things can be great. The tricky part of these is that ideally I'd like to be able (for vectors at least) have functions that can operate on either Vec as input, or a dense array (eg ndarray's arrays). There's probably going to be a trait for that.

One set of very useful things that is missing is support for per-element operations between matrices/vectors.

Yes indeed it's a must have.

Another more basic set of things that is missing is more operations on elements of matrices/vectors. E.g. retrieving and setting a value at a particular position just like a normal matrix. The implementation should handle the case of whether a value is zero or not and act appropriately, including insertion of indices into the storage vectors. To better support this kind of usage you may want to add support for mutable views, and think more carefully about the internal representation.

This one is tricky. I've recently added the triplet matrix, which enables this kind of operations with a lower runtime cost, but I'm not convinced this is a feature I want for the csc/csr matrices. It exists in eigen, but I've really found its usage quite clumsy. In my opinion once you have a compressed matrix you don't want to change its structure, only its values, which lets you benefit from symbolic factorizations. Being able to guarantee that at the type level seems nice.
The path I would prefer here would be to support that use case in another matrix format, probably akin to scipy's Dictionnary Of Keys, and have easy conversions between the formats.

Speaking of views, it would be very nice to have views that are arbitrary sub-regions of the matrix/vector, as well as regions that extend past the boundaries of the original matrix/vector, returning zeroes for out-of-bounds locations.

Yes that's a feature I want to have too. But it'll have to wait a bit, I want to get used to ndarray's indexing syntax beforehand, it could be great to use the same syntax for this feature.

Another thing that would need some careful thought would be support for reusing allocated storage and preallocating. This would would improve performance for cases where a particular routine must operate several times, and could eliminate repeated heap (de)allocations.

As it turns out that's one of my design goals. I try to always have allocation-free implementations, but I want to wrap those implementations into user-friendlier-but-allocating APIs later on (as in the cholesky module for instance). Is there any place in particular where you saw the need for this pattern?
One last thing, could you open one issue for each of these points? It would be easier for me to track it down.
Thanks again for your feedback.

FYI I've started splitting this issue into multiple single issues to better track progress. I'll link the issues here.

Another more basic set of things that is missing is more operations on elements of matrices/vectors. E.g. retrieving and setting a value at a particular position just like a normal matrix. The implementation should handle the case of whether a value is zero or not and act appropriately, including insertion of indices into the storage vectors. To better support this kind of usage you may want to add support for mutable views, and think more carefully about the internal representation.

Mutable views ticket: #56
Working on it right now in this branch: https://github.com/vbarrielle/sprs/tree/CsMatViewMut
Insertion ticket: #57

Speaking of views, it would be very nice to have views that are arbitrary sub-regions of the matrix/vector, as well as regions that extend past the boundaries of the original matrix/vector, returning zeroes for out-of-bounds locations.

Related issue in #58.

One set of very useful things that is missing is support for per-element operations between matrices/vectors. For example if I want to multiply one vector by a constant and add it to another. I think the most practical way for the time being of supporting per-element operations would be to add some functions with differing numbers of arguments that take some borrowed matrices/vectors, and a closure to operate on them to produce the result, or maybe write into an existing matrix/vector. For example, something like

Related issue #59.

It would be very nice to be able to construct a sparse array from a Vec, for example, or dot product a sparse vector with a Vec.

See issue #60.


Release notes??

Purpose / why
An attempt to start documenting release notes.
What changes were made?
Add a release notes section
Interested Parties
@Islandora/8-x-committers_

:bowing_man:

Should the filename be 2.x instead of 8.x-2.x since we are going to do the semantic versioning change?

Question: should we add a "you need to run update-db" to these release notes (for the media__field_file_size update), or can we assume that this is standard Drupal updating procedure and doesn't bear mentioning?
Also, perhaps this PR should be based on a branch of documentation rather than a fork, that way multiple individuals can contribute to the PR?

I think it's worth adding. and yeah, a branch a bunch of people can contribute to makes sense to me. do i have permission to do that?

I think so... I do.

Both of you should.  If there's any issue pushing a branch, let me know.


Create opennebula plugin for chef-provisioning

BlackBerry has started developing a chef-provisioning plugin for opennebula.  We're working away, and will release when things are a bit more stable. :)

Closing since this isn't an actionable item on our end: please point us to any released code!


KYLIN-3406 Ignore execute output file lose

Root Cause
When any single file of Kylin's metadata miss in HDFS, the "Monitor" Page will failed to display all job info and kylin process will throw FileNotFoundException as above. The page has a warning message.
Fix solution
The better way should be : miss file should only affect specific task. And if only execute output miss, task should be success, otherwise that should be a fatal exeception. You have to fix it manually.
Test at https://issues.apache.org/jira/projects/KYLIN/issues/KYLIN-3406

Can one of the admins verify this patch?

Local CI pass.

Pull Request Test Coverage Report for Build 3914

16 of 45 (35.56%)  changed or added relevant lines in 4 files are covered.
7 unchanged lines in 3 files lost coverage.
Overall coverage increased (+0.004%) to 25.942%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

core-common/src/main/java/org/apache/kylin/common/persistence/BrokenEntity.java
0
1
0.0%

core-job/src/main/java/org/apache/kylin/job/dao/ExecutableOutputPOSerializer.java
15
25
60.0%

storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseResourceStore.java
0
18
0.0%

Files with Coverage Reduction
New Missed Lines
%

storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseResourceStore.java
1
0.0%

core-metadata/src/main/java/org/apache/kylin/source/datagen/ColumnGenerator.java
1
81.08%

core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java
5
77.81%

Totals

Change from base Build 3913:
0.004%

Covered Lines:
17701

Relevant Lines:
68233

💛  - Coveralls

@shaofengshi OK, I knew it.

@shaofengshi I have rewrite this patch, and local ci test pass, please review again.


[SPARK-19757][CORE] DriverEndpoint#makeOffers race against CoarseGrainedSchedulerBackend#killExecutors

What changes were proposed in this pull request?
While some executors are being killed due to idleness, if some new tasks come in, driver could assign them to some executors are being killed. These tasks will fail later when the executors are lost. This patch is to make sure CoarseGrainedSchedulerBackend#killExecutors and DriverEndpoint#makeOffers are properly synchronized.
How was this patch tested?
manual tests

Can one of the admins verify this patch?

ok to test

Test build #73859 has started for PR 17091 at commit 6a04ff7.

Test build #73859 has finished for PR 17091 at commit 6a04ff7.

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

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

Merged build finished. Test PASSed.

Can you add back the bug to the PR title?

Sure. Thanks.

Test build #74046 has started for PR 17091 at commit 67b874e.

@vanzin I updated the patch a little so as not to kill an executor if it is busy.

Test build #74046 has finished for PR 17091 at commit 67b874e.

This patch fails from timeout after a configured wait of `250m`.
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/74046/
Test FAILed.

Test build #74117 has started for PR 17091 at commit 9ade0fd.

Test build #74117 has finished for PR 17091 at commit 9ade0fd.

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/74117/
Test PASSed.

Did you mean to close this?

Oh, sorry, I closed it by mistake. I'd like to get it in. Thanks.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

ok to test

Test build #74214 has started for PR 17091 at commit 9ade0fd.

Test build #74214 has finished for PR 17091 at commit 9ade0fd.

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/74214/
Test PASSed.

Merging to master.


AttributeError: 'GoogleOAuth2' object has no attribute 'OAUTH_TOKEN_PARAMETER_NAME'

@pk026
Please provide some details. Have you overridden the google backend of python-social-core?
I'm closing this because it was reported a long time ago.
But fill free to re-open if help is still needed.


Update PHP library

The linked library has been moved to a new location, this change updates the documentation to reflect it.

Oops, didn't see #1753. Closing in favor of that one.


Draft 16 Updates

Make sure the @authority derived component values are normalized before use.
Add more sample signatures from draft to tests.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

13 of 13 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.04%) to 93.31%

Totals

Change from base Build<PHONE_NUMBER>:
0.04%

Covered Lines:
2586

Relevant Lines:
2806

💛  - Coveralls


aws_ebs_volume add attach, detach, and ref tests

This is the latest version of adding the attach and detach actions based on the recent chef-provisioning-aws overhaul.
delete action

if a volume is attached to any instance, it will be automatically detached before attempting the delete (otherwise aws will raise an exception)

attach action

if a volume is :available, it will be attached
if a volume is attached to another instance, it will be detached and attached to the new_resource
if a volume is attached to the expected machine, but to a different device, it will be detached and attached to the new_resource
if a volume doesn't exist at the time of attachment an exception is raised

detach action

if a volume is :in_use, it will be detached
if a volume doesn't exist at the time of attachment a warning is logged

wait_for_volume_status checks

create, delete, attach, and detach call #wait_for_volume_status after converge_by blocks have executed.

Status waits:

create => :available
delete => !volume.exists?
attach => :in_use
detach => :available

Ref Tests
Example ref recipes have been added to test the resource.  These will eventually be added to the new provisioning integration test framework.

_idempotence: verifies each action does not error when called twice to honor #wait_for_volume_status calls
_reattachment: verifies all attach state combinations
_pre_existing: verifies that an existing ebs volume can be referenced and then become managed my provisioning (automated to simulate existing volume)

@tyler-ball @jkeiser @chef/ociv

This is looking really good!  I added 1 comment and I would like to see some tests added, but otherwise I think its almost done.
For an example of the tests I am writing, check out https://github.com/chef/chef-provisioning-aws/blob/master/spec/integration/aws_vpc_spec.rb - I'm also working on some improvments to that to remove some unecessary boilerplate.

The travis failure is because the Gemfile you checked in references a local path.  Update this to reference the git master branch and that should go away.

@tyler-ball here are my changes:

Removed #save_managed_entry lines from :attach and :detach
Added multi-machine types to machine attribute
Added a new recipe to validate they work.  I had issues with AwsInstance, see my comment
Fixed Gemfile
Have not started on specs

Yeah, I have also been having issues with the get_aws_object myself.  I have failing tests in https://github.com/chef/chef-provisioning-aws/pull/132 that highlight this.
I don't think you need the lazy blocks (when adding the machine) - at least, you shouldn't.  If you do, that is a bug on our side.

Actually @jkeiser - should we need the lazy blocks https://github.com/chef/chef-provisioning-aws/blob/pw/ebs_vol_attachment/docs/examples/aws_ebs_volume_machine_types.rb#L36 and https://github.com/chef/chef-provisioning-aws/blob/pw/ebs_vol_attachment/docs/examples/aws_ebs_volume_machine_types.rb#L44-L47 ?  Maybe I am wrong and they are necessary.
m = machine 'test'
ebs_volume 'test_volume' do
  machine m
end

I thought ^^^ would work but maybe the reason my failing security groups test is because the machine doesn't have an aws object until convergence time, and the ebs_volume resource is trying to look it up at compile time.

m  = machine 'blah' returns the Chef::Resource::Machine
I bet
i = aws_instance 'blah' is what we want
On Thursday, March 19, 2015, Tyler Ball<EMAIL_ADDRESS>wrote:

Actually @jkeiser https://github.com/jkeiser - should we need the lazy
blocks
https://github.com/chef/chef-provisioning-aws/blob/pw/ebs_vol_attachment/docs/examples/aws_ebs_volume_machine_types.rb#L36
and
https://github.com/chef/chef-provisioning-aws/blob/pw/ebs_vol_attachment/docs/examples/aws_ebs_volume_machine_types.rb#L44-L47
? Maybe I am wrong and they are necessary.
m = machine 'test'
ebs_volume 'test_volume' do
machine mend
I thought ^^^ would work but maybe the reason my failing security groups
test is because the machine doesn't have an aws object until convergence
time, and the ebs_volume resource is trying to look it up at compile time.
—
Reply to this email directly or view it on GitHub
https://github.com/chef/chef-provisioning-aws/pull/133#issuecomment-83811866
.


Update documentation on I/O

BEGINRELEASENOTES

Added documentation for reading and writing EDM4hep files with the IOSvc
Moved documentation on k4DataSvc to legacy page

ENDRELEASENOTES
Some extensions (namely sphinx-design and from myst_parser colon_fence) are used to render the pages more nicely in sphinx-based documentation with admonitions and tabs (setting properties either in steering file or from command line):

Closes #212

I don't have any more comments. Anything else @m-fila?

I noticed that outputCommands is not capitalized as the rest of the IOSvc properties.
I'm not sure if you want to give it similar treatment as with Input and Output properties
Otherwise that's all. Thank you very much for the comments :smile:

I had the same thought when I was reading the diffs. I'm not sure, in this case this was literally the same command as it is used with PodioDataSvc. At least with Output it was a different parameter name. So I don't have a strong opinion on changing it or keeping it as it is.


Start up page 'get started' button is in incorrect alignment.

Correct UI :

Incorrect UI alignment:

Hey @MadhushaPrasad
I'll be happy to help you fix this bug.

Hey @MadhushaPrasad
I'll be happy to help you fix this bug.

@aayu5hgit sure go ahead

Will he raising a PR by tonight

Will he raising a PR by tonight

no, you are the only one assign for this issue, so you can work on this issue

Cool, I've already started.

@aayu5hgit any update?


[Feature Request] Add zero event

[x] I have read through the manual page (man fzf)
[x] I have the latest version of fzf
[x] I have searched through the existing issues

Info

OS

[x] Linux
[ ] Mac OS X
[ ] Windows
[ ] Etc.

Shell

[ ] bash
[x] zsh
[ ] fish

Problem / Steps to reproduce
I noticed that fzf now has a one event (https://github.com/junegunn/fzf/commit/8ec917b1c36ed1cf6ace64419307aa85fda4bee3) which is really useful. Another useful addition would be a zero event which can be triggered when there are no matches found. One use-case that I have in mind is:
When I'm searching for files in nvim, I start by populating fzf from recently used files (using ShaDa) and if I don't find the file there, I expand my search to all files. This is roughly what I'm doing:
  let recent_files = <some logic>
  let options = [
        \ '--scheme', 'path',
        \ '--bind', 'change:top,space:reload(git ls-files)+unbind(space)',
        \ ]
  call fzf#run(fzf#wrap({
        \ 'source': empty(recent_files) ? 'git ls-files' : recent_files,
        \ 'options': options,
        \ 'down': '40%',
        \ }))

When I call this code, it searches the recent file. I can press space to expand my search to all files. I think a really nice addition to this would be if I can use the zero event to automatically call reload instead of having to press space.
I'm happy to help with the implementation but want to get an initial idea if you think this would be a valuable addition.

Thank you!


Authentication service: add JWT token signature validation as part of the token validation flow

CCF doc says the app needs to validate the signature of JWT token
CCF provides support for managing public token signing keys required for validating tokens. In the future, CCF will support validating token signatures natively (currently the responsibility of apps).
https://microsoft.github.io/CCF/main/build_apps/auth/jwt.html
so it is needed to add JWT token signature validation as part of the token validation flow

Based on my conversation with CCF Team, CCF now supports token signature verification by default. but the app needs to check the payload of the JWT to handle authorisation
And they have updated the documentation based on our conversation


module 'nmap' has no attribute 'PortScanner'

root@kali:~/kickthemout# python3 kickthemout.py
ERROR: Gateway IP could not be obtained. Please enter IP manually.
kickthemout> Enter Gateway IP (e.g. <IP_ADDRESS>): <IP_ADDRESS>
Scanning your network, hang on...
ERROR: Network scanning failed. Please check your requirements configuration.
If you still cannot resolve this error, please submit an issue here:
https://github.com/k4m4/kickthemout/issues
Details: module 'nmap' has no attribute 'PortScanner'

I solved this issue by running
pip3 uninstall nmap

I solved this by uninstalling both nmaps, and then re-installing python-nmap.
pip3 uininstall nmap
pip3 uninstallpython-nmap
pip3 install python-nmap

I solved this by uninstalling both nmaps, and then re-installing python-nmap.
pip3 uininstall nmap
pip3 uninstall python-nmap
pip3 install python-nmap

Bunu, her iki nmaps'i kaldırarak ve ardından python-nmap'i yeniden kurarak çözdüm.
pip3 uininstall nmap
pip3 uninstall python-nmap
pip3 python-nmap yükleyin

çözdüm thx bro

Yeah Thanks, It worked!


Install problem - dependency ‘RCurl’ is not available for package ‘RODProt’

Hello,
install_github("RODProt", "QBRC")

raises
Creating a generic function for ‘close’ from package ‘base’ in package ‘RCurl’
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  impossible de charger l'objet partagé '/usr/local/Cellar/r/3.2.1_1/R.framework/Versions/3.2/Resources/library/RCurl/libs/RCurl.so':
  dlopen(/usr/local/Cellar/r/3.2.1_1/R.framework/Versions/3.2/Resources/library/RCurl/libs/RCurl.so, 6): Library not loaded: libcurl.4.dylib
  Referenced from: /usr/local/Cellar/r/3.2.1_1/R.framework/Versions/3.2/Resources/library/RCurl/libs/RCurl.so
  Reason: image not found
Erreur : le chargement a échoué
Exécution arrêtée
ERROR: loading failed
* removing ‘/usr/local/Cellar/r/3.2.1_1/R.framework/Versions/3.2/Resources/library/RCurl’

The downloaded source packages are in
    ‘/private/var/folders/j_/v8b1bst93_94t724ptsswfsr0000gn/T/RtmpTVSVpH/downloaded_packages’
'/usr/local/Cellar/r/3.2.1_1/R.framework/Resources/bin/R' --no-site-file  \
  --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/j_/v8b1bst93_94t724ptsswfsr0000gn/T/RtmpTVSVpH/devtoolsa28d4ab03a42/QBRC-RODProt-1f69227'  \
  --library='/usr/local/Cellar/r/3.2.1_1/R.framework/Versions/3.2/Resources/library'  \
  --install-tests

ERROR: dependency ‘RCurl’ is not available for package ‘RODProt’
* removing ‘/usr/local/Cellar/r/3.2.1_1/R.framework/Versions/3.2/Resources/library/RODProt’
Erreur : Command failed (1)
De plus : Warning messages:
1: Username parameter is deprecated. Please use QBRC/RODProt
2: In utils::install.packages(pkgs, repos = repos, type = type, ...,  :
  installation of package ‘RCurl’ had non-zero exit status

I'm using Mac OS X 10.10.5
Here is my R version:
$ r --version
R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin14.4.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.

Any idea ?
Kind regards

ERROR: dependency ‘RCurl’ is not available for package ‘RODProt’

Looks like you need to install.packages("RCurl")

I get same error.
I've found in https://cran.r-project.org/web/packages/RCurl/index.html
but I haven't been able to open an issue at http://www.omegahat.org/RCurl

Maybe you need to have curl before you can install RCurl.
Try "curl-config" in the command line and see if it works?

I did
brew unlink

and I installed latest R version for Mac.
It works fine now.

conda install -c omgarcia gcc-6  helped.


Please document that envoy metrics are not automatically available

OSM provides envoy metrics by default. Istio doesn't. This wasn't clear from the docs until this got debugged by the Istio team.
Please document this limitation to allow smoother migration from OSM to Istio.
Workaround is to use Istio Standard Metrics available by default.

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

ID: df0ffbaf-13e7-d3af-15e6-553c6ef4cc73
Version Independent ID: 06397549-1fbf-29ea-61ac-2510bd2f861f
Content: Istio-based service mesh add-on for Azure Kubernetes Service (preview) - Azure Kubernetes Service
Content Source: articles/aks/istio-about.md
Service: azure-kubernetes-service
GitHub Login: @MGoedtel
Microsoft Alias: shasb

@chitturs
Thanks for your feedback! We will investigate and update as appropriate.

@MGoedtel
Could you please review add comments on this, update as appropriate.

@chitturs
Thank you for bringing this to our attention. It is true that OSM provides envoy metrics by default, while Istio does not. This limitation is not explicitly mentioned in the Istio documentation, but it is a known issue that has been reported by users.
To allow for a smoother migration from OSM to Istio, it is recommended to use Istio Standard Metrics, which are available by default. These metrics provide a comprehensive view of the service mesh and can be used to monitor the health and performance of the mesh.

@chitturs
We are going to close this thread, if there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.

Please update the documentation and then close. Thanks.

Hi @chitturs
Our team is updating the documentation. Please keep track of any updates on the identical case brought up by one of our customers.
https://github.com/MicrosoftDocs/azure-docs/issues/110547


Sprite.getColor.a is equal to 0.99607843 instead of 1. Sprite.setAlpha(1) does not work.

If I create a new Sprite (sprite = new Sprite(new Texture(Gdx.files.internal("badlogic.jpg")))) by default sprite.getColor().a should be 1 but it is instead 0.99607843. Also, if I try sprite.setAlpha(1) and sprite.getColor.a = 1 and sprite.setColor(new Color(1,1,1,1) then sprite.getColor().a is still 0.99607843 instead of 1.

duplicate of #2593


[Feature] Add Mirror Equation Calculator

Description
I want to add a calculator which calculates the focal length  of the specified mirror(convex or concave mirror) if the distance of object and image from the mirror is given.
Screenshots
No response
Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[X] I am a GSSOC'24 contributor.
[ ] I am a IWOC'24 contributor.
[ ] I am a JWOC'24 contributor.
[ ] I am a SWOC'24 contributor.

Code of Conduct

[X] I agree to follow this project's "Code of Conduct".

@Rakesh9100 sir , I also want to make "lens focal length calculator" can i make new issue for that or should i make it together with mirror focal length calculator.

We have Wave And Optics Calculator present, is yours different from that? Pls check and let me know @Anshika14528

@Rakesh9100 sir, Yes , It is different from the wave and optics calculator is using focal and object distance to calculate image distance and I want to make calculator which helps us to find focal length and also the wave and optics calculator does not tell us about which lens or mirror is it finding the image distance.

Is this Mirror Equation Calculator @Anshika14528

Yes , i will use mirror equation 1/v + 1/u = 1/f  to calculate focal length(f) where u will be object distance and v will be image distance.

Okay, go ahead @Anshika14528

Thankyou


Live Migrations

Scope of “Basic Live Migration”
Live migration is an incredibly deep and complex topic. We are not going to solve this feature set in one pull request. Understand that this is going to be an iterative process.
The first iteration (which this design proposal sets out to solve) is to define how migrations are orchestrated within KubeVirt. This includes how migrations are initiated, what communication channels are involved, and the sequence of events that occur to orchestrate the migration.
In order to prove this design works, the initial implementation must be able to perform a basic form of live migration. For the purposes of this document, basic live migration simply means live migrating a qemu guest consuming read-only disks to another node where those same disks are available. IP failover and shared storage are not within the scope of what this document is covering. Those topics and others will be addressed in the next iteration of KubeVirt migration support.
Design Overview
Migrations only pertain to VMI objects and VMI migrations are transparent to higher level controllers. This means VMI’s associated with a VM or VMIRS can be migrated despite being managed by higher level controllers. For example, if a VM’s active VMI is migrated to another node, the VM controller is not involved at all with the sequence of events that are performed to achieve the migration.
Migrations are initiated by posting a VirtualMachineInstanceMigration (VMIM) object to the cluster. While this nomenclature is clunky, it is meant to instill that migrations pertain to VMI objects in a similar way to VirtualMachineInstancePresets and VirtualMachineInstanceReplicaSets. For the sake of this discussion, we’ll refer to the VMIM object simply as a Migration object.
When a Migration object is posted to the cluster, this kicks off a sequence of events that involve four stages.
Creation: The creation of the target pod that the VMI will move to.
Preparation: Local preparation of the target pod for VMI consumption.
Migration: The triggering of the migration between the source and target pods.
Finalization: The final acknowledgement indicating the VMI migration has completed.
Migration State Machine Steps
This section outlines in detail the mechanics involved with each of the migration steps.
Creation (Migration controller)
Creation of Target Pod: Migration Controller observes a new Migration object is introduced. The VMI associated with the Migration object is retrieved and target pod is rendered for the migration.
Hand off of VMI to target virt-handler: Migration observes that the target pod is “ready” and assigns the VMI to the node by setting...

the kubevirt.io/migrationTargetNodeName label on the VMI which allows the target node’s informer to observe the VMI.
the kubevirt.io/owned-by label on the target pod which tells the VMI controller this pod is already handed off to virt-handler.
the vmi.Status.MigrationState object to reflect that a migration is in progress. This includes the source and destination node names as well as the UID associated with the current migration job.

At this point, the migration can complete with or without the migration controllers involvement. The migration object will continue to track the migration via the VMI’s vmi.Status.MigrationState entry in order to detect if the migration job succeeds or fails, but the migration controllers involvement in the migration is complete after the Creation phase.
Preparation (Target node’s virt-handler)
Preparation of Target Pod: Virt-handler on the target node observes the VMI is scheduled to its node. Virt-handler knows not to start this VMI because it can see it is the target of a migration in the vmi.Status.MigrationState object and that the source node is somewhere else. Instead of starting the VMI, virt-handler goes through all the steps leading up to the start of the VMI in order to prepare the Pod’s environment.

Creation of cloud-init disks
Creation of secret and ConfigMap disks
Network setup within the pod
And everything else involved with the preStartHook in manager.go

Preparation of Target Migration Proxy: In addition to preparing the Pod’s environment for the migration, virt-handler also opens a proxy server on a unique port in order to tunnel the migration connection later on. Virt-handler takes any connection it receives on this port and bridges that connection to the target pod’s libvirtd unix socket.
Once all the preparation steps are complete, the target node’s virt-handler sets the target address in the vmi.Status.MigrationState object. This indicates to the source virt-handler that the migration is ready to happen.
Migration (Source node’s virt-handler)
Triggering the migration of the source Pod: At this point the source node’s virt-handler has all the information it needs to fulfill the migration. Virt-handler observes the vmi.Status.MigrationState object has a migration address set, and that the target node is different than the source node. This results in the virt-handler to open the source end of the migration proxy and trigger the source pod to perform a live migration via the virt-handler<->virt-launcher command channel.
Source Pod Migration: The virt-launcher’s command server processes the migration request by initiating the virDomainMigration libvirt client api call. Since the migration can take quite a bit of time to complete, this operation is performed asynchronously in a goroutine.
Finalization (Source node’s virt-handler)
Detecting Migration Results: Virt-handler has a libvirt domain informer that allows it to receive information about changes to the libvirt domain. This lets virt-handler discover if the domain has started or stopped. We leverage this functionality to pass information pertaining to the asynchronous  migration back to virt-handler.
If the migration is successful, the domain status will be shutoff with the reason of “migrated”
If the migration fails, the domain’s metadata will reflect that along with a reason the migration failed. The async migration job sets this metadata upon completion.
Finalizing the Migration: Once the source virt-handler detects the migration has completed, the results are reported in the vmi.Status.MigrationState fields. If the migration was successuful, the source virt-handler changes the vmi.Status.NodeName to reflect the migration target’s node name.
At this point the migration is complete. The top level Migration Object observes the VMI’s status and finalizes the Migration object.
Migration Proxy Design
The VMI pod's control plane does not have network access outside of the pod. This is because the network devices passed into the pod are handed off to the qemu guest.  As a result of this, libvirt can not perform the migration directly over a network connection. Instead we have to tunnel the libvirt connections over unix sockets to a pod that does have network connectivity.
In the current design, virt-handler acts as this network proxy. During the preparation stage, the target node exposes a port on the host network that forwards traffic to the target pod's libvirt. During the migration stage, the source node proxies traffic from the source pod to the proxy connection on the target node.
Remaining Implementation Tasks

[x] Figure out why https://github.com/kubevirt/kubevirt/pull/1526 breaks migration notifications and replace reverted patch with proper fix
[x] Webhook Validation use old object instead of informer
[x] Figure out how to expose the libvirt-sock to migration proxy
[x] Profile why virt-handler is using 100% cpu at times
[x] Handle the issue with virt-handler and hostnetwork=true and the metrics port.
[x] Make generated example vmi and migration manifests
[x] Migrate controller unit tests
[x] Virt-handler unit tests
[x] VMI controller unit tests
[x] Functional tests
[x] virt-handler vmi handoff expectations

Libvirt Bugs that need issues filed

[ ] Can't migrate to host with the same hostname.  Both target and source pod have the same hostname, which means we have to rename the target pod's host at the moment to work around this.
[ ] Can't migrate using destination connection that is a unix socket. This requires an unnecessary copy because we have to expose a tcp port and tunnel that traffic to the destination unix socket.
[ ] LIbvirt Lifecycle events don't fire for migrated domains unless we invoke the domain api... To get around this we had to make a goroutine that executes a domain list command on a periodic interval in the background.

Release note:
Fixes #676
Introduces basic live migration support into KubeVirt

Can we consider (from the beginning) migrations where the source node and target node are the same? A VM has several reasons to molt its original pod in order to change the resources it's exposed to (even if it doesn't need to change physical hosts).

We can definitely go as far as not ruling out live migrations between pods on the same node now. Since each pod is running a separate isolated libvirtd, there are no technical limitations preventing us from doing this.
We should keep this use case in mind as we iterate on the live migration design. One possibility that could limit us in the future is the introduction and adoption of the libvirtd-shim that's under development. I don't know exactly what the plans are there, but if we ever go back to adopting a centralized libvirtd we'll have to work with the libvirt team to explain why we need the ability to migrate locally. Libvirt has all these checks to ensure we can't migrate to the same libvirtd instance. For now this isn't an issue for us though since each pod has its own libvirtd.

Can we consider (from the beginning) migrations where the source node and target node are the same? A VM has several reasons to molt its original pod in order to change the resources it's exposed to (even if it doesn't need to change physical hosts).

you really really really don't want to do that unless there's absolutely no other way. Live migration is an expensive, long, risky operation and qemu supports all the hotplugs you may need directly, so for modification of pod's resources do whatever you have to do, but avoid guest live migration. if we need a root agent on host to "relocate" qemu process from one ns to the other, fine.

@rmohr @vladikr @fabiand This PR is at a point where it makes sense to start reviewing now. The functional tests should be passing and I've added a migration functional test as well.
The remaining items are unit tests which I should complete by the end of the week. If we can get some review feedback before the, that will give us a head start.

The changes here are pretty huge, but the bulk of the real work is fairly isolated. To help reviews, here are the files I think it makes the most sense to focus on.

virt-controller/watch/migration.go's tracking of the migration job
virt-controller/watch/vmi.go's detection of the current source pod (now that multiple pods exist)
virt-handler/vm.go's preparing of target pod, source node triggering of the migration, and finalization of migration job.
manager.go's background async migration job and domain get/set locking.

I no longer consider this a WIP. This should now be ready for review and merger.

Hey, chiming in because this discussion reminds me quite a lot of issues we had handling migrations in oVirt. There is a world of possible failures and nasty scenarios out there.

If target node fails, we'll never receive the ack that the target node received the domain. This will cause the migration to timeout during the handoff and fail. The VMI will also fail if the migration is technically successful (according to libvirt) yet the ack never arrives. This is because the qemu process exits after a successful migration.

Could you please elaborate about this scenario? Could the following happen?
migration completes succesfully)
source QEMU exits (because migration succesfull)
no ACK sent by target node, but the migration succeeded, so QEMU is actually running here

ci test please

ci test please

If target node fails, we'll never receive the ack that the target node received the domain. This will cause the migration to timeout during the handoff and fail. The VMI will also fail if the migration is technically successful (according to libvirt) yet the ack never arrives. This is because the qemu process exits after a successful migration.

Could you please elaborate about this scenario? Could the following happen?
migration completes succesfully)
source QEMU exits (because migration succesfull)
no ACK sent by target node, but the migration succeeded, so QEMU is actually running here

@fromanirh Yes, qemu would be briefly running on the target in that scenario.
This scenario will cause the VMI to fail.  The qemu process on the source exits after the migration and we don't receive any acknowledgement from the target that the domain was received. The result from this failure is all pods associated with the VMI will be destroyed causing the qemu process to terminate where ever it might be running.

@rmohr I got everything I wanted in on my side this afternoon. should be ready to merge whenever you're ready.

Awesome work David!
One thing I didn't see is that we are not checking the migration is actually progressing by calling jobStatus() on migrating domain. This is not important for this iteration but something we should consider for the next one.
Both vdsm[1] and nova[2] has a similar functionality to prevent the VMs from getting stuck in a migration forever.
[1] https://github.com/oVirt/vdsm/blob/master/lib/vdsm/virt/migration.py#L782
[2] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L7279

One thing I didn't see is that we are not checking the migration is actually progressing by calling jobStatus() on migrating domain. This is not important for this iteration but something we should consider for the next one.
Both vdsm[1] and nova[2] has a similar functionality to prevent the VMs from getting stuck in a migration forever.

Good observation. That will let us react to and recovery in the event of a "hung" migration.
It also gives us a path for exporting progress metrics pertaining to an in-flight migration job which could be used to provide a visual indication in a UI. @simon3z kind of interesting in light of the recent CDI import/clone/upload progress tracking.

I'll be following up shortly by creating issues to track the remaining outstanding topics raised in this PR.
Thanks for the reviews everyone!

The outstanding migration issues in kubevirt are now being tracked in github. I've also created issues for the libvirt bugs that where uncovered during the work on this feature.
Unable to migrate between to libvirt environments with the same hostname
https://bugzilla.redhat.com/show_bug.cgi?id=1638882
Unable to perform tunnelled migration to destination libvirt over unix socket
https://bugzilla.redhat.com/show_bug.cgi?id=1638889
Libvirt Lifecycle events not firing after migration.
https://bugzilla.redhat.com/show_bug.cgi?id=1638894


Remove bogus escaping of brackets in email bodies

The extra \ in front of [ and ] are not needed. Look at the other templates that work just fine. It was setting a bad example when everyone copy pastes these other templates.
This was done with a search and replace of the regex \\+\] with ] and the similar for [ on all .md and .markdown files. I went through to double check that it worked fine, I didn't see any mistakes.

please resolve the merge conflict for Holly Springs, but otherwise this looks good to me!

Some people seem to be doing the exact opposite such as in ec11119710b198324beaf41ad5bd91d5690e178e, @Ceshion do you know what is up with that?

@NickCrews & @Ceshion I think the confusion might be coming from the two markdown files that are pointed to as "Shining Star" examples in the EMAIL_TEMPLATE_STYLE_GUIDE.md file. Previously, the Oakland and Santa Barbara markdown files had the extra backslashes everywhere. Now those Oakland and Santa Barbara files have been changed, I think that the slashes will become less frequently used.

@ctneal91 I noticed this kind of formatting is often coming from Siteleaf, is there potentially something else going on there?

See 7e6ee6d05b9167a4547d4badbc59f13d29137ff0#commitcomment-39764445 for more context


[Addition]: Cluster of 5 abusing the H3Dex bug traveling across China

Hotspot b58 Addresses
11shDDdy8wMjiHKcCSsATYD9DbGc3ENYhdr8qs61PzhjoGHPUgD
11Da7VaBJaDaGav9Fufb42fKAFuLAdtuucFLam4SVwNBhbau5aC
11jeRTZRZpCZhbzhDf75nU7oEV6Xt98KyNFfZdhfgS8p5K2wmkK
113FEi25B7xLKzCF1ktmzJZAdqNzHjjq35RXsyhjbSxJuLXN8dp
11JdJMvzXT1dv4K31Lf1VfqgjH6r8twL24xsxVvBQXcNriXVEv9
Discord Handle
No response
Reason(s)
A cluster of 5 people, asserted at the same time, spanning 900km, separated by a few minutes from each other, and could only witness each other, is obviously using H3Dex bug to obtain high rewards from false positions

I know this gay  the person who sells equipment.  Often report your customers randomly and let them enter the blacklist. Then you can recycle the machines and sell new machines to them to earn more money

I know this gay the person who sells equipment. Often  reports his own customers, lets them enter the blacklist, and then cheats customers to buy new machines to earn more money.  He has a very bad reputation among Chinese miners. Please pay attention to such malicious reports.

我认识这个卖设备的gay。经常举报自己的客户，让他们进入黑名单，然后骗客户买新机，赚更多的钱。他在中国矿工中的名声很差。请注意此类恶意报道。
 Often reports his own customers, lets them enter the blacklist, and then cheats customers to buy new machines to earn more money. He has a very bad reputation among Chinese miners. Please pay attention to such malicious reports.

Proven cheaters, please stop your slander


Code/Project Refactoring

Describe the issue
No classes, one file, and above 1500 lines of code isn't a great idea.
It's just a mess in my opinion.
I bet no one would like to contribute to the project with not organized code.

How to fix

Move some functionality into classes and other modules.
For example it would be a good idea to separate the commands from the main file into a local packages. You can look at my CopyPaste2 project. It's not a good example, as I didn't care about it, and didn't use the local packages, but you can see how I have separated "CopyPaste functionality" from the "Client handler". You can also check this screenshoot for the reference.
Some function names could be changed as well.
I saw that one time you used camel case and the other time underlines.
Also that's only my opinion, and don't takie it too seriously,
but using discord.commands is pretty limitating, because if you type !   cOmmAnd       arGumenT  instead of  !command argument it won't register.

Additional context

Please do not upload binaries like this.
Use GitHub "Releases" instead.
Python is a pretty slow language and seeing something like "the FASTEST (...)" in the readme is hilarious.
Consider adding additional words like for example "the FASTEST Python (...)", or even change it to "one of the FASTESTS Python (...)". Now it looks much better, doesn't it?

Hope I helped

It's just a mess in my opinion.
I bet no one would like to contribute to the project with not organized code.

Yeah, I get that it's messy at some point. But I would still want to keep everything in 1 file because that's easier for me to search for or add commands. Here's a quick overview of how we organize our code in 1 file:

Global variables
Checks for updates and the configuration file
Client.event (e.g. on message, on ready, error handlers...)
Commands

Listing commands
Normal management commands
Nuke commands
Kaboom commands
Webhook spam commands (The order might be a little different (Don't remember that much :v) the order doesn't matter that much)
Additional commands (e.g. check role permissions, auto nick...)

Start the bot

No classes, one file, and above 1500 lines of code isn't a great idea.

Why is class a must-needed feature in python? I know that adding classes can make the code much easier for future use, like running 2 same scripts in 1 console. But still, I think without classes will be a better solution for digging through the code. (cyxl has asked me this too) I will consider turning everything into class orientated :) (a lot of work tbh).

Move some functionality into classes and other modules.
For example it would be a good idea to separate the commands from the main file into a local packages. You can look at my CopyPaste2 project. It's not a good example, as I didn't care about it, and didn't use the local packages, but you can see how I have separated "CopyPaste functionality" from the "Client handler". You can also check this screenshoot for the reference.

Yeah, I think you are right about this one :/. I also think this will be a good idea to separate commands.

Some function names could be changed as well.
I saw that one time you used camel case and the other time underlines.

All the variables will use underlines and the methods/functions will use camel. Why? Because it's easier for me to recognize the functions and variables, and this helped a lot in the help command as I needed commands format to be different from arguments.

Also that's only my opinion, and don't takie it too seriously,
but using discord.commands is pretty limitating, because if you type !   cOmmAnd      arGumenT instead of !command argument it won't register.

This will be a easy fix. discord.commands is actually very flexible. You can easily overwrite their api with anything you want. Like for this problem, I can just add magic inside the on_message event to easily fix this problem.
@client.event
async def on_message(msg):
    # magic....
    msg.content = magic_output
    await client.process_commands(msg)

Please do not upload binaries like this.
Use GitHub "Releases" instead.

Version 1 used to use release, but then some of my friends found it difficult to download it the compiled version from release. But right now, I will use "released" for the compiled version.

Python is a pretty slow language and seeing something like "the FASTEST (...)" in the readme is hilarious.
Consider adding additional words like for example "the FASTEST Python (...)", or even change it to "one of the FASTESTS Python (...)". Now it looks much better, doesn't it?

Yup, isn't it fun to see the developers are also having fun making this bot? The reason behind this is: first, make it fun ofc. Second, it is the fastest because it's hitting the rate limiting, which means can you go any faster than rate limiting?

It's just a mess in my opinion.
I bet no one would like to contribute to the project with not organized code.

Yeah, I get that it's messy at some point. But I would still want to keep everything in 1 file because that's easier for me to search for or add commands. Here's a quick overview of how we organize our code in 1 file:

Global variables
Checks for updates and the configuration file
Client.event (e.g. on message, on ready, error handlers...)
Commands

Listing commands
Normal management commands
Nuke commands
Kaboom commands
Webhook spam commands (The order might be a little different (Don't remember that much :v) the order doesn't matter that much)
Additional commands (e.g. check role permissions, auto nick...)

Start the bot

No classes, one file, and above 1500 lines of code isn't a great idea.

Why is class a must-needed feature in python? I know that adding classes can make the code much easier for future use, like running 2 same scripts in 1 console. But still, I think without classes will be a better solution for digging through the code. (cyxl has asked me this too) I will consider turning everything into class orientated :) (a lot of work tbh).

Move some functionality into classes and other modules.
For example it would be a good idea to separate the commands from the main file into a local packages. You can look at my CopyPaste2 project. It's not a good example, as I didn't care about it, and didn't use the local packages, but you can see how I have separated "CopyPaste functionality" from the "Client handler". You can also check this screenshoot for the reference.

Yeah, I think you are right about this one :/. I also think this will be a good idea to separate commands.

Some function names could be changed as well.
I saw that one time you used camel case and the other time underlines.

All the variables will use underlines and the methods/functions will use camel. Why? Because it's easier for me to recognize the functions and variables, and this helped a lot in the help command as I needed commands format to be different from arguments.

Also that's only my opinion, and don't takie it too seriously,
but using discord.commands is pretty limitating, because if you type !   cOmmAnd      arGumenT instead of !command argument it won't register.

This will be a easy fix. discord.commands is actually very flexible. You can easily overwrite their api with anything you want. Like for this problem, I can just add magic inside the on_message event to easily fix this problem.
@client.event
async def on_message(msg):
    # magic....
    msg.content = magic_output
    await client.process_commands(msg)

Please do not upload binaries like this.
Use GitHub "Releases" instead.

Version 1 used to use release, but then some of my friends found it difficult to download it the compiled version from release. But right now, I will use "released" for the compiled version.

Python is a pretty slow language and seeing something like "the FASTEST (...)" in the readme is hilarious.
Consider adding additional words like for example "the FASTEST Python (...)", or even change it to "one of the FASTESTS Python (...)". Now it looks much better, doesn't it?

Yup, isn't it fun to see the developers are also having fun making this bot? The reason behind this is: first, make it fun ofc. Second, it is the fastest because it's hitting the rate limiting, which means can you go any faster than rate limiting?

Love seeing suggestions like this. :)

Love seeing suggestions like this. :)

Yeah, I get that it's messy at some point. But I would still want to keep everything in 1 file because that's easier for me to search for or add commands. Here's a quick overview of how we organize our code in 1 file:

So maybe a good idea would be to add some references in the overview and paste it to the readme

Global variables
Checks for updates and the configuration file

what do you think?

Why is class a must-needed feature in python?
I also think this will be a good idea to separate commands.

You are right, python is great for functional programming, and there is a constant discussion about "is FP better than OOP", but in my opinion it's pretty hard to operate in a file with 1500 lines of code without classes. That's why I think, separating the commands would help a lot.

All the variables will use underlines and the methods/functions will use camel

I meant that the functions are sometimes with underlines and sometimes with camel cases.
Here is an example: Underline, Camel

This will be a easy fix. discord.commands is actually very flexible. You can easily overwrite their api with anything you want. Like for this problem, I can just add magic inside the on_message event to easily fix this problem.

I didn't know about this feature, thanks

Version 1 used to use release, but then some of my friends found it difficult to download it the compiled version from release

To help anyone with the download you could add the download link to the readme. For example:
[Download](https://github.com/TKperson/Nuking-Discord-Server-Bot-Nuke-Bot/releases/download/2.2.5/c-realV2.zip)
If anyone clicks in it, the file will download right away

Yup, isn't it fun to see the developers are also having fun making this bot? The reason behind this is: first, make it fun ofc. Second, it is the fastest because it's hitting the rate limiting, which means can you go any faster than rate limiting?

You are right I guess, my mistake

Yeah, I get that it's messy at some point. But I would still want to keep everything in 1 file because that's easier for me to search for or add commands. Here's a quick overview of how we organize our code in 1 file:

So maybe a good idea would be to add some references in the overview and paste it to the readme

Global variables
Checks for updates and the configuration file

what do you think?

Why is class a must-needed feature in python?
I also think this will be a good idea to separate commands.

You are right, python is great for functional programming, and there is a constant discussion about "is FP better than OOP", but in my opinion it's pretty hard to operate in a file with 1500 lines of code without classes. That's why I think, separating the commands would help a lot.

All the variables will use underlines and the methods/functions will use camel

I meant that the functions are sometimes with underlines and sometimes with camel cases.
Here is an example: Underline, Camel

This will be a easy fix. discord.commands is actually very flexible. You can easily overwrite their api with anything you want. Like for this problem, I can just add magic inside the on_message event to easily fix this problem.

I didn't know about this feature, thanks

Version 1 used to use release, but then some of my friends found it difficult to download it the compiled version from release

To help anyone with the download you could add the download link to the readme. For example:
[Download](https://github.com/TKperson/Nuking-Discord-Server-Bot-Nuke-Bot/releases/download/2.2.5/c-realV2.zip)
If anyone clicks in it, the file will download right away

Yup, isn't it fun to see the developers are also having fun making this bot? The reason behind this is: first, make it fun ofc. Second, it is the fastest because it's hitting the rate limiting, which means can you go any faster than rate limiting?

You are right I guess, my mistake

For underline and camel cases function name ones, I didn't know they were like that :rofl:. I'll fix it in the next update.

To help anyone with the download you could add the download link to the readme. For example:
Download
If anyone clicks in it, the file will download right away

I'll put this one in readme.
Thanks for the suggestions 👍,
I'll keep this issue open for people in future that are interested in something like this.

For underline and camel cases function name ones, I didn't know they were like that :rofl:. I'll fix it in the next update.

To help anyone with the download you could add the download link to the readme. For example:
Download
If anyone clicks in it, the file will download right away

I'll put this one in readme.
Thanks for the suggestions 👍,
I'll keep this issue open for people in future that are interested in something like this.

Resolved

Resolved


Support for Julia?

I notice in your 2019 Strange Loop conference talk, Julia popped up in a list of languages that comby applied to. I have done quite a bit of searching to find out why Julia is not explicitly supported - no luck.
Can you give me an explanation please.

Hi 👋 What are the signs you're looking for to see whether Julia is supported or not? It does show up in the list of supported languages when you type comby -list or overview in the docs. Do you get the impression it's not supported because it's not shown on comby.live? I can update that, just trying to clarify the source of confusion here.

Yes, I was confused by it not being in the list on comby.live
Thanks…

Added it :-) https://comby.live


How should semiologies be combined?

Why would you want to do this?
because you previously noted:
The problem with this is that some positive numbers will be mapped to 0

So you think we should just add the percentages and rescale again?
probably - but also try "raw" output that you wanted and see the difference?

Yeah but I also said: "But I guess that never happens, so this can be ignored".
Anyway, let's try to make it work again with single semiologies and then we'll think about how to combine them.

what is the current method being used, 50:50 "equal weights" method?

"equal weights" method:

Can you define specifically what the "equal weights" method is and why you think my implementation is wrong, as you said this morning?

Here's some code that might clarify things. Note that I modified scores for semiologies B and C with respect to the previous table in this issue.
In [1]: from mega_analysis.semiology import get_df_from_dicts, normalise_semiologies_df, combine_semiologies_df
   ...:
   ...: dicts = {
   ...:     'A': dict(X=0, Y=1, Z=1000),
   ...:     'B': dict(X=2, Y=1, Z=0),
   ...:     'C': dict(X=50, Y=50, Z=0),
   ...:     'D': dict(X=0, Y=12, Z=13),
   ...:     'E': dict(X=0, Y=0.1, Z=100),
   ...: }
   ...:
   ...: df = get_df_from_dicts(dicts)
   ...: df
Out[1]:
            X     Y     Z
Semiology
A           0   1.0  1000
B           2   1.0     0
C          50  50.0     0
D           0  12.0    13
E           0   0.1   100

In [2]: normalised_df = normalise_semiologies_df(df)
   ...: normalised_df
Out[2]:
               X           Y      Z
Semiology
A            0.0    0.100000  100.0
B          100.0   50.000000    0.0
C          100.0  100.000000    0.0
D            0.0   92.307692  100.0
E            0.0    0.100000  100.0

In [3]: combined_df = normalised_df.sum()
   ...: combined_df
Out[3]:
X    200.000000
Y    242.507692
Z    300.000000
dtype: float64

In [4]: combined_normalised_df = combined_df / combined_df.max() * 100
   ...: combined_normalised_df
Out[4]:
X     66.666667
Y     80.835897
Z    100.000000
dtype: float64

And with the first two semiologies only:
In [1]: from mega_analysis.semiology import get_df_from_dicts, normalise_semiologies_df, combine_semiologies_df
   ...:
   ...: dicts = {
   ...:     'A': dict(X=0, Y=1, Z=1000),
   ...:     'B': dict(X=2, Y=1, Z=0),
   ...: }
   ...:
   ...: df = get_df_from_dicts(dicts)
   ...: df
Out[1]:
           X  Y     Z
Semiology
A          0  1  1000
B          2  1     0

In [2]: normalised_df = normalise_semiologies_df(df)
   ...: normalised_df
Out[2]:
               X     Y      Z
Semiology
A            0.0   0.1  100.0
B          100.0  50.0    0.0

In [3]: combined_df = normalised_df.sum()
   ...: combined_df
Out[3]:
X    100.0
Y     50.1
Z    100.0
dtype: float64

In [4]: combined_normalised_df = combined_df / combined_df.max() * 100
   ...: combined_normalised_df
Out[4]:
X    100.0
Y     50.1
Z    100.0
dtype: float64

Thanks
I see what's happening here
there is a bias introduced inherently over weighing those semiologies with a more even distribution of localisations. what do I mean by this?
           X  Y     Z
Semiology
A          0  1  1000
B          2  1     0

instead, what we need is something more akin to a softmax probabilistic treatment of each individual raw semiology.
Say these are the raw data:
           X  Y     Z
Semiology
A          0  1  1000
B          2  2     2

softmax:
           X  Y     Z
Semiology
A          0  0.01  0.99
B          0.33  0.33     0.33

now combine:
           X  Y     Z
          0.33  0.34     1.32

and softmax again:
           X  Y     Z
          0.24  0.25   0.51

Can you provide some code and results of that?

equal weights methods:
| X | Y | Z
-- | -- | -- | --
0.0 | 0.100000 | 100.0
100.0 | 50.000000 | 0.0
100.0 | 100.000000 | 0.0
0.0 | 92.307692 | 100.0
0.0 | 0.100000 | 100.0

concretely:
the value of Y is reduced in softmax version (scale by 200 for comparison)
current method:
X 66
Y 80
Z 100
softmax scaled up by 200:
X 66
Y 33
Z 100

note that the parameters of the MinMaxScaler called within normalise_semiologies_df were changed:
def normalise_semiologies_df(semiologies_df: pd.DataFrame) -> pd.DataFrame:
    table = np.array(semiologies_df)
    data = table.T
    scaler = MinMaxScaler((0, 1))
    scaler.fit(data)
    normalised = scaler.transform(data).T
    normalised_df = pd.DataFrame(
        normalised,
        columns=semiologies_df.columns,
        index=semiologies_df.index,
    )
    return normalised_df

I suggest we use 0 to 1 (or 1 to 100) and not ZERO to 100.

and in case you want to also see the first two semiologies only:
top part is reproducing your example above, and bottom part is using the 0,1 minmaxscaler followed by softmax:

in conclusion: the softmax gives a more graded distribution, and all values add up to 1.
i.e. if the Q is: patient with semiology A and B, where are the likely EZ? then this goes further in asnwering the Q.

![image](https://user-images.githubusercontent.com/10786099/82331413-ff663f80-99db-11ea-9ea7-7c25edb2a84b.png)

what's the best way and place to upload the jupyter notebook? resources?

You can use Google Colab to share an executable notebook. Probably not a good idea to start adding notebooks to the repo, specially because they don't work well with git.
Thanks for the examples. Please stick to PNG (not JPEG) for screenshots (https://github.com/thenineteen/Semiology-Visualisation-Tool/issues/8#issuecomment-630798341 is hard to read) or, even better, paste the code directly in your comment so that I can copy & paste it if I want to run it too. Also, it's quite hard to see the effect of softmax on the table because of the scientific notation.
I think it'd make it a bit easier to imagine if the final values are scaled between 0 and 1, or 0 and 100, because the colormap will be rescaled to have whatever scale the scores have anyway.
The question is: how do we know if the technique we choose is a good of representation of the data we have? Do you think asking Aiden for advice wouldn't be a good idea?

The question is: how do we know if the technique we choose is a good of representation of the data we have? Do you think asking Aiden for advice wouldn't be a good idea?

by validating it using out of database seizure free cases - like the 14 I already did. If this was an option as in #19 then I could run them with and without softmax 0 to 1 option and see which works best...

You didn't follow up on the discussion about e.g. softmax after my comment on the 19th of May: https://github.com/thenineteen/Semiology-Visualisation-Tool/issues/8#issuecomment-630961480
With softmax, scores for each semiology don't have a maximum of 100, although I guess they could be scaled up to achieve this. Another issue is that at the moment having a semiology with data points (0, 1, 2) is the same as (0, 50, 100). Softmax turns these into (0.1, 0.2, 0.7) and (0, 0, 1).

| X | Y | Z
-- | -- | -- | --
0.0 | 1.0 | 1000.0
2.0 | 1.0 | 0.0
50.0 | 50.0 | 0.0
0.0 | 12.0 | 13.0
0.0 | 0.1 | 100.0

I don't know what you want to say with that table.

note that the parameters of the MinMaxScaler called within normalise_semiologies_df were changed:
def normalise_semiologies_df(semiologies_df: pd.DataFrame) -> pd.DataFrame:
    table = np.array(semiologies_df)
    data = table.T
    scaler = MinMaxScaler((0, 1))
    scaler.fit(data)
    normalised = scaler.transform(data).T
    normalised_df = pd.DataFrame(
        normalised,
        columns=semiologies_df.columns,
        index=semiologies_df.index,
    )
    return normalised_df

I suggest we use 0 to 1 (or 1 to 100) and not ZERO to 100 as flattens to zero much more easily.

the issue you quote regarding the figures will be fixed by

the above (note 0 to 1)
when we use proportions (#118 ) rather than raw numbers, as these will be between 0 and 1, akin to a probability per semiology, then combining these as a softmax.

Please don't delete my comments.

Please don't delete my comments.

Like, never ever.

your comment was on a table which was pasted and posted by accident. The table was deleted as was the comment referring to it as otherwise reading through this would become even more confusing than it already is

I know, still not right to delete someone else's comment. I think everyone would agree on that.

it was relevant yes, but given I know my comment was an unrelated table by accidet, then I think you must trust me not to delete comments at a whim

I'm going to need an implementation of this softmax version to combine semiologies for clinical validation - do you think  you can create an extra option please which toggles combining semiology methods between the current version and softmax version I suggested above?

As I said in https://github.com/thenineteen/Semiology-Visualisation-Tool/issues/8#issuecomment-652973996, softmax sets a lot of number to 0.
Softmax:

Minmax:

FYI
spoke with Tim Stone and Prof Norman Williams (Data Clinic. WEISS).
Agree proportions could be useful and could use either binomial proportions CI or bootstrapping. Bootstrapping CI will be problematic for low data semiologies and structures, and given the distributions from sankey, a binomial proportions one is suitable.
Tim suggests that the current combination of semiology over emphasises the whales - he thinks a better technique to normalising, even to softmax, would be a log x +1 (even using base 2)
I explained my thoughts about how to do CI per semiology per structure - 8 regions as per Sankey. the netrail point would be a naive baseline of 1/8 = 12.5%. CI straddling this mean the semiology doesn't particularly localise to that area. They agreed this is sound and works.
Similarly for lateralisation: 50% as baseline.
Also agreed that these would be forrest plots and no summary statistic could be ascertained.


MCPWM Use of Internal Sync (IDFGH-1272)

Environment

Development Kit: ESP32-DevKitC

Kit version : v4

Module or chip used: ESP32-WROOM-32

IDF version (run git describe --tags to find it): v3.2-dev-1148-g96cd3b75c

Build System: Make

Compiler version (run xtensa-esp32-elf-gcc --version to find it): 1.22.0-80-g6c4433a

Operating System: Windows

Power Supply: USB

Problem Description
I am using the example code from "MCPWM basic config" and issue 3361 to generate 2 PWM signals from Timer 0 and Timer 1 MCPWM Unit 0 with 25% Phase shift of Timer 1 on Timer 0 through the internal sync. If inverted (see code for inverse section), no sync is happening and signals are completely out of phase.
Additionally, do I have to sync again after each change of frequency?
Expected Behavior
2 synchronized pwm signals in both configuration with inverted shift
Actual Behavior
2 pwm signals for inverted case not synchronized
Steps to repropduce
please see code
Code to reproduce this issue
    //1. mcpwm gpio initialization
    mcpwm_example_gpio_initialize();

    //2. initialize mcpwm configuration
    printf("Configuring Initial Parameters of mcpwm...\n");

    bool inverse = false;

    mcpwm_config_t pwm_config;
    pwm_config.frequency = 100;    //frequency = 1000Hz
    pwm_config.cmpr_a = 0.0;    //duty cycle of PWMxA = 0%
    pwm_config.cmpr_b = 0.0;    //duty cycle of PWMxb = 0%
    pwm_config.counter_mode = MCPWM_UP_DOWN_COUNTER;
    pwm_config.duty_mode = MCPWM_DUTY_MODE_0;
    mcpwm_init(MCPWM_UNIT_0, MCPWM_TIMER_0, &pwm_config);
    mcpwm_init(MCPWM_UNIT_0, MCPWM_TIMER_1, &pwm_config);
    printf("Configuration Done \n");

    if(inverse)
   {
    mcpwm_sync_enable(MCPWM_UNIT_0, MCPWM_TIMER_0, 1, 500);
    mcpwm_sync_enable(MCPWM_UNIT_0, MCPWM_TIMER_1, 1, 0);
    MCPWM0.timer[1].sync.out_sel = 1;
    vTaskDelay(1000/portTICK_PERIOD_MS);
    MCPWM0.timer[1].sync.out_sel = 0;
    mcpwm_set_duty(MCPWM_UNIT_0, MCPWM_TIMER_0,  MCPWM_OPR_A, 50);
    mcpwm_set_duty(MCPWM_UNIT_0, MCPWM_TIMER_1,  MCPWM_OPR_A, 50);
   } else {
    mcpwm_sync_enable(MCPWM_UNIT_0, MCPWM_TIMER_0, 1, 0);
    mcpwm_sync_enable(MCPWM_UNIT_0, MCPWM_TIMER_1, 1, 500);
    MCPWM0.timer[0].sync.out_sel = 1;
    vTaskDelay(1000/portTICK_PERIOD_MS);
    MCPWM0.timer[0].sync.out_sel = 0;
    mcpwm_set_duty(MCPWM_UNIT_0, MCPWM_TIMER_0,  MCPWM_OPR_A, 50);
    mcpwm_set_duty(MCPWM_UNIT_0, MCPWM_TIMER_1,  MCPWM_OPR_A, 50);
    }

    vTaskDelete(NULL);

Change this back to timer[1]
    MCPWM0.timer[0].sync.out_sel = 1;
    vTaskDelay(1000/portTICK_PERIOD_MS);
    MCPWM0.timer[0].sync.out_sel = 0;

Thanks for your answer!
But then I sync on the output of timer 0? What does the line exactly represent?

mcpwm_sync_enable(MCPWM_UNIT_0, MCPWM_TIMER_0, **1**, 500);
The 1 means use timer[0] as sync input so you have to match it to
MCPWM0.timer[0].sync.out_sel = 1;
Otherwise you have to change it to
mcpwm_sync_enable(MCPWM_UNIT_0, MCPWM_TIMER_0, **2**, 500);
And
MCPWM0.timer[1].sync.out_sel = 1;

@negativekelvin Thanks for the notes. @fungo16 Thanks for reporting the issue, would you help share if any updates for the issue? Has it been resolved? Thanks.

@fungo16 Thanks for reporting the issue, will close this issue due to few updates. Feel free to reopen if you still have the issue, thanks.


Add "unique()" method, mimicking pandas

Would it be good to add a unique() method that mimics pandas?
import pandas as pd
import xarray as xr
pd.Series([0, 1, 1, 2]).unique()
xr.DataArray([0, 1, 1, 2]).unique()  # not implemented

Output:
array([0, 1, 2])
AttributeError: 'DataArray' object has no attribute 'unique'

What would .unique() return on xarray.DataArray? For consistency with pandas, I guess it would return a 1D numpy or dask array?
I don't see a lot of value in adding this to xarray, given that all the xarray metadata gets lost by the unique() operation. You might as well just write np.unique(my_data_array.data).

Right, it would return a 1D numpy or dask array.
I suppose I'm used to simply typing pd.Series().unique() rather than np.unique(pd.Series()).
I use it in for loops primarily.
for season in da['time.season'].unique():
vs
for season in np.unique(da['time.season'].data):

Hi, I also vote for this function, My typical use-case.
There is some structure in 3D space and I need to "flatten it" to 2D. Let us say it is axially symetric so I assign R and Z coordinate to points (or r and theta in polar).  And I want to simplify this using interp; however, it requuires unique coordinates.
I have some solution here: https://stackoverflow.com/questions/51058379/drop-duplicate-times-in-xarray
and adapted this into actuall function:
def distribure_uniform(ds, N_points=512):

    ds_theta = ds.sortby("theta").swap_dims({"idx": "theta"})
    _, index = np.unique(ds_theta['theta'], return_index=True)

    ds_theta = ds_theta.isel(theta=index)

    ds_theta = ds_theta.interp(
        theta=np.linspace(ds.theta.min(), ds.theta.max(), N_points))

    ds_theta = ds_theta.swap_dims({"theta": "idx"})
    return ds_theta

In an idal case I would like to write something like this:
def distribure_uniform(ds, N_points=512):

    ds_theta= ds.unique("theta", sorted=False, sort=True)

    ds_theta = ds_theta.swap_dims({"idx": "theta"})
    ds_theta = ds_theta.interp(
        theta=np.linspace(ds.theta.min(), ds.theta.max(), N_points))
    ds_theta = ds_theta.swap_dims({"theta": "idx"})
    return ds_theta

A case I ran into where supporting .unique() in the pandas sense would be helpful is when an object dtype is used to support nullable strings:
>>> ar = xr.DataArray(np.array(['foo', np.nan], dtype='object'), coords={'bar': range(2)}, name='foo')
>>> np.unique(ar.data)
TypeError: '<' not supported between instances of 'float' and 'str'
>>> ar.to_dataframe().foo.unique()
array(['foo', nan], dtype=object)

I guess the limitation on using pd.unique() is that it requires 1D data. pd.unique(ar.data.flatten()) isn't so painful, but that feels like the kind of thing xarray should do for you.


Ember 2.10.0+ migration to glimmer / removal of ember-handlebars breaks outlet keyword.

I started looking into replacing it but it seems quite involved.

I got started on a basic hack to get this working - it's surely not the best way to go about it and still needs to load parent model, target and have an "into" specified - but it's a start, no?
  Ember.Route.reopen({
    controllerFor(name, _skipAssert) {
      let owner = Ember.getOwner(this);
      let route = owner.lookup(`route:${name}`);
      let controller;

      if (route && route.controllerName) {
        name = route.controllerName;
      }

      controller = owner.lookup(`component:${name}`);

      if (!controller) {
        return this._super.apply(this, arguments);
      }

      return controller;
    },

    render(_name, options) {
      let name;

      console.log(this.templateName, this.routeName, options);
      if (typeof _name === 'object' && !options) {
        name = this.templateName || this.routeName;
        options = _name;
      } else {
        name = (_name && _name.replace(/\//g, '.')) || this.routeName;
      }

      let templateName = "components/" + (this.templateName || name);

      let owner = Ember.getOwner(this);
      let into = options && options.into && options.into.replace(/\//g, '.');
      let outlet = (options && options.outlet) || 'main';

      let controller = owner.lookup(`component:${name}`);

      if (!controller) {
        this._super.apply(this, arguments);
      } else {
        let template = owner.lookup(`template:${templateName}`);
        console.log(Ember.Route.parentRoute(this));

        let renderOptions = {
          owner,
          into,
          outlet,
          name,
          controller,
          template,
          ViewClass: undefined
        };

        this.connections.push(renderOptions);
        Ember.run.once(this.router, '_setOutlets');
      }
    }
  });


Cannot start container : scope already exists

Hello
I've got strange error when I'd stopped fleet services.
My service file looks like
[Unit]
Description=mongostorage
After=docker.service
Requires=docker.service

[Service]
ExecStart=/bin/bash -c '/usr/bin/docker start -a mongostorage ||  /usr/bin/docker run --name mongostorage registry.at.netstream.ru/pusher/mongostorage sleep infinity'
ExecStop=/usr/bin/docker stop mongostorage

When I stopped this service I've got docker container broken.
Any attempt to start this service or container again has failed with error:
core-push3 mlavrenov # docker start mongostorage
Error response from daemon: Cannot start container mongostorage: Unit docker-9966f1b37f206ddbc4f4c35551aed5503417764faad75132bb4abc230ebf55b1.scope already exists.
2014/07/02 16:55:15 Error: failed to start one or more containers

This behavior caused only by fleetctl stop.
systemctl stop with the same service works perfectly.
This is logs for fleetctl stop process.
Jul 02 17:13:03 core-push3 fleet[867]: I0702 17:13:03.656704 00867 event.go:66] CommandStopJob(mongostorage.service): instructing Agent to stop Job
Jul 02 17:13:03 core-push3 systemd[1]: Stopping mongostorage...
Jul 02 17:13:03 core-push3 docker[894]: 2014/07/02 17:13:03 POST /v1.12/containers/mongostorage/stop?t=10
Jul 02 17:13:03 core-push3 docker[894]: [38a3c466] +job stop(mongostorage)
Jul 02 17:13:04 core-push3 fleet[867]: I0702 17:13:04.145459 00867 event.go:98] EventUnitStateUpdated(mongostorage.service): reporting state to Registry
Jul 02 17:13:13 core-push3 docker[894]: 2014/07/02 17:13:13 Container 30058af0c3c3f03a47f608996285a2dafb58e190133bc11dcc458393c94205cf failed to exit within 10 seconds of SIGTERM - using the force
Jul 02 17:13:13 core-push3 docker[894]: [38a3c466] +job release_interface(30058af0c3c3f03a47f608996285a2dafb58e190133bc11dcc458393c94205cf)
Jul 02 17:13:13 core-push3 docker[894]: [38a3c466] -job release_interface(30058af0c3c3f03a47f608996285a2dafb58e190133bc11dcc458393c94205cf) = OK (0)
Jul 02 17:13:13 core-push3 docker[894]: [38a3c466] -job stop(mongostorage) = OK (0)
Jul 02 17:13:13 core-push3 docker[894]: [38a3c466] -job attach(mongostorage) = OK (0)
Jul 02 17:13:13 core-push3 docker[15196]: mongostorage
Jul 02 17:13:13 core-push3 systemd[1]: Stopped mongostorage.
Jul 02 17:13:13 core-push3 fleet[867]: I0702 17:13:13.707836 00867 manager.go:114] Stopped systemd unit mongostorage.service(done)
Jul 02 17:13:13 core-push3 kernel: docker0: port 2(vethb34c) entered disabled state
Jul 02 17:13:13 core-push3 systemd-networkd[702]: vethb34c: link is down
Jul 02 17:13:13 core-push3 systemd-networkd[702]: vethb34c: carrier off
Jul 02 17:13:13 core-push3 kernel: device vethb34c left promiscuous mode
Jul 02 17:13:13 core-push3 kernel: docker0: port 2(vethb34c) entered disabled state
Jul 02 17:13:13 core-push3 systemd-udevd[566]: IMPORT{builtin}: 'uaccess' unknown /usr/lib64/udev/rules.d/73-seat-late.rules:15
Jul 02 17:13:14 core-push3 fleet[867]: I0702 17:13:14.149551 00867 event.go:98] EventUnitStateUpdated(mongostorage.service): reporting state to Registry
Jul 02 17:13:15 core-push3 ntpd[678]: Deleting interface #48 vethb34c, fe80::b4fa:96ff:fe39:861c#123, interface stats: received=0, sent=0, dropped=0, active_time=870 secs
Jul 02 17:13:15 core-push3 ntpd[678]: peers refreshed

I would appreciate any advice on this problem.

I still have this issue,
I am using docker's restart strategy to manage my containers
for now I use a drop-in to stop left up containers:
[Service]
ExecStopPost=/usr/bin/bash -c 'echo "Cleaning orphan units";for unit in $(/usr/bin/systemctl list-unit-files --no-legend --no-pager -l | grep --color=never -o .*.scope); do echo "Force stoping $unit";/usr/bin/systemctl stop $unit;done'

Same issue on Ubuntu 15


go back to home

Is your feature request related to a problem? Please describe.

Describe the solution you'd like:

Describe alternatives you've considered:

Additional context:

how to go back to home


Pear requires a nightly or dev version of Rust

I decided to try out Rocket, but during attempt to run any of its examples, I get this error on both v0.3.16 and master:
$ cargo run
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling rocket v0.3.16 (file:///home/pk/github.com/Rocket/lib)
   Compiling rocket_codegen v0.3.16 (file:///home/pk/github.com/Rocket/codegen)
   Compiling proc-macro2 v0.4.19
   Compiling pear_codegen v0.0.20
error: failed to run custom build command for `pear_codegen v0.0.20`
process didn't exit successfully: `/home/pk/github.com/Rocket/target/debug/build/pear_codegen-9db1b986b647ff1e/build-script-build` (exit code: 101)
--- stderr
Error: Pear requires a nightly or dev version of Rust.
Installed version is: 1.28.0 (2018-07-30). Minimum required: 1.30.0-nightly (2018-08-23).
thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', /home/pk/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.20/build.rs:31:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

I believe that this package should not have such a strong requirement, as it makes it unusable with released versions of Rust.

Rocket very explicitly requires nightly so this is likely to be intentional.
See https://rocket.rs/guide/getting-started/

OK, I see, I just did not RTFM ;) thanks

Is this still the case?
Error: Pear requires a nightly or dev version of Rust.
Installed version is: 1.31.1 (2018-12-18). Minimum required: 1.31.0-nightly (2018-10-05).

This is a dealbreaker for using Rocket on ARMv6 (can't cross-compile).
Is there a workaround?

If you are using rustup, you can sync to the nightly build via the following command: -> rustup default nightly. Then test it using cargo build to confirm it compiles. If you want to lock down the version of rust / rocket, you can run the following command: -> rustup override set nightly.

rustup default nightly

it works, thx.

Installed version is: 1.42.0 (2020-03-09). Minimum required: 1.31.0-nightly (2018-10-05). is ridiculous though. The “Minimum” requirement ostensibly is satisfied (42 >> 31).

Pear requires a 'dev' or 'nightly' version of rustc.
Installed version: 1.44.1 (2020-06-17)
Minimum required:  1.31.0-nightly (2018-10-05)

I agree that this is pretty ridiculous. Rocket doesn't require nightly Rust anymore — why does Pear?

After some struggling to try out Rocket for the first time, I realized I had to run this command (I'm using Windows):
rustup default nightly-x86_64-pc-windows-gnu instead of the one I ran earlier to remove C++/Visual Studio error: rustup default stable-x86_64-pc-windows-gnu
I hope this comment will save someone's time and negative emotions ;)

i am here for 5 hours and still feilure

rustup override set nightly

I'm having the same issue, Pear requires 1.31.0-nightly and I have 1.56.1

This is really annoying and NO company is going to migrate to Rust meanwhile the big libraries force you to work in a nightly mode. Especially when the requirement behind is far passed.

This is really annoying and NO company is going to migrate to Rust meanwhile the big libraries force you to work in a nightly mode. Especially when the requirement behind is far passed.

Why would anyone in an open source project care if "big companies" use Rust?

Why would anyone in an open source project care if "big companies" use Rust?

The answer to this would not improve pear in any way.

This is really annoying and NO company is going to migrate to Rust meanwhile the big libraries force you to work in a nightly mode. Especially when the requirement behind is far passed.

Why would anyone in an open source project care if "big companies" use Rust?

I don't think this is the forum to discuss this, and happy to continue it on Reddit but the really short answer could be: if companies don't use rust, you are not going to get a salary as a rust developer ever. Maybe not your intention but it'd end up being a good language to play (like D) but... long live to Java 👯

This is really annoying and NO company is going to migrate to Rust meanwhile the big libraries force you to work in a nightly mode. Especially when the requirement behind is far passed.

Please read my earlier comment. Neither Pear nor Rocket (0.5-rc) require nightly.

Hi
My environment:
OS : Linux Mint 20 (64 bits)
rustc --version : rustc 1.58.1 (db9d1b20b 2022-01-20) - I use the Stable Rust

I'm beginner in both Rust and Rocket (which I've just started learning) and I have the same issue
Here is what I have in main.rs
#[macro_use] extern crate rocket;
use rocket::form::Form;
use rocket_contrib::templates::Template;

#[get("/user/<id>")]
fn user(id: usize) -> &'static str {
    "user function called."
}

#[get("/user/<id>", rank = 2)]
fn user_int(id: isize) -> &'static str {
    "user_int called."
}

#[get("/user/<id>", rank = 1)]
fn user_str(id: &str) -> &'static str {
    "user_str called."
}

#[launch]
fn rocket() -> _ {
    rocket::build().mount("/", routes![user, user_int, user_str])
}

And here is the content of my Cargo.toml

[package]
name = "hello-rocket"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rocket = "0.5.0-rc.1"
rocket_contrib = "0.4.10"

And here is the error that I get when I run in the terminal cargo run
$ cargo run
Compiling version_check v0.9.4
Compiling proc-macro2 v1.0.36
Compiling libc v0.2.118
Compiling unicode-xid v0.2.2
Compiling syn v1.0.86
Compiling cfg-if v1.0.0
Compiling log v0.4.14
Compiling yansi v0.5.0
Compiling memchr v2.4.1
Compiling autocfg v1.1.0
Compiling futures-core v0.3.21
Compiling pin-project-lite v0.2.8
Compiling serde_derive v1.0.136
Compiling serde v1.0.136
Compiling bytes v1.1.0
Compiling slab v0.4.5
Compiling httparse v1.6.0
Compiling hashbrown v0.11.2
Compiling futures-sink v0.3.21
Compiling proc-macro2 v0.4.30
Compiling bitflags v1.3.2
Compiling unicode-xid v0.1.0
Compiling pin-utils v0.1.0
Compiling itoa v1.0.1
Compiling syn v0.15.44
Compiling smallvec v1.8.0
Compiling fnv v1.0.7
Compiling percent-encoding v2.1.0
Compiling futures-task v0.3.21
Compiling futures-channel v0.3.21
Compiling tinyvec_macros v0.1.0
Compiling proc-macro-hack v0.5.19
Compiling lazy_static v1.4.0
Compiling futures-util v0.3.21
Compiling version_check v0.1.5
Compiling const_fn v0.4.9
Compiling once_cell v1.9.0
Compiling unicode-bidi v0.3.7
Compiling futures-io v0.3.21
Compiling matches v0.1.9
Compiling try-lock v0.2.3
Compiling safemem v0.3.3
Compiling percent-encoding v1.0.1
Compiling byteorder v1.4.3
Compiling parking_lot_core v0.8.5
Compiling inlinable_string v0.1.15
Compiling typeable v0.1.2
Compiling ref-cast v1.0.6
Compiling traitobject v0.1.0
Compiling scopeguard v1.1.0
Compiling tower-service v0.3.1
Compiling httpdate v1.0.2
Compiling language-tags v0.2.2
Compiling cfg-if v0.1.10
Compiling mime v0.3.16
Compiling glob v0.3.0
Compiling state v0.4.2
Compiling state v0.5.2
Compiling either v1.6.1
Compiling encoding_rs v0.8.30
Compiling ppv-lite86 v0.2.16
Compiling serde_json v1.0.79
Compiling async-trait v0.1.52
Compiling lazycell v1.3.0
Compiling same-file v1.0.6
Compiling ryu v1.0.9
Compiling remove_dir_all v0.5.3
Compiling base64 v0.13.0
Compiling fastrand v1.7.0
Compiling spin v0.9.2
Compiling binascii v0.1.4
Compiling proc-macro2-diagnostics v0.9.1
Compiling standback v0.2.17
Compiling time v0.2.27
Compiling cookie v0.15.1
Compiling uncased v0.9.6
Compiling multer v2.0.2
Compiling figment v0.10.6
Compiling instant v0.1.12
Compiling pear_codegen v0.1.4
Compiling rocket_codegen v0.4.10
Compiling rocket v0.4.10
Compiling rocket v0.5.0-rc.1
Compiling indexmap v1.8.0
Compiling atomic v0.5.1
Compiling http v0.2.6
Compiling tinyvec v1.5.1
Compiling tracing-core v0.1.22
Compiling unicase v1.4.2
Compiling base64 v0.9.3
Compiling lock_api v0.4.6
Compiling walkdir v2.3.2
error: failed to run custom build command for pear_codegen v0.1.4
Caused by:
process didn't exit successfully: /home/training/Documents/Rust/Rocket/hello-rocket/target/debug/build/pear_codegen-cffabe19d2a1cad5/build-script-build (exit status: 101)
--- stderr
Error: Pear requires a 'dev' or 'nightly' version of rustc.
Installed version: 1.58.1 (2022-01-20)
Minimum required:  1.31.0-nightly (2018-10-05)
thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', /usr/local/rust/cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.1.4/build.rs:24:13
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
And the same error by setting RUST_BACKTRACE=full
error: failed to run custom build command for `pear_codegen v0.1.4`

Caused by:
  process didn't exit successfully: `/home/training/Documents/Rust/Rocket/hello-rocket/target/debug/build/pear_codegen-cffabe19d2a1cad5/build-script-build` (exit status: 101)
  --- stderr
  Error: Pear requires a 'dev' or 'nightly' version of rustc.
  Installed version: 1.58.1 (2022-01-20)
  Minimum required:  1.31.0-nightly (2018-10-05)
  thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', /usr/local/rust/cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.1.4/build.rs:24:13
  stack backtrace:
     0:     0x5557da35f97c - std::backtrace_rs::backtrace::libunwind::trace::h09f7e4e089375279
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
     1:     0x5557da35f97c - std::backtrace_rs::backtrace::trace_unsynchronized::h1ec96f1c7087094e
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
     2:     0x5557da35f97c - std::sys_common::backtrace::_print_fmt::h317b71fc9a5cf964
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:67:5
     3:     0x5557da35f97c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he3555b48e7dfe7f0
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:46:22
     4:     0x5557da37d0cc - core::fmt::write::h513b07ca38f4fb1b
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/fmt/mod.rs:1149:17
     5:     0x5557da35c3e5 - std::io::Write::write_fmt::haf8c932b52111354
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/io/mod.rs:1697:15
     6:     0x5557da3610d0 - std::sys_common::backtrace::_print::h195c38364780a303
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:49:5
     7:     0x5557da3610d0 - std::sys_common::backtrace::print::hc09dfdea923b6730
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:36:9
     8:     0x5557da3610d0 - std::panicking::default_hook::{{closure}}::hb2e38ec0d91046a3
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:211:50
     9:     0x5557da360c85 - std::panicking::default_hook::h60284635b0ad54a8
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:228:9
    10:     0x5557da361784 - std::panicking::rust_panic_with_hook::ha677a669fb275654
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:606:17
    11:     0x5557da32baae - std::panicking::begin_panic::{{closure}}::haa659a0e143387b5
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:526:9
    12:     0x5557da32b8f8 - std::sys_common::backtrace::__rust_end_short_backtrace::h06e345acd2ac3ed1
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:139:18
    13:     0x5557da32b9ef - std::panicking::begin_panic::hf94f072690a6f749
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:525:12
    14:     0x5557da32d27f - build_script_build::main::h508e78ef7a173979
                                 at /usr/local/rust/cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.1.4/build.rs:24:13
    15:     0x5557da32f18b - core::ops::function::FnOnce::call_once::h26c0ee99ba426915
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:227:5
    16:     0x5557da32b93e - std::sys_common::backtrace::__rust_begin_short_backtrace::hca0ce5045c9b9310
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:123:18
    17:     0x5557da32b651 - std::rt::lang_start::{{closure}}::h32b3d179ada8294c
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:145:18
    18:     0x5557da35f60b - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h7e688d7cdfeb7e00
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:259:13
    19:     0x5557da35f60b - std::panicking::try::do_call::h4be824d2350b44c9
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:406:40
    20:     0x5557da35f60b - std::panicking::try::h0a6fc7affbe5088d
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:370:19
    21:     0x5557da35f60b - std::panic::catch_unwind::h22c320f732ec805e
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panic.rs:133:14
    22:     0x5557da35f60b - std::rt::lang_start_internal::{{closure}}::hd38309c108fe679d
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:128:48
    23:     0x5557da35f60b - std::panicking::try::do_call::h8fcaf501f097a28e
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:406:40
    24:     0x5557da35f60b - std::panicking::try::h20e906825f98acc1
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:370:19
    25:     0x5557da35f60b - std::panic::catch_unwind::h8c5234dc632124ef
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panic.rs:133:14
    26:     0x5557da35f60b - std::rt::lang_start_internal::hc4dd8cd3ec4518c2
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:128:20
    27:     0x5557da32b620 - std::rt::lang_start::heac8c8d471137e62
                                 at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:144:17
    28:     0x5557da32d87c - main
    29:     0x7fe7aabe70b3 - __libc_start_main
                                 at /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
    30:     0x5557da32972e - _start
    31:                0x0 - <unknown>

Am I missing something or is my Rust or rocket (or both) installation which is broken?

You're using contrib 0.4 but rocket 0.5. You can't do that. See the upgrading guide.

I ran into this issue and found out that probably the only solution is to move to rocket 0.5 which does not depend on pear_codegen.
To reproduce:
cargo new banana
cd banana
cargo add rocket
cargo build

The result will be rocket 0.4.11 with the build of pear_codegen failing with:
error: failed to run custom build command for pear_codegen v0.1.5
Caused by:
  process didn't exit successfully: `/home/bram/tmp/banana/target/debug/build/pear_codegen-958a8fa45f97b8df/build-script-build` (exit status: 101)
  --- stderr
  Error: Pear requires a 'dev' or 'nightly' version of rustc.
  Installed version: 1.59.0 (2022-02-23)
  Minimum required:  1.31.0-nightly (2018-10-05)

The solution was to use rocket = "0.5.0-rc.2" as a dependency instead. I don't understand the closed upstream issue https://github.com/SergioBenitez/Pear/issues/30 but apparently it's expected behavior and if you don't want nightly you just don't want pear_codegen.