[massCode] Ability to create new snippet from clipboard or selection with a shortcut key

Extension – massCode
Author:
ability to save a selection / clipboard into a new snippet form on masscode from using a shortcut on raycast.
Describe the feature and the current behavior/state.
Right now, all you can do is search your snippets on masscode, but you cannot create any from raycast.
Who will benefit with this feature?
It will convenient for those who already use masscode, to be able save their snippets on masscode from raycast and have more portability with  their snippets, rather then relying on raycast to store code, since its only for mac.
Any Other info.
Ability to see code syntax highlighting from the ray-cast preview will be highly appreciated.

CC: @antonreshetov

Are you still around @antonreshetov

is there an api on the masscode to create snippets?

@antonreshetov are you around?


made some custom transport implementation possible

Hey,
im using your library at work and i needed to make it linux compatible. I made some very minor changes that allowed me to make my own RpcConnectedClientTransport implementation. The changes made it possible to use the SMBLibrary as my transport method instead of the pinvoke/windows-dependant one. If you don't mind, it would be nice to have those changes in the main repo so:

others may benefit from making their own transport implementation
i don't have to maintain my own fork :p

Have a nice day :)
Also thanks so much for creating this awesome project!

normally id publish the whole "linux implementation" but i only did the bare minimum as quickly as possible. Basically i just replaced the entire connect and bind part of this library with using SMBLibrary to connect and bind to a namedpipe. Then just used the pipes read and writefile functions for readfragment and writefragment. Thats i, but it works surprisingly well!


Exception

Hi,
I tried to deserialize the following string wiith zcl_mdp_json_deserializer, but it failed, could you please check: (it was valid on https://jsonlint.com/):
{"tileConfiguration":"{"display_icon_url":"sap-icon://home-share","display_number_unit":"","service_url":"/sap/opu/odata/sap/ZPA_STATUTORY_SRV/TripDetailsSet/$count?$filter=TravelType eq '9'","service_refresh_interval":0,"navigation_use_semantic_object":true,"navigation_target_url":"#Employee-ManageMyStatutoryTravel","navigation_semantic_object":"Employee","navigation_semantic_action":"ManageMyStatutoryTravel","navigation_semantic_parameters":"","display_search_keywords":"ESS statutory travel"}"}
Thank you
Attila

Hi Attila,
I hope you are fine :)
It seems these quotes are extra, can you check it is copied correctly?
{"tileConfiguration":
" <---------------
{"display_icon_url":"sap-icon://home-share",
"display_number_unit":"",
"service_url":"/sap/opu/odata/sap/ZPA_STATUTORY_SRV/TripDetailsSet/$count?$filter=TravelType eq '9'",
"service_refresh_interval":0,
"navigation_use_semantic_object":true,
"navigation_target_url":"#Employee-ManageMyStatutoryTravel",
"navigation_semantic_object":"Employee",
"navigation_semantic_action":"ManageMyStatutoryTravel",
"navigation_semantic_parameters":"",
"display_search_keywords":"ESS statutory travel"}
" <---------------
}
regards,
Fatih

Thank You Faith,
it seemed a temporary issue which I could not reproduce a week after, when I come back to this code.
I close the Issue, and thank You very much again for Your Great Solution!


Plugins and themes for<EMAIL_ADDRESS>

I'm thinking about to add plugins and themes system for Mobi.css.
But the idea is not very mature, so<EMAIL_ADDRESS>will only include the basic styles. For now I think it's better if we can think over how we can implement plugins and themes. Maybe it's helpful to<EMAIL_ADDRESS>Here is something I've thought:
Why plugins
There are too many components a css framework could have. Mobi.css only focus on mobile, but it's still a lot of components we may need. It's redundant if every developers need to develop their own components. So maybe a plugins system is useful.
What should be includes in a plugin

css files that people can directly use, like dist/mobi-plugin-toast.min.css
scss files that people can import it to build their own css files. like src/mobi-plugin-toast.scss
(optional) js files that people can directly use, like dist/mobi-plugin-toast.min.js
(optional) js files that people can require it to build their own bundled js file. like src/mobi-plugin-toast.js

Some points

js is optional, components can only have css files.
js should be separated from Mobi.css, it should work fine even if people don't use Mobi.css. It's a independent component.

Why themes
Mobi.css is easily to customize, we can provide a standard way to help people create their own themes, and share it to the community.
A question, how theme works together with plugins?

这个想法不错。
我有一些建议：
mobi.css这个仓库关注mobi.css本身就够了，尽可能不要在这个仓库添加插件和主题了。我的想法是可以新建一个组织，例如mobi-components什么的？专门编写mobi.css的插件和主题。
另外，引入插件和主题，这是要向Bootstrap看齐吗？

I would agree to you that Mobi.css will focus on itself. Themes and plugins will be third-party libraries.
But I don't agree to create a new organization to maintain them. Themes and plugins shouldn't have to be centralized, or it's to complex for people who want to create a theme or plugin - they need to apply to join the organization first.
My idea is to create a list to show themes and plugins on the official site, like what hexo did: https://hexo.io/plugins/
Plus, it's better to write English when we discuss new features. I want Mobi.css to be more globalized.
Thanks!

Great idea !!  will be better than Bootstrap ~
waiting for update .

After some investigating, I think maybe it's time to use css variables in<EMAIL_ADDRESS>First of all, css variables is the future of css. It's already drafted three years ago, and most of modern browsers supports it. There is a demo here.
Secondly, for me, the most useful feature of SASS is variables. Css variables not only extends the all function of SASS variables, but also has some exciting features. Such as scoping, calculating and re-rendering in time.
Last, using css variables can bring us a comfortable way to customizing themes, just need to override some variables. No more compiling!

The design for theme system is ready.
However, I didn't came up with a good idea for plugin system.
Maybe we can add only theme system for 2.0.0 ?

Update to v3.0.0，plugins and themes are stable features now!


Issue: 74 - Upgraded to ASP.NET Core 2.2.0

This PR is my attempt to migrate dotnetfoundation-website to ASP.NET Core 2.2.0.
I have not migrated to ASP.NET Core 3.0 yet because as per documentation ASP.NET Core 3.0 still does not support Azure App Service.
Assuming that the website is possibly hosted over Azure App Services, I did not attempt to migrate to the latest ASP.NET Core version.

We can deploy to Azure App Service using a self contained deployment, then flip to framework dependent deployment once supported (which should be any day now). Are you up for updating this to 3.0 and I'll handle the deployment issues?

Sure.. Let me give it a shot.. 👍

HI @jongalloway, an update. I have not forgotten about this.
I'm working on upgrading to .NET Core 3.0 as and when I find the time. There are a few issues that I have encountered but should be able to resolve.


Disable and enable

How can i disable and enable the control using multiselect. i have tried $('#id').prop('disabled', true) but not working

Added setIsEnabled method, which accepts boolean value, indicating whether this control is enabled or not. Refer to demo and readme for details.

I am getting this error in my rails .erb page.
If I change the extension to .html, then it works.
 Uncaught TypeError: document.multiselect is not a function

What am I doing wrong?


website: no benchamrks results

It seems that we are lacking some results on our webpage from recent runs.
It seems that at least in some cases the results are present on in latest_results in s3 (I checked GCBench).

Investigated for gc and update benchmarks.
As a result we have #283 #284 (credit to @isidentical)  #279

Not relevant after #296


Fix typos in span

Hi @andrewlock, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
TTYL, DNFBOT;

@andrewlock, thanks! Though I think these were fixed on prior PR (or changes I made manually)


MVP Matching Algorithm (individual reporting)

Drawing on this issue: https://github.com/enigmampc/SafeTrace/issues/17
The MVP matching algorithm is Rust code that runs inside the enclave, takes inputs of userID, infectionStatus, latitude, longitude, time, and duration.
The code compares latitude and longitude between submitted user data and all user data which has been submitted and has a positive test result to find matches within 4m and 24hours (subject to change).
For each match in time and proximity with an individual who has tested positive, the algorithm returns latitude, longitude,  date, and duration (duration from both submitting user and positive match users user "matched" with).
Other elements mentioned in https://github.com/enigmampc/SafeTrace/issues/17 are out of scope for the MVP

@lacabra when you have a moment can you make sure these requirements are in line with what you've been anticipating / add any additional detail that could be useful? This is for an MVP and does not have all features included that we've discussed previously.

Why return the lat,long of a match rather than just the existence?

@FishmanL that way the front end can query google to find a likely placename. The thinking was people can then know where they were exposed and assess the risk (i.e., oh, that was a grocery store vs. oh, that was a park). It does expose additional data.

@lacabra @ainsleys from the epidemiology feedback issue, we can potentially change the match criteria to 2 meters and location overlap of any period of time.
We can also leave this out of MVP scope. I detailed this further in issue #33

Amazing effort from @lacabra and we now have this working within the enclave. Documentation coming soon!
via @lacabra:

JSON_RPC server implements 4 endpoints documented here: https://github.com/enigmampc/SafeTrace/tree/master/api-server#api-endpoints
There is a permanently working version of the enclave available at https://safetrace.enigma.co (if you visit with the browser you’ll get a 405 error becuause it does not accept GET requests, only POST requests properly formatted as JSON RPC requests. For example try from command line:

curl -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "id":1, "method":"getEnclaveReport", "params": {}}' https://safetrace.enigma.co
and you will get the report in response

As per the above, Remote Attestation just works

Users can send encrypted data to the enclave, like so: https://github.com/enigmampc/SafeTrace/blob/master/client/data.js. Data gets received by the enclave, that decrypts it, seals it and stores it on disk

Users can query matches for userdata that has been submitted previously to the enclave: userID is sent encrypted to the enclave. Enclave unseals data, and performs a time+geolocation match between the user and other users that tested positive. The actual matching algorithm is here: https://github.com/enigmampc/SafeTrace/blob/7094bf340e53743950903a2febd8f3c780490296/enclave/safetrace/enclave/src/data.rs#L228

Time and distance resolution are hardcoded as constants, (Time=5min, Distance=10m) which we can change and recompile, or can be moved to parameters in the future (should be easy)

Results from the matching algo are encrypted back to the user.

Sample javascript client code is included for reference here: https://github.com/enigmampc/SafeTrace/blob/master/client/index.js It’s not packaged as a library yet (left as a ToDo, but frontend devs should be able to copy/paste and reuse)

All you need to make this initial-DP is to change line 252 of data.rs to subtract 2*abs(lap(0.87)), using (https://docs.rs/GSL/0.4.25/rgsl/randist/laplace/fn.laplace.html), it's a simple change that has real privacy benefits

Thanks @FishmanL. Can you please document the reasoning behind the 2 constants: 2 and 0.87?

Sure -- 0.87 is based on finding the 80% sensitivity of adding an additional random person with covid to the minimum across all people (assuming people are distributed uniformly with at least 10 people with covid  per 10000 meters and the max distance we care about is 100 meters, using the order statistics formulae for the uniform to get that 0.87), and the 2 is because, to avoid false negatives, i'm using the absolute value of the laplace instead of the laplace (I'm not sure you need it to actually be twice as far on the tail bounds, but this is overly conservative anyway, so)

(the relevant math is 2/(M+1)*(1-x/N)^(M+1) is the tail bound on x, where N is the max distance we care about and M is person density)

@FishmanL if you'd like to propose this code in Rust, pls open a PR and we can review. At this point we do not have the bandwidth to add DP to the MVP matching algorithm

Closing the issue as it's finisihed


