text:
Nodepool custom_data Issues After https://github.com/sassoftware/viya4-iac-aws/pull/122

Terraform Version Details
{
"terraform_version": ""1.0.4"",
"terraform_revision": "null",
"terraform_outdated": "false",
"provider_selections": "{}"
}
...using the Docker-container
Terraform Variable File Details
I'm having issues getting custom_data to populate in the Launch Templates or execute on the underlying AWS nodes using terraform.tfvars lines such as this:
    "custom_data" = "./files/custom-data/additional_userdata.sh"
or this:
    "custom_data" = "/workspace/files/custom-data/additional_userdata.sh" (for the Docker container)
from examples/sample-input-custom-data.tfvars.
Steps to Reproduce
Use the "custom_data" option to populate User Data in Launch Templates and run init-scripts on the AWS nodes.
Expected Behavior
Init-scripts based on custom_data in the terraform.tfvars are part of the Launch Templates, and executed on the AWS nodes.
Actual Behavior
User_Data is not created in the Launch Template based on custom_data contents in the terraform.tfvars.
Additional Context
I know this has worked in the past, but it's been a number of months since I've needed to use it.  The custom_data simply doesn't show up under User Data in the Launch Template in AWS, and "user_data" doesn't show up as a line in a "terraform plan" execution under a section such as:
       # module.eks.module.eks_managed_node_group["compute"].aws_launch_template.this[0] will be created
Looking here, with the switch from additional_userdata to post_bootstrap_user_data in https://github.com/sassoftware/viya4-iac-aws/pull/122, it seems like "enable_bootstrap_user_data" needs to be set to true:
https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/submodules/_user_data#input_enable_bootstrap_user_data
...so I added that to the locals.tf under user_node_pool:
        enable_bootstrap_user_data       = true
        post_bootstrap_user_data        = (np_value.custom_data != "" ? file(np_value.custom_data) : "")
...which brought user_data as a line in the terraform plan for the launch template:
     + user_data              = (known after apply)
...but that errored out on a terraform apply with:
│ Error: error waiting for EKS Node Group (viya4-poc-eks:compute-20220804032322452400000018) to create: unexpected state 'CREATE_FAILED', wanted target 'ACTIVE'. last error: 1 error occurred: │       * : Ec2LaunchTemplateInvalidConfiguration: User data was not in the MIME multipart format. │ │ │ │   with module.eks.module.eks_managed_node_group["compute"].aws_eks_node_group.this[0], │   on .terraform/modules/eks/modules/eks-managed-node-group/[main.tf](http://main.tf/) line 269, in resource "aws_eks_node_group" "this": │  269: resource "aws_eks_node_group" "this" {
So I changed the additional_userdata.sh script to MIME multipart format using the "Amazon Linux user data" template here:
https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html#launch-template-user-data
...and then the code ends up in the Launch Template, and executes correctly on the node.
I'm wondering if the sample-input-custom-data.tfvars works as-is after https://github.com/sassoftware/viya4-iac-aws/pull/122 on your side, or if the updates above need to be integrated into viya4-iac-aws?
References
No response
Code of Conduct

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

This is identified at this Issue https://github.com/sassoftware/viya4-iac-aws/issues/139#issuecomment-1181123593 already.
There I provide one simple workaround:  this simple addition to locals.tf (around line 104, before post_bootstrap_user_data does seem to fix the issue:
pre_bootstrap_user_data = (np_value.custom_data != "" ? file(np_value.custom_data) : "")

Closing, this is a dupe of issue https://github.com/sassoftware/viya4-iac-aws/issues/139
PR #158 should resolve this.

authors: canpmh jarpat shealym


text:
Hotfix Develop - no-url-protocols, Fix regex for detecting url protocol use

Closes #340
DCO 1.1 Signed-off-by: Ben Rothman bensrothman@gmail.com

updated.

source: gharchive/pull-request

repo: sasstools/sass-lint

license: mit

license_type: permissive

license_source: bigquery


text:
Build failure for 2.8.x-tiered-storage

Run: ./gradlew build
Observe the following:
> Task :core:compileTestScala
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/log/remote/RemoteIndexCacheTest.scala:27: Unused import
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/log/remote/RemoteIndexCacheTest.scala:28: Unused import
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/api/AdminClientWithPoliciesIntegrationTest.scala:91: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala:160: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala:1059: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala:1094: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala:1126: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/api/BaseProducerSendTest.scala:105: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/api/ConsumerBounceTest.scala:87: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/api/ConsumerBounceTest.scala:384: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala:2177: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala:2229: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala:2292: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/api/SaslSslAdminIntegrationTest.scala:50: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/network/DynamicConnectionQuotaTest.scala:340: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/server/DynamicBrokerReconfigurationTest.scala:1358: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/server/DynamicBrokerReconfigurationTest.scala:1385: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/integration/kafka/server/DynamicBrokerReconfigurationTest.scala:1394: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/integration/UncleanLeaderElectionTest.scala:344: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/log/OffsetIndexTest.scala:52: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/security/authorizer/AuthorizerWrapperTest.scala:39: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/security/authorizer/AuthorizerWrapperTest.scala:41: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/security/authorizer/AuthorizerWrapperTest.scala:47: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/server/EdgeCaseRequestTest.scala:119: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/server/KafkaApisTest.scala:1459: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/server/ProduceRequestTest.scala:46: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/server/ProduceRequestTest.scala:82: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/server/ProduceRequestTest.scala:127: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/server/ProduceRequestTest.scala:167: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/server/ProduceRequestTest.scala:198: @nowarn annotation does not suppress any warnings
[Error] /local/home/diviv/oss/kafka/core/src/test/scala/unit/kafka/tools/MirrorMakerTest.scala:29: @nowarn annotation does not suppress any warnings
31 errors found

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:compileTestScala'.
> Compilation failed

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 4m 24s
378 actionable tasks: 286 executed, 92 up-to-date

After fixing the imports, next failure is with a unit test
> Task :storage:test
kafka.api.TransactionsTestWithTieredStore.testBasicTransactions() failed, log available in /local/home/diviv/oss/kafka/storage/build/reports/testOutput/kafka.api.TransactionsTestWithTieredStore.testBasicTransactions().test.stdout

TransactionsTestWithTieredStore > testBasicTransactions() FAILED
    org.opentest4j.AssertionFailedError: Consumed 1 records before timeout instead of the expected 2 records
        at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39)
        at org.junit.jupiter.api.Assertions.fail(Assertions.java:117)
        at kafka.utils.TestUtils$.pollUntilAtLeastNumRecords(TestUtils.scala:852)
        at kafka.utils.TestUtils$.consumeRecords(TestUtils.scala:1478)
        at kafka.api.TransactionsTest.testBasicTransactions(TransactionsTest.scala:112)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
        at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
        at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
        at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
        at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
        at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
        at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
        at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)

The build is successful after merging https://github.com/satishd/kafka/commit/f86ae5c5dc5af5fba4ba65ef86c26d8e7c523200
Although I found two unit tests to be flaky. Added separate issues for them. Resolving this one.

source: gharchive/issue

repo: satishd/kafka

license_source: github-api


text:
Doesn't let me block more than one chain at a time

I can run the extension once but then it logs me out of my account and even with other accounts, all I get are error messages. Even when running it on small accounts, I get the same problem.

I just got it today and am seeing the same thing.  Most of the users I want to block return errors.  Out of every thousand or so perhaps 200 get through.  Then it logs me out of my account and I have to log back in, then close Chrome and reopen it to continue.  It is a GREAT tool and very much needed right now but definitely needs tweaking.

yeah it appears to run up against some kind of Twitter rate limiting.  500 block in rapid succession seems to be a hard trigger, but there are other cumulative ones, etc.
it's a great solution, but may need some pacing and slowdown in the script.

authors: Blockq amaranth21 deviantollam

repo: satsukitv/twitter-block-chain


text:
discrepancy about "Evaluation time discrepancy"

Hi,
I am testing about the interesting Evaluation time discrepancy, and I have a test like following:
a = [1, 2, 3]
b = [10, 20, 30]
g = (i + j for i in a for j in b)
a = [4, 5, 6]
b = [100, 200, 300]
print(list(g))

And the result is
[101, 201, 301, 102, 202, 302, 103, 203, 303]

I tested it with python3 on osx and debian, and got same result.
It seems that only a is evaluated at declaration time? Or passed by reference?
Could someone give some detailed information about this?

I digged a little about this and found something from generated byte code.
a = [1, 2, 3]
b = [10, 20, 30]
g = (i + j for i in a for j in b if 4 in a and 100 in b)
a = [4, 5, 6]
b = [100, 200, 300]
import dis
dis.dis(g)

result
  1           0 LOAD_FAST                0 (.0)
        >>    3 FOR_ITER                52 (to 58)
              6 STORE_FAST               1 (i)
              9 LOAD_GLOBAL              0 (b)
             12 GET_ITER
        >>   13 FOR_ITER                39 (to 55)
             16 STORE_FAST               2 (j)
             19 LOAD_CONST               0 (4)
             22 LOAD_GLOBAL              1 (a)
             25 COMPARE_OP               6 (in)
             28 POP_JUMP_IF_FALSE       13
             31 LOAD_CONST               1 (100)
             34 LOAD_GLOBAL              0 (b)
             37 COMPARE_OP               6 (in)
             40 POP_JUMP_IF_FALSE       13
             43 LOAD_FAST                1 (i)
             46 LOAD_FAST                2 (j)
             49 BINARY_ADD
             50 YIELD_VALUE
             51 POP_TOP
             52 JUMP_ABSOLUTE           13
        >>   55 JUMP_ABSOLUTE            3
        >>   58 LOAD_CONST               2 (None)
             61 RETURN_VALUE

