Add chain ID to the connection section of the relayer configuration

Summary of Bug
Connection end part is missing chain_id in the relayer configuration
For Admin Use

[X] Not duplicate issue
[X] Appropriate labels applied
[] Appropriate contributors tagged
[X] Contributor assigned/self-assigned

We don't need this one anymore since we're not validating params against this config, right? @ancazamfir

We don't need this one anymore since we're not validating params against this config, right? @ancazamfir

I misunderstood. We don't need it to validate params for queries but the relayer will still need chain ID 🙃


Only show non-default cursor if scroll container can be scrolled

Currently, the move cursor (or whichever else) is shown even if the container actually can’t be scrolled. For (mouse) users, this sets a wrong expectation that the container can be scrolled in case it doesn’t.
It's easy enough to check for scroll with container.scrollWidth > container.clientWidth and container.scrollHeight > container.clientHeight, but the check needs to be repeated on orientationchange and resize of window, which adds a bit extra complexity for a small improvement, so I leave it here for your consideration.
Thanks!

You could set the cursor setting to '', maybe null not sure, I can't remember how jQuery treats that. Then do the checking in another place.
See: https://github.com/davetayls/jquery.kinetic/blob/master/jquery.kinetic.js#L118
this.$el
      .addClass(ACTIVE_CLASS)
      .css('cursor', this.settings.cursor);

If you can see a nice way of integrating it into the plugin, feel free to submit a PR and we can review it from there.


A little bug