Increasing memory use of Estimator with Dataset

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04
TensorFlow installed from (source or binary): Binary (pip install)
TensorFlow version (use command below): Tested on 1.8.0 and 1.10.0-dev20180620
Python version: 3.6
CUDA/cuDNN version: 9.0
GPU model and memory: GTX1050
Exact command to reproduce: See below for minimal test case

Describe the problem
I'm experiencing a memory leak that leaves some allocated memory behind after each Estimator training/evaluation run. I noticed this when my ML Engine jobs started failing after 1.5 hours of training with an OOM error on big CSV files, using the standard Dataset input pipeline with some preprocessing, batching, prefetching etc. The memory graph shows slow but steady increase of memory use until total RAM is filled. I observe the same behavior on my local machine.
I've distilled it down to a minimal test case with use of Estimator and Dataset input and tested on my local machine, where I also get slowly increasing memory use over time. It seems most pronounced when using a big shuffle buffer, but after all this time staring at it I'm not so sure of anything any more.
Test script (first pip install -U memory_usage):
import tempfile, time, argparse, os

# Install with pip install -U memory_usage
from memory_profiler import memory_usage
import tensorflow as tf
from tensorflow.python.client import device_lib

parser = argparse.ArgumentParser()
parser.add_argument('--apply-shuffle-repeat', action='store_true')
parser.add_argument('--shuffle', action='store_true')
parser.add_argument('--gpu', action='store_true')
args = parser.parse_args()

# Turn on/off gpu
if not args.gpu:
    print("Turning off GPU")
    os.environ["CUDA_VISIBLE_DEVICES"]=""

print(f"Tensorflow version: {tf.GIT_VERSION} {tf.VERSION}")

print(f"Devices: {device_lib.list_local_devices()}")

tmpdir = tempfile.mkdtemp()

_input = [1] * 5000000
_target = [1] * 5000000

def input_fn(batch_size=4096):
    data = tf.data.Dataset.from_tensor_slices(
        ({'input': _input}, _target))
    if args.shuffle:
        data = data.shuffle(1000000)
    elif args.apply_shuffle_repeat:
        data = data.apply(tf.contrib.data.shuffle_and_repeat(buffer_size=1000000, count=1))
    data = data.batch(batch_size)
    return data

estimator = tf.estimator.DNNRegressor(
    [64],
    [tf.feature_column.numeric_column(key='input')],
    model_dir=tmpdir)

train_spec = tf.estimator.TrainSpec(input_fn=input_fn)

eval_spec = tf.estimator.EvalSpec(input_fn=input_fn)

# Train and evaluate forever
tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)

Output of mprof run tf_estimator_memoryleak_minimal.py --apply-shuffle-repeat  (so it runs on CPU, for GPU use --gpu option) and plotting with mprof plot shows memory usage slowly but surely creeping upward:

I would expect memory usage after every train/evaluate loop to return to the initial level.
Am I using the Dataset in the wrong way? Should I convert to an Iterator first? Is slightly increasing memory use normal and should I restart my train script every once in a while?

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Bazel version

Interesting. This looks like memory increases as more of the dataset is read (in order to repeat the dataset has to hang onto all points), and then it levels off which presumably is when it is repeating. Based on my reading of .train_and_evaluate(), it doesn't seem to be equivalent to:
while True:
  my_estimator.train(...)
  my_estimator.evaluate(...)

One simple thing you can try is to put a print statement in the input_fn to see if it is called once or repeatedly. If it is just called once for training and once for eval, then this behavior makes sense. (I would expect a memory leak to be linearly increasing, not asymptotic.)

Thanks @The-Fonz for opening this issue.
I'm have similar observations with train_and_evaluate. It is mostly visible when using buffered Dataset operators like shuffle but it seems to level off after some steps:

(Each increase corresponds to a new training phase.)
After more investigation, this appears to be fixed by https://github.com/tensorflow/tensorflow/commit/3edb609926f2521c726737fc1efeae1572dc6581. However, I'm not sure about the availability of this change: GitHub says it's part of the 1.9.0rc2 tag but the commit is not on the r1.9 branch?
Anyway, I can confirm this is no more an issue in the current nightly package.

Thanks @guillaumekln for pointing that out, with the latest tf-nightly I can confirm that this problem is gone! I can happily train and evaluate forever now.
@robieta the input_fn was indeed called repeatedly for every train and evaluate cycle. With the new behavior, the input_fn is only called once for all train cycles, and repeatedly for the evaluate cycles.
Closing as this seems to be solved by 3edb609.

I'm seeing a similar issue, and it seems to be documented as expected behavior:
Note that in current implementation estimator.evaluate will be called multiple times. This means that evaluation graph (including eval_input_fn) will be re-created for each evaluate call. estimator.train will be called only once.
The question is whether the graph and eval_input_fn are release/de-allocated after each call
Ps: I'm happy to move this discussion to a different place it helps

Dear @The-Fonz ,
I got few questions need your help.
Do you mean that the problem could be solve by train_and_evaluate()? as you said, input_fn() will be called repeatedly while evaluate(), won't it be a leaking situation?
I meet the same issues by iterating train() and evaluate() separately, does anyone have idea how to solve the problem?
(train_and_evaluate() seems not work with horovod multi gpu training so I iterate train() and evaluate() instead)

Hi @chychen, has been some time since I worked on this but I recall that it was fixed and that you need to use train_and_evaluate() as it only runs input_fn() once, see comments above.


Promise-returning setState and forceUpdate

[Rendered]
This RFC specifies setState and forceUpdate to return a promise when no callback is provided.
class DataFetcher extends React.Component {
  state = {
    loading: false,
    error: null,
    data: null,
  };

  async componentDidMount() {
    await this.setState({ loading: true });
    try {
      let response = await fetch(this.props.url);
      let data = await response.json();
      await this.setState({ data, loading: false });
    } catch (error) {
      await this.setState({ error, loading: false });
    }
  };

  render() {
    return this.props.render(this.state);
  }
}

Note: This example doesn't rely so much on setState being applied before continuing. I can come up with a better example if people want it better demonstrated. I figured the data fetching example was easiest to understand.

This seems easy enough to provide in an external library, and therefore be entirely opt-in.
export const setStatePromise = (o, state) => new Promise(resolve => o.setState(state, resolve));

await setStatePromise(this, { loading: true })

// or if you want syntax similar to the RFC, but still opt-in for performance

this.setStateAsync = setStatePromise.bind(null, this) // in constructor

await this.setStateAsync({ loading: true })

We should be careful with naming conventions as well, now that this.deferSetState is coming down the pipeline as well... if someone wants to have deferSetStateAsync (or, for what it's worth, an AbstractDeferSetStateAsyncFactoryFactoryBean), that's a naming decision that shouldn't be made in the core library :)

I think that proposal will cause a perfomance problems.

One data point here. In our concurrent mode API where you want to do one setState first at a higher priority followed by a setState at lower priority we originally proposed something like deferring a callback (or just requestIdleCallback or setTimeout). However, that introduced an unfortunate async seam that could now introduce new imperative effects (like other setStates). That in turn causes the sequence to be scheduled in a non-predictable way.
The original example in the beginning of this RFC is actually a good example of this. The classic problem with code like this is that it's not resilient to new updates coming in - in the meantime. E.g. what if props updates? How do fetches that happen during update interleave with other updates happening during the async sequence?
For data fetching in general, we have the whole Suspense thing which can solve most of the canonical use cases for this. For the more general problem, I think we need something that defines a sequence up front instead of triggering imperative code along the way. That way if other imperative code adds a sequence, it will by default be added in full after the first sequence instead of some operations becoming interleaved. Then those can be combined to be executed in different priorities or collapse like our update queue generally works.
We've learned a lot since this RFC was originally posted. I'm now pretty skeptical that this exact pattern is the right way forward. It's (deceiving) simplicity is aspirational for any API to compete with though.

Can someone update about this RFC? This is a fairly easy and straight-forward suggestion, why is it still open?
It should have been merged already (or closed) ages ago, is there anything left to discuss here?
I am trying to figure out if this whole RFC mechanism is really working, or is it just a time waster for the community, because it looks like that not even a single RFC had been merged, that was not suggested by a member of the core team itself. All the community suggestions are just left stale.
Can someone from the React team confirm to us that this RFC process is still active and we are not wasting our time? (not this specific RFC, I am talking about the whole RFC process now).

This rfc predates hooks, and I don't really think it's worth improving the class api anymore, I'm gonna close it


Fix underline_meta not working in RichTextLabel

Solves #17682.

RTL getting some love, love it. thank you

Cherry-picked for 3.0.7.


Remove deprecated methods in jacoco module

@bmuschko I'm surprised there were no test or doc changes necessary, but I can't find anything. Merge it!


Website does not say what specs actually is

Sorry, but it is really terrible when that happens...

I intend to replace the website with just the book and add an overview there.


WIP: Regen

Apply https://github.com/gtk-rs/gir/pull/424, https://github.com/gtk-rs/gir/pull/426
and fix\ignore clippy warnings

Thanks!

This PR is postponed due planned fix ApplicationExt name conflict with gtk.


Sidenote overlap with fullwidth figures

Hi, thanks for your work on this,
Any easy way to move sidenotes up and down? I have a case where it overlaps with a fullwidth figure

Yes! Sorry, I didn't realize that was from a package. I found how to do it we can close that
Thanks for your work btw.

Ah, brilliant, glad to hear that. Just for our future selves, how did you solve it? :-)

https://eu.mirrors.cicku.me/ctan/macros/latex/contrib/snotez/snotez-manual.pdf has everything relevant.
For my case that was:
\sidenote[][-50mm]


Delete before "Re-create" or is this "Re-create" on top of the existing setup? Instructions unclear.

[This document explains that you need to re-create the existing configuration but it doesn't explain if that means you need to first delete the configuration and then create it again following the instructions. I'm hoping it means you just rerun the creation step over top of the existing setup but need clarification. ]

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

ID: ffe20a92-15f7-ef03-3038-e30ea0c97ad5
Version Independent ID: 854ae140-2107-5b1b-8289-710b2f7a7887
Content: Manage your subscription - Azure Databricks
Content Source: databricks/administration-guide/account-settings/account.md
Service: azure-databricks
GitHub Login: @mssaperla
Microsoft Alias: saperla

@chris2shehu Thanks for the feedback! We are currently investigating and will update you shortly.

Hi @mssaperla ,
Requesting to validate customer feedback and update the document accordingly as appropriate. Thankyou

Thanks for your dedication to our documentation. Unfortunately, we have been unable to review your issue and apologize for the delayed response. The requested updates have not yet been made. The timeline for resolution varies based on resourcing. We've created an internal work item (DOC-7153) to incorporate your suggestions. We are closing this issue for now, but feel free to comment here as necessary.
#please-close


Function of first_frame_tokens.detach() before decoder call

https://github.com/LatentActionPretraining/LAPA/blob/33a2db32957dd8ccbb709de82ad96fb04d7fa57c/laq/laq_model/latent_action_quantization.py#L268
It seems that you detach the first_frame_tokens before using at as conditioning feature in cross attention in decoder. Could you confirm if this is intentional? It seems to break the gradient flow back to token embedding layer while training.

Yes, we apply a stop gradient to the first frame patch embedding to avoid representation collapse. We will modify the Figure to avoid misunderstanding.


feat: construct library for ECS

Add an initial version of a construct library for AWS Elastic Container Service.
This construct library isn't fully feature-complete yet. This is the first iteration so
that people can use it for experimentation and put it to the test, and we can improve
on it later.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