It seems that only the first for i in X is loaded from local scope(LOAD_FAST),  all other for x in XX and if XX are loaded from global scope(LOAD_GLOBAL).

@zxdvd  Yes your analysis is correct. According to PEP-289

Only the outermost for-expression is evaluated immediately, the other expressions are deferred until the generator is run

You can visit the link to get some more insights and details.

Added a snippet and releveant explanation for this in the project. Feel free to check out the above commit and revert back if anything's incorrect / missing.

authors: satwikkansal sohaibfarooqi zxdvd

repo: satwikkansal/wtfpython

license: WTFPL


text:
Error reporting prod docs

Description
Migrates additional content from support.backtrace.io (adds content for security and compliance + file attachments) to Sauce Docs. Also updates previously migrated content for workflow integrations.
Motivation and Context
Content was migrated "as-is" from the KB to ensure existing translation projects are maintained. The content will be updated in the future to meet to our documentation styles and standards.
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Documentation fix (typos, incorrect content, missing content, etc.)

Checklist

[ ] I have read the contributing document.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

@kimsauce Thanks for the thorough review! I made the style changes. Can you re-review?

repo: saucelabs/sauce-docs

license: MIT


text:
[java] update property name

One-line summary
Rename toggle property to be more descriptive
Description
To toggle off Sauce code, set sauce.disabled to "true" rather than using saucelabs to "false"
Types of Changes

Refactor/improvements

@titusfortner do we need an acceptance test that validates that this behavior works as expected? I remember that you had concerns. I also see a bunch of //TODO in the ToggleLocalExample.java

authors: nadvolod titusfortner


text:
chore: Update Container Resource Specifications

Review Checklist

Summary*

[ ] fix: Bug fix for Add the items tackled here as checklists
[x] feat: Completed task
[ ] chore: Incomplete task

[ ] test: Sub-task 1

Structure*

[ ] The Pull Request has a proper title that conforms to our MR title standards
[ ] The Pull Request has one commit, and if there are more than one, they should be squashed
[ ] The commit should have a proper title and a short description
[ ] The commit must be signed off
[ ] Unused imports are not present
[ ] Dead code is not present
[ ] Ensure dry running library to confirm changes

Tests

[ ] Proper and high quality unit, integration and acceptance(if applicable) tests have been written
[ ] The coverage threshold should not be lowered

Sign off*

[ ] All comments have been resolved by the reviewers
[ ] Approved by Czar {replace_with_czar_name}
[ ] Signed off by second reviewer {replace_with_name}
[ ] Ensure all checks are done before merging :warning:
[ ] All PRs needs to be signed before merging :warning:

N/B:

Add a checklist if more than one item is done.
Add screenshots and/or images where necessary
Indicate any breakages caused in the UI :exclamation:
Where necessary, indicate which issue the Pull Request solves (Closes #)
Any new files are updated in the folder structure in the README

Pull Request Test Coverage Report for Build 6862146754

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 83.255%

Totals

Change from base Build 6862013635:
0.0%

Covered Lines:
17566

Relevant Lines:
21099

💛  - Coveralls

authors: Salaton coveralls

repo: savannahghi/mycarehub


text:
chore(deps): upgrade project dependencies

Upgrade all project dependencies except coverage.

:tada: This PR is included in version 1.0.2-rc.1 :tada:
The release is available on:

v1.0.2-rc.1
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.2 :tada:
The release is available on:

v1.0.2
GitHub release

Your semantic-release bot :package::rocket:

repo: savannahghi/sghi-etl-core


text:
CI for Node

Created node.js.yml file to practice CI.

Initializes with two players


text:
docs: add notes in readme.md

for:

[x] canvasid which was not documented
[x] usecredentials #88 #80 #60
[x] base64 or Uint8Array pdf format #77 #37 #62

thanks @simobasso :tada:

repo: sayanee/angularjs-pdf


text:
Duplicate logging on el7

On a base installation of CentOS 7 using this module and the following parameters, double logging can be seen under /var/log/messages.
  class { 'rsyslog::client':
    log_local => true,
    log_auth_local => true,
    log_remote => false,
  }

Example:
$ logger test

yields
Oct 21 16:44:03 mad-west-vcs006 centos: test
Oct 21 16:44:03 mad-west-vcs006 centos: test

This seems to be something to do with the journal integration added in el7.
One of the configuration items in the stock config (removed under puppet) fixes this behaviour
# Turn off message reception via local log socket;
# local messages are retrieved through imjournal now.
$OmitLocalLogging on

Should this be made part of the stock config for el7?

Any news on this?

authors: mdsummers saz

repo: saz/puppet-rsyslog


text:
Unresolved dependency generating jar with SBT

I'm developing a Spark process in Scala (Eclipse IDE) and runs fine in my local pc, but when I try to compiled with SBT that I installed on my pc I got a error (see picture).
My first doubt is why SBT try to compile with scala 2.12 if I explicitly set scalaVersion to 2.11.11 in my build.sbt. I tried installing other SBT versions with the same results, also in other PCs but not works. I need help to fix it.
scala_version(Spark) :2.11.11
sbt_version : 1.0.2
spark: 2.2
build.sbt
name := "Completitudf"
version := "1.0"
organization := "com.bcp.spark"
scalaVersion := "2.11.11"
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % "2.2.0" % "provided",
"org.apache.spark" %% "spark-sql" % "2.2.0" % "provided"
)

assembly.sbt
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.0.2")

Try
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")

repo: sbt/sbt-assembly


text:
Unresolved dependencies: de.heikoseeberger#sbt-header;3.0.2 not found

Environment details:

sbt.version = 0.13.16
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
javac 1.8.0_144
Scala code runner version 2.12.3 -- Copyright 2002-2017, LAMP/EPFL and Lightbend, Inc.

I am trying to add sbt-header to my project to keep copyright headers up to date, but I am unable to add this plugin to sbt.
The error I am getting:
[error] (*:update) sbt.ResolveException: unresolved dependency: de.heikoseeberger#sbt-header;3.0.2: not found

Detailed message:
[info] Resolving de.heikoseeberger#sbt-header;3.0.2 ...
[warn] 	module not found: de.heikoseeberger#sbt-header;3.0.2
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/de.heikoseeberger/sbt-header/scala_2.10/sbt_0.13/3.0.2/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/de.heikoseeberger/sbt-header/scala_2.10/sbt_0.13/3.0.2/ivys/ivy.xml
[warn] ==== local: tried
[warn]   /Users/aabramov/.ivy2/local/de.heikoseeberger/sbt-header/scala_2.10/sbt_0.13/3.0.2/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/de/heikoseeberger/sbt-header_2.10_0.13/3.0.2/sbt-header-3.0.2.pom
[warn] ==== local-preloaded-ivy: tried
[warn]   /Users/aabramov/.sbt/preloaded/de.heikoseeberger/sbt-header/3.0.2/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn]   file:////Users/aabramov/.sbt/preloaded/de/heikoseeberger/sbt-header_2.10_0.13/3.0.2/sbt-header-3.0.2.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: de.heikoseeberger#sbt-header;3.0.2: not found
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::

As an example I took this project: https://github.com/sbt/sbt-fresh
Maybe I need to add some special resolvers to my project?
Thank you.

Suddenly, the issue fixed by upgrading sbt version to 1.0.2.
So another question: how can I use this plugin with sbt version 0.13.16?
I am trying to add sbt-header plugin to Scala main repository in scope of https://github.com/scala/bug/issues/10531.

My fault, I forgot to cross-publish. Done now. Thanks for reporting.

authors: Abrasha hseeberger

repo: sbt/sbt-header


text:
Cache jar classpath entries between commands

Zinc frequently needs to check the library classpath to ensure that
class names are defined in a given jar. There is a cost to looking up
the class names in the jar so it's a benefit to cache this across runs
so that we don't have to redo the same work every time. More
importantly, in testing with the latest sbt HEAD, I found that sbt would
crash fairly frequently because it ran out of direct memory, which is
used by nio to read and write to native memory without copying. The
direct memory area is shared with the java heap and if it reaches the
limit, the jvm crashes hard as though kill -9 was invoked. After caching
the entries, I stopped seeing crashes.

This would eliminate the need for https://github.com/sbt/zinc/pull/864

repo: sbt/sbt


text:
Sources for generated types are not included in source artifacts

compiler-interface-1.0.0-M5-sources.jar doesn't include sources for xsbti.compile.Compilers or xsbti.compile.IncOptions because their sources are generated by sbt-datatype. It would be nice if the generated Java sources were actually part of the source artifact.

Do you know something about this @eed3si9n ? It would be indeed good because this would mean that people can have a look at all the generated sources, which include an extensive part of the Zinc Java API.

This is due to https://github.com/sbt/sbt/issues/2205.
See my workaround in https://github.com/sbt/librarymanagement/pull/62.

Fixed upstream

authors: Friendseeker dwijnand jvican kiritsuku

repo: sbt/zinc


text:
ERROR: when parsing SPM manifest: missingKey("product_type")

I keep running into that error, even when I try to run a completely new blank project.

Hi @jblanked ! At the moment we don't support Xcode 15, only lower versions. We will release a build with support for Xcode 15 and Swift 5.9 next week. I'll report it here.

Hi @jblanked ! At the moment we don't support Xcode 15, only lower versions. We will release a build with support for Xcode 15 and Swift 5.9 next week. I'll report it here.

Awesome!! Super excited

Any update on this? 🙏🏾

Hi @jblanked yes, we've uploaded a new release with Xcode 15 support on the SCADE website, you can try it here: https://www.scade.io/download/

You are awesome! As a developer, I understand the process of fine-tuning and releasing new code. Thank you so much. Everything is working now with the new update.

authors: bulantsevajo jblanked