Hi, after long hours work time, sometimes week, or two i getting this message "Can't parse entities: can't find end of the entity starting at byte offset 161"
I dont know why showig date 2020-10-14 when that was send 3-4 days ago
Here last log:
[OK!] 2020-10-14 00:16:03 Alert Received & Sent!
> BTC/USDT TF H1
SHORT Sell,
Entry: 13512.240789195805,
Take profits: TP1: 13310.60445 TP2: 13176.1539, TP3: 13041.70335
Stop Loss: null
[OK!] 2020-10-14 00:16:03 Alert Received & Sent!
> BTC/USDT TF H1
LONG Buy
Entry: 13292.075942768162,
Take profits: TP1: 13432.058175000002 TP2: 13565.048850000001, TP3: 13698.039525000002
Stop Loss: null
[OK!] 2020-10-14 00:16:03 Alert Received & Sent!
> BTCUSDT SHORT Sell
Binance Futures, Bybit
Entry: {{OpenS}}
Take profits:
TP1: 13310.60445
TP2: 13176.1539
TP3: 13041.70335
TP4: 12907.2528
TP5: 12772.802249999999
Stop Loss: {SLi_short)}}
Can't parse entities: can't find end of the entity starting at byte offset 178
[OK!] 2020-10-14 00:16:03 Alert Received & Sent!
> LONG Buy, Binance Futures, Bybit. Entry: 13492.592658598704, Take profits: TP1: 13643.5849999091 TP2: 13778.669999908201, TP3: 13913.7549999073 Stop Loss: {{("SL_long)"}}
Can't parse entities: can't find end of the entity starting at byte offset 161
[OK!] 2020-10-14 00:16:03 Alert Received & Sent!
> LONG Buy, Binance Futures, Bybit. Entry: 13480.750247856926, Take profits: TP1: 13646.808922535101 TP2: 13781.9258425602, TP3: 13917.0427625853 Stop Loss: {{("SL_long)"}}
Can't parse entities: can't find end of the entity starting at byte offset 161
Can't parse entities: can't find end of the entity starting at byte offset 161

BTCUSDT Crossing 13522.0000000
[OK!] 2020-10-31 07:27:05 Alert Received & Sent!
ETHUSDT LONG Buy
Binance Futures, Bybit
Entry:<PHONE_NUMBER>040855
Take profits:
TP1:<PHONE_NUMBER>5
TP2:<PHONE_NUMBER>999999
TP3:<PHONE_NUMBER>5
TP4:<PHONE_NUMBER>5
TP5:<PHONE_NUMBER>5
Stop Loss: {{("SL_LONG")}}
Can't parse entities: can't find end of the entity starting at byte offset 192
[OK!] 2020-10-31 07:27:05 Alert Received & Sent!
BTCUSDT LONG Buy
Binance Futures, Bybit
Entry: 13519.210206668417
Take profits:
TP1: 13432.058175000002
TP2: 13565.048850000001
TP3: 13698.039525000002
TP4: {{plot("LongTP4")}}
TP5: {{plot("LongTP5")}}
Stop Loss: {{("SL_LONG")}}
Can't parse entities: can't find end of the entity starting at byte offset 220

Hi,
My first question would be, did it ever work for you? Secondly it seems {{("SL_LONG")}} is not being transmitted correctly. You may want to look into that.
In terms of your time, it simply takes your server time. That might've been set incorrectly.

Generally yes it works, but in this time i changed some things in indicator code, and now has been fixed. Im using dedicated server, and date is correct, coz other things work with correct date.

Hi,
My first question would be, did it ever work for you? Secondly it seems {{("SL_LONG")}} is not being transmitted correctly. You may want to look into that.
In terms of your time, it simply takes your server time. That might've been set incorrectly.

Glad to hear that it is working now. The log entry uses timestamp which refers to your local server time. Unsure why yours are off if it's set correctly.


[cache-then-network] Don't bust cache if not necessary

Feature detect whether cache options are available in the Fetch API by checking whether Request.prototype.cache exists.
If it exists, we pass 'no-cache' as the cache option so we shouldn't need to use a cache-busting URL param

Looks like it is available everywhere: https://developer.mozilla.org/en-US/docs/Web/API/Request/cache

So I guess we can't use it to feature detect? Since https://bugzilla.mozilla.org/show_bug.cgi?id=1120715 is still open.

Yeah it would seem that feature detection isn't going to help us here


Sync with Kubernetes master repo

What this PR does / why we need it:

We had commits in k/k that were not applied here. 10 commits in total.
Switched from 10.x versions to 11.x versions for kubernetes dependencies
Removed some unnecessary files (vendored them instead of having a copy that we need to keep in sync)
Removed a temporary getVolumeSource and use the getVolumeInfo as in the main k/k master

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:
Release note:

NONE

/test cloud-provider-openstack-acceptance-test-csi-cinder
/test cloud-provider-openstack-acceptance-test-lb-octavia

/approve

thanks for the synchronization, those commits look reasonable to me.
/lgmt

/lgtm

/lgtm


Add Exponential Linear Unit(ELU)

Summary
The Exponential Linear Unit (ELU) activation function is used in neural networks and deep learning due to its benefits over other activation functions like ReLU (Rectified Linear Unit) and its variants. Here are some reasons why ELU might be preferred:
Benefits of ELU
1.Mitigates Vanishing Gradient Problem:
ELU addresses the vanishing gradient problem more effectively than activation functions like Sigmoid or Tanh. It does this by ensuring that gradients do not vanish as quickly, especially for negative inputs.
2.Smoothness and Nonlinearity:
ELU provides smooth, nonlinear behavior for both positive and negative inputs. This smoothness can help the network learn better representations and improve convergence.
3.Negative Values Handling:
Unlike ReLU, which zeroes out negative values, ELU allows negative values to pass through but scales them in a non-linear way. This helps in learning richer representations and reduces bias in the network output.
4.Self-Normalizing Properties:
The ELU activation function helps maintain mean activations close to zero, which can lead to faster convergence. This self-normalizing property is beneficial for training deep networks.
5.Avoids Dead Neurons:
ELU avoids the issue of dead neurons (common in ReLU) where neurons become inactive and stop learning because they output zero for all inputs.
Basic example
import { ELU } from './activation-functions';

// Create an ELU activation function with a custom alpha value
const elu = new ELU(0.5);

// Example input values
const inputs = [1, 0, -1, -2];

// Apply ELU activation function
const activated = elu.activate(inputs);
console.log('Activated values:', activated);

// Example error propagated back
const error = 0.5;

// Compute gradient for each activated value
const gradients = Array.isArray(activated)
  ? activated.map(value => elu.measure(value, error))
  : elu.measure(activated, error);

console.log('Gradients:', gradients);

Motivation
Use Cases
Deep Neural Networks (DNNs):
Use Case: ELU is beneficial in very deep networks where maintaining healthy gradients across many layers is crucial. It helps ensure that gradients remain significant and stable.
Convolutional Neural Networks (CNNs):
Use Case: In CNNs, ELU can be used to avoid dead neurons and improve the learning of complex features, especially in layers with many filters and pooling operations.
Generative Models:
Use Case: In models like Generative Adversarial Networks (GANs), ELU's properties can aid in generating more diverse and realistic outputs by preventing the collapse of gradient signals.
Recurrent Neural Networks (RNNs):
Use Case: For RNNs, ELU can help in learning temporal patterns more effectively by ensuring gradients are well-behaved and do not vanish.
Expected Outcomes
-Improved Training Stability:
Outcome: ELU can lead to more stable training dynamics by avoiding issues with vanishing gradients and dead neurons, which can improve the convergence of the training process.
-Faster Convergence:
Outcome: The self-normalizing property of ELU can help networks converge faster compared to some other activation functions by keeping activations centered around zero.
-Better Model Performance:
Outcome: By mitigating issues like vanishing gradients and providing smoother non-linearity, ELU can lead to improved performance of neural networks on various tasks, including image classification, natural language processing, and more.
-Reduced Risk of Dead Neurons:
Outcome: With ELU, the risk of neurons becoming inactive and failing to learn is reduced, which helps in maintaining a more active and learning-capable network.

@techarch assign me this i will add this


Relative path not working

I modified the example, relative path seems not working.
Code snippet:
func main() {
	statikFS, err := fs.New()
	...
	for _, name := range []string{"hello.txt", "/hello.txt"} {
		_, err := statikFS.Open(name)
		if err != nil {
			log.Printf("file %s: %s", name, err)
		} else {
			log.Printf("file %s exists", name)
		}
	}
        ...
}

$ go run main.go
2020/03/11 07:50:11 file hello.txt: file does not exist
2020/03/11 07:50:11 file /hello.txt exists

I think it makes sense we only support absolute path, I can't think of a
use case where we don't use it. Hence one option here is to either prepend
slash when missing or just update the documentation to specify this. Any
thoughts on this @rakyll?
On Wed, 11 Mar 2020, 00:52 Razon Yang<EMAIL_ADDRESS>wrote:

I modified the example
https://github.com/rakyll/statik/blob/master/example/main.go, relative
path seems not working.
Code snippet:
func main() {
statikFS, err := fs.New()
...
for _, name := range []string{"hello.txt", "/hello.txt"} {
_, err := statikFS.Open(name)
if err != nil {
log.Printf("file %s: %s", name, err)
} else {
log.Printf("file %s exists", name)
}
}
...
}
$ go run main.go
2020/03/11 07:50:11 file hello.txt: file does not exist
2020/03/11 07:50:11 file /hello.txt exists
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/rakyll/statik/issues/109?email_source=notifications&email_token=AAXOYAU2RM2TYC3PB35A3CTRG3HCNA5CNFSM4LFKGZ72YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IUBWPEA,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAXOYAS7AAW5WVDZ6YI63PLRG3HCNANCNFSM4LFKGZ7Q
.

@jcchavezs Thx, I solved it by adding a forward slash.
But, IMO, a file system(http.FileSystem) should be able to open relative path files, such as http.Dir and packr.Box.


Add system check to make sure ParentalKey points to ClusterableModel

Seems to be quite a common thing to think that ParentalKey can be pointed to any model and currently doesn't give any error.

Rebased


resources not refreshing until after cqf-ruler restart

after cloning cqf-ruler and switching to the develop branch (most recent commit: c7d14ce1fad66ee7c6f06fdfd3d4983d77776b88), cqf-ruler-dstu3 is not reflecting newly-installed resources until after cqf-ruler is restarted.

commit c7d14ce1fad66ee7c6f06fdfd3d4983d77776b88 (HEAD -> develop, origin/develop)
Merge: b15350c 2a9f6c2
Author: JPercival<EMAIL_ADDRESS>Date:   Sat Feb 8 01:37:49 2020 -0700

after posting new terminology and content bundles to cqf-ruler via Postman (per instructions at http://build.fhir.org/ig/cqframework/opioid-cds/quick-start.html), and after receiving good/expected 201 (created) responses for all items in Postman, refreshing the cqf-ruler UI does not show the number of resources beside each resource category (expect to see "ValueSet (19)" up at the top of the Resources list for example, but only seeing "ValueSet" down at the bottom until after a cqf-ruler restart).
I would post screenshots, but https://github.com/DBCG/cqf-ruler/issues/172 is preventing other parts of the UI from functioning at all so probably best to handle that bug first.
OS is Windows 10 Enterprise version 1803 w/ OS build 17134.1246.
Java version is OpenJDK 11.0.6 w/ OpenJ9 VM
Browser is Google Chrome 80.0.3987.106. Also tested on IE 11 v11.1246.17134.0 with same results.

cqf-ruler is based on the HAPI FHIR server upstream. HAPI implements the resource counts via an indexing service that runs periodically. There can be a significant delay between the time a resource is added and the time the count is updated. The default is updating every 10 minutes.


Pipe generated transform method has wrong parameters

Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions
All versions are affected, including v7.0.0-rc.3.
Repro steps
ng generate pipe ...

Problem
The generated method transform has wrong parameters. The second parameter, args, will not receive all the pipe arguments, but only the first one, and other arguments are lost.
The generated method is:
transform(value: any, args?: any): any {
  return null;
}

A right version should be:
transform(value: any, ...args: any[]): any {
  return null;
}

Not sure about this, because I think in general it preferred to specify all the parameter needed.
Example;
 transform(value: any, argOne: number, argTwo?: number): any {

Yes, I agree, you should always rewrite the method with meaningful parameters and right types, even the first one (value).
It's what I explain when I give Angular trainings. But I don't like having to tell that the generated code is wrong. Generated code should not be wrong, it should not mean that all the pipe arguments will be sent in the second method parameter, since it's not what happen.
Perhaps it may generate something like that:
transform(value: any, arg1: any, arg2: any): any {

or any other syntax that won't confuse the users.


Change behavior of recording readers to not capture more after rewind

This is my proposed fix for https://github.com/zio/zio-json/issues/481
The implementation of orElse creates a WithRecordingReader and rewinds it in case the left decoder fails. The right decoder is called with the same recording reader, so it can read the same input that was read until the left side failed. The reader however continues recording the input even after reaching the end of it's "tape", so, when used on top level as in my case, it essentially records the whole input for no reason.
There are only two places in the code where WithRecordingReader and rewind is used and I believe in both cases the correct behavior is that we don't continue recording after replayed. This means rewind can only be called once.
Also this made the optimization that the detected nested recording readers unusable so I removed that.

It is broken and maybe I was wrong about it being the correct behavior in the other use case too - I'll investigate and if we need both behaviors then restore the original version and just add a new method beside rewind to release the capturing that we can use from orElse only.


New version: PicoQuant v0.1.3

Registering package: PicoQuant
Repository: https://github.com/ICHEC/PicoQuant.jl
Created by: @nmoran
Version: v0.1.3
Commit: 24dfb6cffa5ef45346c247ec5f7138f7d9603b82
Reviewed by: @nmoran
Reference: https://github.com/ICHEC/PicoQuant.jl/issues/1#issuecomment-694103899

stop

stop


implement --no-only flag functionality

Summary
This pr implements the functionality stated in https://github.com/substack/tape/issues/569.
How it works
By passing a --no-only flag while running tape tests (eg. tape **/*test.js --no-only), any test.only unintentionally left in any of the tests causes an error to be thrown to make tests fail.
This behaviour can alternatively be achieved by setting the environmental variable NODE_TAPE_NO_ONLY_TEST to true.

I tried to improve this by passing an option explicitly into tape.run, but because of the way the lazy loader works, i'm not sure how well that'd work.

o okay yea understood, also been trying to debug the exit code being 8 for the node version 0.10, read around it and got to know some earlier versions of node used it for uncaught exceptions but not sure what can be done yet at our end

ah right, forgot about that. i'll take a quick look locally.

I see that 0.10 and 0.8 both have different kinds of failures, including some exit codes of 127. io.js v3.0-v3.2 seem to have similar failures. I'd prefer not to start making these fail, so let's look more into them.
I've rebased on top of a commit that fixes the 16.9/16.10 failures.

I see that 0.10 and 0.8 both have different kinds of failures, including some exit codes of 127. io.js v3.0-v3.2 seem to have similar failures. I'd prefer not to start making these fail, so let's look more into them.

okay got it, thanks. Earlier today, tried 0.8 locally and did not get the tests introduced in this pr failing (I guess could depend on the specific minor version).
Please do you mean some other tests failed also with the 127 exit code or these same tests?

At this point (and we can check once CI is completed) i think all the remaining failures are:

0.6 (and i think 0.9), which always fail
node 0.8, 0.10, 3.0, 3.1, and 3.2, failing on test/no_only.js

The latter is my concern.

so after trying locally, I see the iojs 3.0, 3.1 and 3.2 failures are related to some stack-buffer overflow error related to https://github.com/nodejs/node/issues/2581, and fixed i think for latter versions?

hmm, meaning what, that this one test file is triggering a bug, but no other test files have triggered it before?

hmm, oddly enough locally v3.3 fails, but it passes in CI.

hmm, when i run the test file by itself, it fails consistently for me locally, but when i run the full suite, it passes. That's concerning.

ok, figured that last one out; when specifying env, the PATH has to be explicitly passed down.

(also, tap v8 doesn't seem to have todo, which is added in v11)

Codecov Report

Merging #572 (eaaef47) into master (8594f3b) will increase coverage by 0.32%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #572      +/-   ##
==========================================
+ Coverage   96.03%   96.36%   +0.32%
==========================================
  Files           4        4
  Lines         631      632       +1
  Branches      147      148       +1
==========================================
+ Hits          606      609       +3
+ Misses         25       23       -2

Impacted Files
Coverage Δ

index.js
98.11% <100.00%> (+0.01%)
:arrow_up:

lib/test.js
95.42% <0.00%> (+0.28%)
:arrow_up:

lib/results.js
100.00% <0.00%> (+0.65%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8594f3b...eaaef47. Read the comment docs.

When I use iojs v3.2, and I run tape --no-only test-b.js, i get an exit code of 1 and the expected output - is the bug just around spawn?

o okay interesting, yea most likely something around that.

I've switched from spawn to exec; that seems like it'll fix it :-)

yeah, i locally changed the ok to a match, and i see it's the exact node bug you linked.

I went ahead and TODOd the tests for node 0.8, 0.10, and 3.0-3.2.

okay cool, this was fun :smile:, thanks for the review and insights @ljharb


Missing component javascripts.

It seems like each of your Samples (in dist/samples/components/) are all missing their associated .js files.  For example, the ChoiceField component index.html (see here: https://github.com/OfficeDev/Office-UI-Fabric/blob/master/dist/samples/Components/ChoiceField/index.html#L15) calls a file named ChoiceField.js which doesn't exist.  Same thing for all the other components I've looked at.

Great catch, thanks. I think this is actually an issue with the template used for component samples, which expects a JS file for a component even if one doesn't exist, hence the 404s. We clean that up.

Awesome, go get 'em Peter.

Thanks again for flagging this. I'll reactivate this issue for now until we've resolved it--we don't have an ETA yet but I want to be sure it's clear we're aware of it :)

I am trying to make use of the dialog but the samples don't show how to open/close a dialog is there some missing js files as the sample references

However, these do not exist?

In the fabric site the Spinner page doesn't show the js tab alongside the demo html. It should have as it is in the markup of the page, just not showing up.

@digglek - #274 should help with the JS for the Dialog. We've also included an example of a blocking dialog for extra completeness.
@weshackett - we'll get the examples up on the site asap for both the Spinner and the Dialog.

Issue #110 covers needing JS to demonstrate opening and closing a Dialog.


Load test plan

Since we're consolidating APIs and moving to AWS, we need to assemble a short plan to test the load of both users hitting the /meta endpoint as well as the workers for processing imagery.
We are currently running production on a t2.xlarge. Is this sufficient? Also related, how many max workers do we want running for processing imagery?

The new deployment of OAM will move from using seperate servers for the Catalog API and Uploader API to using a single server in a combined API. This means that the Catalog API is now responsible for both serving database-accessing API requests and CPU-intensive imagery processing.
Note that Seth's recent work on Marblecutter and Monq worker integration should once again allow the seperation of the API load and processing load.
In order to test the new setup I uploaded a queue of ~200MB raw TIFFs. Note that current settings mean that only one image is processed at a time. I then ran the following load test:
ab -c 100 -n 5000 'http://api-staging.openaerialmap.org/meta?limit=99999'
These are requests for all the currently available imagery that create the highlighted grid squares on the frontend map. Note that this in itself is a significantly unoptimised DB query (approx 400k per request) and should be thought about carefully as more imagery is included in OAM. Also note that this request is only requested by a user when they visit the home page.
From OAM's Google Analytics I can see that there are usually about 2000 visitors per month, therefore concurrent users are rarely if ever going to be above 5. However I will assume a maximum plausible concurrent user surge of 100 after successful marketing. This is reflected in the -c 100 of the benchmark test. The results can be seen below in [1]. Note that mean response times are in the 5000ms range, this is not ideal, but perfectly acceptable if the server is not dropping requests and retains ample RAM, which it does. I also tested a concurrency of 300, see [2] below, which generates mean responses of 15000ms, this is not acceptable, but again there are no dropped responses and RAM remains sufficient.
My first suggestion for scaling is to separate the API service from the imagery processing service, as I mentioned at the beginning. However, if you would either like to support more concurrent imagery uploads or concurrent users above 100, then I would simply recommend adding more cores, the current 8GB is more than enough.

[1]
Document Path:          /meta?limit=99999
Document Length:        412598 bytes
Concurrency Level:      100
Time taken for tests:   246.659 seconds
Complete requests:      5000
Failed requests:        1408
(Connect: 0, Receive: 0, Length: 1408, Exceptions: 0)
Write errors:           0
Total transferred:<PHONE_NUMBER> bytes
HTML transferred:<PHONE_NUMBER> bytes
Requests per second:    20.27 [#/sec] (mean)
Time per request:       4933.183 [ms] (mean)
Time per request:       49.332 [ms] (mean, across all concurrent requests)
Transfer rate:          8185.61 [Kbytes/sec] received
Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0   11  97.2      1    1002
Processing: 1173 4890 819.7   4872    7761
Waiting:     1166 4812 811.3   4804    7633
Total:       1178 4901 825.4   4891    7796
Percentage of the requests served within a certain time (ms)
50%   4891
66%   5178
75%   5343
80%   5520
90%   5952
95%   6303
98%   6775
99%   7065
100%   7796 (longest request)
[2]
Document Path:          /meta?limit=99999
Document Length:        407751 bytes
Concurrency Level:      300
Time taken for tests:   494.546 seconds
Complete requests:      10000
Failed requests:        4093
(Connect: 0, Receive: 0, Length: 4093, Exceptions: 0)
Write errors:           0
Total transferred:<PHONE_NUMBER> bytes
HTML transferred:<PHONE_NUMBER> bytes
Requests per second:    20.22 [#/sec] (mean)
Time per request:       14836.383 [ms] (mean)
Time per request:       49.455 [ms] (mean, across all concurrent requests)
Transfer rate:          8078.66 [Kbytes/sec] received
Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0   16 116.7      1    1003
Processing:  1609 14639 6885.6  14981   57021
Waiting:     1359 14553 6886.6  14902   56997
Total:       1609 14655 6884.9  14998   57022
Percentage of the requests served within a certain time (ms)
50%  14998
66%  16406
75%  17088
80%  17566
90%  21113
95%  28954
98%  31162
99%  40153
100%  57022 (longest request)


docs(portal): update structure and copy for templating/files docs

@Jlawlzz that was just a copy-edit, do you still want someone to do a technical review?

@h3xar0n Yep, ill wait for one of the others to look over it for technical issues before merging.  Thank you for the copy edits, you are my hero!


Uncached cheat.sh queries not returning anything.

The cht.sh server is returning cached items okay, as in:
http://cheat.sh/python/sum
http://cheat.sh/python/pandas
But new never before seen queries such as:
http://cheat.sh/python/pandas+dataframe+sum+count
http://cheat.sh/python/dataframe+sum
http://cheat.sh/python/pandas+gbp
http://cheat.sh/python/gbp
http://cheat.sh/python/token
All return:
$ curl cheat.sh/
python/dataframe+sum
#  404 NOT FOUND
#
#  Unknown cheat sheet. Please try to reformulate your query.
#  Query format:

 /LANG/QUESTION

#  Examples:

 /python/read+json
 /golang/run+external+program
 /js/regex+search

#  See /:help for more info.
#
#  If the problem persists, file a GitHub issue at
#  github.com/chubin/cheat.sh or ping @igor_chubin

Screenshot:  https://imgur.com/C4pWaw3.png
sudo please be giving me username and password serverside so I can go in and fix your code, sh | -recursive force  (this is a joke)

Most probably cache ate all disk space. Or StackOverflow limited cht.sh access with some CAPTCHa. Or both.

sudo please be giving me username and password serverside so I can go in and fix your code, sh | -recursive force

And what is it the plan?

If stackoverflow has gated their API's that makes me sad.  Hopefully serverside can be rumbled back to life.  What is the fee structure?

@chubin knows. All I can see is that server is hosted on Hetzner, and as far as I know Hetzner doesn't provide any Open API to query disk space, mem, CPU stats and fee that is needed to keep them up.

Thank you for the ticket. I know about the problem existence before, but the issue is still very important, and motivating :)
The problem is here since December 16, and we have been trying to solve it. I hope that the solution is close, and the problem will be fixed soon. It is in our proprietary search engine, and it nothing of the resource limitation, full disks, etc kind of problems.
So let's just wait and I will come up with a solution.
Please excuse me for the inconvenience.
@abitrolly Sorry for my disappearance, I saw your commits and the things you did, thank you very much for them.
I hope I will come back to the project soon.

Happy new year! :christmas_tree:
The problem is fixed. Please check if it works for you.

Happy new year! :christmas_tree:
The problem is fixed. Please check if it works for you.

It's fixed.
I've been tearing apart the cublas libraries lately for people trying to N-Gpu accelerate their python code, octave code or pandas dataframes code, so that heavy ML related operations (dot products, linear algebra etc) go 1 to 4 orders of magnitude faster than with a CPU because you can use all 10 thousand cores in parallel to do the work.  Your service is helping me drill in that.
Comments buried 15 layers deep in that code are laid down by Nvidia and Google developers hide hints in comments for how to increase your probability of passing the 8 onsite interviews from zero to five zeros and a one.  If you're the kind of person who hacks on the labyrinth of cuda, then apparently that's a thing they like to see.

@sentientmachine Eric, you've switched from R to Python completely, or was it was temporary for a short time?

@chubin For better or worse I've been jumping around between maybe 10 computer languages, C++, Java, Python, R, Octave, Perl, Bash, Psql, vimscript, php, html5, github markdown, latex, javascript, and probably a few others.
We all should have agreed to just stick with C++ for everything, it would have been easier that way.

And more Rust and Ruby stuff is coming. )

@abitrolly Once you've got your dev environment and skill set up to muster on Rust, Ruby and Golang, I'll need to throw that all away and focus on PHP, Java, Julia, Dart, Swift, and Powershell on an Azure cloud instance.  https://www.youtube.com/watch?v=PktyJR_U2J0

Reopening because this bug crops up every 2 to 5 months.
This query works because serverside has cached the response:
http://cheat.sh/psql/convert+numeric+column+to+integer
This query produces an internal server error because serverside has not cached the response:
http://cheat.sh/psql/convert+numeric+column+to+double
Error Message:
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

I am not sure if the caching code is in the repository. Exposing cache metrics would be helpful for diagnostics. Then add cache invalidation for stale entries. It may happen that there is no cache invalidation at all, so the server stops when disk or memory is full. But I haven't looked into the code yet. Just got five minutes to comment.

In particular, adding cache/disk/mem metrics to the "Internal Server Error" page would help to diagnose what is going on.

Code is working again effective now(), Closing.
http://cheat.sh/psql/convert+numeric+column+to+integer
http://cheat.sh/psql/convert+numeric+column+to+double


storageerror

{
"name": "StorageError",
"message": "XML specified is not syntactically valid.\nRequestId:c8214677-85b4-4581-a8f7-1e26af830f30\nTime:2020-02-21T03:04:34.7300007Z",
"stack": "StorageError: XML specified is not syntactically valid.\nRequestId:c8214677-85b4-4581-a8f7-1e26af830f30\nTime:2020-02-21T03:04:34.7300007Z\n    at Function.StorageServiceClient._normalizeError (C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\azure-storage\lib\common\services\storageserviceclient.js:1205:23)\n    at Object.StorageServiceClient._processResponse (C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\azure-storage\lib\common\services\storageserviceclient.js:751:50)\n    at Request.processResponseCallback [as _callback] (C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\azure-storage\lib\common\services\storageserviceclient.js:319:37)\n    at Request.self.callback (C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\request\request.js:185:22)\n    at ZoneDelegate.invokeTask (C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\zone.js\dist\zone-node.js:275:35)\n    at Zone.runTask (C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\zone.js\dist\zone-node.js:151:47)\n    at Request.ZoneTask.invoke (C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\zone.js\dist\zone-node.js:345:33)\n    at Request.emit (events.js:182:13)\n    at Request. (C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\request\request.js:1157:10)\n    at ZoneDelegate.invokeTask (C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\zone.js\dist\zone-node.js:275:35)\n    at Zone.runTask (C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\zone.js\dist\zone-node.js:151:47)\n    at Request.ZoneTask.invoke (C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\zone.js\dist\zone-node.js:345:33)\n    at Request.emit (events.js:182:13)\n    at IncomingMessage. (C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\request\request.js:1079:12)\n    at Object.onceWrapper (events.js:273:13)",
"code": "InvalidXmlDocument",
"linenumber": "1",
"lineposition": "66",
"reason": "Element 'DeleteRetentionPolicy' is not recognized.",
"statusCode": 400,
"requestId": "c8214677-85b4-4581-a8f7-1e26af830f30"
}

Can you tell us how you ran into this?  Were you doing something with the soft delete? Thanks.

Dup of #2659

Setting up Team video, OBS provides hookup for and Office Business 365 have with Azure benefits for improvement to mixer and twitch. But I use Twitch to run through mixer!

I'm still figuring out Streamer through Office!

The other is setting up my storage on Azure!
But waiting on Azure for what I have on files, and my account Monetize on Mixer?

My name tag for these are through AtomicMass3B9, and my group or team goes through Gothalion and stevenyagel!
I use Dmarch28 because of Discord and my community in it, which is the gaming app Steam!

my repository is Dmarch28/khmer

Can you help me to understand where Storage Explorer fits in this?


Convert AUTHORS to NOTICE

Use a standard Apache 2 Sec 4d NOTICE.
Soft link AUTHORS over to NOTICE since we reference that all over.

LGTM - why does the AUTHORS file show up as a delete and new file rather than a modification to an existing file?

because technically it is a new file (files are a combo of mode and name - the mode is no longer regular file but link).


Retraining model - how to get acid and base models?

Hello
Thank you for providing the code and some data.
I tried to retrain the models with data and code provided with recent pytorch version - in case some incompatibilities.
The prepare script creates training and test from mol.sdf; then train_graph.py generates models, but the data only has acidic pKa. Do you have the data used to train basic pKa?
Thank you

Hi, sorry for the late reply to your question.prepare_dataset_graph.py is a script both for acid and base. For basic compounds, you need to add the atom index of the ionization center to idx property in sdf file. For example, CCCNCC, the atom index of N should be assigned to idx and the pka value should be assigned to pka.

Thank you for the answer, do you have the training data from the paper with basic centre, or is the file provided an exmaple of format?
Thanks

Because the train data is extracted from the ChEMBL database, which is calculated by ACDLab. Due to copyright issues, we cannot publish the dataset. You can extract the training set from ChEMBL by following the method described in the paper. I'm very sorry that I can't help you with the dataset.

I see, thank you for the information.


Error while clicking on "Jump to first unread message." inside a room

With riot v0.8.9 on LeEco 1s with android 6.0 I noticed an error while trying to click on "Jump to first unread message". Please find the attachment for error details.

I strongly suspect Riot is choking on an HTTP error here. So the actual bug is that it displays this nonsense instead of "500 Internal server error" or whatever the actual error is.

Closing the issue in favour of Element.io


Support all receiver types for all protocol methods

At the moment the protocol methods are in an inconsistent state: some of them can take PyRef or PyRefMut, and some of them take &self or &mut self.
This is confusing to users and also gets in the way in certain cases like needing to access Python inside a protocol method (which can be obtained from PyRef::py() for example) or wanting to return PyRef<Self>.
The simple solution is to just change all protocol methods to use TryFromPyCell trait. This is however a breaking change.
The better solution is to change all #[pyproto] methods to support any of the five of &PyCell, PyRef<Self>, PyRefMut<Self>, &self and &mut self, just like we support for #[pymethods].
I've had some ideas how to approach this second point so would like to take a shot at it soon.

The better solution is to change all #[pyproto] methods to support any of the five of &PyCell, PyRef, PyRefMut, &self and &mut self, just like we support for #[pymethods].

So what would the trait definition would be?
Or we remove __dunder__ methods?

I think I see a way to make a PyMethodReceiver trait which is implemented by all five types.

Quick update from me: over the weekend I had a little time to play with a trait along the lines of:
pub trait PyMethodReceiver<'a>: Sized {
    fn receive<T, U>(slf: &'a PyAny, f: impl FnOnce(Self) -> T) -> PyResult<U>
    where
        T: IntoPyCallbackOutput<U>,
        U: 'static;
}

It almost works, but there's some lifetime challenges about making sure the receiver lifetime is scoped correctly and safely. For the &self and &mut self receivers, I currently have some issues:
// THIS IMPL ISN'T SAFE BECAUSE &'a C IN THE CLOSURE CAN OUTLIVE THE `PYREF` GUARD
impl<'a, C: PyClass + 'a> PyMethodReceiver<'a> for &'a C {
    fn receive<T, U>(slf: &'a PyAny, f: impl FnOnce(Self) -> T) -> PyResult<U>
    where
        T: IntoPyCallbackOutput<U>,
        U: 'static
    {
        let cell: &PyCell<C> = slf.extract()?;

        // Introduce a PyRef to hold the guard. The lifetime of this is not long enough.
        let _ref = cell.try_borrow()?;

        // XXX: Use of unsafe below is not sound; was a hack to get compilation but the lifetime inferred outlives the guard.
        f(unsafe { cell.try_borrow_unguarded()? }).convert(slf.py())
    }
}

I'm hopeful that if I continue experimenting with designs in this space I'll be able to come up with a definition which is sound and gets us what we want.

So you mean you're extending the current fn __dunder__(slf: Self::Receiver...) to accept &Self or &mut Self type?
Interesting, but I'm not sure we really need this.
Both fn __dunder__(slf: &Self) and fn __dunder__(slf: PyRef<Self>) are not straightforward to write, so I think the usablity  gain is not so much.

I think that the most important thing is that we support fn __dunder__(slf: PyRef<Self>), for a couple of reasons:

it's possible to return slf: PyRef<Self> from methods, which is not possible with &self.
it's possible to get Python from slf.py(), which is also not possible with &self.

So for 0.13 we could change all dunder methods to use TryFromPyCell trait, even if we can't support the full set.

I'm also very interested in this, for yet another use case: PyRef<Self> gives access to all inherited classes. I don't think there is any way (even unsafe) to access them with the provided &self.

I took another look at this today, with a hope that after #1328 it should be possible to do further refactoring to support all of the receiver types listed above.
The answer is that if we change the traits to have slf: Self::Receiver as the first argument, e.g. like the existing PyIterProtocol trait:
pub trait PyIterProtocol<'p>: PyClass {
    fn __iter__(slf: Self::Receiver) -> Self::Result
    where
        Self: PyIterIterProtocol<'p>,
    {
        unimplemented!()
    }

    fn __next__(slf: Self::Receiver) -> Self::Result
    where
        Self: PyIterNextProtocol<'p>,
    {
        unimplemented!()
    }
}

... then for these traits it's not possible to call self.__iter__(). It has to be called as e.g. PyIterProtocol::__iter__(self).
As a consequence, supporting &self syntax in #[pyproto] for these traits is confusing in my opinion. If I see this code:
#[pyproto]
impl PyIterProtocol for MyClass {
    fn __iter__(slf: PyRef<Self>) -> PyRef<Self>
    {
        slf
    }

    fn __next__(&mut self) -> Option<i32>
    {
        unimplemented!()
    }
}

Then I would expect I should be able to call self.__next__() on MyClass instances. But actually I can't, because the trait definition above doesn't have an &mut self receiver. I have to call it as MyClass::__next__(self).

This problem might eventually be fixed with the arbitrary_self_types feature in a far-future Rust version. In the interest of providing a solution now, I think we have two options:

Just support TryFromPyCell receivers for all protocols.
That's the solution dicussed elsewhere in this thread. It's breaking for all existing #[pyproto] implementations which use &self or &mut self receivers. At least all protocols will be consistent with each other after this.

*Merge #[pyproto] and #[pymethods].
This idea is a bit more radical, but I actually think it could be quite nice. Basically we let users write slot methods in #[pymethods] and the proc macro can detect these and handle them specially.
Migrating for users should not be too hard because all they will have to do is merge their #[pyproto] blocks into their #[pymethods].
Doing this would remove a lot of the current things we do to make #[pyproto] work (e.g. inserting lifetimes, lots of extra protocol traits). So the pyo3 codebase would probably be smaller and easier to maintain. From a user perspective, pyo3 would have a smaller API.
There are some nice advantages to using traits though, like documentation and grouping (e.g. force both buffer methods to be implemented together). We can always make sure the guide has good docs.
... I'm tempted to hack around in the near future and see what this feels like in practice.

I took another look at this today, with a hope that after #1328 it should be possible to do further refactoring to support all of the receiver types listed above.
The answer is that if we change the traits to have slf: Self::Receiver as the first argument, e.g. like the existing PyIterProtocol trait:
pub trait PyIterProtocol<'p>: PyClass {
    fn __iter__(slf: Self::Receiver) -> Self::Result
    where
        Self: PyIterIterProtocol<'p>,
    {
        unimplemented!()
    }

    fn __next__(slf: Self::Receiver) -> Self::Result
    where
        Self: PyIterNextProtocol<'p>,
    {
        unimplemented!()
    }
}

... then for these traits it's not possible to call self.__iter__(). It has to be called as e.g. PyIterProtocol::__iter__(self).
As a consequence, supporting &self syntax in #[pyproto] for these traits is confusing in my opinion. If I see this code:
#[pyproto]
impl PyIterProtocol for MyClass {
    fn __iter__(slf: PyRef<Self>) -> PyRef<Self>
    {
        slf
    }

    fn __next__(&mut self) -> Option<i32>
    {
        unimplemented!()
    }
}

Then I would expect I should be able to call self.__next__() on MyClass instances. But actually I can't, because the trait definition above doesn't have an &mut self receiver. I have to call it as MyClass::__next__(self).

This problem might eventually be fixed with the arbitrary_self_types feature in a far-future Rust version. In the interest of providing a solution now, I think we have two options:

Just support TryFromPyCell receivers for all protocols.
That's the solution dicussed elsewhere in this thread. It's breaking for all existing #[pyproto] implementations which use &self or &mut self receivers. At least all protocols will be consistent with each other after this.

*Merge #[pyproto] and #[pymethods].
This idea is a bit more radical, but I actually think it could be quite nice. Basically we let users write slot methods in #[pymethods] and the proc macro can detect these and handle them specially.
Migrating for users should not be too hard because all they will have to do is merge their #[pyproto] blocks into their #[pymethods].
Doing this would remove a lot of the current things we do to make #[pyproto] work (e.g. inserting lifetimes, lots of extra protocol traits). So the pyo3 codebase would probably be smaller and easier to maintain. From a user perspective, pyo3 would have a smaller API.
There are some nice advantages to using traits though, like documentation and grouping (e.g. force both buffer methods to be implemented together). We can always make sure the guide has good docs.
... I'm tempted to hack around in the near future and see what this feels like in practice.

Without knowing too much about the implementation specifics, idea #2 sounds good to me.  It will feel natural to Python users, since it mirrors how special methods are defined there.
On the Rust side though, the "trait-ness" of these interfaces is lost.  Do people use the traits on the Rust side to handle different objects with common traits - even if the traits only contain Python related functionality?  (If desperately needed this could still be mitigated by still having the traits and implementing them automatically from the pymethods macro, with its methods just forwarding to the related pymethod.)

Do people use the traits on the Rust side to handle different objects with common traits - even if the traits only contain Python related functionality?

It's possible, but I haven't seen this in practice. Note that a Rust extension module will only have these protocol traits defined for its own pyclasses, and not for any builtin or thirdparty Python object. So most consumption of the Python protocols will still need to go via Python's dynamic type system / attribute lookup at runtime.
Having drafted the implementation for option 1 in #1561, I also now strongly prefer option 2. I agree about just having #[pymethods] being natural for Python users, and the migration for existing PyO3 projects will probably be easier. Option 2 will require cut-and-pasting all #[pyproto] methods into #[pymethods]. Option 1 actually forces quite a significant re-write of all #[pyproto] methods.
In either way, I think release 0.14 is due soon as we've got a lot of changes piling up, so I'm regrettably going to shift this to the 0.15 milestone. In my eyes this is one of the top things to sort for 0.15, along with #1056.

I think idea 2 could be better for those who already know Python well, but for Rust users who don't know Python very well, the trait is much better.
How about convert user-defined trait methods to take slf: PyRef<T>? I agree that this is certainly ugly, but in the future, we can use arbitrary self. I'm happy to implement this.
Also, even if we remove protocol traits, I think we have to leave some traits (e.g., buffer). So, if we are going to remove protocol traits, we need to clarify what traits should be remained.

How about converting user-defined trait methods to take slf: PyRef? I agree that this is certainly ugly, but in the future, we can use arbitrary self.

This is exactly what I've drafted in #1561.

I think idea 2 could be better for those who already know Python well, but for Rust users who don't know Python very well, the trait is much better. I actually didn't know Python very well when I had to write some Rust extensions for Python. I'm not sure it's a major case, though.

What I think I'm hearing from this is that the traits provide useful grouping and documentation. I think with good documentation in the guide we can have most of the same benefit.

I meant rewriting the trait definition by proc macro.

Ahh I see!
Yes, it's true #[pyproto] could rewrite all &self to slf: PyRef<Self>. It'd also have to rewrite all uses of self to slf inside of the function body. The result would mean that there would be less hard-breaking migration for users implementing these traits.
The downsides of this approach:

Users calling these traits would still have to change call syntax from self.__str__() to Self::__str__(slf) (with slf being a PyRef.
This would add even more magic to the #[pyproto] macro (which I think already does too much). I don't think we'd want to document this rewriting of self as a supported feature. Instead we should say it is a temporary bridge which would be removed after a couple of PyO3 versions.

If people think that option 1 is the better final design than option 2, then I could support migrating to option 1 via this. However I still think that option 2 is probably nicer overall. I need to try and draft an implementation of option 2 and see what it looks like in reality!

Another interesting point for the discussion: a user this week tried to implement __str__ and __repr__ in #[pymethods] and then was confused why they did not work correctly. I had to point them to #[pyproto] docs on Gitter: https://kushaldas.in/posts/adding-dunder-methods-to-a-python-class-written-in-rust.html
This further makes me think just having the one macro would help avoid confusion.

OK, now I'm also inclined to use pymethod for everything. Raising compile errors and preparing documentation would be big stuff, though.

Yes, I'm willing to put in the effort to build all of the necessary implementation for 0.15!

a user this week tried to implement __str__ and __repr__ in #[pymethods] and then was confused why they did not work

I've had this problem too.

preparing documentation

I'm on board to do this. I know my way around the magic methods (in python) pretty well.

Help with the documentation when we're ready would be really amazing. I'll probably start experimenting with this in about a month's time once 0.14 release is done and any relevant bugfixes out the way.
I imagine that what this will end up being like is that the #[pymethods] which have constraints in the types and arguments will be the ones that need documentation.
For example, we might need to document constraints like:
`__setattr__`
  - Takes a receiver (`&self`, `&mut self`, `PyRef<Self>`, `Py<Self>` etc.)
  - Takes two arguments
  - Returns `()` or `PyResult<()>`

`__str__`
  - Takes a receiver (`&self`, `&mut self`, `PyRef<Self>`, `Py<Self>` etc.)
  - Takes no arguments
  - _Should_ return a string type (`&str`, `String`, `&PyString`, `&PyAny`, `PyObject` etc.), optionally wrapped in `PyResult`.

I imagine that it might need a couple iterations to make this all easy to read.

The initial implementation for #[pymethods] is merged in #1864 and the remaining work is tracked in #1884. The plan is not to change #[pyproto] any more, and to eventually deprecate. Anyone who has a need for this functionality is encouraged to try the experimental #[pymethods] implementation in 0.15 once that releases (or on main already).


Unity getContactQuality is always -1

Hello!
I'm having difficulties getting the Unity example to work. When I start the Unity example, it correctly authorizes it, but when the "ensure good contact quality" screen appears it just shows for 1 frame the correct quality,

but then the quality is always 0.

I printed the value that I get from the DataStream::getContactQuality method and it is always -1, except when the screen initially appears where it seems to work for a fraction of a second, but then it is always -1... In the DevDataBufferMethod::GetContactQuality() method a comment says //return -1 if the moment there is no battery come. What does this mean? I charged the battery to 100%...
I would be very happy if somebody could help me, since I'm writing my bachelor thesis, in which I use Emotiv Insight and therefore understanding how the plugin works by using the example would be very helpful.

Hi @floriangamillscheg ,
We have just updated unity-plugin and unity-example to support for Emotiv Cortex 2.7.0. Please update and check again. Let us know about result. Thanks

HI @tungntEmotiv ,
yes thank you, it now works! I have 2 other questions:

is there a way to decrease the time between the measurement of the performance metrics data? It seems the performance data is only updated about every 30 seconds. Is there a way to decrease this time?
Is the profile only used for the mental commands and facial expression? Or in other words, can a trained profile help achieve more accurate data in the performance metrics?

Thanks!

Hi @floriangamillscheg

The API should send you the PM data every 10 seconds. Internally, Cortex updates the PM every 0.5 seconds, but you need a paid PRO license with the option "High-Res Performance Metrics" to see the PM at 2 Hertz.
https://www.emotiv.com/emotivpro/

Yes, the profile is only for mental command and facial expressions. You cannot train the performance metrics.


Fix smallserial type

smallserial was left alone without proper typing 😅

Closes #1848

Hii, how does your release flow work? When do you guys intend to approve the workflows?

Approved, will include in next releases


Run validation with assert ON

This finds more bugs, and a fix for numpy_expr is attached.

@jeanlaroche this should fix the bug we discussed about on IRC.
As a side note: compile your native builds with -DNDEBUG

That's awesome. Let me try now... Thanks!!!

I confirm that this fixes my problem. No more assert!


CircleCI integration

This one's important to get right, so don't go easy on me.
Non CircleCI changes:

Added a test for the ViewingArea class
Added unittest module functionality to test_demo.py
Added pytest and flake8 to setup.py in extras_require
Updated requirements.txt after installing with pip in a clean environment

CircleCI changes (from kjmerf and emails):

Using sudo pip install to avoid the virtual environment commands
Copied a different set of flake8 commands, not too different from last discussion
Using "deploy" step for PyPi deployment, which doesn't seem too different from run
Installing twine separately in this deploy step directly from pip. I wasn't as sure about this.
Added a CircleCI badge in the README.md

CircleCI link is https://circleci.com/gh/baogorek/datascroller. PyPi environment variable has been added.
A lot of commits here, I know. I tried to rebase but I had merged in other branches along the way so I couldn't do a straight rebase of the 21 commits. If you want I could try rebasing parts of the commit chain the reduce the number.

I'll wait for @kjmerf to approve this but it all looks good to me. Do we know that the attempted upload to PyPI will happen when this is merged? Is there a way to test that it works beforehand?

About a way to test that it works beforehand, we could change the twine code to push to Test PyPi. I'm also okay with going for it, and if we botch the release and lose the version, we just increment and go ahead.


Fix race condition in testutils.logger

You can't both write and read from testutils.logger buffer concurrently given buffer is not threadsafe. Overwriting some functions with locks to fix.

Coverage decreased (-0.1%) to 99.9% when pulling 75bb51c6d429a4d8c5222c4f5fbeb62688b90435 on fix_racecondition into f3b555e624af729d582d1b8e33a3772da3d1b2cd on master.

Coverage remained the same at 100.0% when pulling a91c6ad1703ddec7b4614a084aa70595b8cce98d on fix_racecondition into f3b555e624af729d582d1b8e33a3772da3d1b2cd on master.

Coverage remained the same at 100.0% when pulling b3831cec11a4df76b2cca3deffcd105417704130 on fix_racecondition into f3b555e624af729d582d1b8e33a3772da3d1b2cd on master.


Bug in the Resources Form

Describeing the bug
There is a bug in the Resources tab Form section. The alignment of the form is not in an appropriate way it requires some changes in it.
Bug Screenshot:

To Reproduce
Steps to reproduce the behavior:

Go to the 'Resouces page or section'
Click on 'Form'
Scroll down to '....'
See error

Expected behavior
The alignment of the form should look like this:

Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [Windows]
Browser [chrome]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.
Have you read the Code of Conduct?
Write your answer here.

duplicate of https://github.com/HITK-TECH-Community/Community-Website/issues/935


[FEATURE REQ] Support e2e tracing for CloudEvents in Microsoft.Azure.WebJobs.Extensions.EventGrid

Library name
Microsoft.Azure.WebJobs.Extensions.EventGrid
Please describe the feature.
EventGrid client SDKs populate distributed tracing extension with trace context. To leverage it and enable proper e2e tracing in Functions and WebJobs, the extension should read this context and continue the trace
Below is the code users need to write now (specific to Application Insights, but  Microsoft.Azure.WebJobs.Extensions.EventGrid can use System.Diagnostics.Activity only and Functions already do the trick with Application Insights).
For IAsyncCollector<CloudEvent> overload, it gets tricky and we'd have to use ActivitySource to properly populate links.
Users would likely want to be able to extract context for individual events, it's tracked here https://github.com/Azure/azure-sdk/issues/3319
private readonly TelemetryClient telemetryClient;
public Function1(TelemetryClient telemetryClient)
{
    this.telemetryClient = telemetryClient;
}

[FunctionName("Function1")]
public void Run([EventGridTrigger]CloudEvent evnt, ILogger log)
{
    using (var processingOperation = telemetryClient.StartOperation<RequestTelemetry>(ExtractActivity(evnt)))
    {
        // do something
        log.LogInformation("Processing  CloudEvent... {event}", evnt.Data.ToString());
    }
}

private static Activity ExtractActivity(CloudEvent evnt)
{
    // read distributed tracing extension
    // https://github.com/cloudevents/spec/blob/v1.0.1/extensions/distributed-tracing.md
    string traceparentStr = null;
    string tracestateStr = null;
    if (evnt.ExtensionAttributes.TryGetValue("traceparent", out var traceparent)
        && traceparent is string)
    {
        traceparentStr = (string) traceparent;
        if (evnt.ExtensionAttributes.TryGetValue("tracestate", out var tracestate)
            && tracestate is string)
        {
            tracestateStr = (string)tracestate;
        }

    }

    return ExtractActivity("CloudEvents Process " + evnt.Type, traceparentStr, tracestateStr);
}

private static Activity ExtractActivity(string activityName, string traceparent, string tracestate)
{
    var activity = new Activity(activityName);

    if (!string.IsNullOrEmpty(traceparent))
    {
        // parse traceparent according to https://www.w3.org/TR/trace-context/
        if (traceparent.StartsWith("00-") && traceparent.Length == 55)
        {
            // preserve function execution as parent and add link context from the event
            // assuming we do this inside the extension code, we should just make this context parent
           // or use `ActivitySource` with proper links support if possible
            activity.AddTag("_MS.links",
                $"[{{\"operation_Id\":\"{traceparent.Substring(3, 32)}\",\"id\":\"{traceparent.Substring(36, 16)}\"}}]");
        }

        activity.TraceStateString = tracestate;
    }

    return activity;
}

This was added in https://github.com/Azure/azure-sdk-for-net/pull/25944


Pancake_Sort

Submission Title
Pancake_Sort
Submission Type
Algorithm
Submission Description
Pancake sorting is the colloquial term for the mathematical problem of sorting a disordered stack of pancakes in order of size when a spatula can be inserted at any point in the stack and used to flip all pancakes above it.
Folder Related To
Algorithm => Sorting_Programming => Pancake_Sort => Pancake_Sort.ext
Contributors

[ ]  C++ -
[ ]  C -
[ ]  Python -
[ ] Java -
[ ] JavaScript -
[ ] TypeScript -
[ ] Golang -
[ ] Ruby -
[ ] php -
[ ] Swift -
[ ] C# -

i'll try it in js

I can do it in Python

Can I do this in C++.?

@ahampriyanshu hey, i would like to work on this issue. I would create it in python language. Please assign this to me.

I can do it in Ruby 🙌

Can I do a pancake (yummy) sort in Java?

i would like to do this in java

Hi @TechnoPhasePRO & @RahulRS246 :wave:
Please opt a different language/issue :v:

Can you add me for C#

hey! can you please assign this to me in C ?

thanks everyone :v:


Plugin timeout for VM creation should be configurable.

We've tested with a delay of 0.75s each way, and that works fine. With a delay of 1s, creation of VMs on remote hosts fail. (Error: Failed to launch instance "new": Please try again later [Error: No valid host was found. ].)
This is going to be OK in most circumstances, but might need increasing for slow networks.

Superseded by PR #307.


Support containers/docker?

Vagrant has support for using docker containers in place of VMs, and in my experience it can take the creation of a 3 node cluster from ~3-5 minutes down to 10-15 seconds because of the limitations in VirtualBox around needing to create hosts sequentially. This Vagrantfile looks non-trivial but I'm interested in seeing it support Docker containers, I'm wondering how complicated the community thinks that might be?

I am strongly biased nowadays and have a strong preference for orchestrating Docker containers with Terraform instead. See also: my other project, Vaultron which does exactly that for a specific use case and can spin up a Vault cluster of 3 instances with a Consul cluster of 3 servers on Docker with Terraform in less than one minute on a modern laptop.
While I could support this being a possibility, I personally have no interest in implementing it, and have pretty much transitioned away from Ansible for day-to-day use.


How do I configure port mapping?

Can't figure this one out...

I'm new to docker.  Can this be done with the PS cmdlets?
docker run -p 80:80 kitematic/hello-world-nginx
Btw , terrific job aligning this so well with the PS way of things. It just works.

Answered in https://github.com/Microsoft/Docker-PowerShell/issues/174.  It's not pretty, but at least it works.  This is a prime candidate for functionality that should get wrapped into a cmdlet for usability and discovery.


Populate modal form during onOpen event

Hello,
More of a question, really... I have a form within a modal and I can't seem to populate it with data.
The workflow goes a bit like this:
Users can select a country on a map, which then saves it as a relationship. When users then click on the same country again it opens up the edit modal and I pass the id of the country along like so: $wire.emit('modal:open', 'user-log', id). In the onOpen method of the modal I then use the id to get the country relationship and set some properties:
public function onOpen(array $eventParams, self $formClass): void
{
    $country = current_user()
        ->countries()
        ->where('id', $eventParams[0])
        ->first();

    $formClass->name = $country->name;
    $formClass->private = (bool) $country->meta->private;
}

I then tried to fill the form with data:
public function fill(): array
{
    return [
        'name'    => $this->name,
        'private' => $this->private,
    ];
}

It doesn't work, tho. This seems to be the order the methods are called in:
On page load:
mount
getFormSchema
fill

On open:
onOpen
getFormSchema

So, the fill method never gets called again during onOpen. How can I then populate a form with data set during the onOpen event?
Cheers!

Looks like I can manually fill the form in onOpen like so:
$livewire->form->fill(
    $formClass->fill()
);

Is this the recommended way then?

Hey @boris-glumpler, yep that's exactly how it is intended!
For example, this is an alternative approach that comes from one of my projects, where I directly modify two properties in the Livewire $data array:
    public function onOpen(array $eventParams, Component $livewire)
    {
        $from = organization()->settings->worktimes['from'] ?? '08:00';
        $to = organization()->settings->worktimes['to'] ?? '17:00';

        $selectedDate = $eventParams[0] ?? null;

        $livewire->data['starts_at'] = carbon($selectedDate)->setTimeFrom($from)->tzXXXXX();
        $livewire->data['ends_at'] = carbon($selectedDate)->setTimeFrom($to)-> tzXXXXX();

        $this->selectedDate = $selectedDate;

        $livewire->data['persons'] = [];
    }

Thanks for your reply!


Fixing #27: properly paint SVG arcs with angles >180°

fixes https://github.com/vdobler/chart/issues/27
In the code there is now a comparison which sets the "large-arc-flag" if needed as described in the SVG documenation.
Examples of plots:

Thanks for the Fix!
On Thu, 25 Jul 2019 at 09:38, harenber<EMAIL_ADDRESS>wrote:

fixes #27 https://github.com/vdobler/chart/issues/27
In the code there is now a comparison which sets the "large-arc-flag" if
needed as described in the SVG documenation
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Arcs.
Examples of plots:
[image: Schnappschuss (2019-07-24 18 18 33)]
https://user-images.githubusercontent.com/5817273/61810417-7d4ece00-ae3f-11e9-8add-19d948b0414c.png
[image: Schnappschuss (2019-07-24 18 18 13)]
https://user-images.githubusercontent.com/5817273/61810418-7d4ece00-ae3f-11e9-9465-eb7e09819dc4.png
You can view, comment on, or merge this pull request online at:
https://github.com/vdobler/chart/pull/29
Commit Summary

When painting an ARC with SVGs "A" or "a" in a path, you need to set
the large-arc-flag

File Changes

M svgg/svg.go
https://github.com/vdobler/chart/pull/29/files#diff-0 (12)

Patch Links:

https://github.com/vdobler/chart/pull/29.patch
https://github.com/vdobler/chart/pull/29.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/vdobler/chart/pull/29?email_source=notifications&email_token=AAFLHRXPYT35VRQEN62TDQ3QBFJ6RA5CNFSM4IGXY7F2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBNAP4A,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFLHRRU3PXZW2DERCO2XZTQBFJ6RANCNFSM4IGXY7FQ
.

--
Dr. Volker Dobler


Question: How to KEEPIDENTITY in bulkinsert?

Is there a way to keepidentity from source data while bulk insert?
At the moment, using bulk insert SQL server assigns the identity values rather than from the source data but I would like to insert the source data values, is this possible?
My source data identity values are like 1,2,3...150,151,2000

@KarthikYan I'm so sorry to hijack your issue, but I really need to know how to let SQL Server assign the identity using this library. I cannot find the answer anywhere and I tried everything I could think of.
If I have a table like:
Id INT IDENTITY(1,1),
Name VARCHAR(50),
CreatedAt DATETIME2

And then I have a dataframe with the following schema:
root
 |-- Name: string (nullable = false),
 |-- CreatedAt: timestamp (nullable = false)

How should I set the BulkCopyMetadata?
val bulkCopyMetadata = new BulkCopyMetadata
bulkCopyMetadata.addColumnMetadata(1, "Name", java.sql.Types.VARCHAR, 50, 0)
bulkCopyMetadata.addColumnMetadata(2, "CreatedAt", java.sql.Types.TIMESTAMP, 0, 0)

What does the first parameter refer to? Is it the index on the table or on the dataframe?
I keep getting com.microsoft.sqlserver.jdbc.SQLServerException: Source and destination schemas do not match. no matter what I tried.

@KarthikYan I'm so sorry to hijack your issue, but I really need to know how to let SQL Server assign the identity using this library. I cannot find the answer anywhere and I tried everything I could think of.
If I have a table like:
Id INT IDENTITY(1,1),
Name VARCHAR(50),
CreatedAt DATETIME2

And then I have a dataframe with the following schema:
root
 |-- Name: string (nullable = false),
 |-- CreatedAt: timestamp (nullable = false)

How should I set the BulkCopyMetadata?
val bulkCopyMetadata = new BulkCopyMetadata
bulkCopyMetadata.addColumnMetadata(1, "Name", java.sql.Types.VARCHAR, 50, 0)
bulkCopyMetadata.addColumnMetadata(2, "CreatedAt", java.sql.Types.TIMESTAMP, 0, 0)

What does the first parameter refer to? Is it the index on the table or on the dataframe?
I keep getting com.microsoft.sqlserver.jdbc.SQLServerException: Source and destination schemas do not match. no matter what I tried.

did you try creating a data frame that includes ID (Identity column)?

What happens when you add an entry to the config with BulkCopyKeepIdentity -> "true"?

Anyone figure this out? Not having the column in the dataframe complains about the schemas, adding bulkCopyKeepIdentity doesn't appear to affect the insert and having the Id column overrides the identity in the table.

Alright got this working:
Dataframe: contains all columns including identity column with value null
BulkCopyMetaData: contains all metadata including identity column
Config: "bulkCopyKeepIdentity"  -> "false"

Used   "bulkCopyKeepIdentity"   -> "true" to keep identity, it was lot simpler than I originally thought


Support for bound service account tokens in Kubernetes Auth method

Is your feature request related to a problem? Please describe.
Kubernetes 1.12 introduced Service Account Token Volume Projection into Pods as Beta capability. This allows for periodic rotation of the JWT Token of a Service account which is a security requirement in many organizations.
This feature request is to ensure that Spring Cloud Vault can properly Authenticate to Vault when using the Kubernetes Auth method.
HashiCorp Vault added support for this by having issuer and iss validation as part of the Kubernetes Auth Method configuration
Describe the solution you'd like
Spring Cloud Vault should read the JWT token prior to Kubernetes Authentication, or reload the JWT token periodically. The above documentation says:

The application is responsible for reloading the token when it rotates. Periodic reloading (e.g. once every 5 minutes) is sufficient for most use cases.

Describe alternatives you've considered
The application could use REST APIs instead of Spring Cloud Vault to login via Kubernetes Auth. This is problematic because it introduces additional complexity for developers to implement authentication and renewal logic.
Additional context
Service Account Token Volume Projection is an important security capability introduced in Kubernetes 1.12. Prior to Service Account Token Volume Projection, Service Account tokens were static. This was a major issue as most organizations have a requirement to rotate credentials. Additional orchestration was needed to delete a Service Account secret and allow Kubernetes to create a new one.
The Service Account Token Volume Projection solves for this challenge elegantly as described above:

The kubelet will request and store the token on behalf of the pod, make the token available to the pod at a configurable file path, and refresh the token as it approaches expiration. Kubelet proactively rotates the token if it is older than 80% of its total TTL, or if the token is older than 24 hours.

If I understand correctly, the only thing to do is to re-read the token file when the session token expires to re-login into Vault?
If so, then this is already the case for all non-reactive arrangements.

Hello Mark,
That is correct, the token file needs to be re-read prior to re-logging into Vault. Could you please elaborate on non-reactive? We will be specifying Kubernetes Authentication properties in Bootstrap.yml as documented under Kubernetes Authentication

Non-reactive basically means each application that does not use WebFlux or RSocket.
Using the reactive stack imposes limitations in terms of avoiding blocking calls. Reading a file uses blocking I/O. In Spring Vault, we don't support non-blocking File I/O yet.
By enabling the reactive Vault support, the selected authentication mechanism returns a descriptor (AuthenticationSteps) of activities that are required to log into Vault. These are typically HTTP calls and how to transform the outcome of HTTP calls to form a login request.
Since we have the limitation of avoiding blocking calls when running the application, what happens is that the Kubernetes token is read once and is reused for subsequent login calls, see KubernetesAuthentication.createAuthenticationSteps(…).
AuthenticationSteps is reused until application shutdown. It captures the JWT.

That limitation is now addressed by spring-projects/spring-vault#586.

Hello @mp911de , sorry to bother you again but do you have an estimate when this limitation will be lifted for Reactive Stack applications? Issue GH-586 says its targeted for Milestone 2.3 RC1 but it does not have an ETA. Thank you for your help.


Immediately Fires Discconnect Event, No Raw Output

I am trying to host my Discord bot on a Digital Ocean Linux server.
This code works on Windows just fine, and there is not anything seemingly that would break the code in the transition. But nothing happens after login attempt other than the "Disconnected" event's code. No success function, no raw output.
The code can be found in my repository
https://github.com/BrandonCookeDev/DiscordCookieBot/blob/master/app.js in case you're interested,
but this seems like a bug. There's no proxy configuration I had to add for NPM so I don't believe it's a proxy issue.

What's the nodejs version and Discord.js version on both?

I just upgraded it to the latest (on the server) Discord.js available from npm (8.1.0).
Node JS Version 6.3.0

I'm having a similar issue trying to deploy to a docker container based on node:6.4. You can deploy it using orderofperfectlight/discord-gw2-sync

@waterfoul this isn't a fix per say, but if you aren't using autoReconnect it may at least reconnect the bot after whatever issue is causing it to DC. also, you can try adding .catch(console.log) to various parts of the bot, as well as using the disconnect event, which passes along errors that happen inside the client.

I'm already trying to catch the error event, it just never fires. Here is the pertinent code:
discord.bot.on('error', function(message) {
	console.log('error recieved', message);
});

I'll add a connect handler and see what that does to see if it's already auto-reconnecting (I didn't change the default)

Update: I've retooled my bot a bit to maintain 3 connections so it can work around this disconnect issue. I've got handlers logging warnings, errors, and disconnects. I appear to be getting an average of 4 "WS close: 1006" errors per client an hour so there is definetly something odd going on

Upgraded node to 6.5.0 and issue persists. I have yet to try downgrading.

Update: I switched to 4.5.0 and issue still persists. I'm really not sure what to do from here

I've found that my bot is still unstable even with the redundant connections

Should be fixed in 9.0.2

Would you mind explaining why this occurred? I would very much like to know.


Added fallback links in case automatic forwarding is blocked.

When I tried to open a link, I had to manually change the URL from fxtwitter.com back to twitter.com in order to be redirected to the orignal tweet. So here's a small suggestion to help others who are experiencing the same problem.

This is a neat little change, good idea :) I'll go ahead and merge


populate table with prepared statement

Codecov Report

Merging #386 into dev will decrease coverage by 0.04%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                dev     #386      +/-   ##
============================================
- Coverage     40.16%   40.11%   -0.05%
+ Complexity     1892     1887       -5
============================================
  Files           107      107
  Lines         24482    24482
  Branches       4038     4038
============================================
- Hits           9833     9822      -11
- Misses        12815    12817       +2
- Partials       1834     1843       +9

Flag
Coverage Δ
Complexity Δ

#JDBC41
39.95% <ø> (-0.1%)
1879 <ø> (-4)

#JDBC42
39.95% <ø> (-0.06%)
1881 <ø> (-4)

Impacted Files
Coverage Δ
Complexity Δ

...om/microsoft/sqlserver/jdbc/ReaderInputStream.java
44.94% <0%> (-3.38%)
16% <0%> (-1%)

...om/microsoft/sqlserver/jdbc/SimpleInputStream.java
47.4% <0%> (-1.49%)
9% <0%> (-1%)

...om/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java
49.14% <0%> (-0.36%)
209% <0%> (-1%)

...m/microsoft/sqlserver/jdbc/SQLServerStatement.java
59.06% <0%> (-0.31%)
129% <0%> (-1%)

...m/microsoft/sqlserver/jdbc/SQLServerResultSet.java
27.15% <0%> (-0.25%)
186% <0%> (-2%)

...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java
45.13% <0%> (+0.2%)
0% <0%> (ø)
:arrow_down:

...a/com/microsoft/sqlserver/jdbc/PLPInputStream.java
40.96% <0%> (+1.2%)
29% <0%> (+1%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bd68b5...7cdbf33. Read the comment docs.


Refactor image corruption toolbox

Description

main.py as the main entry point
moved test assests to stock-plugins root (stock-plugins/user_defined_files)
refactored the folder and files structure.
Users can now execute the plugin as a module
Plugin will now accept comma separated assets paths (data,model,ground_truth), model classifications, ground truth value,plugin args
Following plugins are refactored -

blur corruptions
digital corruptions
Environment corruptions
general corruptions

Type of Change

refactor: Code refactoring without changes in functionality

perf: Performance improvements

How to Test
Execute the below command for each plugin
cd aiverify/stock-plugins/aiverify.stock.robustness-toolbox/algorithms/<PLUGIN_NAME>/
pytest .

Checklist
Please check all the boxes that apply to this pull request using "x":

[x]  I have tested the changes locally and verified that they work as expected.
[x]  I have added or updated the necessary documentation (README, API docs, etc.).
[x]  I have added appropriate unit tests or functional tests for the changes made.
[x]  I have followed the project's coding conventions and style guidelines.
[x]  I have rebased my branch onto the latest commit of the main branch.
[x]  I have squashed or reorganized my commits into logical units.
[x]  I have added any necessary dependencies or packages to the project's build configuration.
[x]  I have performed a self-review of my own code.
[x]  I have read, understood and agree to the Developer Certificate of Origin below, which this project utilises.

Screenshots (if applicable)
[If the changes involve visual modifications, include screenshots or GIFs that demonstrate the changes.]
Additional Notes
[Add any additional information or context that might be relevant to reviewers.]

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
   have the right to submit it under the open source license
   indicated in the file; or

(b) The contribution is based upon previous work that, to the best
   of my knowledge, is covered under an appropriate open source
   license and I have the right under that license to submit that
   work with modifications, whether created in whole or in part
   by me, under the same open source license (unless I am
   permitted to submit under a different license), as indicated
   in the file; or

(c) The contribution was provided directly to me by some other
   person who certified (a), (b) or (c) and I have not modified
   it.

(d) I understand and agree that this project and the contribution
   are public and that a record of the contribution (including all
   personal information I submit with it, including my sign-off) is
   maintained indefinitely and may be redistributed consistent with
   this project or the open source license(s) involved.

I get the following errors when running pytests under the environment_corruptions algo:
ImportError while importing test module '/Users/leongpeckyoke/Projects/aiverify2/temporary/aiverify/stock-plugins/aiverify.stock.image-corruption-toolbox/algorithms/environment_corruptions/tests/e2e/test_e2e.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.venv/lib/python3.11/site-packages/wand/api.py:159: in <module>
    libraries = load_library()
.venv/lib/python3.11/site-packages/wand/api.py:148: in load_library
    raise IOError('cannot find library; tried paths: ' + repr(tried_paths))
E   OSError: cannot find library; tried paths: []

During handling of the above exception, another exception occurred:
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/e2e/test_e2e.py:4: in <module>
    from aiverify_environment_corruptions.algo_init import AlgoInit
aiverify_environment_corruptions/algo_init.py:9: in <module>
    from aiverify_environment_corruptions.algo import Plugin
aiverify_environment_corruptions/algo.py:11: in <module>
    from aiverify_environment_corruptions.utils import environment
aiverify_environment_corruptions/utils/environment.py:8: in <module>
    from wand.api import library as wandlibrary
.venv/lib/python3.11/site-packages/wand/api.py:183: in <module>
    raise ImportError('MagickWand shared library not found.\n'
E   ImportError: MagickWand shared library not found.
E   You probably had not installed ImageMagick library.
E   Try to install:
E     brew install freetype imagemagick
_____________________________________________________________________________ ERROR collecting tests/unit_tests/test_algo.py _____________________________________________________________________________
ImportError while importing test module '/Users/leongpeckyoke/Projects/aiverify2/temporary/aiverify/stock-plugins/aiverify.stock.image-corruption-toolbox/algorithms/environment_corruptions/tests/unit_tests/test_algo.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.venv/lib/python3.11/site-packages/wand/api.py:159: in <module>
    libraries = load_library()
.venv/lib/python3.11/site-packages/wand/api.py:148: in load_library
    raise IOError('cannot find library; tried paths: ' + repr(tried_paths))
E   OSError: cannot find library; tried paths: []

During handling of the above exception, another exception occurred:
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit_tests/test_algo.py:6: in <module>
    from aiverify_environment_corruptions.algo import Plugin
aiverify_environment_corruptions/algo.py:11: in <module>
    from aiverify_environment_corruptions.utils import environment
aiverify_environment_corruptions/utils/environment.py:8: in <module>
    from wand.api import library as wandlibrary
.venv/lib/python3.11/site-packages/wand/api.py:183: in <module>
    raise ImportError('MagickWand shared library not found.\n'
E   ImportError: MagickWand shared library not found.
E   You probably had not installed ImageMagick library.
E   Try to install:
E     brew install freetype imagemagick

Please add a requirements in the readme to install the imagemagick for this algo


Error Installing with Python 3.7

When running pip install python on Linux Mint 19:

running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/glove
copying glove/glove.py -> build/lib.linux-x86_64-3.7/glove
copying glove/corpus.py -> build/lib.linux-x86_64-3.7/glove
copying glove/init.py -> build/lib.linux-x86_64-3.7/glove
running build_ext
building 'glove.glove_cython' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/glove
gcc -pthread -B /home/rjhubba2/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/rjhubba2/anaconda3/include/python3.7m -c glove/glove_cython.c -o build/temp.linux-x86_64-3.7/glove/glove_cython.o -fopenmp -ffast-math -march=native
glove/glove_cython.c: In function ‘__Pyx_ExceptionSave’:
glove/glove_cython.c:16753:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
*type = tstate->exc_type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16754:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
*value = tstate->exc_value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16755:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
*tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
glove/glove_cython.c: In function ‘__Pyx_ExceptionReset’:
glove/glove_cython.c:16767:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16768:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16769:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
glove/glove_cython.c:16770:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16771:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16772:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = tb;
^~~~~~~~~~~~~
curexc_traceback
glove/glove_cython.c: In function ‘__Pyx_GetException’:
glove/glove_cython.c:16815:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16816:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16817:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
glove/glove_cython.c:16818:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = local_type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16819:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = local_value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16820:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = local_tb;
^~~~~~~~~~~~~
curexc_traceback
glove/glove_cython.c: In function ‘__Pyx_ExceptionSwap’:
glove/glove_cython.c:16842:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16843:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16844:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
glove/glove_cython.c:16845:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = *type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16846:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = *value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16847:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = *tb;
^~~~~~~~~~~~~
curexc_traceback
error: command 'gcc' failed with exit status 1

Failed building wheel for glove-python
Running setup.py clean for glove-python
Complete output from command /home/rjhubba2/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-v8bbfpp6/glove-python/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" clean --all:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help

error: option --all not recognized

Failed cleaning build dir for glove-python
Failed to build glove-python
Installing collected packages: glove-python
Running setup.py install for glove-python ... error
Complete output from command /home/rjhubba2/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-v8bbfpp6/glove-python/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-1ktnwkqo/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
running build_ext
building 'glove.glove_cython' extension
gcc -pthread -B /home/rjhubba2/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/rjhubba2/anaconda3/include/python3.7m -c glove/glove_cython.c -o build/temp.linux-x86_64-3.7/glove/glove_cython.o -fopenmp -ffast-math -march=native
glove/glove_cython.c: In function ‘__Pyx_ExceptionSave’:
glove/glove_cython.c:16753:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
*type = tstate->exc_type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16754:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
*value = tstate->exc_value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16755:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
*tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
glove/glove_cython.c: In function ‘__Pyx_ExceptionReset’:
glove/glove_cython.c:16767:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16768:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16769:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
glove/glove_cython.c:16770:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16771:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16772:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = tb;
^~~~~~~~~~~~~
curexc_traceback
glove/glove_cython.c: In function ‘__Pyx_GetException’:
glove/glove_cython.c:16815:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16816:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16817:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
glove/glove_cython.c:16818:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = local_type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16819:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = local_value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16820:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = local_tb;
^~~~~~~~~~~~~
curexc_traceback
glove/glove_cython.c: In function ‘__Pyx_ExceptionSwap’:
glove/glove_cython.c:16842:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16843:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16844:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
glove/glove_cython.c:16845:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = *type;
^~~~~~~~
curexc_type
glove/glove_cython.c:16846:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = *value;
^~~~~~~~~
curexc_value
glove/glove_cython.c:16847:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = *tb;
^~~~~~~~~~~~~
curexc_traceback
error: command 'gcc' failed with exit status 1

As far as I can tell from people posting about this error, this is because these files are generated by an older version of Cython that is not compatible with Python 3.7. If you upgrade Cython to the version that supports Python 3.7 and regenerate files, supposedly this will work.

Hello,
I got the exact same error when trying to install this repo with python3.7
I went through this by recompiling all .pyx files of the project, with cython>=0.29.X installed.
cython glove_cython.pyx
cythonize glove_cython.pyx

cython metrics/accuracy_cython.pyx
cythonize metrics/accuracy_cython.pyx

cython corpus_cython.pyx
cythonize corpus_cython.pyx

When it comes to "corpus_cython.pyx" you must get some synthax error on c++. I did not know how to fix them, so I just removed the lines concerned. Then it worked.
However, you may not be able to use corpus... It would be good to fix these errors and propose a solution.

Hi,
Might be a bit too late for you, but I found the solution to this problem with c++ errors.
Do what @ftorregrossa said, but when it comes to cython corpus_cython.pyx, run cython --cplus corpus_cython.pyx instead.
After that, cd .. then python setup.py cythonize, as written under Development in README.
Then, just running make should work.

@maciejkula can you please fix this and update the package on pypi? The whole world is depending on this.

Here is a fork with this updated to work in python 3.8. It took me a lot to get it working, hope it helps someone out there: https://github.com/7Puentes/glove-python (it also includes minor changes, but shouldn't break anything)


Allow Canary to fail the build

Right now, canary integration test failures are ignored.
This was on-purpose initially, as I was expecting canary to be very unstable.
Although, the effect of continue-on-error is that these tasks are reported as green, and failures do go unnoticed.
This PR just remove that, making sure that we are appropriately noticing canary test failures.
If it turns out that canary is just failing too much, well, maybe we fix the issues - or we revert this change.
cc @AkihiroSuda if we can get that soon, that would be lovely!

cc @fahedouch :)

I'm not sure we want to run this for every PR, it seems unstable and it may break CI PRs that target the stable version of deps. We may have independent workers who manage this periodically.

I'm not sure we want to run this for every PR, it seems unstable and it may break CI PRs that target the stable version of deps. We may have independent workers who manage this periodically.

We can of course revisit this if it is a PITA.
Honestly, right now, I am more annoyed by flaky tests on the regular CI (TestIPFSComposeX being the worst offender).
A couple of additional notes:

this does not target unstable versions of dependencies - it only target the latest release of dependencies (including pre-releases, that is true)
though the idea of having a system that is independent of PRs is attractive, experience of this unfortunately showed that people tend to ignore these

Anyhow, let see how this goes?


ModalService.closeModals() - Dont close other modals

In my situation I use ModalService.closeModals to close all modals but when I open a new modal the other modal just pop up too

See this comment: https://github.com/dwmkerr/angular-modal-service/issues/225#issuecomment-345504720

Hi there whitefox920 I already solved the my problem.
what fix my problem is just seperating controllers for modal to disable other modal on main controller on poping up specially when reinitializing controllers. Thanks