Closing in favor of newer one


Getting chrome error on each tab loaded

I'm getting the "Aw, Snap! Something went wrong." chrome error each time the script opens a new tab. Doesn't give any more info than that.

I made a fix to the problem to this problem.
Due to renewal of the layout, structure and content-delivery throughout the netflix website, the entire frame seems to be hidden behind a cross-domain iframe (from http://*.nflxext.com/). This disallows one to use javascript to click on something within that iframe.
I made a workaround, which actually works with a single url (per rating) that contains some GET requests. I stumbled upon this when browsing the site and ratings wizard for a bit. The URL looks something like this:
http://www.netflix.com/SetRating?value=4&pval=4.0626845&widgetid=M70001989_XXXXXXXXXX&rtrnct=true&authURL=YYYYYYYYYYYYYYYYYYYYYYYYY&section=RECS
Where  XXXXXXX refers to the accountid (not profile id) , and YYYYYY is the authenticationURL to ensure that you are who you say you are. Luckily this authenticion url is persistent for quite some time. You get there by going to: http://www.netflix.com/RatingsWizard?skgr=false&wizst=2, and copying the link address from one of the rating stars from any of the presented films or series.
I created a second json file called 'account.json' containing the accountid and authURL (extracted from the URL above). The file is read by background.js, and upon running the extension, the complete URL is formed.
So above I added:
'''javascript
// Load account details
var authKey;//
var accountID;//
var xhr2 = new XMLHttpRequest();
xhr2.onreadystatechange = function() {
if (xhr2.readyState == 4) {
//alert(xhr.responseText);
resp = JSON.parse(xhr2.responseText);
console.log(resp);
response = resp.shift();
console.log(response);
accountID = response.accountid;
authKey = response.authkey;
console.log(authKey + ' '+ accountID);
//alert("ratings: "+ ratings);
}
}
xhr2.open("GET", chrome.extension.getURL('/account.json'), true);
xhr2.send();
'''
And I changed your rating function from:
'''javascript
// This is what does the work for a given movie
var tabIds = [];
function rate(movie) {
var starClass;
if (movie.rating == 0) {
starClass = "rvnorec";
} else {
starClass = "rv" + movie.rating;
}
console.log(movie.url + " " + starClass);
chrome.tabs.create({"url": movie.url, "active": false}, function(tab) {
console.log("Opened " + tab.id);
tabIds.push(tab.id);
if (tabIds.length > 10) {
var tabId = tabIds.shift();
console.log("Removing " + tabId);
chrome.tabs.remove(tabId);
}
chrome.tabs.executeScript(tab.id, {"code": "var star = document.getElementsByClassName('" + starClass + "')[0]; star.click();"});
});
}
'''
to the following:
'''javascript
// This is what does the work for a given movie
var tabIds = [];
function rate(movie) {
//Create url
url = "http://www.netflix.com/SetRating?value="+movie.rating+"&widgetid=M"+movie.id+"_"+accountID+"&rtrnct=true&authURL="+authKey;
chrome.tabs.create({"url": url, "active": false}, function(tab) {
	console.log("Opened " + tab.id+ "| "+ url);
	tabIds.push(tab.id);
	if (tabIds.length > 10) {
		var tabId = tabIds.shift();
		console.log("Removing " + tabId);
		chrome.tabs.remove(tabId);
	}
});

}
'''
I know it's not the ideal solution (since one has to find his/her account id and the authentication url), but it does work very smoothly. Please consider it

Julius, can you put this into a Pull Request? Chrome isn't my primary browser anymore but I can try taking a look.

For me it's the same. I use firefox now, but since I'm not that well  known
in the scripting en webworld I'd just used your script as a good basis.
I put in the request!
On 30 September 2015 at 18:32, Nicolas Ward<EMAIL_ADDRESS>wrote:

Julius, can you put this into a Pull Request? Chrome isn't my primary
browser anymore but I can try taking a look.
—
Reply to this email directly or view it on GitHub
https://github.com/UltraNurd/netflix-rater/issues/2#issuecomment-144468717
.


Commands prefixed with '#' aren't saved to history

In bash (and zsh etc), when you prefix a command with the '#' character and hit return it gets saved to your history but does NOT get executed.
This is really useful if you're in the middle of building a long command and forget you need to run another command first, just preix the command with '#', hit return, run the other command, then pull the prefixed command from your history and continue....
Would be great if Atuin could lsupport this :)

This is also discussed in #467, so it seems like other people had or are having the same issue.

Dupe of #467, as @arcuru said 😁


No instructions to tear down DynamoDB (during cleanup)

At the end of the workshop when we tear down the stack there are no instructions to delete DynamoDB. Folks using dev environments could potentially incur costs as a result. Might be a good idea to remind folks to wipe DynamoDB after they do cdk destroy.

Duplicate of #126. Thanks for bringing our attention back to this issue.


How to access parent object within inline nested blocks?

I have the following models:
class Song
  belongs_to :author
end

class Author
end