repo: scade-platform/SCADE


text:
Update ContractReader.js

Added setTried(true) in case tried === false and updateValue() function was called to prevent calling updateValue() many times

The hooks are now an npm package living in a different repo.

authors: codenamejason korotkih

repo: scaffold-eth/scaffold-eth


text:
Check TS typings on lint-staged and GH actions

Right now the only way I see type errors is with my IDE.
I added a yarn next:check-types to be able to check those.

Added it to lint-staged: I didn't find a way to check only specific files with TSC (as we do with the linting).
Added it to the GH Action also.

It seems that this is not ignoring node_modules

Added it to lint-staged: I didn't find a way to check only specific files with TSC (as we do with the linting).

First I thought it would be nice if we type-check only staged changes and was finding some solutions to overcome it until I came across this comment. And now it makes sense to let tsc go through all the files so I think the current approach is nice also if its get too annoying for the developer he can use @ts-ignore since ban-ts-comment is off now.
But would love to know your thoughts on this, if we plan to go other way(type-checking only staged files) then we can use below resources/packages to solve this problem :

tsc-files package, article explaining use of it here
Stackoverflow discussion solution

I came across this comment.

I like that and it makes a lot of sense.
Let's keep it for now, and if at some point the checks on lint-staged take a lot of time... maybe we can run that command only on the GH action.
Thanks Shiv!


text:
js.constructorOf[T] failing in fullOptJS mode in master

Code :

  import scala.scalajs.js.ConstructorTag
    import scala.scalajs.js.annotation.ScalaJSDefined

    @ScalaJSDefined
    class FirstScreen extends js.Object

    @ScalaJSDefined
    class SecondScreen extends js.Object

    @inline
    def nameCtorPair[C <: js.Object: ConstructorTag]: (String, js.Any) = {
      val ctor = js.constructorTag[C].constructor
      println(s"Name : ${ctor.name} ctor : $ctor ")
      ctor.name.toString -> ctor
    }

    val map =
      js.Dictionary(nameCtorPair[FirstScreen], nameCtorPair[SecondScreen])

    js.Dynamic.global.console.log(map)

fastOptJS
Name : $c_Lclient_SampleApp$FirstScreen$1 ctor : function $c_Lclient_SampleApp$FirstScreen$1()
 Name : $c_Lclient_SampleApp$SecondScreen$1 ctor : function$c_Lclient_SampleApp$SecondScreen$1() {

fullOptJS*
Name : a ctor : function (){g.Object.call(this)}
Name : a ctor : function (){g.Object.call(this)}

That doesn't seem abnormal. Closure potentially optimizes the constructor enough to remove everything but the super call. Besides, it renames things, so the name property isn't reliable in fullOpt.

hmm ok, but it was working fine in 0.6.14
Name : kd ctor : function kd(){g.Object.call(this)}
Name : od ctor : function od(){g.Object.call(this)}

anyway what do you suggest for this kind of use case (i want name of that class) ?

You could use an implicit ClassTag in addition to the ConstructorTag to access its runtimeClass.getName.

You could use an implicit ClassTag in addition to the ConstructorTag to access its runtimeClass.getName.

👍 , thank you thats what i want , now in fullOpt also i have readable name in debugging :)

repo: scala-js/scala-js


text:
Future request: select scala-js version when use Scala2.11

Ref #4807
Based on the Scala2.11 supported discussion.
I need to support to Scala2.11 with scala-js 0.6 what other library also supported.
Any method that I can change scala-js's version to 0.6 when I use Scala2.11 in cross build? Now I can just change the source file and it's the same way as what other library done.

Ah, thanks! This solution has met my expectations and is even more reasonable than I expected.

水山清风
@.***