and the following representer:
module Song
  include Roar::JSON

  nested :relationships do
    property :author do
      nested :links do
        property :related, getter: ->(_) { #calling id here will refer to author.id }
      end
    end
  end
end

I would like to build the related link by including the song id. How can I access the song id within the author getter?
In the end I want to build the following url: /songs/:song_id/author

You can either pass the song into the render call as documented here: https://github.com/apotonick/representable/#passing-options
Or you have to make your author object know about the song relationship, maybe by introducing an intermediate decorator. Remember, Representable is a document-mapper and not an ORM, it doesn't know about your domain and object graphs.
I will talk about that in my new book OOP For Real, but basically, the domain you want has the following API:
song.id #=> 1
song.author #=> <Author>
song.author.song #=> <Song>

You understand where this is heading? It's your job to provide the correct object graph to Representable, not vice-versa. :wink: Anyway, I would suggest you use my first point with the options?

Hmm but an Author could have many songs. There is no one-to-one mapping here. Also I find it super strange to have to pass the song instance as an option since this is the primary object i'm decorating.
song = Song.first
song.to_json(song: song)

Really look weird and from an outsider, unnecessary.

Well, again, Representable is a document-mapper. The way you model your domain (which in this case is a song object with one author) is "your problem", Representable has no way of knowing what exactly you want to do with the represented object. Also, this might look like something trivial to you, but imagine this was a 5-level deep nested structure, now what is the "top-level" object, etc.?
I could think of an extension to Representable::Decorator (that would only work with decorator classes).
class SongDecorator < Representable::Decorator
  include Representable::JSON
  include Representable::Parent

  nested :relationships do
    property :author do
      nested :links do
        property :related, getter: ->(*) { parent.represented.id }
      end
    end
  end
end

SongDecorator.new(song).to_json

As you can see, we could pass the parent object to the child decorator instances, that way, you could access parent (which is a decorator that responds to #represented which in turn is the decorated object.

Thanks for the explanation. I wonder how we are going to deal with such feature on Roar. This is a format used in JSONAPI format.

Well, for a specific media type, this is a different thing, as you would simply mix in Roar::JSONAPI and this takes care of this internally, e.g. by passing around models to child decorators using the technique described earlier.
I thought you need a generic solution, but if you "only" want to render JSON-API, I wonder, have you seen Roar::JSONAPI? It's here: https://github.com/apotonick/roar/tree/jsonapi

Yes, I contributed to it ;) But it's currently not working for latest JSONAPI format (v1.0). Basically I'm trying to render JSONAPI valid json using roar and representable directly. If I can have something working, I could consider helping to finalize the JSONAPI branch on roar.
But now I hit this wall where I need to have this "parent" idea when declaring related links.

Ah, ok, haha! Can't you get further with the to_hash(parent: represented) trick? You could override to_hash and do that per default? I will soon get back to Roar, as I'm finishing chapter 10 of the Trailblazer book, and chapter 11 is Roar!!!!

BTW, "soon" as in next week or so, so we can work on JSONAPI together. You should join the https://gitter.im/trailblazer/chat to discuss details, it's so much better for communication! :beers:

Alright, I won't loose too much time on this then. I can wait for links representation. My goal was to have a JSONAPI format structure like, in place.
Thanks for looking at this. Let's continue talking over gitter :)


no bin directory

Hi,
I've a question, after I installed goenv for 1.14.1,
and I saw inside the GOPATH that managed by goenv.
There are directories like src and pkg,
but why bin directory doesn't created?
Thanks

All these dirs are lazily created.


svd_compressed() fails for complex input

What happened:
Complex singular values and vectors of svd_compressed() are different from standard np.linalg.svd.
What you expected to happen:
Complex singular values and vectors of svd_compressed() are similar (within some uncertainties) to standard np.linalg.svd.
Minimal Complete Verifiable Example:
import numpy as np
import xarray as xr
import dask.array as da
from matplotlib.pyplot import imshow

data = xr.tutorial.open_dataset(
    'air_temperature',
    chunks={'lat': 25, 'lon': 25, 'time': -1}
)
temp = data.air
temp = temp.stack(x=('lat', 'lon')).compute()
temp -= temp.mean('time')
# artificial complexification of data
temp = temp + (1j * 0.1 * temp**2)
kernel = np.dot(temp.conj().T, temp) / temp.shape[0]

# standard SVD
u, s, vt = np.linalg.svd(kernel, full_matrices=False)
# dask SVD
dask_kernel = da.from_array(kernel)
k = 100
dsvd = da.linalg.svd_compressed(dask_kernel, k)
u2, s2, vt2 = (x.compute() for x in dsvd)

np.allclose(s[:100], s2)  # False
np.allclose(vt[:100], vt2)  # False

# visual check: look at first singular vector
v = vt.reshape((temp.shape[1],) + data.air.shape[1:])
v2 = vt2.reshape((k,) + data.air.shape[1:])

# imaginary parts of first singular vector are clearly different
imshow(v[0,:,:].imag, vmin=-1e-3, vmax=1e-3)
imshow(-v2[0,:,:].imag, vmin=-1e-3, vmax=1e-3)

Anything else we need to know?:

For real input, both methods yield the same results.
When running svd_compressed() a warning is thrown complaining about complex being casted to real dtypes:

/home/nrieger/anaconda3/envs/xmca/lib/python3.7/site-packages/dask/array/utils.py:108: ComplexWarning: Casting complex values to real discards the imaginary part
  meta = meta.astype(dtype)

Environment:

Dask version: 2021.04.0
Python version: 3.7.10
Operating System: Ubuntu 20.04
Install method: conda

Ping @eric-czech and @RogerMoens since you have both looked at the svd implementation recently.

For real input, both methods yield the same results.

What makes you say that?  If I remove the line in your example that casts temp to imaginary, the allclose still fails and afiak singular vectors from np.lingalg.svd aren't directly comparable to those from da.lingalg.svd_compressed like that.
You could compare to da.linalg.svd instead, but even then the results will only be the same up to possible sign flips.  You would have to pass the numpy results through sign coercion as dask does by default now after https://github.com/dask/dask/pull/6613.

Hi thanks for getting back! You're completely correct with your points, I added svd_flip to guarantee consistent signs in the solution and, as you suggested,  compared da.linalg.svd_compressed to da.linalg.svd.
I'm aware that da.linalg.svd_compressed is an approximation and I'm not expecting it to yield the exact results as  da.linalg.svd. However, I would expect that they yield similar solutions (what would be the benefit of having such a method otherwise?). I rewrote the MWE a bit to make things clear.

Imports

import xarray as xr
import dask.array as da
from dask.array.utils import svd_flip

Make two functions for (i) getting the kernel (real and complex) and (ii) performing svd both in standard and compressed form. perform_svd only returns the first 5 singular values/vectors for both SVD algorithms.

Functions

def get_kernel():
    data = xr.tutorial.open_dataset(
        'air_temperature',
        chunks={'lat': 25, 'lon': 25, 'time': -1}
    )
    temp = data.air
    temp = temp.stack(x=('lat', 'lon')).compute()
    temp -= temp.mean('time')
    # artificial complexification of data
    temp = temp + (1j * 0.1 * temp**2)
    kernel = np.dot(temp.conj().T, temp) / temp.shape[0]
    dask_kernel = da.from_array(kernel)
    return dask_kernel

def perform_dask_svd(kernel):
    # Dask SVD
    dsvd1 = da.linalg.svd(kernel)
    u1, s1, vt1 = (x.compute() for x in dsvd1)
    u1, vt1 = svd_flip(u1, vt1)

    # Dask SVD Compressed
    k = 100
    dsvd2 = da.linalg.svd_compressed(kernel, k)
    u2, s2, vt2 = (x.compute() for x in dsvd2)
    u2, vt2 = svd_flip(u2, vt2)

    # compare only first n singular values/vectors
    n = 5
    result = {
        # standard SVD
        'std' : {'u': u1[:, :n], 's': s1[:n], 'vt': vt1[:n]},
        # compressed SVD
        'com' : {'u': u2[:, :n], 's': s2[:n], 'vt': vt2[:n]}
    }
    return result

Perform SVD

complex_kernel = get_kernel()
real_kernel = get_kernel().real

real = perform_dask_svd(real_kernel)
cplx = perform_dask_svd(complex_kernel)

real contains the solution for  da.linalg.svd_compressed and da.linalg.svd for real input, cplx contains the same but for complex input.

Check results

# REAL
# ----------------------
# Get an idea of the magnitude of the solution
print(np.max(real['std']['s']))  # 3.4e6
print(np.max(real['std']['vt']))  # around 0.1

np.allclose(real['std']['s'], real['com']['s'], rtol=1e-4)  # True
np.allclose(real['std']['vt'], real['com']['vt'], rtol=1e-4, atol=1e-4)  # True

# Maximal absolute deviation
print(np.max(real['std']['s'] - real['com']['s']))  # 0.25 for singular values; that's fine
print(np.max(real['std']['vt'] - real['com']['vt']))  # 2e-5 for singular vector; that's fine

# COMPLEX
# ----------------------
# Get an idea of the magnitude of the solution
print(np.max(cplx['std']['s']))  # 3.4e6
print(np.max(cplx['std']['vt'].real))  # around 0.1
print(np.max(cplx['std']['vt'].imag))  # around 0.1

np.allclose(cplx['std']['s'], cplx['com']['s'], rtol=1e-4)  # False
np.allclose(cplx['std']['vt'], cplx['com']['vt'], rtol=1e-4, atol=1e-4)  # False

# Maximal absolute deviation
print(np.max(cplx['std']['s'] - cplx['com']['s']))  # around 17, OK if compared to max absolute value of 3.4e6
print(np.max(cplx['std']['vt'].real - cplx['com']['vt'].real))  # 0.06  really bad if compared to max absolute value of 0.1
print(np.max(cplx['std']['vt'].imag - cplx['com']['vt'].imag))  # 0.16j even worse, that translates to a relative error > 100%!

From the comparison below it is evident, that while for real input the solutions are approximately the same, the difference are substantial when taking complex input.

@nicrie:  You have set not iterator for the randomized svd, this might improve the quality of the fit. Default is the power iterator, but the qr iterator is more precise depending on your singular value spectrum. Secondly, do to its sampling nature you should not compare the left and right singular vectors separately, but rather compare the whole reconstruction A_k w.r.t. the original A.

I tried to review the reconstruction and I got:
recon = (cplx['svd']['u']*cplx['svd']['s'])@cplx['svd']['vt'] recon_com = (cplx['com_svd']['u']*cplx['com_svd']['s'])@cplx['com_svd']['vt'] print(np.linalg.norm(recon.imag - recon_com.imag, 2)/np.linalg.norm(recon.imag,2)) # 1.4710661 print(np.linalg.norm(recon.real - recon_com.real, 2)/np.linalg.norm(recon.real,2)) # 0.022141397
which is relatively large: 147% and 2.2% relative difference. It seems that the real part is well reconstructed to some extent, but the complex part not.

However, I would expect that they yield similar solutions (what would be the benefit of having such a method otherwise?).

I was trying to understand that myself recently and came to the conclusion that I don't think this is true.  Afaik, SVD is not unique for non-square matrices so comparison of reconstruction quality is necessary instead of comparing singular vectors.

I believe the SVD is unique (up to signs) for non-square matrices, and complex matrices as long as no singular value pairs (two or more singular values with the same value exist). See Trefethen, L. N. & Bau III, D. Numerical linear algebra, vol. 50 (Siam, 1997).
I am not sure whether randomized methods provide unique solutions, as they severely depend on the sampling of the matrix. In my experience they are not unique.

Just checked, the TSQR gives same results for complex matrices as numpy QR. I am not sure whether the sampling for complex matrices should also be a complex matrix.

I have planned to check the tsqr including svd next week:
v, s, u = tsqr(a_compressed.T, compute_svd=True)

I think the sampling step is appropriate.
@nicrie: you could try to compare the outputs with sklearn randomized/compressed/truncated SVD: https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.TruncatedSVD.html
@eric-czech: how does the svd flip function handles complex inputs?

how does the svd flip function handles complex inputs?

It should be fine AFAIK since the operations in that function only operate on the real term, so this invariant should be true regardless of the input:
x = np.random.rand(1000, 100) + np.random.rand(1000, 100) * 1j
u, s, v = np.linalg.svd(x, full_matrices=False)
uf1, vf1 = svd_flip(u, vt)
uf2, vf2 = svd_flip(np.real(u), np.real(vt))
np.testing.assert_array_equal(np.real(uf1), uf2)
np.testing.assert_array_equal(np.real(vf1), vf2)

It will preserve the complex dtypes too since it's only using addition, multiplication and axis summation.

Small update: I just checked the tsqr with svd, I think there is a casting in there somewhere that is not appropriate:
import xarray as xr
import dask.array as da
from dask.array.utils import svd_flip
import numpy as np
import matplotlib.pyplot as plt

a = np.random.rand(500,100)+np.random.rand(500,100)*1j
a_da = da.asarray(a)
u_da, s_da, vt_da = da.linalg.tsqr(a_da, compute_svd=True)

gives me
dask\array\utils.py:108: ComplexWarning: Casting complex values to real discards the imaginary part
  meta = meta.astype(dtype)

The singular values (s_da) seem to be correct, but the u_da and vt_da are not.

Thanks for the updates @RogerMoens. I tried to compare with the truncated SVD of sklearn, but their implementation does not support complex data (perhaps for a reason?)
I tried to understand where the ComplexWarning is coming from, but I realize I don't understand the code sufficiently well.
Nevertheless, I narrowed down the thrown warning to final lines of code in TSQR, lines 502 - 517, where meta_from_array is called and causes the casting from complex to real. However, not sure if its really a problem since it affects only the meta information (?):
graph = HighLevelGraph(layers, dependencies)
u_meta = meta_from_array(data, len((m_u, n_u)), uu.dtype)
s_meta = meta_from_array(data, len((n_s,)), ss.dtype)
vh_meta = meta_from_array(data, len((d_vh, d_vh)), vvh.dtype)
u = Array(
    graph,
    name_u_st4,
    shape=(m_u, n_u),
    chunks=(data.chunks[0], (n_u,)),
    meta=u_meta,
)
s = Array(graph, name_s_st2, shape=(n_s,), chunks=((n_s,),), meta=s_meta)
vh = Array(
    graph, name_v_st2, shape=(d_vh, d_vh), chunks=((n,), (n,)), meta=vh_meta
)
return u, s, vh

If the error arises before you call .compute then the meta might be the issue, but I think what you are seeing is not an error, but incorrect results, so I think the meta is not the root of the issue.

The same issue. But on my case, I reconstructed the matrix using M'=UΣV^† . The real matrix input yields reasonable answer, and it fails for complex matrix input. Here is my code
import os
import sys
import time
import numpy as np
from opt_einsum import contract

from dask.distributed import Client
from dask_cuda import LocalCUDACluster
from dask_cuda.initialize import initialize
from dask.utils import parse_bytes
from dask.distributed import performance_report
from dask.distributed import wait
from dask.distributed import get_task_stream

import cupy
import rmm
import cudf
import dask.array as da

def setup_rmm_pool(client):
    client.run(
        cudf.set_allocator,
        pool=False,
        #initial_pool_size= parse_bytes("1GB"),
        allocator="default"
    )
    client.run(
        cupy.cuda.set_allocator,
        #rmm.rmm_cupy_allocator,
        rmm.mr.set_current_device_resource(rmm.mr.ManagedMemoryResource())
    )

if __name__ == "__main__":

    initialize(create_cuda_context=True)

    cluster = LocalCUDACluster(local_directory="./tmp/",
                                memory_limit=None)

    client = Client(cluster)
    setup_rmm_pool(client)

    nprs = np.random.RandomState(seed=1234)
    rs = da.random.RandomState(seed=1234,RandomState=cupy.random.RandomState)

    SIZE = 15000
    k = 32

    b = nprs.rand(SIZE) + 1j * nprs.rand(SIZE)
    b = da.from_array(b, chunks=(5000))
    b = b.map_blocks(cupy.asarray)
    #a = contract("i,j->ij",b,b) * 10
    a = da.einsum("i,j->ij",b,b) * 10
    #a = a.persist()

    a = da.exp(1.2*a)

    t0=time.time()
    u,s,vh=da.linalg.svd_compressed(a,k=k, seed=rs)
    u,s,vh=da.compute(u,s,vh)
    t1=time.time()
    u=da.from_array(u,chunks=(5000,k))
    vh=da.from_array(vh,chunks=(k,5000))

    #b = contract("ij,j,jk->ik",u,s,vh)
    b = da.einsum("ij,j,jk->ik",u,s,vh)
    a = a - b #<-a:M, b:M'
    tr = da.sum(da.diagonal(a)).compute()
    print("trace:{:}".format(tr))
    norm=da.linalg.norm(a).compute()
    print("norm:{:}".format(norm))

    sys.exit(0)

I calculated the trace and norm of M-M' (M:original matrix; M':M'~UΣV^†) which should be small. On the complex case, difference between M and M' is large.
trace:(768972.9893344672+7563949.776901031j)
norm:54801713.60352144

But on the real case, it yields a reasonable answer.
trace:-2.470109161656353e-08
norm:1.8832952585877038e-07

I think I have found the bugs in svd_compressed(). The svd calculation for complex matrix is $A=U\Sigma V^\dagger$, where $U$ and $V^\dagger$ are complex matrices. The " ${}^\dagger$ " means "Hermitian transpose", which on the case of real matrix reduces to a transpose matrix. While calculating complex matrix svd, we should use Hermitian transpose but not transpose matrix.
At the source code for dask.array.linalg, I found some bugs, and I will figure out the bugs by comments. First, at the "compression_matrix()" function,
    if iterator == "power":
        for i in range(n_power_iter):
            if compute:
                mat_h = mat_h.persist()
                wait(mat_h)
            tmp = data.T.dot(mat_h) #<-should be Hermitian transpose da.conj(data.T) on the complex case
            if compute:
                tmp = tmp.persist()
                wait(tmp)
            mat_h = data.dot(tmp)
        q, _ = tsqr(mat_h)
    else:
        q, _ = tsqr(mat_h)
        for i in range(n_power_iter):
            if compute:
                q = q.persist()
                wait(q)
            q, _ = tsqr(data.T.dot(q)) #<-should be Hermitian transpose da.conj(data.T) on the complex case
            if compute:
                q = q.persist()
                wait(q)
            q, _ = tsqr(data.dot(q))

    return q.T #<-should be Hermitian transpose da.conj(data.T) on the complex case

Then, at the "svd_compressed()" function,
    a_compressed = comp.dot(a)
    v, s, u = tsqr(a_compressed.T, compute_svd=True)
    u = comp.T.dot(u.T) #<-should be  da.conj(comp.T).dot(u.T) on the complex case
    v = v.T
    u = u[:, :k]
    s = s[:k]
    v = v[:k, :]
    if coerce_signs:
        u, v = svd_flip(u, v)
    return u, s, v

Here is my code of randomized svd by the use of power iteration

randomized_svd.py
def rsvd(A:da.Array, k:int, n_oversamples=10, n_power_iter=0, seed=da.random.RandomState(seed=1234,RandomState=np.random.RandomState)):
    """
    A: MxN dask array\\
    k:rank\\
    n_oversamples+k=l << min{M,N} must be satisfied\\
    seed:default is numpy.random.RandomState(seed=1234)
    """

    M, N = (da.shape(A)[0], da.shape(A)[1])

    l = k + n_oversamples
    Omega = seed.normal(size=(N, l))
    Q = __power_iteration__(A, Omega, n_power_iter)
    del Omega

    if A.dtype == "complex16" or A.dtype == "complex32" or A.dtype == "complex64" \
        or A.dtype == "complex128" or  A.dtype == "complex256" or A.dtype == "complex512":
        B = da.conj(da.transpose(Q)) @ A
    else:
        B = da.transpose(Q) @ A

    u_tilde, s, vh = da.linalg.svd(B)
    del B
    u = Q @ u_tilde
    del u_tilde

    return u[:,:k], s[:k], vh[:k,:]

def __power_iteration__(A, Omega, n_power_iter:int):

    Y = A @ Omega
    if A.dtype == "complex16" or A.dtype == "complex32" or A.dtype == "complex64" \
        or A.dtype == "complex128" or  A.dtype == "complex256" or A.dtype == "complex512":
        for q in range(n_power_iter):
            Y = A @ (da.conj(da.transpose(A)) @ Y)
    else:
        for q in range(n_power_iter):
            Y = A @ (da.transpose(A) @ Y)
    Q, _ = da.linalg.tsqr(Y)

    return Q

Here is the test code, which compares to the full svd "cupy.linalg.svd" and "dask.array.linalg.svd_compressed"

test.py
import sys
import time
import numpy as np
from opt_einsum import contract

from dask.distributed import Client
from dask_cuda import LocalCUDACluster
from dask_cuda.initialize import initialize
from dask.utils import parse_bytes
from dask.distributed import performance_report
from dask.distributed import wait
from dask.distributed import get_task_stream

import cupy
import rmm
import cudf
import dask.array as da

def setup_rmm_pool(client):
    client.run(
        cudf.set_allocator,
        pool=False,
        #initial_pool_size= parse_bytes("1GB"),
        allocator="default"
    )
    client.run(
        cupy.cuda.set_allocator,
        #rmm.rmm_cupy_allocator,
        rmm.mr.set_current_device_resource(rmm.mr.ManagedMemoryResource())
    )

if __name__ == "__main__":

    initialize(create_cuda_context=True)

    cluster = LocalCUDACluster(local_directory="./tmp/",
                                memory_limit=None)

    client = Client(cluster)
    setup_rmm_pool(client)

    nprs = np.random.RandomState(seed=1234)
    rs = da.random.RandomState(seed=1234,RandomState=cupy.random.RandomState)

    SIZE = 10000
    k = 32

    b = nprs.rand(SIZE) + 1j * nprs.rand(SIZE)
    b = cupy.asarray(b, dtype=cupy.complex128)
    a = contract("i,j->ij",b,b) * 10
    a = cupy.exp(1.2*a)

    #full svd
    t0 = time.time()
    u,s,vh = cupy.linalg.svd(a)
    t1=time.time()
    del u,vh
    print("full svd time: {:.2f} s".format(t1-t0))
    print(s[:k])

    a = da.from_array(a, chunks=(5000,5000))

    #rsvd
    from randomized_svd import rsvd
    t0 = time.time()
    u,s,vh = rsvd(a, k=k, seed=rs)
    u,s,vh = da.compute(u,s,vh)
    t1 = time.time()
    print("rsvd time: {:.2f} s".format(t1-t0))
    print(s)

    u  = da.from_array(u,chunks=(SIZE,k))
    vh = da.from_array(vh,chunks=(k,SIZE))
    b = da.einsum("ij,j,jk->ik",u,s,vh)
    err = a - b
    tr = da.trace(err).compute()
    print("trace:{:19.12e}{:+19.12e}".format(tr.real,tr.imag))
    materr = da.linalg.norm(err).compute()
    materr = float(materr / da.max(da.abs(a)))
    print("err:{:18.12e}".format(materr))

    #dask.array.linalg.svd_compress
    t0 = time.time()
    u,s,vh = da.linalg.svd_compressed(a, k=k, seed=rs)
    u,s,vh = da.compute(u,s,vh)
    t1 = time.time()
    print("da.linalg.svd_compress time: {:.2f} s".format(t1-t0))
    print(s)

    u  = da.from_array(u,chunks=(SIZE,k))
    vh = da.from_array(vh,chunks=(k,SIZE))
    b = da.einsum("ij,j,jk->ik",u,s,vh)
    err = a - b
    tr = da.trace(err).compute()
    print("trace:{:19.12e}{:+19.12e}".format(tr.real,tr.imag))
    materr = da.linalg.norm(err).compute()
    materr = float(materr / da.max(da.abs(a)))
    print("err:{:18.12e}".format(materr))

    sys.exit(0)

The results are:

full svd by using cupy.linalg.svd()
full svd time: 86.01 s
[2.58296767e+07 1.05558179e+07 3.38844060e+06 9.88898912e+05
 2.59627169e+05 6.74255883e+04 1.89209066e+04 5.94213692e+03
 2.20050461e+03 8.92638939e+02 3.50820653e+02 1.26915979e+02
 4.22639368e+01 1.30184354e+01 3.72038540e+00 9.90751139e-01
 2.47328075e-01 5.81214650e-02 1.29043303e-02 2.71591129e-03
 5.43455898e-04 1.03658501e-04 1.88871552e-05 3.29431051e-06
 5.51039526e-07 8.85671784e-08 1.37849358e-08 6.26629286e-09
 5.37837639e-09 5.31998482e-09 5.17301750e-09 5.07648171e-09]

ramdomized svd by using my function "rsvd()"
rsvd time: 4.72 s
[2.58296767e+07 1.05558179e+07 3.38844060e+06 9.88898912e+05
 2.59627169e+05 6.74255883e+04 1.89209066e+04 5.94213692e+03
 2.20050461e+03 8.92638939e+02 3.50820653e+02 1.26915979e+02
 4.22639368e+01 1.30184354e+01 3.72038540e+00 9.90751139e-01
 2.47328075e-01 5.81214650e-02 1.29043303e-02 2.71591127e-03
 5.43455901e-04 1.03658517e-04 1.88872026e-05 3.29426812e-06
 5.50886046e-07 8.78125741e-08 1.03905719e-08 2.97395585e-09
 2.87520604e-09 2.74762063e-09 2.67777793e-09 2.61763907e-09]
trace:-3.837440116878e-09-2.231108248151e-09
err:4.611527374705e-13

ramdomized svd by using dask.array.linalg.svd_compressed()
da.linalg.svd_compress time: 3.34 s
[1.22753454e+07 3.51378639e+06 1.41504285e+06 2.65017653e+05
 6.59603978e+04 2.11401367e+04 5.50606266e+03 1.51125671e+03
 6.00777209e+02 2.37258157e+02 7.97001757e+01 2.92310333e+01
 8.82265661e+00 2.17949256e+00 5.76741777e-01 1.48938971e-01
 3.01250371e-02 7.56122991e-03 1.67292376e-03 3.35416451e-04
 7.11668163e-05 1.36569683e-05 2.32605468e-06 3.61926695e-07
 5.14757978e-08 6.07435046e-09 2.95743600e-09 2.66944135e-09
 2.56615446e-09 2.42686096e-09 2.35138792e-09 2.28905663e-09]
trace: 1.585523226585e+06+4.090091981828e+06
err:2.223140103552e+02

I calculated the trace and error of matrix $M-M'$, in which $M$ is the original matrix, and
$$M_{ik} \simeq M^\prime_{ik}=\sum_{k=1}^{32} U_{ij} \sigma_{j} V^\dagger_{jk}.$$
The error is defined by $\text{err}=|M-M^\prime|/|M|$.
The results show that my code yields a reasonable answer because the trace and error are quite small, and the large singular values are the same as full svd.
By the way, the skinny matrix svd and tsqr seem to be currect because I used them in my code. But I'm not sure if there are the same bugs (at where should use Hermitian transpose, but have used tranpose matrix for complex matrix) in the code.

@LUOXIAO92 Thank you for the detailed explanation. By looking at the dask code, we are clearly missing the case for complex numbers. I'm not sure what's the best approach to include this case here, but would you be interested in opening a PR?
Maybe @ian-r-rose or @jakirkham might have some input here.

Perhaps I am wrong, but it seems to me that an easy fix such as replacing all expression in the form of A.T to A.conj().T should do the trick, no? conj creates the conjugates of a matrix which is the identity matrix for real matrices. Therefore, only complex matrices are affected by the change.
I'd still like to get this work so I will try to make a PR if that's really all what's needed.


Size Limit

More of a question, but is there a size limit?
While connected to xcode, my application works correctly and updates when I post a new manifest.  However, when I run it unconnected I always get error 18.  My applications is about 320MB at the moment.  I'm lost to why it won't run unconnected.

Hi,
There are no size limits. Error -18 occurs when plugin copying your bundled www files onto the external storage.  Especially, if most of it is your web files. And if you try to call plugin's API from the JS side - you will get this error, since it's not yet ready to work.
Why this happens only when you disconnected from the Xcode - that's a good question on which, I'm afraid, I don't have an answer to. If in Xcode you use emulator, then this copying large files on it is faster, then the same operation on the real device. If test this on the same actual device - then that's a mystery...
To speed things up you might need to split the app somehow. For example, store in www folder only html/css/js files with some images, but all the heavy stuff should be loaded by the app on the first launch from the Internet and cached on the sdcard. This way you will reduce the size of the app, and make it easier for the plugin to copy www content on the external storage. But, of course, this might not be an option in your case.

Yes, I planned to break it up as this app will become much larger with
videos.
I'm manually checking for updates when the app is loaded, perhaps I should
wait until the 'assets copied' event is fired.  Then again, that would only
work on the first load, correct?
I just became worried that when I push to iPad from XCode, wait 10 seconds,
refresh, it's loaded, finds the update and works correctly.  On the other
hand, if I push from XCode, pull the cord after it's loaded and running, it
doesn't matter how long I wait or how many times I close/start the app.
Just a constant -18 error.
Thanks for the help.
On Sat, Jan 9, 2016 at 11:53 AM, Nikolay Demyankov<EMAIL_ADDRESS>
wrote:

Hi,
There are no size limits. Error -18 occurs when plugin copying your
bundled www files onto the external storage.  Especially, if most of
it is your web files. And if you try to call plugin's API from the JS side

you will get this error, since it's not yet ready to work.

Why this happens only when you disconnected from the Xcode - that's a good
question on which, I'm afraid, I don't have an answer to. If in Xcode you
use emulator, then this copying large files on it is faster, then the same
operation on the real device. If test this on the same actual device - then
that's a mystery...
To speed things up you might need to split the app somehow. For example,
store in www folder only html/css/js files with some images, but all the
heavy stuff should be loaded by the app on the first launch from the
Internet and cached on the sdcard. This way you will reduce the size of the
app, and make it easier for the plugin to copy www content on the
external storage. But, of course, this might not be an option in your case.
—
Reply to this email directly or view it on GitHub
https://github.com/nordnet/cordova-hot-code-push/issues/82#issuecomment-170259405
.

I'm manually checking for updates when the app is loaded, perhaps I should
wait until the 'assets copied' event is fired.  Then again, that would only
work on the first load, correct?

Yes, that is correct.
I think your issue has something to do with the "pull the cord after it's loaded and running". On my experience, sometime if you run the app on the real device from the Xcode and then pull the cord - it can lead for the app to hang and die, or other unexpected behaviour. If it works fine after running from the Xcode - it should work the same way without it, because you run the same app on the same device. As an experiment, you can build your app for Ad-Hoc distribution and install on the device without Xcode. Or use TestFlight.

One last quick question.  Did you mean the 'asset copied' event only fires
on the first load?  Or will it fire every run after the first just as an
indication 'it's all there'?
If only on the first load, is there a better way to know when it's safe to
check for updates on app run?
Thanks again...
On Sat, Jan 9, 2016 at 1:15 PM, Nikolay Demyankov<EMAIL_ADDRESS>wrote:

I'm manually checking for updates when the app is loaded, perhaps I should
wait until the 'assets copied' event is fired. Then again, that would only
work on the first load, correct?
Yes, that is correct.
I think your issue has something to do with the "pull the cord after it's
loaded and running". On my experience, sometime if you run the app on the
real device from the Xcode and then pull the cord - it can lead for the app
to hang and die, or other unexpected behaviour. If it works fine after
running from the Xcode - it should work the same way without it, because
you run the same app on the same device. As an experiment, you can build
your app for Ad-Hoc distribution
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/TestingYouriOSApp/TestingYouriOSApp.html
and install on the device without Xcode. Or use TestFlight.
—
Reply to this email directly or view it on GitHub
https://github.com/nordnet/cordova-hot-code-push/issues/82#issuecomment-170266618
.

As stated in the documentation - eventually this error will go away: plugin will store the requests while asset's are copied, and then execute them automatically, instead of sending an error message. Right now I had to do it like so... In most cases people doesn't notice that, since copying is fast. Or they just don't use plugins API from JS, and let the plugin do everything on his own. But like in your case - that might take some time.
Assets are copied on the external storage in the following situations:

On the very-very first application launch, when there is no version of www folder on the external storage. Plugin uses it for the updates, so it should be there before any other work can be done. On the every next launch no assets copying is needed, so you wan't get this error.
When application is updated via App Store/Google Play. In that case, bundled www folder might contain some new Cordova files, so we need to reinstall it on the external storage.
When plugin detects, that current www folder on the external storage is corrupted. In that case, plugin reinstalls it from the assets. But this is something that should not happen. But can, if user will wipe out his sdcard.

So, I would say for now - if this error happens when you call plugin's API - just do nothing. On the next launch - it should be fine, if assets are installed on the external storage.

I'm still having the same issues.  I downloaded the latest release from this weekend.
When I run through Xcode - All is fine.
When I deploy to Ipad, First run is good and I also receive the 'assets installed' message.  On all subsequent runs after closing the app I get many errors like the one below.  Note the '//' between 'www' and 'src'.
file:///var/mobile/Containers/Data/Application/XXX/Library/Application%20Support/com.scyllagroup.development.mmtios/cordova-hot-code-push-plugin/2016.01.11-12.58.42/www//src/aurelia-task-queue.js
Failed to load resource.  The requested URL was not found on this server.

This is really weird. Works when device is attached, but not when it is unplugged. Will try to reproduce it, just need to fix my Xcode.
What version you are using? The one that was on the github, or did you install it from npm? If from npm - then during the weekend I didn't publish update in there, I did that today.

Using 1.2.2, installed from npm a couple hours ago.  I was watching the
other issue, thinking I was seeing the same thing...
On Mon, Jan 11, 2016 at 2:48 PM, Nikolay Demyankov<EMAIL_ADDRESS>
wrote:

This is really weird. Works when device is attached, but not when it is
unplugged. Will try to reproduce it, just need to fix my Xcode.
What version you are using? The one that was on the github, or did you
install it from npm? If from npm - then during the weekend I didn't publish
update in there, I did that today.
—
Reply to this email directly or view it on GitHub
https://github.com/nordnet/cordova-hot-code-push/issues/82#issuecomment-170668770
.

So, v1.2.2 didn't work for you?

No, but the error messages definitely changed since the last release.
On Mon, Jan 11, 2016 at 2:56 PM, Nikolay Demyankov<EMAIL_ADDRESS>
wrote:

So, v1.2.2 didn't work for you?
—
Reply to this email directly or view it on GitHub
https://github.com/nordnet/cordova-hot-code-push/issues/82#issuecomment-170671140
.

Okey, thanks. Will try to reproduce.

Anyway, tomorrow morning will release v1.2.3 with bugfix for https://github.com/nordnet/cordova-hot-code-push/issues/83 , but you can ignore it, since it doesn't fix your issue.

Hold off, sorry to send you off on a goose chase but it seems to be with the way I'm using system.js and jspm.  I have it working, but don't truly understand it yet.  I'll post the results when I understand more in case it hits anyone else down the road.

Great!


Why the result image is all black, when cfg-scale == 0 and temperature == 0 in Class-conditionalImageGeneration

Hi.
When I test Class-conditionalImageGeneration function in LlamaGen's GPT-L model.
When I use cfg-scale == 0 temperature == 0 in the model.

When I set cfg-scale 0, when temperature == 0

When I set cfg-scale 2,  when temperature == 0

When I set cfg-scale  3, when temperature == 0

When I set cfg-scale 4 when temperature == 0

When I set cfg-scale 10 when temperature == 0

So when cfg-scale to 10 could make 360 class otter(Also maybe sth wrong in #76 )
Also I find when I set cfg-scale 0, 2, 3, 4, 10 when temperature == 1

Question 1: Why the result image is all black, when cfg-scale == 0 and temperature == 0 in Class-conditionalImageGeneration? Could I understand that the model depend heavily on the temperature random? Is it only when setting temperature != 0 could working?(Maybe  > 1.0)
Also I notice your Experiments that model performance very bad when cfg-scale == 0. But I do not find temperature Experiments

It is my hyperparameter
python3 autoregressive/sample/sample_c2i.py \
  --vq-ckpt ./pretrained_models/vq_ds16_c2i.pt \
  --gpt-ckpt ./pretrained_models/c2i_L_384.pt \
  --gpt-model GPT-L \
  --image-size 384


Window decorations are not taken into consideration

Which leads to stuff like this:

(the empty space around the window should be filled)
What I found until now:

Ration uses wmctrl to position and resize windows, but it doesn't recognize decorations
wmiface apparently does (1 & 2), but not when I tried it
Some window managers (such as Pantheon) use Mutter (or Clutter?) but it's a C lib, which means we'll need to write a little C program before using it in Ration

(poke @joaquincasares)

Hey @Dinduks ,
Unfortunately I don't have the resources to test across multiple setups, but am highly open to pull requests. If you find out how to recognize decorations, please submit a pull request to the main project's master branch: https://github.com/onyxfish/ration.
For now the workaround would be to create a ~/.ration file and under the Config section set usable_screen_width and usable_screen_height.
I did notice your master branch is behind by a few commits, so you'll want to pull from the main repo in order to get this functionality.
Cheers,
Joaquin

Joaquin,
I would have submitted an issue to the project's official repo, but issues are disabled on it.
Theoretically, the workaround you suggest wouldn't work because each window has a different decoration (when it comes to size), and very often, there's no decoration at all. Please tell me if I'm wrong.
I use the project's official repo for my personal usage, this is a PR repo only. But thanks for noticing! :)

Ah, thanks for catching that. I don't have admin rights to make that change, but I agree with the setting so I'll leave as is.
True. Perhaps extending these two options to have a all sides padded may be your workaround: https://github.com/onyxfish/ration/blob/master/ration/ration.py#L29-L30? You'd probably want negative padding, but you may get bitten in cases with windows without decoration.
Sorry I can't be of further help.


improvement Make RewriteDateLiteralRule to be compatible with mysql

Proposed changes
Issue Number: close #7875
Problem Summary:
Make RewriteDateLiteralRule to be compatible with mysql
Checklist(Required)

Does it affect the original behavior: (Yes)
Has unit tests been added: (Yes)
Has document been added or modified: (No)
Does it need to update dependencies: (No)
Are there any changes that cannot be rolled back: (No)

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

cc @morningman @xinghuayu007


create a show instance for a move and a coordinate

A very simple solution for #7

Thanks for the help :) I left some comments

Yes, you are right.


Sidebar ads not detected when FB UI language is swedish

Looking at the code it seems like sidebar ad collecting was implemented but I do not see sidebar ads in the classifier when using Facebook in Swedish. Switching it to English and sidebar ads are detected/collected properly.

@Rukicc Ah, makes sense. Can you tell me what it says in Latvian in the same place where it says "Sponsored" in English, in this screenshot?

Hi,
If i select this String and  paste in notepad it look like: "Apma A ksāt A
a rek A lāma"
Corect String to find is "Apmaksāta reklāma"
Arnis
On Tue, Jun 26, 2018 at 5:29 PM, Jeremy B. Merrill<EMAIL_ADDRESS>
wrote:

@Rukicc https://github.com/Rukicc Ah, makes sense. Can you tell me what
it says in Latvian in the same place where it says "Sponsored" in English,
in this screenshot?
[image: screenshot 2018-06-26 10 28 46]
https://user-images.githubusercontent.com/548250/41919128-c25d0f1a-792b-11e8-86cf-3051f8578f23.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/propublica/facebook-political-ads/issues/36#issuecomment-400329755,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYOxGEgaQgreCRkSewXWz1B3fJ-YaxMeks5uAkVJgaJpZM4R5WXp
.

@Rukicc thank you!

I'm uploading the new version that supports "Apmaksāta reklāma" right now, it should be available within a few hours (and will be updated automatically).


Scaleway doesn't allow you to add more SSDs

I was about to set up persistent volumes for my cluster, but it looks like scaleway doesn't allow you to add more than 50GB storage to a single instance. If you try to start your instance with more than 50GB storage attached, you will get an error:
The total volume size of VC1S instances must be equal or below 50GB

I think it's worth mentioning in the README that PVs are not a possibility on scaleway (haven't tried digital ocean yet).

Please see this issue: https://github.com/scaleway/image-tools/issues/184
You can in fact attach further disks (more than 50GB in total), but it's
currently almost impossible to automate it using Terraform. I ended up
creating a 30GB Ubuntu image which can be used to attach another 20GB disk.
Unfortunately, images cannot be shared publicly and the process to create
one is just awful. Please consider adding a comment to the issue mentioned
above.
On 30 April 2017 at 19:07:58, NorbertK<EMAIL_ADDRESS>wrote:

I was about to set up persistent volumes for my cluster, but it looks like
scaleway doesn't allow you to add more than 50GB storage to a single
instance. If you try to start your instance with more than 50GB storage
attached, you will get an error:
The total volume size of VC1S instances must be equal or below 50GB
I think it's worth mentioning in the README that PVs are not a possibility
on scaleway (haven't tried digital ocean yet).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/hobby-kube/guide/issues/4, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAkoIZ68R6eY1GnhXnlTw-NqXz97N8zgks5r1L_ugaJpZM4NMoKA
.

Right, attaching the disks is fine, however, you cannot start the instance, if you have more than 50 GB attached, which is probably what terraform is also running into, see:
https://community.online.net/t/arm64-2gb-volume-limitation/4492

That's unfortunate, I didn't know such restrictions exist. This leaves us with the following options for now:

Create a smaller custom image to stay below the total limit. Impractical, but works
Create a virtual block device (example)
Use the more expensive VC1M (2x50GB or more)

Related: https://community.online.net/t/wrongful-volume-billing/4539

I will close this issue. Scaleway has been a pain to work with and support is basically nonexistent. I'm planning to give the crown to Hetzner Cloud soon. See #28


setOnItemClickListener missing?

Hi Chris,
Is there a way I can get the selected item in the list? I don't see setOnItemClickListener, and when I tried to add setOnClickListener to View in getView, xml styling for "pressed" doesn't work somehow.

Use getRefreshableView().setOnItemClickListener()


v0.0.2 Improved

Add support for custom title view
Fix proper behavior for left and right bar
button items.

First of all, thanks for awesome control. It's very helpful.
Could you merge it to master, add 0.0.2 tag and make pod trunk push for a new version, please?
I work on https://github.com/Pitometsu/CruiserWebViewController
and have add some general compatibility to your code.
Best regards.

Hi, thank you for taking time working this :+1:
I've run the example project. And it turns out the squeezed title label is a little bit higher than the original one.
I've pushed some fix to https://github.com/zetachang/IPSqueezableViewController/commit/690af53384f9d96533574bfef5a48dd93497dcf6. It will fix it, but I am not sure if it's still compatible with the addressField one you integrate with in your repo.
Hope you can check it out. If it works, we can merge this and release a new version. :wink:
Regards.

@zetachang It's ok with custom tittleView, thank you for fast feedback!

v0.0.2 has been published. Thank you again for your contributions!

Thank you for attention!


Bump Dependencies #10146793786

Bumps dependencies for product-is. Link : https://github.com/wso2/product-is/actions/runs/10146793786

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


[feat-3701][Framework]: Python framework support for plugins

⚠ Pre Checklist

Please complete ALL items in this checklist, and remove before submitting

[ ] I have read through the Contributing Documentation.
[ ] I have added relevant tests.
[ ] I have added relevant documentation.
[ ] I will add labels to the PR, such as pr-type/bug-fix, pr-type/feature-development, etc.

Summary

Does this close any open issues?
Closes #3701
Screenshots
Include any relevant screenshots here.
Other Information
Any other information that is important to this PR.

assign this to me


BoringSSL FIPS is out of date

Currently BoringSSL FIPS is using the version that was release at "2019-08-08" .
Therefore, some API are not available for example SSL_was_key_usage_invalid

I don't think it's that old. It looks to be 2021-04-29.

This is the last certification per https://boringssl.googlesource.com/boringssl/+/master/crypto/fipsmodule/FIPS.md. So I don't think we can update it to anything newer.

Ok, this date should be updated then.
Thanks good to know

@tyxia You're looking at an old commit.

oops , you are right. The latest one is [2021-04-29] (https://github.com/tyxia/envoy/blob/37f764e056505632ae12a22d215fa46305be4053/bazel/repository_locations.bzl#L133)

Note that that doesn't mean Envoy can't use new APIs at all. Of course, if Envoy wishes to support such-and-such old BoringSSL in some builds, those builds will be unable to use newer BoringSSL features. But Envoy builds targeting more recent BoringSSL versions can use new features perfectly fine. You just gate the code behind a preprocessor check like #if BORINGSSL_API_VERSION >= .... That's BoringSSL's standard strategy for dealing with version skew.
In particular, the API you mentioned was specifically added because someone on Google's Envoy team requested it to help manage a transition to enable this security check. Our expectation was that they would use it in Envoy quickly, using this standard version skew strategy, and not wait for Envoy's oldest supported version to move past it. I'm a little surprised to hear that's the impediment. Hopefully this comment clears up the conclusion and Envoy can now switch to using BoringSSL following our standard practices. Artificially waiting years before you can use new features does no one any good. :-)

@davidben Thanks for sharing the details and info!
I just want to clarify one thing in case there is any misunderstanding: This API is now being used but not in FIPS mode like below:
#ifndef BORINGSSL_FIPS
  // Increment the `was_key_usage_invalid_` stats to indicate the given cert would have triggered an
  // error but is allowed because the enforcement that rsa key usage and tls usage need to be
  // matched has been disabled.
  if (SSL_was_key_usage_invalid(ssl)) {
    stats_.was_key_usage_invalid_.inc();
  }
#endif

Regarding #if BORINGSSL_API_VERSION >= ... you mentioned, I think it won't be effective until version that Envoy is using is actually bumped? But it is the good generic approach to check in the code using API in the future

Ah okay. Yeah that works too. Using the number means it'll get picked up automatically as the BORINGSSL_FIPS build updates, and you can keep track of which ifdefs are old and can be retired.

We're already using the latest FIPS build as noted above; closing


can you cache mp3?

can you cache mp3?

Yes, I had success caching mp3s using this library

@gazedash , can you provide a sample of code? I'm wondering how my app will get the music cached and not on server?

Me too 💃


Istio 1.24 RC - Pilot References Still Present in injection-template.yaml

Is this the right place to submit this?

[X] This is not a security vulnerability or a crashing bug
[X] This is not a question about how to use Istio

Bug Description
While testing with Istio 1.24 RC 0, I noticed that there are still references to pilot in injection-template.yaml in the istiod helm chart.
Since the pilot section of values.yaml has been refactored (removed) for 1.24, we should remove these last few references. Should be .Values.cni instead of .Values.pilot.cni
i.e. https://github.com/istio/istio/blob/2def51733077f350382dcf8f68ae7d1a3d3c6f99/manifests/charts/istio-control/istio-discovery/files/injection-template.yaml#L48
Version
N/A

Additional Information
N/A

cc @bleggett

Yeah that's what https://github.com/istio/istio/pull/53611 is for.
cc @nshankar13 do you want to keep that PR open and fixup or do you want me to do it?

Will take another stab at this.


change:flexdatalist event not firing

$('input.flexdatalist').flexdatalist();

$('input.flexdatalist.fetchUnits').on( 'change:flexdatalist', function(event, set, options) {
    alert(set.value);
});

Neither does the alert show up, nor does the console mention any errors.
Everything else works fine.

Hi,
What kind of change is supposedly happening?
Thanks!
Sérgio

@sergiodlopes I am using a default input (no multiselect). It should fire whenever an option got selected and the change has been reflected in the value of the input.

@jonhue I tested on documentation page (v2.2.1, check browser console for trigger logs) and it seems to be working fine.
Are you using the latest version? If so, I must be missing something...

@sergiodlopes Oh, I found my mistake. Thanks for your help!

@sergiodlopes  One more question: I have updated to the master version, and flexdatalist is now removing the placeholder when initialized on an input (it did not previously). Is that intended?

@jonhue Not intended. It was missing from input's alias. v2.2.2 has a fix.
Sérgio


Update platform list and dependencies to fix converge

Description
Update platform list and dependencies to fix converge
Issues Resolved

Included CentOS-7.4 platform (not an issue)

OpenSuse 12.3 is discontinued
Repo paths have changed and it fails with
File '/repodata/repomd.xml' not found on medium 'http://download.opensuse.org/update/12.3-non-oss/'

[x] Removed OpenSuse 12.3 and replaced with OpenSuse 42.3

Old version of openldap cookbook was using pakcage name db-utils instead of correct db4-utils

[x] Updated metadata to depend upon openldap cookbook version 3.1 and changed include_recipe from openldap::server to openldap::default

Ubuntu 15.10 is not LTS
15.10 release update, backports, and security repositories are not available anymore, thus
build fails. Anyway, in my opinion, servers should deploy only LTS releases anyway

[x] Removed ubuntu-15.10 platform
[x] Added ubuntu-16.04 platform

Contribution Check List

[x] All tests pass.

@zuazo

Coverage remained the same at 99.834% when pulling 8c3186301f0427e5205d8202492602a9c466bf18 on ledgr:fix/converge into 387b31af7aff34c63d9983d2b24e95d61012fcb6 on zuazo:master.


ISPN-11893 Remove deprecated DistributionManager methods

https://issues.redhat.com/browse/ISPN-11893

Deprecate getReadConsistentHash and getWriteConsistentHash
Remove deprecated GroupManager methods
Remove deprecated ClusteringDependentLogic methods
Deprecate DataLocality (unused)

Thanks @danberindei


⚠ Bofrost.lu has degraded performance

In 9be0e1d, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 2252 ms

Resolved: Bofrost.lu performance has improved in 1e22431 after 22 minutes.


JSON logging [TW-150] [CSL-1199]

moved JSON logging from cardano-sl to time-warp-nt
added all JSON log events from the benchmark branch

Do we need it for cardano-sl-0.5?

Yes - that's why I went through a lot of trouble to shift it from master to cardano-sl-0.5-rc.

I've had a look at the CI failures, and they seem to be unrelated to the contents of the pull request:
We have
util-scripts/lint.sh: No such file or directory
and
[00:05:27] 'scripts\appveyor-retry' is not recognized as an internal or external command,
[00:05:27] operable program or batch file.

@domenkozar Do these error messages tell you anything?

@kantp i think the first error is related to script reorganisation we did several days ago:
https://github.com/input-output-hk/cardano-sl/pull/945
The new path for lint is scripts/haskell/lint.sh.

Ah, thanks @volhovM. In that case, merging cardano-sl-0.5-rc again should fix this.

Now you should merge 5b922a5069533d3f18cae85c4a3113020642adc4 to master.

@brunjlar @kantp or someone else. Please merge 5b922a5069533d3f18cae85c4a3113020642adc4 to master as soon as you find time for it. It's very important to not delay this merge.


Solcast 2 rooftop ids

I have 2 solcast rooftop ids, how can i pass that data?
I'm also using https://github.com/oziee/ha-solcast-solar, so I have solcast sensors in my HA, is it possible to pass that data?

Hi, you will need to fuze the sensor on a single one using templates. Then feed that single sensor data passing the data as a list when calling the shell command, just as described in the documentation here: https://emhass.readthedocs.io/en/latest/forecasts.html#passing-your-own-forecast-data

Hi, did you find a solution for this?

Now I use for my rest sensors
- platform: rest
  name: "Solcast Forecast huis"
  json_attributes:
    - forecasts
  resource: https://api.solcast.com.au/rooftop_sites/xxxxxxxxxxc/forecasts?format=json&api_key=xxxxxxxxx&hours=24
  method: GET
  value_template: "{{ (value_json.forecasts[0].pv_estimate)|round(2) }}"
  unit_of_measurement: "kW"
  device_class: power
  scan_interval: 86400
  force_update: true

- platform: rest
  name: "Solcast Forecast garage"
  json_attributes:
    - forecasts
  resource: https://api.solcast.com.au/rooftop_sites/xxxxxxxxxxc/forecasts?format=json&api_key=xxxxxxxxx&hours=24
  method: GET
  value_template: "{{ (value_json.forecasts[0].pv_estimate)|round(2) }}"
  unit_of_measurement: "kW"
  device_class: power
  scan_interval: 86400
  force_update: true

Then i use 2 templates
    solcast_24hrs_forecast_garage:
      value_template: >-
        {%- set awattar_all_list = state_attr('sensor.solcast_forecast_garage', 'forecasts') | map(attribute='pv_estimate') | list %}
        {%- set values_all = namespace(all=[]) %}
        {% for i in range(awattar_all_list | length) %}
          {%- set v = (awattar_all_list[i] | float |multiply(1000) ) | int(0) %}
          {%- set values_all.all = values_all.all + [ v ] %}
        {%- endfor %} {{ (values_all.all)[:48] }}

    solcast_24hrs_forecast_huis:
      value_template: >-
        {%- set awattar_all_list = state_attr('sensor.solcast_forecast_huis', 'forecasts') | map(attribute='pv_estimate') | list %}
        {%- set values_all = namespace(all=[]) %}
        {% for i in range(awattar_all_list | length) %}
          {%- set v = (awattar_all_list[i] | float |multiply(1000) ) | int(0) %}
          {%- set values_all.all = values_all.all + [ v ] %}
        {%- endfor %} {{ (values_all.all)[:48] }}

And another to combine those 2
    solcast_24hrs_forecast:
      value_template: >-
        {% set a = states("sensor.solcast_24hrs_forecast_garage")[1:-1].split(',') | map('int') | list %}
        {% set b = states("sensor.solcast_24hrs_forecast_huis")[1:-1].split(',') | map('int') | list %}
        {% set ns = namespace(items = []) %}
        {% for i in range(a | length) %}
          {% set ns.items = ns.items + [ a[i]  + b[i]  ] %}
        {% endfor %}
        {{ ns.items }}

I have 2 shell commands
publish_data: "curl -i -H 'Content-Type:application/json' -X POST -d '{}' http://localhost:5001/action/publish-data"
dayahead_optim: curl -i -H 'Content-Type:application/json' -X POST -d '{"pv_power_forecast":{{states('sensor.solcast_24hrs_forecast')}}}' http://localhost:5001/action/dayahead-optim

Then I use this automation
alias: EMHASS data
id: 684e7c96-7eb8-41fa-b81c-e3c97e234b56
trigger:
  - platform: time
    at: "05:30:00"
    id: "dayahead"
  - platform: time_pattern
    minutes: /5
action:
  - choose:
      - conditions:
          - condition: trigger
            id: "dayahead"
        sequence:
          - service: homeassistant.update_entity
            data: {}
            target:
              entity_id:
                - sensor.solcast_forecast_garage
                - sensor.solcast_forecast_huis
          - delay:
              minutes: 1
          - service: shell_command.dayahead_optim
    default:
      - service: shell_command.publish_data

Do I have to leave method: solcast in my configuration?

Great, thanks for sharing. Would you mind if I put some of this in the documentation? To help other people with the same use case?
No need to change the method, it will be automatically changed to list when passing a list at runtime

I have two arrays east and west facing and provide this solution like this:
- platform: rest
  name: "Solcast Forecast West"
  json_attributes:
    - forecasts
  resource: https://api.solcast.com.au/rooftop_sites/4db1-7ec8-f883-c123/forecasts?format=json&api_key=XXXX&hours=48
  method: GET
  value_template: "{{ (value_json.forecasts[0].pv_estimate)|round(2) }}"
  unit_of_measurement: "kW"
  device_class: power
  scan_interval: 06:00:00
  force_update: true

- platform: rest
  name: "Solcast Forecast East"
  json_attributes:
    - forecasts
  resource: https://api.solcast.com.au/rooftop_sites/60b4-41b9-80ca-06b0/forecasts?format=json&api_key=XXXX&hours=48
  method: GET
  value_template: "{{ (value_json.forecasts[0].pv_estimate)|round(2) }}"
  unit_of_measurement: "kW"
  device_class: power
  scan_interval: 06:00:00
  force_update: true

    - name: solcast 24hrs forecast
      state: >-
          {%- set solcast_west_list = state_attr('sensor.solcast_forecast_west', 'forecasts')|selectattr('period_end','gt',utcnow().isoformat())|map(attribute='pv_estimate')|list %}
          {%- set solcast_east_list = state_attr('sensor.solcast_forecast_east', 'forecasts')|selectattr('period_end','gt',utcnow().isoformat())|map(attribute='pv_estimate')|list %}

          {%- set values_all = namespace(all=[]) %}
          {% for i in range(solcast_west_list | length) %}
           {%- set v = ((solcast_west_list[i] + solcast_east_list[i]) | float |multiply(1000) ) | int(0) %}
            {%- set values_all.all = values_all.all + [ v ] %}
          {%- endfor %} {{ ([states('sensor.APF_Generation_Entity')|int(0)] + (values_all.all)[1:47]) }}

  post_mpc_optim: "curl -i -H \"Content-Type: application/json\" -X POST -d '{\"load_cost_forecast\":{{(
          ([states('sensor.amber_general_price')|float(0)] +
          state_attr('sensor.amber_general_forecast', 'forecasts') |map(attribute='per_kwh')|list)[:48])
          }}, \"prod_price_forecast\":{{(
          ([states('sensor.amber_feed_in_price')|float(0)] +
          state_attr('sensor.amber_feed_in_forecast', 'forecasts')|map(attribute='per_kwh')|list)[:48])
          }}, \"pv_power_forecast\":{{states('sensor.solcast_24hrs_forecast')
          }}, \"prediction_horizon\":{{min(48,
          (state_attr('sensor.amber_feed_in_forecast', 'forecasts')|map(attribute='per_kwh')|list|length)+1)
          }},\"alpha\":0, \"beta\":1, \"soc_init\":{{(states('sensor.powerwall_charge')|float(0))/100
          }}, \"soc_final\":0.05, \"def_total_hours\":[{{states('sensor.def_total_hours_pool_filter')
          }},{{states('sensor.def_total_hours_pool_heatpump')
          }},{{states('sensor.def_total_hours_ev')
          }},{{states('sensor.def_total_hours_hvac')
          }},{{states('sensor.def_total_hours_hws')
          }}]}' http://localhost:5000/action/naive-mpc-optim"