------------------ 原始邮件 ------------------
发件人: "Sébastien @.>;
发送时间: 2023年3月27日(星期一) 晚上11:33
收件人: @.>;
抄送: @.>; @.>;
主题: Re: [scala-js/scala-js] Future request: select scala-js version when use Scala2.11 (Issue #4840)
If you really want to conditionally use Scala.js 0.6.x or 1.x, use an environment variable. Details here: http://www.scala-js.org/news/2020/02/25/announcing-scalajs-1.0.0/#cross-building-for-scalajs-06x-and-1x
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>


text:
re-enable akka-persistence-tck

now that we have Scalactic available

test run in progress at https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-integrate-community-build/514/consoleFull

failed because the Scalactic dependency wasn't available. perhaps over-aggressive caching by dbuild? let's try again with a newer Scala SHA, forcing rebuilding of everything: https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-integrate-community-build/515/consoleFull

try again now that #271 is merged: https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-integrate-community-build/524/consoleFull

repo: scala/community-builds


text:
Misleading docs?

Here it is written that "Elementwise multiplication" is done through a :* b. But this doesn't seem to work?
import breeze.linalg._

val v1 = DenseVector(1.0, 2.0, 3.0)

 v1 :* 2

Scala 2.13.6, breeze 1.2

The operator has been renamed to avoid surprising precedence. So
v1 *:* 2.0

should do what you want. The docs do need updating accordingly.

fixed the docs!

authors: LLCampos darrenjw dlwh

repo: scalanlp/breeze


text:
Scalaz Streams Project

Hi John, I am the lead for Scalaz-Streams project and I don't have access to the repository. Also this project already exists https://github.com/scalaz/scalaz-stream. Should we come up with a new name for Scalaz8 streams project.

Well, it does not have a master branch, so I'd say you can start with an empty one and leave the other branches alone for historical reasons.

@virdis Done! Accept the invite and feel free to add anyone else to the project.
I think we can do our work in a new master branch.

authors: jdegoes ktonga virdis

repo: scalaz/scalaz-zio


text:
.NET CORE support

Doesn't currently support latest .NET CORE.

It does. If you have any specific issues, please, inform us.


text:
feature:OSIS-22 Update Tenant

Description:

Update Account's customAttributes

Design ref: https://github.com/scality/osis/blob/development/1.0/Design.md#update-tenant

Hello saitharunthodupunuru,
My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.
Status report is not available.

Incorrect fix version
The Fix Version/s in issue OSIS-22 contains:

None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

1.0.0

Please check the Fix Version/s of OSIS-22, or the target
branch of this pull request.

/approve

Incorrect fix version
The Fix Version/s in issue OSIS-22 contains:

None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

1.0.0

Please check the Fix Version/s of OSIS-22, or the target
branch of this pull request.
The following options are set: approve

/reset

Reset complete
I have successfully deleted this pull request's integration branches.
The following options are set: approve

In the queue
The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.
The changeset will be merged in:

:heavy_check_mark: development/1.0

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.
IMPORTANT
Please do not attempt to modify this pull request.

Any commit you add on the source branch will trigger a new cycle after the
current queue is merged.
Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.
The following options are set: approve

I have successfully merged the changeset of this pull request
into targetted development branches:

:heavy_check_mark: development/1.0

Please check the status of the associated issue OSIS-22.
Goodbye saitharunthodupunuru.

authors: bert-e saitharunthodupunuru

repo: scality/osis


text:
🛑 META.APPINN is down

In 7413877, META.APPINN (https://meta.appinn.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: META.APPINN is back up in e6550c7.

repo: scavin/appinnuptime


text:
withAlert is not working

My code is like:
import React from 'react'
import { ContextProviderComponent } from './Context'
import { withAlert } from 'react-alert'
import AlertTemplate from 'react-alert-template-basic'

// optional cofiguration
const options = {
  position: 'bottom right',
  timeout: 3000,
  offset: '30px',
  transition: 'scale',
}

class Root extends React.Component {
  render() {
    return (
      <ContextProviderComponent>{this.props.children}</ContextProviderComponent>
    )
  }
}

const RealRoot = withAlert({
  template: AlertTemplate,
  ...options,
})(Root)

export default RealRoot

And I get an error:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `ForwardRef(WithAlert(Root))`.

I am not sure maybe I am doing something wrong but I cannot figure it out. Is it supposed to work like this? I appreciate any help!
My versions:
"react": "16.8.6",
"react-alert": "5.5.0"

Hi, @OrKoN!
I'm curious - did you wrap your component with AlertProvider like in the Usage section from the documentation? I'm not seeing it in your example above - unless it is hidden in './Context' file.

@besLisbeth yes, I was using that and I tried different combinations. It's stopped working after I added my own context. So probably I was doing something wrong. Anyway, I actually gave up and implemented my own logic for the use case I have on one page:
  // Component methods
  sendAlert(message, options) {
    const alert = {
      message,
      options,
    }
    this.setState(
      {
        alerts: [...this.state.alerts, alert],
      },
      () => {
        setTimeout(() => {
          this.closeAlert(alert)
        }, 2000)
      }
    )
  }

  closeAlert(alert) {
    this.setState({
      alerts: this.state.alerts.filter(a => a !== alert),
    })
  }

import Alert from 'react-alert-template-basic'

// render
<div className={styles.alerts}>
  {this.state.alerts.map((a, i) => {
    return (
      <Alert
        close={() => this.closeAlert(a)}
        key={`alert${i}`}
        message={a.message}
        options={a.options}
      />
    )
  })}
</div>

.alerts {
  position: fixed;
  bottom: 50px;
  right: 50px;
  z-index: 100;

  > * {
    margin-top: 10px;
  }
}

Maybe someone will find it useful if they hit the same problem as I had (again probably it's me not understanding contexts and providers properly and also using gatsby which adds a bit of magic on its own).

authors: OrKoN besLisbeth

repo: schiehll/react-alert


text:
🛑 EC-Balzheim is down

In 06bf01a, EC-Balzheim (https://www.ec-balzheim.de) was down:

HTTP code: 0
Response time: 0 ms

Resolved: EC-Balzheim is back up in e84d86c after 6 minutes.

repo: schliesser/upptime


text:
Application doesn't open fully when selecting it from app bar

I am noticing that the app won't open when I select it from the app bar. A small pop-up opens in the upper left-hand corner, but I can't click on it or move it. I have taken a screenshot and linked it. I am wondering if this is a conflict with me playing at native 4k resolution.

Thanks
KSP 2 v. 0.1.3.1.24603
12900k
32GB DDR5
RTX4090
LG 32UD99-W

Which version of SpaceWarp are you running? There have been some recent changes to SpaceWarp which were put in to solve problems like this. The latest version of SpaceWarp is 1.3.0.3 and is available here: https://spacedock.info/mod/3277/Space Warp + BepInEx#changelog
Also, have you considered switching to Flight Plan? I don't do much with ROC anymore as all of its capabilities have been rolled into Flight Plan, which can do a lot more. If you prefer staying with ROC, that's fine too. IT's opening fine for me in 0.1.3.1, but then I'm also running the latest SpaceWarp which may be why.

authors: bmcmahonwrx schlosrat

repo: schlosrat/ResonantOrbitCalculator


text:
Replace the deprecated setLayers call with setFileEntriesLayers

Also update the jib-core version to 0.18.0

thanks for your contribution!

authors: pschichtel schmitch

repo: schmitch/sbt-jib


text:
🛑 pianos.pub is down

In a209fcf, pianos.pub (https://pianos.pub/) was down:

HTTP code: 502
Response time: 245 ms

Resolved: pianos.pub is back up in e25280a.

repo: schollz/upptime


text:
[Core] Add Support for IsNullCondition or IsEmptyCondition

I did not yet think about this one in deep yet not in all search engines something like null does exists, example some even don't allow to send null and require to send nothing instead.
I'm not even yet sure if I for example indexing multi values like in the test example "tags": ["Tag A", "Tag B"] and should be even possible with a null via "tags": ["Tag A", null, "Tag C"], its sure more technical not a real world example.
But maybe something like a IsEmptyCondition make sense. This would be keep in mind that "title": "" and "title": null at the end would be the same. And Empty would on multi values only match when it is [].

I'm not even yet sure if I for example indexing multi values like in the test example "tags": ["Tag A", "Tag B"] and should be even possible with a null via "tags": ["Tag A", null, "Tag C"], its sure more technical not a real world example.

What would even be the merit in having having null in a list like that (even if it's technically possible). In the real world, what would it mean to have a null in a list? For non-associative arrays I'm not sure what the added value would be. Think more realistic use cases would be tags: null, tags: [], tags: [{key: value, key2: value2}, {key: value, key2: null}] (associative).

But maybe something like a IsEmptyCondition make sense. This would be keep in mind that "title": "" and "title": null at the end would be the same. And Empty would on multi values only match when it is [].

I'm not sure how others perceive this, but to me title: "" and title: null are two different things. Having title: "" means the title has a value and is set to "", while with title: null it has no value (maybe it was not set, missing, or not available at that time). If IsEmptyCondition would handle both "" and null, you will no longer distuingish between the two of them. Think a IsNullCondition that explicetly only handles null values would be my preference and let IsEmptyCondition handle the rest.
Like you already said, some engines probably don't allow null, so I don't know how that would be handled (maybe engines that allow null can use the IsNullCondition, and others should use IsEmptyCondition for those cases).

authors: ToshY alexander-schranz

repo: schranz-search/schranz-search


text:
Add TomasVotruba bladestan to list of templating tools

Add @TomasVotruba bladestan to list of templating tools

Thanks Alex! :hugs:

Thank you for all your Open Source work :)

authors: TomasVotruba alexander-schranz

repo: schranz-templating/templating


text:
Rescan only 1 issue from Seccubus finding

Rescan only 1 issue from Seccubus finding

Pretty complex thing to do actually.


text:
Added 7 Seconds by Youssou N’Dour & Neneh Cherry

Song link: https://open.spotify.com/track/76D5nfZbYzZYfUZKGy73jy?si=Mzco5rYpS3ykO5ARgzHMEA
Spotify URI: spotify:track:76D5nfZbYzZYfUZKGy73jy

Nope, but wanted to assign moods to all tracks in a separate pull request

repo: schuifel-shuffle/schuifel-shuffle-data


text:
Correção das traduções. Ainda existem termos na interface que não são traduzidos ao fazer a troca de idiomas.

Descrição do problema
Ao testar o sistema fazendo a troca do idioma, percebe-se que alguns termos se mantém no idioma anterior.
Deve ser feita a verificação e correção.
Passos para reproduzir o problema

Acesse a página inicial
Clique no dropwdown de troca de idiomas, localizado no canto superior direito.
Observe por toda interface que alguns termos não fazem a troca.

Comportamento esperado
Todos os labels do sistema e textos informativos devem ser traduzíveis.
Screenshots ou vídeos
Para dar mais detalhes e contexto sobre o erro, considere anexar fotos ou vídeos do problema.
Anexos
Está seção é opcional, utilize para referenciar arquivos que servem de insumo para reproduzir o erro, ex:

XML utilizado
HTML produzido
PDF criado

Ambiente utilizado
Quando aplicável, forneça detalhes sobre o ambiente utilizado, ex:

Navegador Mozilla Firefox versão 30
Windows XP
PC programs versão 1.0
Aparelho celular iPhone 7, iOS 7

Feita a correção.
Ajustados arquivos .po e removidas as linhas
#, fuzzy
que impediam a correta compilação e geração da tradução.


text:
Can't use SupervisedScorer when using X, y, domain = dataset.pack_lodo

When using LeaveOneDomainOut we want to have a cross validation by modifying the source and target domains at each split.
Thus we need to use the dataset.pack_lodo method since its the only one not asking for a source and a target domain.
Now if we want to use the SupervisedScorer, it asks a target_labels argument to generate a score.
However when we use the pack_lodo function we don't have the target_labels.
Thus we can't use SupervisedScorer when using LeaveOneDomainOut.
And by leaving the param target_labels empty in cross_validate , we get ValueErrors.

Getting target_labels for SupervisedScorer when using pack_lodo is possible, it's just a little bit tedious as it requires understanding of the packing. You need to take unmasked labels and duplicate it into masked positions. Something like
y_source, y_target = source_target_split(y, sample_domain=sample_domain)
target_labels = source_target_merge(y_source, y_source, sample_domain=sample_domain)

target_labels should now be passed to the fit params. The rest will happen automatically (the correct labels will be propagated through the entire machinery of the model selection). For now, I would rather put this in the document/examples for the SupervisedScorer, rather than keeping any sort of functionality dedicated to this (edge-)case.

Right now it doesn't work since _merge_source_target() expects a 2D array as an input to work.
Let me change that, so that we can feed y to it.

I think it would be also better to maintain parity between 'split' and 'merge', so it would look like 'source_target_merge' rather than an old name. Also, should be public in utils. We can do it here or in a separate PR, as you can see fit better.

authors: YanisLalou kachayev

repo: scikit-adaptation/skada


text:
In serialization, check for "tojson", "fromjson" methods on the object

As a last-ditch effort before resorting to Pickle.

Done: see PR #28.

repo: scikit-hep/awkward-array


text:
Rewrite Cython compilation in setup.py

The current setup.py isn't written in a good way.
The two main issues I see are:

Cython isn't run automatically when Cython files are edited.
python setup.py egg_info fails if Cython or Numpy aren't installed.

I think the recommended way to fix 1. is to use Cythonize:
http://docs.cython.org/en/latest/src/userguide/source_files_and_compilation.html
For 2. one has to be careful to put the Cython and numpy imports in if statements or try blocks, so that python setup.py egg_info works.
I don't have time to fix this now. Contributions welcome!
Another thing that should be done is to extend the travis-ci test matrix to something similar like
https://github.com/iminuit/iminuit/blob/master/.travis.yml
to e.g. have a build where no Cython and Numpy are installed and python setup.py egg_info is run.

Number 1. has been fixed by #75.
Number 2. is still true, due to the numpy import. We need numpy regardless of whether we have Cython or not, I think, due to the numpy imports in the Cython files which get translated to preprocessor imports in the C files:
// Inside costfunc.c, for example
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"

The Extension objects in the setup.py file need the numpy include path.
I don't know how to get around that then 😕 Other than require users to pip install numpy before installing probfit.

The recommended way to write setup.py files for Cython projects is to put the Cython (and for us also Numpy) imports in if-else or try-except blocks.
For iminuit I (or Piti?) put this:
https://github.com/iminuit/iminuit/blob/master/setup.py#L32
There are several efforts to improve Python packaging to use static config files more instead of setup.py, but for now, package managers run python setup.py egg_info to just get a version number and dependencies and other basic info. So it is really useful to make that work without needing dependencies. setuptools is an exception, the Python packaging authority changed the default examples and recommendation to import setuptools in setup.py instead of import distutils a few years ago.

probfit now does Cython checking in the same way as iminuit, but iminuit doesn't have the numpy problem probfit does (numpy isn't required to build the iminuit C(++) components).

To be clear: I'm fully in favour if making egg_info (and indeed pip install probfit) work without having to install numpy first. I'm just not sure how to do it.

Same trick as with Cython: you have to avoid the numpy import and uses in the top-level module in setup.py, and instead only conditionally import and use it.
The options are:

if
try, except
a function
a module in probfit that you import from setup.py if it setup.py gets too confusing.

I'm not a setup.py expert, I would start by looking at setup.py of other projects using Cython and Numpy, like pandas, scikit-image, ...
It might be that these "big" projects always have a complex solution.
Maybe also search the Cython mailing list archive and Stackoverflow, and if you don't find anything, ask a "What is the best practice to write a setup.py using Cython / Numpy" question.
Also -- I don't think this is a blocker for the next release. If you don't want to spend more time on it, just assign the issue to me. (but I don't have time for this short-term).

I see the milestone is already "wishlist".
:-)

I have a feeling that those packages use wheels when you pip install. Building must require numpy, whether or not Cython is present. Cython is needed only if one wants to (re)generate the C files.
Is probfit distributed with wheels? Compiled for each platform?
Interestingly, in a new virtualenv I get an import error about numpy if I do pip install scikit-learn; python -c 'import sklearn'. But installing pandas in another new virtualenv doesn't give me the same problem, it installs numpy.

Building must require numpy

Yes, python setup.py build needs Numpy.
But python setup.py egg_info (the command to extract package name, version, depencency and other meta info) should work without Numpy.
I would bet that it does for packages like scikit-learn and pandas.
Yes, people are starting to produce wheels for many packages.
But you can always find the source tarballs on PyPI, and these are used by many people and projects (e.g. to build conda package, Linux packages, users building from source).

Is probfit distributed with wheels?

No.
Honestly, I don't think the userbase is large enough to bother.
And it's technically very savvy people, they have a C compiler and don't mind waiting a minute for probfit to compile.

Ah! I see, OK. I hadn't thought of people using only egg_info.
Thank you for being so patient 😅
So a diff like this should fix that:
diff --git a/setup.py b/setup.py
index 35f85a1..7bafbb3 100644
--- a/setup.py
+++ b/setup.py
@@ -3,28 +3,33 @@ import os
 from setuptools import setup
 from setuptools.extension import Extension

-import numpy as np
-
 try:
-    from Cython.Build import cythonize
-
-    USE_CYTHON = True
+    import numpy as np
 except ImportError:
-    print('Cython is not available; using pre-generated C files')
-    USE_CYTHON = False
+    print('Could not import numpy; C extensions will not be built')
+    USE_NUMPY = False

-ext = '.pyx' if USE_CYTHON else '.c'
 extensions = []
-for source_file in glob('probfit/*' + ext):
-    fname, _ = os.path.splitext(os.path.basename(source_file))
-    extensions.append(
-        Extension('probfit.{0}'.format(fname),
-                  sources=['probfit/{0}{1}'.format(fname, ext)],
-                  include_dirs=[np.get_include()])
-    )
+if USE_NUMPY:
+    try:
+        from Cython.Build import cythonize
+
+        USE_CYTHON = True
+    except ImportError:
+        print('Cython is not available; using pre-generated C files')
+        USE_CYTHON = False
+
+    ext = '.pyx' if USE_CYTHON else '.c'
+    for source_file in glob('probfit/*' + ext):
+        fname, _ = os.path.splitext(os.path.basename(source_file))
+        extensions.append(
+            Extension('probfit.{0}'.format(fname),
+                      sources=['probfit/{0}{1}'.format(fname, ext)],
+                      include_dirs=[np.get_include()])
+        )

-if USE_CYTHON:
-    extensions = cythonize(extensions)
+    if USE_CYTHON:
+        extensions = cythonize(extensions)

 def get_version():

Summary: try/except the numpy import, and then only try to create Extension objects if we have numpy.

In principle, yes.
But I'll need to see the full new setup.py and think or locally try through different cases.
Error messages should also be reasonable.
Can you make a PR, so that I can try it out?
And add a build on travis-ci where you don't have the optional dependencies, but still run setup.py.
I think we have that for iminuit, if no, I could point you to other .travis.yml where we have such builds in the build matrix.

Thus was fixed in #105.

authors: alexpearce cdeil henryiii

repo: scikit-hep/probfit


text:
ENH: explain why aps method have coverage higher thna 1-alpha

Fixes #236

Codecov Report
Patch and project coverage have no change.

Comparison is base (88f0bc6) 99.90% compared to head (69ad566) 99.90%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #278   +/-   ##
=======================================
  Coverage   99.90%   99.90%
=======================================
  Files          28       28
  Lines        3269     3269
  Branches      343      343
=======================================
  Hits         3266     3266
  Misses          3        3

Impacted Files
Coverage Δ

mapie/classification.py
100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

repo: scikit-learn-contrib/MAPIE


text:
topology: allow peering links between core-ASes

Currently, the topology loader forbids core ASes from having peering links (i.e. links with "link_to": "peer"). The validation check is here: https://github.com/scionproto/scion/blob/4a8bc98ec7d969dd622c5a90fe677e3c980aaa88/private/topology/topology.go#L544-L550.
As far as I'm aware, there is no technical reason why core ASes cannot have peering links.
Core ASes should be able to have peering links to any other AS, i.e. to both core or non-core ASes in both the same or different ISDs.

In the current definitions of peering links in IETF drafts we say:

Peering Link: A link between two SCION border routers of different
ASes, where at least one of the two ASes is not core.

@jiceatscion We should clarify this and how it reflects into the spec

Both Anapaya and Adrian confirm that there's no reason to prohibit peering between core ASes. So my update to the draft should stand. As for fiing the code, that's a pretty minor issue comparatively. Just change the snippet that Matthias copied here and the associated tests if any.

authors: jiceatscion matzf nicorusti

repo: scionproto/scion


text:
deadlock on osx for python 3.8

We are still seeing something weird with a python 3.8 build on osx over on conda-forge
==== testing package: scipy-1.3.1-py38h82752d6_2 =====
running run_test.py
============================= test session starts ==============================
platform darwin -- Python 3.8.0, pytest-5.2.2, py-1.8.0, pluggy-0.12.0 -- $PREFIX/bin/python
cachedir: .pytest_cache
rootdir: $SRC_DIR
collecting ... collected 17186 items / 1225 deselected / 15961 selected

_lib/tests/test__gcutils.py::test_set_gc_state PASSED                    [  0%]
_lib/tests/test__gcutils.py::test_gc_state PASSED                        [  0%]
_lib/tests/test__gcutils.py::test_assert_deallocated PASSED              [  0%]
_lib/tests/test__gcutils.py::test_assert_deallocated_nodel PASSED        [  0%]
_lib/tests/test__gcutils.py::test_assert_deallocated_circular PASSED     [  0%]
_lib/tests/test__gcutils.py::test_assert_deallocated_circular2 PASSED    [  0%]
_lib/tests/test__testutils.py::test__parse_size PASSED                   [  0%]
_lib/tests/test__testutils.py::test__mem_available PASSED                [  0%]
_lib/tests/test__threadsafety.py::test_parallel_threads PASSED           [  0%]
_lib/tests/test__threadsafety.py::test_reentering PASSED                 [  0%]
_lib/tests/test__util.py::test__aligned_zeros PASSED                     [  0%]
_lib/tests/test__util.py::test_check_random_state PASSED                 [  0%]
_lib/tests/test__util.py::TestMapWrapper::test_serial PASSED             [  0%]

https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=91407&view=logs
This is with a patch from the 1.3.x branch here
https://github.com/conda-forge/scipy-feedstock/blob/02371e5393763b42fef7f50552829e57f2eb79f3/recipe/scipy1.3.2.patch
@rgommers  for viz
relates to https://github.com/conda-forge/scipy-feedstock/pull/114

Could you please add which OpenBLAS lib you are linking to?

For sure but it will be a while since I need to run to a kids birthday party. This is a conda forge build so we are linking to whatever openblas version is in the global pinnings.

Thanks for the bug report @beckermr.
This was also noticed and debugged at https://github.com/scipy/scipy/issues/10927#issuecomment-542365484. Short summary: it was caused by a Python bug (https://bugs.python.org/issue38501) without a response so far.
Explicit gc.collect() was added in two places to work around this hang in https://github.com/scipy/scipy/pull/10930. Backported to 1.3.x in commit 88024e7ca, so this should be fixed now.

We are seeing this also on Py3.7 runs now too. Hence there is more to it I guess.

Are we? Do you have a link?

Our local runs for #11001 together with @mdhaber and the linked issue

Ahhh so to be clear, I ran this build with a patch derived from the maintenance branch for 1.3.x. So I am pretty sure the commit you mentioned was already applied.

Got it, so we do still have a real problem. Release is already tagged, and wheels are being built. I think it's best to continue with the release, and try to debug this problem asap and push out a 1.3.3 fix if needed. People are blocked upgrading to py38 by no SciPy release, so this seems better than delaying since we don't have a root cause or fix yet. @tylerjereddy FYI

So I am pretty sure the commit you mentioned was already applied.

yes, checked the diff and the patch was already applied

OK here is the verbose version of the problem
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py", line 105, in spawn_main
    exitcode = _main(fd)
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py", line 114, in _main
    prepare(preparation_data)
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py", line 225, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
    run_name="__mp_main__")
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Ilhan Polat\Documents\pydump\testmapwrapper.py", line 28, in <module>
    with MapWrapper(2) as p:
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\site-packages\scipy-1.4.0.dev0+89286b9-py3.7-win-amd64.egg\scipy\_lib\_util.py", line 385, in __init__
    self.pool = Pool(processes=int(pool))
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\multiprocessing\context.py", line 119, in Pool
    context=self.get_context())
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py", line 176, in __init__
    self._repopulate_pool()
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py", line 241, in _repopulate_pool
    w.start()
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py", line 112, in start
    self._popen = self._Popen(self)
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\multiprocessing\context.py", line 322, in _Popen
    return Popen(process_obj)
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\multiprocessing\popen_spawn_win32.py", line 46, in __init__
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
    _check_not_importing_main()
  File "C:\Users\Ilhan Polat\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
    is not going to be frozen to produce an executable.''')
RuntimeError:
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

I'll look into it right now but let me know if you see the problem right away.

Looks like we are bitten by this recursive firing https://stackoverflow.com/questions/18204782/runtimeerror-on-windows-trying-python-multiprocessing

@beckermr Could you please test the patch in the linked PR above please?

FWIW: I'm on OS X 10.12.6, and I installed Python 3.8 from https://www.python.org/, and used pip3 to install all the scipy dependencies.  I built scipy from the master branch (last commit 35fd20ec1aa05).  The test ../../tests/test__util.py::TestMapWrapper::test_parallel hangs:
$ python3 runtests.py -n -s _lib -m full -v
===================================================================== test session starts =====================================================================
platform darwin -- Python 3.8.0, pytest-5.2.2, py-1.8.0, pluggy-0.13.0 -- /usr/local/bin/python3
cachedir: .pytest_cache
rootdir: /Users/warren/repos/git/forks/scipy, inifile: pytest.ini
collected 40 items

../../tests/test__gcutils.py::test_set_gc_state PASSED                                                                                [  2%]
../../tests/test__gcutils.py::test_gc_state PASSED                                                                                [  5%]
../../tests/test__gcutils.py::test_assert_deallocated PASSED                                                                                [  7%]
../../tests/test__gcutils.py::test_assert_deallocated_nodel PASSED                                                                                [ 10%]
../../tests/test__gcutils.py::test_assert_deallocated_circular PASSED                                                                                [ 12%]
../../tests/test__gcutils.py::test_assert_deallocated_circular2 PASSED                                                                                [ 15%]
../../tests/test__testutils.py::test__parse_size PASSED                                                                                [ 17%]
../../tests/test__testutils.py::test__mem_available PASSED                                                                                [ 20%]
../../tests/test__threadsafety.py::test_parallel_threads PASSED                                                                                [ 22%]
../../tests/test__threadsafety.py::test_reentering PASSED                                                                                [ 25%]
../../tests/test__util.py::test__aligned_zeros PASSED                                                                                [ 27%]
../../tests/test__util.py::test_check_random_state PASSED                                                                                [ 30%]
../../tests/test__util.py::TestMapWrapper::test_serial PASSED                                                                                [ 32%]
../../tests/test__util.py::TestMapWrapper::test_parallel

Ah, this is why macOS started failing for 3.8 (from the docs):
Changed in version 3.8: On macOS, the spawn start method is now the default.
Further down it states: Functionality within this package requires that the __main__ module be importable by the children. That explains the infinite recursion probably, __main__ is from pytest.
Reviewing the MapWrapper code again, I think it's fine as is. User code should have a __main__ or they will trigger this issue, but that's unavoidable probably - IIRC joblib has this issue as well.

Indeed, that's how I ended up with the fix. Looks like we are still OK sans the test fix.

This is a known issue with pytest + multiprocessing: https://github.com/pytest-dev/pytest/issues/958
Suggested workaround is to run the tests with python -m pytest ...

Hmmmmm. Do you have suggestions for this test script on the conda feedstock?
https://github.com/conda-forge/scipy-feedstock/blob/master/recipe/run_test.py

Suggested workaround is to run the tests with python -m pytest ...

I'd rather guard on SciPy side instead of hitting this again if something else changes on the pytest side.

Yes, if the guard in gh-11034 is correct, that's definitely preferable.

I don't understand why tests have started failing on Python 3.7, they've been running ok up until now.

This is a known issue with pytest + multiprocessing: pytest-dev/pytest#958
Suggested workaround is to run the tests with python -m pytest ...

See:
https://github.com/pypa/setuptools/issues/443

I am using the latest setuptools and unfortunately it is not solved.

Here are the rest of the tests that fail. Only 2
https://github.com/conda-forge/scipy-feedstock/blob/07c055613430e7cdfe9932caa410af5ca1fcd17e/recipe/scipy-1.3.2-bad-tests.patch

I've added both to the linked PR as a skipif.

authors: WarrenWeckesser andyfaff beckermr ilayn rgommers

repo: scipy/scipy


text:
Possible error in docs for leastsq

Hello,
I am currently reading some of the source code touching on fitting routines in scipy because I am trying to verify that I understand the documentation correctly. I am not terribly comfortable with statistical methods.
During this work I discovered that in the docs for leastsq for the return values it says:
cov_xndarray

[...]
To obtain the covariance matrix of the parameters x,
cov_x must be multiplied by the variance of the residuals
 – see curve_fit.

However when looking at the code for curve_fit, to me it looks as if the opposite is the case, i.e. cov_x is rescaled in cases where we are not interested in the absolute value of the parameter variance (because the absolute sigmas are unknown).
The respective code block https://github.com/scipy/scipy/blob/adc4f4f7bab120ccfab9383aba272954a0a12fb0/scipy/optimize/minpack.py#L760-L766
seems to return pcov/cov_x unchanged if the absolute sigmas are known. The documentation of curve_fit to me suggests that in this case pcov is the correctly scaled covariance matrix for the optimisied parameters, i.e. I can estimate the parameter uncertainties by taking the square root of the diagonal elements.
Chances are I am mixing something up here due to my personal lack of understanding, in that case I apologise for wasting your time :-P

did you try this out minimizing the least squares sum for a simple dataset? I think it is the only way you can sleep well knowing the covariance from curve_fit is the one you think it is

If no one is working on this topic I would like to help and contribute to this issue. I can try to figure out a solution and add some test to check.

I think it is safe to assume that nobody else is working on it. Go for it!

Are you working on this @santinoacco ? If not I may want to solve this.

To make sure we stay in sync with the current codebase, here is section highlighted by @HPLegion.
https://github.com/scipy/scipy/blob/829b79c93a8bada44debcb0ace3265d4dd106470/scipy/optimize/_minpack_py.py#L885-L893
The documentation in question is:

IIUC, the issue is that the documentation is suspected to be wrong:

However, when looking at the code for curve_fit, to me it looks as if the opposite is the case...

The code that modifies pcov if not absolute_sigma is:
https://github.com/scipy/scipy/blob/829b79c93a8bada44debcb0ace3265d4dd106470/scipy/optimize/_minpack_py.py#L923-L934
Here is code that shows agreement between pcov returned by curve_fit and cov_x (scaled by the variance of the residuals) from leastsq.

import numpy as np
from scipy import optimize

rng = np.random.default_rng(8250058582555444926)
size = 100
x = np.linspace(0, 3, size)
y = 2*x + 1 + rng.normal(size=size)*0.5

def line(x, *p):
    return p[0]*x + p[1]

# with curve_fit
guess = np.array([1.0, 5.0])
popt, pcov = optimize.curve_fit(line, x, y, guess, method='lm')

# with leastsq
def residual(p):
    return line(x, *p) - y

popt, hessinv, _, _, _ = optimize.leastsq(residual, guess, full_output=True)
pcov2 = hessinv * np.var(residual(popt))

np.testing.assert_allclose(pcov, pcov2, atol=1e-3, rtol=5e-2)

I don't see a problem with the documentation of leastsq in this case. The code above demonstrates that:

To obtain the covariance matrix of the parameters x, cov_x must be multiplied by the variance of the residuals -- see curve_fit.

is true. I'm not sure where the confusion is coming from, but my guess it is actually the curve fit documentation - perhaps the definition of absolute_sigma?

I don't think absolute_sigma is whether "the absolute sigmas are known" - the sigma parameter is used to specify known a covariance matrix of errors; absolute_sigma only changes how it is interpreted.

I believe the issue was a misunderstanding that is resolved by the previous post.
It's been a few weeks without follow-up, so If I don't hear back in another two weeks or so, I'll go ahead and close this one.
If I misunderstood, or if there are documentation suggestions that would help us avoid a misunderstanding in the future, please let me know.

Hi,
unfortunately it has been a while since I looked at this, and I really don't have time to dig deep right now.
But looking at @mdhaber 's posts I think it looks indeed as if I misunderstood the docstrings at the time when I ran into this. So this can probably be closed.
Cheers to all of you for following up on this regardless! :)

Thanks all for the discussion then

authors: HPLegion RobertoFranceschini ilayn mdhaber musteng santinoacco


text:
Levy Stable Random Variates Code has a typo

The code to simulate stable random variates uses the following formulation (taken from Nolan, J., 1997. Numerical Calculation of Stable Densities and distributions Functions.):

Note in scipy code for alpha == 1:
    def _rvs(self, alpha, beta, size=None, random_state=None):

        def alpha1func(alpha, beta, TH, aTH, bTH, cosTH, tanTH, W):
            return (2/np.pi*(np.pi/2 + bTH)*tanTH -
                    beta*np.log((np.pi/2*W*cosTH)/(np.pi/2 + bTH)))

whereas the factor of 2/pi should be applied to both parts of the difference, eg
    def alpha1func(alpha, beta, TH, aTH, bTH, cosTH, tanTH, W):
        return (2/np.pi*(
                (np.pi / 2 + bTH) * tanTH -
                beta*np.log((np.pi/2*W*cosTH)/(np.pi / 2 + bTH))
            )
        )

This typo will be resolved in PR #9523 with supporting tests.
It is hard to demonstrate in current scipy as cdf code is unstable around alpha == 1. However, with branch from PR #9523 the following code demonstrates KS test failing with weak pvalue.
>>> d1 = levy_stable(alpha=1., beta=-.5, scale=100., loc=1000.)
>>> kstest(d1.rvs(size=3000, random_state=1234), d1.cdf)
KstestResult(statistic=0.038524906711054685, pvalue=0.00026392725082308383)

Whereas with correction:
KstestResult(statistic=0.019095943425717465, pvalue=0.22115623025632158)

Scipy/Numpy/Python version information:
1.5.2 1.19.2 sys.version_info(major=3, minor=7, micro=4, releaselevel='final', serial=0)

gh-9523 was merged, so closing this.

authors: bsdz rgommers


text:
The error handling when installing SciPy 1.5.3 on Python 3.9 is problematic

So I've been working on a PR adding Python 3.9 support to a library I maintain, as are a lot of people right now. When Travis tried to install SciPy, I got this completely uninformative and absolutely giant error message: https://pastebin.com/ZaQsAvLR
Surely there's a more sensible way to handle this. If my understanding is correct, this is done by having python_requires=">=3.6", be python_requires=">=3.6, <3.9" in setup.py. This also just makes more sense in general because libraries as large as SciPy never natively support never versions of Python, like a simple library like python-chess might. I'm happy to do a little PR for this unless people see something wrong with it.

We're in the middle of the process making 3.9 wheels at the moment. Indeed we've been building scipy for 3.9 during CI for at least 6 months now. The error message you see is because you haven't got blas setup correctly, so the build process can't proceed.
Here's how we setup dependencies for testing 3.9 on Linux at the moment: https://github.com/scipy/scipy/blob/master/.github/workflows/bleedingedge.yml#L32. You should only need libatlas-base-dev liblapack-dev gfortran (on Ubuntu).
I'd say the error message isn't totally uninformative, but it could be clarified.

Does your CI run work now that wheels for 3.9 are available?

Yes, thank you. It's still unclear to me why you don't specify a maximum python version for SciPy though, given that there's a negligible chance of SciPy functioning with a new Python release without modification. This would dramatically improve error message quality. I can do a tiny PR for it if desired.

@justinkterry

It's still unclear to me why you don't specify a maximum python version for SciPy though, given that there's a negligible chance of SciPy functioning with a new Python release without modification.

There's a pretty high chance of it working in an environment that is designed for source builds. The vast majority of our Python 3.9 CI additions were just "add it to the matrix and it works."
That said, there's a PR/proposal related to this exact topic here: gh-12862
Perhaps reading through that will give you an idea of some of the challenges/complexities behind the scenes, and you can make suggestions there if you want.

authors: andyfaff justinkterry tylerjereddy


text:
NetCDF maskandscale test failure on Windows XP

======================================================================
ERROR: test_netcdf.test_maskandscale
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\nose\case.py", line 197, in runTest
    self.test(*self.arg)
  File "C:\Python27\lib\site-packages\scipy\io\tests\test_netcdf.py", line 330, in test_maskandscale
    assert_allclose(Temp[:].compressed(), expected)
  File "C:\Python27\lib\contextlib.py", line 24, in __exit__
    self.gen.next()
  File "C:\Python27\lib\site-packages\scipy\_lib\_tmpdirs.py", line 55, in in_tempdir
    rmtree(d)
  File "C:\Python27\lib\shutil.py", line 252, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "C:\Python27\lib\shutil.py", line 250, in rmtree
    os.remove(fullname)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\docume~1\\br\\locals~1\\temp\\tmpy1jbmg\\ms.nc'

same build as in #5540 and #5539.
@efiring any ideas on what this might be?

The mmap cannot be closed because the Temp variable is still around.
Workaround for this test: use mmap=False

@pv Thanks--I would have been baffled.  It looks like an alternative fix would be to explicitly delete Temp at the end of the loop, correct?  And do you know why this problem crops up specifically with XP?

FWIW it's not specific to XP, it shows up in Wine, too.

On windows, open files cannot be unlinked.

So if Temp were deleted at the end of the loop, then the inner context manager would close the file, and the outer context manager would succeed, correct?

authors: efiring ev-br pv


text:
scipy.sparse.linalg.eigsh requires at least 20 iterations to converge no matter what

scipy.sparse.linalg.eigsh requires 20 iterations to find the largest eigenvalue even if I give the exact top eigenvector as the initial vector (the code below).
This is an issue for me because every matrix-vector operation counts in my problem. A bit more context on why I noticed this issue:
I have an application in which 1) I need to repeatedly find the largest eigenvalue of a positive definite matrix, 2) I have a very good estimate of the top eigenvector every time, and 3) I only need relatively low accuracy e.g. 10% relative error. I was confident that the Lanczos / Arnoldi iterations should converge very quickly, say in less than 10 iterations or so, but I noticed that every time it always takes exactly 20 iterations.
Reproducing code example:

import numpy as np
import scipy as sp
import scipy.sparse
import scipy.sparse.linalg

size = 10 ** 4
D = np.ones(size)

info = {'n_iter': 0}
def matvec(v):
    info['n_iter'] += 1
    return D * v

linear_op = sp.sparse.linalg.LinearOperator((size, size), matvec=matvec)

info['n_iter'] = 0
v0 = np.random.randn(size)
eigval, eigvec = sp.sparse.linalg.eigsh(linear_op, k=1, v0=v0)
print("{:d} iterations until convergence.".format(info['n_iter']))

info['n_iter'] = 0
v0 = np.zeros(size)
v0[0] = 1
eigval, eigvec = sp.sparse.linalg.eigsh(linear_op, k=1, v0=v0)
print("{:d} iterations until convergence.".format(info['n_iter']))

Scipy/Numpy/Python version information:
import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info)
1.1.0 1.15.4 sys.version_info(major=3, minor=6, micro=3, releaselevel='final', serial=0)

Try setting the ncv parameter to something smaller than 20.  The default is min(n, max(2*k + 1, 20)) which for your example comes out as 20.

Ah, I missed the ncv parameter. Thanks! Yes, changing ncv does make convergence possible with fewer iterations.

What if I need to compute more eigenvalues. Let's say I already have 5 but need another 5. The documentation always speaks only about v0 as a vector of length size. But now I need to pass 10 such vectors. First five are already known, the second five are to be determined. But I cannot feed five known vectors to v0, only 1 of them.

you may be best off opening a new issue @JanElias3141

Also eigsh currently does not support "warm start" hence the only way is to do everything for 10 from scratch.

That is a real shame. I thought the initial vector is included specifically because of this functionality. As I understand it, users can now guess only one vector, not more. Is there any plan to extend it? I might be ignorant but is seems to me as a straightforward option with not much work and potentially extremely useful application. As I see it, users typically do not know how many eigenvalues they need. So they compute some, check quality of the approximation of the linear system, and possibly compute more.
I am really glad scipy has this function and will use it anyway.

Initial vector is to start the process better, not to get things take off where its left off internally. But at least it can make the convergence much faster so not everything is lost.

We are in the process of rewriting ARPACK but what you ask is to provide exceeding amount of information to resume the process. It is far from straightforward unfortunately from today's point of view, maybe we would find a way at the end

Thank you for your explanation. Good luck with rewriting the code. You are providing an excellent service to the community.

authors: JanElias3141 aki-nishimura ewmoore ilayn lucascolley


text:
Add repr for RootResults

Partial fix for #5483
Added a _repr_ for RootResults, similar to the one OptimizeResult has.

Sorry, I'm new to this :)
Changed eval to getattr and added TestRootResults.test_repr in test_zeros.

Could I please get help with this error? Is it something to do with the particular versions of python and numpy?

I think that must be a separate bug in assert_string_equal on Python 2.6.
Maybe you can replace it here by assert_equal so that we avoid the bug here.

Thanks, merged.

authors: aakashjain pv


text:
Fixing dependency version requirement

These warnings should be removed.
root@LAPTOP-F2FKVH30:~# gem specific_install https://github.com/sciruby-jp/rubydown
/usr/bin/git
http installing from https://github.com/sciruby-jp/rubydown
Cloning into '/tmp/d20190309-43-1fwpq90'...
remote: Enumerating objects: 192, done.
remote: Counting objects: 100% (192/192), done.
remote: Compressing objects: 100% (134/134), done.
remote: Total 334 (delta 76), reused 162 (delta 51), pack-reused 142
Receiving objects: 100% (334/334), 2.06 MiB | 813.00 KiB/s, done.
Resolving deltas: 100% (133/133), done.
Checking out files: 100% (48/48), done.
WARNING:  exe/rubydown is not executable
WARNING:  open-ended dependency on kramdown (>= 0) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on pry (>= 0) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on daru (>= 0) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on numo-narray (>= 0) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on numo-gnuplot (>= 0) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on rbplotly (>= 0) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on test-unit (>= 0, development) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  See http://guides.rubygems.org/specification-reference/ for help
  Successfully built RubyGem
  Name: rubydown
  Version: 0.1.0
  File: rubydown-0.1.0.gem
Fetching addressable-2.6.0.gem
Fetching faraday-0.15.4.gem
Fetching multipart-post-2.0.0.gem
Fetching public_suffix-3.0.3.gem
Fetching launchy-2.4.3.gem
Fetching rbplotly-0.1.2.gem
Fetching uuidtools-2.1.5.gem
Fetching numo-gnuplot-0.2.4.gem
Fetching numo-narray-0.9.1.4.gem
Fetching backports-3.12.0.gem
Fetching packable-1.3.10.gem
Fetching daru-0.2.1.gem
Fetching coderay-1.1.2.gem
Fetching method_source-0.9.2.gem
Fetching pry-0.12.2.gem
Fetching kramdown-2.1.0.gem
Building native extensions. This could take a while...
/usr/local/lib/site_ruby/2.5.0/rubygems/ext/builder.rb:183: warning: conflicting chdir during another chdir block
/usr/local/lib/site_ruby/2.5.0/rubygems/ext/builder.rb:191: warning: conflicting chdir during another chdir block
Successfully installed

Almost fixed in 0fe6789f2154ffe017563a21e85e7d1746d8cb43

repo: sciruby-jp/rubydown


text:
Problem with quotes in test.py

Hi,
for the thorough testing on CI I need to have possibility to switch GNU math libraries order.
In the case below there are THREEfold quotes. Any help ?
configure_build_and_exe('fc_lapack', 'python setup.py --fc=gfortran --static --cmake-options="-DMATH_LIB_SEARCH_ORDER='ATLAS,SYSTEM_NATIVE,OPENBLAS'"')

Have you tried to escape the quotes?

Hi,
configure_build_and_exe('fc_lapack', 'python setup.py --fc=gfortran --static --cmake-options="-DMATH_LIB_SEARCH_ORDER=ATLAS,MKL"

gives
CMake Error at /home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/modules/math_libs.cmake:387 (set):
  Syntax error in cmake code at

    /home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/modules/math_libs.cmake:387

  when parsing string

    ${ATLAS,MKL_BLAS_INCLUDE_PATH_SUFFIXES}

  syntax error, unexpected cal_SYMBOL, expecting } (39)
Call Stack (most recent call first):
  /home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/modules/math_libs.cmake:406 (find_math_library)
  /home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/modules/math_libs.cmake:353 (find_service)
  /home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/modules/math_libs.cmake:474 (config_math_service)
  CMakeLists.txt:26 (include)

Also proper semicolons give error message:
    def test_fc_lapack_static():
>       configure_build_and_exe('fc_lapack', 'python setup.py --fc=gfortran --static --cmake-options="-DMATH_LIB_SEARCH_ORDER=ATLAS;MKL"')

../../test.py:198:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../test.py:112: in configure_build_and_exe
    stdout, stderr = exe(binary)
../../test.py:69: in exe
    universal_newlines=True).communicate()
/usr/lib64/python2.6/subprocess.py:642: in __init__
    errread, errwrite)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <subprocess.Popen object at 0x18ec910>, args = ['./bin/example'], executable = './bin/example', preexec_fn = None
close_fds = False, cwd = None, env = None, universal_newlines = True, startupinfo = None, creationflags = 0, shell = False, p2cread = None
p2cwrite = None, c2pread = 8, c2pwrite = 10, errread = 11, errwrite = 12

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       cwd, env, universal_newlines,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite):
        """Execute program (POSIX version)"""

        if isinstance(args, types.StringTypes):
            args = [args]
        else:
            args = list(args)

        if shell:
            args = ["/bin/sh", "-c"] + args
            if executable:
                args[0] = executable

        if executable is None:
            executable = args[0]

        # For transferring possible exec failure from child to parent
        # The first char specifies the exception type: 0 means
        # OSError, 1 means some other error.
        errpipe_read, errpipe_write = os.pipe()
        try:
            try:
                self._set_cloexec_flag(errpipe_write)

                gc_was_enabled = gc.isenabled()
                # Disable gc to avoid bug where gc -> file_dealloc ->
                # write to stderr -> hang.  http://bugs.python.org/issue1336
                gc.disable()
                try:
                    self.pid = os.fork()
                except:
                    if gc_was_enabled:
                        gc.enable()
                    raise
                self._child_created = True
                if self.pid == 0:
                    # Child
                    try:
                        # Close parent's pipe ends
                        if p2cwrite is not None:
                            os.close(p2cwrite)
                        if c2pread is not None:
                            os.close(c2pread)
                        if errread is not None:
                            os.close(errread)
                        os.close(errpipe_read)

                        # Dup fds for child
                        if p2cread is not None:
                            os.dup2(p2cread, 0)
                        if c2pwrite is not None:
                            os.dup2(c2pwrite, 1)
                        if errwrite is not None:
                            os.dup2(errwrite, 2)

                        # Close pipe fds.  Make sure we don't close the same
                        # fd more than once, or standard fds.
                        if p2cread is not None and p2cread not in (0,):
                            os.close(p2cread)
                        if c2pwrite is not None and c2pwrite not in (p2cread, 1):
                            os.close(c2pwrite)
                        if errwrite is not None and errwrite not in (p2cread, c2pwrite, 2):
                            os.close(errwrite)

                        # Close all other fds, if asked for
                        if close_fds:
                            self._close_fds(but=errpipe_write)

                        if cwd is not None:
                            os.chdir(cwd)

                        if preexec_fn:
                            preexec_fn()

                        if env is None:
                            os.execvp(executable, args)
                        else:
                            os.execvpe(executable, args, env)

                    except:
                        exc_type, exc_value, tb = sys.exc_info()
                        # Save the traceback and attach it to the exception object
                        exc_lines = traceback.format_exception(exc_type,
                                                               exc_value,
                                                               tb)
                        exc_value.child_traceback = ''.join(exc_lines)
                        os.write(errpipe_write, pickle.dumps(exc_value))

                    # This exitcode won't be reported to applications, so it
                    # really doesn't matter what we return.
                    os._exit(255)

                # Parent
                if gc_was_enabled:
                    gc.enable()
            finally:
                # be sure the FD is closed no matter what
                os.close(errpipe_write)

            if p2cread is not None and p2cwrite is not None:
                os.close(p2cread)
            if c2pwrite is not None and c2pread is not None:
                os.close(c2pwrite)
            if errwrite is not None and errread is not None:
                os.close(errwrite)

            # Wait for exec to fail or succeed; possibly raising exception
            # Exception limited to 1M
            data = _eintr_retry_call(os.read, errpipe_read, 1048576)
        finally:
            # be sure the FD is closed no matter what
            os.close(errpipe_read)

        if data != "":
            _eintr_retry_call(os.waitpid, self.pid, 0)
            child_exception = pickle.loads(data)
            for fd in (p2cwrite, c2pread, errread):
                if fd is not None:
                    os.close(fd)
>           raise child_exception
E           OSError: [Errno 2] No such file or directory

/usr/lib64/python2.6/subprocess.py:1234: OSError
---------------------------------------------------------- Captured stderr call ----------------------------------------------------------
CMake Error: The source directory "/home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/test/fc_lapack/build-2015-08-10-13-29-42" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
/bin/sh: MKL: command not found
make: *** No targets specified and no makefile found.  Stop.
================================================== 1 failed, 13 passed in 63.24 seconds =============

I meant escaping not removing:
http://stackoverflow.com/questions/9050355/python-using-quotation-marks-inside-quotation-marks

authors: bast miroi

repo: scisoft/autocmake


text:
Jobs are not spawned from files uploaded by UIDPlacer

The UIDPlacer has job creation commented out. When this is re-activated, be sure to pass it the modified (saved) container as per offline discussion!

After reviewing that segment again, we shouldn't be spawning jobs on subject files. I'll remove the commented out code and add a comment for clarity.

authors: kofalt nagem

repo: scitran/core


text:
Problems spinning up a shiny app with docklet_shinyapp

I tried to spin up a shiny app with docklet_shinyapp. It works fine using the example in the help file, but not with my own shiny app. It says "The application exited during initialization. "
I think the problem is that my shiny app uses R packages that are not installed on the shinyapp docklet. How can install additional packages? I tried the following, which did not work:
d %>% docklet_run("rocker/shiny", "Rscript -e 'install.packages(\"shinydashboard\")'")

Also, how can I get the error log to find out what error occurred in the shiny app?

session info please, as requested

I didn't provide the session info because the problem is not on the local machine, but here it is anyway:
R version 3.6.0 (2019-04-26)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=German_Switzerland.1252  LC_CTYPE=German_Switzerland.1252    LC_MONETARY=German_Switzerland.1252 LC_NUMERIC=C
[5] LC_TIME=German_Switzerland.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] analogsea_0.7.0

loaded via a namespace (and not attached):
[1] httr_1.4.0     compiler_3.6.0 magrittr_1.5   R6_2.4.0       tools_3.6.0    yaml_2.2.0     jsonlite_1.6

for seeing logs:
# to get running containers
docklet_ps(d)
# get logs
droplet_ssh(d, "docker logs <container ID>")

for the dependencies:
droplet_ssh(d, "docker exec <container ID> R -e 'install.packages(\"shinydashboard\")'")

make sure not to use docker exec -ti since it's not interactive

Thank you very much. It works. It would be great if you could add this to the documentation.

authors: sckott studerus

repo: sckott/analogsea


text:
Embree support using pip

Rather than using conda to install embree,is there any support for installing it via pip?

This was mentioned in this answer from issue #23, It's worth to notice that pyembre requires (wraps)  embree v2 and that command may need to be adapted

repo: scopatz/pyembree


text:
Deployments with Docker Compose

We should add a Dockerfile with proper build scripts and entry scripts. We can use docker-compose to enable fast deployment with Dockers.

Fixed

repo: scorelab/OpenDF


text:
Fixes #53 fixes #43

Due to changes to the Facebook API, the user's Facebook name and
e-mail address return as undefined undefined, and undefined respectively.
This PR addresses these issues, hopefully successfully fixing them.
Changes made:

In auth.js: under Facebook, 'profileFields' was added for requesting
permissions from the FB API.
In routes.js: 'public_profile' was added to the FB permissions scope.
Although FB provides this by default to an app that was granted access by
a user, it is considered best practice to declare all requested permissions.
In user.js: under facebook, name was changed to be before email field.
Their order is the reason behind issue #43, where email id returns as undefined.

Right on! I'll update the article as well to show these changes. Really appreciate it.

authors: fatima-alansari sevilayha

repo: scotch-io/easy-node-authentication


text:
Bypass Upload

I want to combine this with an image gallery so that a user can choose from a catalog of images and then make that image available to cropit for resizing, cropping, etc.
So let's say I have an image already on my page. For the sake of simplicity, let's just say it's a single image. If I click that I want it to load in cropit in place of actually uploading an image from a folder on my computer.
If you could point me in the right direction for doing that, I would very much appreciate it.

You can setting imageSrc programmatically like this:
$imageCropper.cropit('imageSrc', 'http://placekitten.com/g/1280/800');

Ahhhh I was SO close. I had tried exactly that in the image-preview, but not in the main cropit div.
Thank you very much for the answer.

authors: difster scottcheng

repo: scottcheng/cropit