@davidusb-geek
You can use all my config

Thanks! I just added a complete new example to fusion two sensors to the documentation.


"Connection test passed" label is too bright

Bright green on white is not very readable. Probably needs to be dialed down to #008000 or something like that.

Need also test on dark theme


Clarify what are valid alert names.

Fixes #636
@beorn7
The current recording rule docs say "time series name" , and the docs already cover the syntax for those. That bit is all getting rewritten soon for 2.0 anyway.

:+1:

I've just written the docs for 2.0 and ensured this is covered for both.


fix: timer leak in backoff

change
Fix the timer leak problem caused in some cases.

I don't think there will be a leak per se, as the timer will be garbage collected once it fires, but explicitly stopping the timer should at least expedite the cleanup. Thanks.

https://github.com/golang/go/commit/508bb17edd04479622fad263cd702deac1c49157
rsc has fixed this problem.


Sticky top position

It would be great if you could allow the update/change of the margin top position. I have a sticky element that needs to stick to a header, but this header's height is smaller on mobile.
Thanks,
Tom

+1
And/or add an extra data-attribute for being an 'offset' element or an element that comes before the sticky element and its height has to be (observed and) used for the offset.


Add weighted operations run simulation

Close #797
add operations run simulation for

update admin
migrate contract
clear admin

add new test contract for simulation migrate contract

Let's remove some code to finish this: see https://github.com/CosmWasm/wasmd/pull/1071/commits/5697af634d560532388b08605d7f29ebc14314ed

Let's remove some code to finish this: see 5697af6

Got it :3 tysm!!!


Update scio-core, scio-test to 0.11.3

Updates

com.spotify:scio-core
com.spotify:scio-test

from 0.10.4 to 0.11.3.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.spotify" } ]

labels: library-update, early-semver-major, semver-spec-minor, commit-count:1

Superseded by #135.


2.0.0-alpha-7 Causes Breaking Changes

Commit 98ca4f5 causes breaking interoperability with Workbase. A number of dependencies are not listed as well (lz4, tbb, zstd) which causes issues with the debug flag.
The main page is still promoting distribution of 1.8.4 and I imagine the homebrew tap should be in-line with that.

I agree, 1.8.4 should be available.

@rickhousley thank you for reporting!

The main page is still promoting distribution of 1.8.4 and I imagine the homebrew tap should be in-line with that.

Happy to inform we've released production version of 2.0.0 and encourage all users to switch to it as it's the only one that is going to be supported going forward. Should you find any bugs with the newest release, feel free to open another issue.


can we send images in big picture style?

it is displaying images as icons in notifications, how can we send image as big picture style

This is definitely possible, but currently not supported by this plugin. I don't know when I'll have time to add more features like this. If a feature is missing in this plugin, I've been recommending people check out flutter_local_notifications as that seems to have more active development.

In that plugin also there is no code for displaying big picture style.


Fixes #4741, TPLink switch

TPLink switch detecting wrong version and get_emeter_daily() returning False leading to exception.

I recommend reverting https://github.com/home-assistant/home-assistant/pull/4670 for now.
It adds support for the HS200, but by doing that breaks alot of the pre-existing functionality.

Followed @mweinelt advice and reverted it .


adding formatPercentage utility function to simplify legacy i18n migration

this is a utility passthru function to simplify migration from legacy i18n solutions that simply calls back into formatNumber with {as: 'currency'} automatically added to the format options.
relates to #395

I forgot to ask, but can you update the README?

ah readme, i knew i was forgetting something 👍


arch: arm: tiva: License update licenses to Apache

Summary
Gregory Nutt has submitted the SGA and we can migrate the licenses to Apache.
Impact
NONE
Testing
NONE

@xiaoxiang781216 please merge after revew


with create-archive action

/packit copr-build

/packit copr-build

@dhodovsk do we still use this?

/packit build


Parser Registry Problem

Hello, I am looking at the code and it seems that a new Parser impl instance is created for each file in the datasource.
For 100K files repos this looks like a significant overhead. Disclaimer: I am not a Python dev, just a random observer :)
https://github.com/truefoundry/cognita/blob/01b22433b6a25973d8bf561a23c619c5f41770e7/backend/indexer/indexer.py#L234
and
https://github.com/truefoundry/cognita/blob/main/backend/modules/parsers/parser.py#L91
Shouldn't the parser instances be created per datasource and not cached globally?
WDYT?

Thanks for reporting this, you are correct
We should actually be caching instances for the entire duration of indexing


Update README.md

@tcoopman thanks for adding that :+1:, was thinking we could also point people towards the location of the vendored binaries e.g.
if you use a Windows, path="absolute/path/to/oni2/vendor/win/...etc"

Thanks @tcoopman ! I'll bring this in for now, and we can continue to revise. Tracking #40 to remove this requirement completely: https://github.com/onivim/oni2/issues/40

Sorry for the delay on this, @tcoopman ! I guess we won't need this now though with @Akin909 's fix for #40 (no need to set the environment variable now, with the esy bootstrap command).
Thank you for the contribution, though!