cannot import jupyter

Tried using VScode with jupyter notebook previously, and I recall there was an option to import the ipynb to avoid seeing all the css formating and just solely on the code.
After a few months of not using VScode, i tried importing ipynb again, and the import command no longer re-renders the notebook. after importing, it still looks the same, pre-import. not seeing any error message, please advise me if i have done anything wrongly.

@lxlguy can you give us some more information?

What command did you run (Import Notebook?)
Did it generate a python file?

Import doesn't generate the output, it just generates the code. If you want to see the output, you then click on 'Run Below' or one of the other commands to run the entire imported file.

Hi @rchiodo,
I launched VSCode from Anaconda Navigator. I tried to open a bunch of .ipynb files in VScode. Some of them, when i opened the file using "Open File", the files will open with a pop up asking if i want to import to Python. (Source: Python extension, with 3 options: import, later, don't ask again) For the other files, there was no prompting. In all cases, the files opened with all the CSS and code chunks together and it was visually confusing navigate. (importing seems to do nothing in either case)
My enabled extensions are:
Python (by microsoft)
Anaconda extension (by microsoft)
vscode-nbpreviewer (by jithurjacob)
YAML (Redhat)
I might be mistaken, but I thought previously (I think i tried VS Code on another machine a few months back), VS Code was capable of stripping out the non-code segments and leave only the code in the edit pane, and I could run individual cells (there was a button to run cells)
I would like to check if my experience so far is the intended behavior for VS Code with respect to Jupyter notebooks?

Importing should open a python file. You may have this issue here:
#3958
If you open a python file and add the following:
#%%
print('hello')

Does the Run Cell code lens appear above the #%%? If you run a cell do you get the cell output or perhaps an error message?

As far as viewing the .ipynb files, that's the default vscode behavior. Any file you open will have the raw text inside of it.

I'm also having issues in importing ipython notebooks into vscode! it just wont do it!
the jupyter notebook is installed and the interactive part in vscode works just fine, meaning I can easily do
#%% , and a jupyter cell pops up and I can easily code and run them.
However, I am not able to import any notebooks at all! upon trying to import one, I simply get something like this in a new windows :
#%% Change working directory from the workspace root to the ipynb file location. Turn this addition off with the DataScience.changeDirOnImportExport setting
# ms-python.python added
import os
try:
	os.chdir(os.path.join(os.getcwd(), '..\\..\deeplsv-mstr\initialization'))
	print(os.getcwd())
except:
	pass

running this cell doesnt do anything!
I have the latest version of vscode 1.34.0 and the python extension version is 2019.5.17517!
(I have anaconda3 installed and using Python 3.6.7 if thats needed)
What am I missing here?
Thanks in advance

@Coderx7 	do you have an example notebook that repros the problem?
That code above is supposed to set the current working directory to where the notebook is relative to your workspace. This is because by default the current directory for our interactive window is your root workspace folder.
However if you imported a notebook with cells in it, the other cells should appear below that line.
You can also disable that line with this setting here:

@rchiodo , Any notebook on my system has this issue.
You can test with these notebooks as I have issues with them as well( just tested one of them).
I have never been able to import any notebooks so far. I can use #%% to activate interactive ipython inside vscode and use it, but that's about it. because of this I'm currently using an extension to able to preview ipython notebooks inside vscode

Those notebooks work for me, so there must be something specific to your system.
Can you go to Help | Developer Tools, click on Console, right click and Save As, then upload the results here?
Under the covers we just run this command line:
python -m nbconvert --to python --stdout '<file'>

Can you also try that and see if you get any errors? (or any output)

Here you are :  the console log
I ran that command and everything went just fine. here is the output :
E:\DeepLearning\Pytorch_Udacity_Course\deep-learning-v2-pytorch-master\weight-initialization>python -m nbconvert --to python --stdout weight_initialization_exercise.ipynb
[NbConvertApp] Converting notebook weight_initialization_exercise.ipynb to python

# coding: utf-8

# # Weight Initialization
# In this lesson, you'll learn how to find good initial weights for a neural network. Weight initialization happens once, when a model is created and before it trains. Having good initial weights can place the neural network close to the optimal solution. This allows the neural network to come to the best solution quicker.
#
#
#
#
# ## Initial Weights and Observing Training Loss
#
# To see how different weights perform, we'll test on the same dataset and neural network. That way, we know that any changes in model behavior are due to the weights and not any changing data or model structure.
# > We'll instantiate at least two of the same models, with _different_ initial weights and see how the training loss decreases over time, such as in the example below.
#
#
#
# Sometimes the differences in training loss, over time, will be large and other times, certain weights offer only small improvements.
#
# ### Dataset and Model
#
# We'll train an MLP to classify images from the [Fashion-MNIST database](https://github.com/zalandoresearch/fashion-mnist) to demonstrate the effect of different initial weights. As a reminder, the FashionMNIST dataset contains images of clothing types; `classes = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat', 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']`.   Run the cell below to download and load the dataset.
#
# ---
# #### EXERCISE
#
# [Link to normalized distribution, exercise code](#normalex)
#
# ---

# ### Import Libraries and Load [Data](http://pytorch.org/docs/stable/torchvision/datasets.html)

# In[ ]:

import torch
import numpy as np
from torchvision import datasets
import torchvision.transforms as transforms
from torch.utils.data.sampler import SubsetRandomSampler

# number of subprocesses to use for data loading
num_workers = 0
# how many samples per batch to load
batch_size = 100
# percentage of training set to use as validation
valid_size = 0.2

# convert data to torch.FloatTensor
transform = transforms.ToTensor()

# choose the training and test datasets
train_data = datasets.FashionMNIST(root='data', train=True,
                                   download=True, transform=transform)
test_data = datasets.FashionMNIST(root='data', train=False,
                                  download=True, transform=transform)

# obtain training indices that will be used for validation
num_train = len(train_data)
indices = list(range(num_train))
np.random.shuffle(indices)
split = int(np.floor(valid_size * num_train))
train_idx, valid_idx = indices[split:], indices[:split]

# define samplers for obtaining training and validation batches
train_sampler = SubsetRandomSampler(train_idx)
valid_sampler = SubsetRandomSampler(valid_idx)

# prepare data loaders (combine dataset and sampler)
train_loader = torch.utils.data.DataLoader(train_data, batch_size=batch_size,
    sampler=train_sampler, num_workers=num_workers)
valid_loader = torch.utils.data.DataLoader(train_data, batch_size=batch_size,
    sampler=valid_sampler, num_workers=num_workers)
test_loader = torch.utils.data.DataLoader(test_data, batch_size=batch_size,
    num_workers=num_workers)

# specify the image classes
classes = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',
    'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']

# ### Visualize Some Training Data

# In[ ]:

import matplotlib.pyplot as plt
get_ipython().magic('matplotlib inline')

# obtain one batch of training images
dataiter = iter(train_loader)
images, labels = dataiter.next()
images = images.numpy()

# plot the images in the batch, along with the corresponding labels
fig = plt.figure(figsize=(25, 4))
for idx in np.arange(20):
    ax = fig.add_subplot(2, 20/2, idx+1, xticks=[], yticks=[])
    ax.imshow(np.squeeze(images[idx]), cmap='gray')
    ax.set_title(classes[labels[idx]])

# ## Define the Model Architecture
#
# We've defined the MLP that we'll use for classifying the dataset.
#
# ### Neural Network
#
#
#
# * A 3 layer MLP with hidden dimensions of 256 and 128.
#
# * This MLP accepts a flattened image (784-value long vector) as input and produces 10 class scores as output.
# ---
# We'll test the effect of different initial weights on this 3 layer neural network with ReLU activations and an Adam optimizer.
#
# The lessons you learn apply to other neural networks, including different activations and optimizers.

# ---
# ## Initialize Weights
# Let's start looking at some initial weights.
# ### All Zeros or Ones
# If you follow the principle of [Occam's razor](https://en.wikipedia.org/wiki/Occam's_razor), you might think setting all the weights to 0 or 1 would be the best solution.  This is not the case.
#
# With every weight the same, all the neurons at each layer are producing the same output.  This makes it hard to decide which weights to adjust.
#
# Let's compare the loss with all ones and all zero weights by defining two models with those constant weights.
#
# Below, we are using PyTorch's [nn.init](https://pytorch.org/docs/stable/nn.html#torch-nn-init) to initialize each Linear layer with a constant weight. The init library provides a number of weight initialization functions that give you the ability to initialize the weights of each layer according to layer type.
#
# In the case below, we look at every layer/module in our model. If it is a Linear layer (as all three layers are for this MLP), then we initialize those layer weights to be a `constant_weight` with bias=0 using the following code:
# >```
# if isinstance(m, nn.Linear):
#     nn.init.constant_(m.weight, constant_weight)
#     nn.init.constant_(m.bias, 0)
# ```
#
# The `constant_weight` is a value that you can pass in when you instantiate the model.

# In[ ]:

import torch.nn as nn
import torch.nn.functional as F

# define the NN architecture
class Net(nn.Module):
    def __init__(self, hidden_1=256, hidden_2=128, constant_weight=None):
        super(Net, self).__init__()
        # linear layer (784 -> hidden_1)
        self.fc1 = nn.Linear(28 * 28, hidden_1)
        # linear layer (hidden_1 -> hidden_2)
        self.fc2 = nn.Linear(hidden_1, hidden_2)
        # linear layer (hidden_2 -> 10)
        self.fc3 = nn.Linear(hidden_2, 10)
        # dropout layer (p=0.2)
        self.dropout = nn.Dropout(0.2)

        # initialize the weights to a specified, constant value
        if(constant_weight is not None):
            for m in self.modules():
                if isinstance(m, nn.Linear):
                    nn.init.constant_(m.weight, constant_weight)
                    nn.init.constant_(m.bias, 0)

    def forward(self, x):
        # flatten image input
        x = x.view(-1, 28 * 28)
        # add hidden layer, with relu activation function
        x = F.relu(self.fc1(x))
        # add dropout layer
        x = self.dropout(x)
        # add hidden layer, with relu activation function
        x = F.relu(self.fc2(x))
        # add dropout layer
        x = self.dropout(x)
        # add output layer
        x = self.fc3(x)
        return x

# ### Compare Model Behavior
#
# Below, we are using `helpers.compare_init_weights` to compare the training and validation loss for the two models we defined above, `model_0` and `model_1`.  This function takes in a list of models (each with different initial weights), the name of the plot to produce, and the training and validation dataset loaders. For each given model, it will plot the training loss for the first 100 batches and print out the validation accuracy after 2 training epochs. *Note: if you've used a small batch_size, you may want to increase the number of epochs here to better compare how models behave after seeing a few hundred images.*
#
# We plot the loss over the first 100 batches to better judge which model weights performed better at the start of training. **I recommend that you take a look at the code in `helpers.py` to look at the details behind how the models are trained, validated, and compared.**
#
# Run the cell below to see the difference between weights of all zeros against all ones.

# In[ ]:

# initialize two NN's with 0 and 1 constant weights
model_0 = Net(constant_weight=0)
model_1 = Net(constant_weight=1)

# In[ ]:

import helpers

# put them in list form to compare
model_list = [(model_0, 'All Zeros'),
              (model_1, 'All Ones')]

# plot the loss over the first 100 batches
helpers.compare_init_weights(model_list,
                             'All Zeros vs All Ones',
                             train_loader,
                             valid_loader)

# As you can see the accuracy is close to guessing for both zeros and ones, around 10%.
#
# The neural network is having a hard time determining which weights need to be changed, since the neurons have the same output for each layer.  To avoid neurons with the same output, let's use unique weights.  We can also randomly select these weights to avoid being stuck in a local minimum for each run.
#
# A good solution for getting these random weights is to sample from a uniform distribution.

# ### Uniform Distribution
# A [uniform distribution](https://en.wikipedia.org/wiki/Uniform_distribution) has the equal probability of picking any number from a set of numbers. We'll be picking from a continuous distribution, so the chance of picking the same number is low. We'll use NumPy's `np.random.uniform` function to pick random numbers from a uniform distribution.
#
# >#### [`np.random_uniform(low=0.0, high=1.0, size=None)`](https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.uniform.html)
# >Outputs random values from a uniform distribution.
#
# >The generated values follow a uniform distribution in the range [low, high). The lower bound minval is included in the range, while the upper bound maxval is excluded.
#
# >- **low:** The lower bound on the range of random values to generate. Defaults to 0.
# - **high:** The upper bound on the range of random values to generate. Defaults to 1.
# - **size:** An int or tuple of ints that specify the shape of the output array.
#
# We can visualize the uniform distribution by using a histogram. Let's map the values from `np.random_uniform(-3, 3, [1000])` to a histogram using the `helper.hist_dist` function. This will be `1000` random float values from `-3` to `3`, excluding the value `3`.

# In[ ]:

helpers.hist_dist('Random Uniform (low=-3, high=3)', np.random.uniform(-3, 3, [1000]))

# The histogram used 500 buckets for the 1000 values.  Since the chance for any single bucket is the same, there should be around 2 values for each bucket. That's exactly what we see with the histogram.  Some buckets have more and some have less, but they trend around 2.
#
# Now that you understand the uniform function, let's use PyTorch's `nn.init` to apply it to a model's initial weights.
#
# ### Uniform Initialization, Baseline
#
#
# Let's see how well the neural network trains using a uniform weight initialization, where `low=0.0` and `high=1.0`. Below, I'll show you another way (besides in the Net class code) to initialize the weights of a network. To define weights outside of the model definition, you can:
# >1. Define a function that assigns weights by the type of network layer, *then*
# 2. Apply those weights to an initialized model using `model.apply(fn)`, which applies a function to each model layer.
#
# This time, we'll use `weight.data.uniform_` to initialize the weights of our model, directly.

# In[ ]:

# takes in a module and applies the specified weight initialization
def weights_init_uniform(m):
    classname = m.__class__.__name__
    # for every Linear layer in a model..
    if classname.find('Linear') != -1:
        # apply a uniform distribution to the weights and a bias=0
        m.weight.data.uniform_(0.0, 1.0)
        m.bias.data.fill_(0)

# In[ ]:

# create a new model with these weights
model_uniform = Net()
model_uniform.apply(weights_init_uniform)

# In[ ]:

# evaluate behavior
helpers.compare_init_weights([(model_uniform, 'Uniform Weights')],
                             'Uniform Baseline',
                             train_loader,
                             valid_loader)

# ---
# The loss graph is showing the neural network is learning, which it didn't with all zeros or all ones. We're headed in the right direction!
#
# ## General rule for setting weights
# The general rule for setting the weights in a neural network is to set them to be close to zero without being too small.
# >Good practice is to start your weights in the range of $[-y, y]$ where $y=1/\sqrt{n}$
# ($n$ is the number of inputs to a given neuron).
#
# Let's see if this holds true; let's create a baseline to compare with and center our uniform range over zero by shifting it over by 0.5.  This will give us the range [-0.5, 0.5).

# In[ ]:

# takes in a module and applies the specified weight initialization
def weights_init_uniform_center(m):
    classname = m.__class__.__name__
    # for every Linear layer in a model..
    if classname.find('Linear') != -1:
        # apply a centered, uniform distribution to the weights
        m.weight.data.uniform_(-0.5, 0.5)
        m.bias.data.fill_(0)

# create a new model with these weights
model_centered = Net()
model_centered.apply(weights_init_uniform_center)

# Then let's create a distribution and model that uses the **general rule** for weight initialization; using the range $[-y, y]$, where $y=1/\sqrt{n}$ .
#
# And finally, we'll compare the two models.

# In[ ]:

# takes in a module and applies the specified weight initialization
def weights_init_uniform_rule(m):
    classname = m.__class__.__name__
    # for every Linear layer in a model..
    if classname.find('Linear') != -1:
        # get the number of the inputs
        n = m.in_features
        y = 1.0/np.sqrt(n)
        m.weight.data.uniform_(-y, y)
        m.bias.data.fill_(0)

# create a new model with these weights
model_rule = Net()
model_rule.apply(weights_init_uniform_rule)

# In[ ]:

# compare these two models
model_list = [(model_centered, 'Centered Weights [-0.5, 0.5)'),
              (model_rule, 'General Rule [-y, y)')]

# evaluate behavior
helpers.compare_init_weights(model_list,
                             '[-0.5, 0.5) vs [-y, y)',
                             train_loader,
                             valid_loader)

# This behavior is really promising! Not only is the loss decreasing, but it seems to do so very quickly for our uniform weights that follow the general rule; after only two epochs we get a fairly high validation accuracy and this should give you some intuition for why starting out with the right initial weights can really help your training process!
#
# ---
#
# Since the uniform distribution has the same chance to pick *any value* in a range, what if we used a distribution that had a higher chance of picking numbers closer to 0?  Let's look at the normal distribution.
#
# ### Normal Distribution
# Unlike the uniform distribution, the [normal distribution](https://en.wikipedia.org/wiki/Normal_distribution) has a higher likelihood of picking number close to it's mean. To visualize it, let's plot values from NumPy's `np.random.normal` function to a histogram.
#
# >[np.random.normal(loc=0.0, scale=1.0, size=None)](https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.normal.html)
#
# >Outputs random values from a normal distribution.
#
# >- **loc:** The mean of the normal distribution.
# - **scale:** The standard deviation of the normal distribution.
# - **shape:** The shape of the output array.

# In[ ]:

helpers.hist_dist('Random Normal (mean=0.0, stddev=1.0)', np.random.normal(size=[1000]))

# Let's compare the normal distribution against the previous, rule-based, uniform distribution.
#
#
# #### TODO: Define a weight initialization function that gets weights from a normal distribution
# > The normal distribution should have a mean of 0 and a standard deviation of $y=1/\sqrt{n}$

# In[ ]:

## complete this function
def weights_init_normal(m):
    '''Takes in a module and initializes all linear layers with weight
       values taken from a normal distribution.'''

    classname = m.__class__.__name__
    # for every Linear layer in a model
    # m.weight.data shoud be taken from a normal distribution
    # m.bias.data should be 0

# In[ ]:

## -- no need to change code below this line -- ##

# create a new model with the rule-based, uniform weights
model_uniform_rule = Net()
model_uniform_rule.apply(weights_init_uniform_rule)

# create a new model with the rule-based, NORMAL weights
model_normal_rule = Net()
model_normal_rule.apply(weights_init_normal)

# In[ ]:

# compare the two models
model_list = [(model_uniform_rule, 'Uniform Rule [-y, y)'),
              (model_normal_rule, 'Normal Distribution')]

# evaluate behavior
helpers.compare_init_weights(model_list,
                             'Uniform vs Normal',
                             train_loader,
                             valid_loader)

# The normal distribution gives us pretty similar behavior compared to the uniform distribution, in this case. This is likely because our network is so small; a larger neural network will pick more weight values from each of these distributions, magnifying the effect of both initialization styles. In general, a normal distribution will result in better performance for a model.
#

# ---
#
# ### Automatic Initialization
#
# Let's quickly take a look at what happens *without any explicit weight initialization*.

# In[ ]:

## Instantiate a model with _no_ explicit weight initialization

# In[ ]:

## evaluate the behavior using helpers.compare_init_weights

# As you complete this exercise, keep in mind these questions:
# * What initializaion strategy has the lowest training loss after two epochs? What about highest validation accuracy?
# * After testing all these initial weight options, which would you decide to use in a final classification model?

There's an error with finding the template file we create:
jinja2.exceptions.TemplateNotFound: C:\Users\TestUser\AppData\Local\Temp\tmp-8044PQcO1wZI8LDB.tpl

I didn't specify in the command line above, but we also pass a template.
Does the C:\Users\TestUser\AppData\Local\Temp folder exist?
I'm trying to figure out why the tmp file wouldn't be readable.

Yes it exists and its also accessible :!
os.path.exists("C:/Users/TestUser/AppData/Local/Temp") returns True

What's in it? Perhaps jinja is having a read problem.

Mine looks like this:
{%- extends 'null.tpl' -%}
{% block codecell %}
#%%
{{ super() }}
{% endblock codecell %}
{% block in_prompt %}{% endblock in_prompt %}
{% block input %}{{ cell.source | ipython2python }}{% endblock input %}
{% block markdowncell scoped %}#%% [markdown]
{{ cell.source | comment_lines }}
{% endblock markdowncell %}

This is the content :
{%- extends 'null.tpl' -%}
{% block codecell %}
#%%
{{ super() }}
{% endblock codecell %}
{% block in_prompt %}{% endblock in_prompt %}
{% block input %}{{ cell.source | ipython2python }}{% endblock input %}
{% block markdowncell scoped %}#%% [markdown]
{{ cell.source | comment_lines }}
{% endblock markdowncell %}

Hmm. Nbconvert is having some problem reading it. Not sure why. Without being able to debug your machine, the only thing I can think of is to reinstall nbconvert.
Can you try running nbconvert like this?
python -m nbconvert --to python --stdout --template C:\Users\TestUser\AppData\Local\Temp\tmp-8044PQcO1wZI8LDB.tpl <jupyter notebook>

yup, it encountered with the same errors :
Temp\tmp-8044PQcO1wZI8LDB.tpl weight_initialization_exercise.ipynb
[NbConvertApp] Converting notebook weight_initialization_exercise.ipynb to python
Traceback (most recent call last):
  File "C:\Users\TestUser\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\TestUser\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\TestUser\Anaconda3\lib\site-packages\nbconvert\__main__.py", line 2, in <module>
    main()
  File "C:\Users\TestUser\Anaconda3\lib\site-packages\jupyter_core\application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "C:\Users\TestUser\Anaconda3\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
    app.start()
  File "C:\Users\TestUser\Anaconda3\lib\site-packages\nbconvert\nbconvertapp.py", line 293, in start
    self.convert_notebooks()
  File "C:\Users\TestUser\Anaconda3\lib\site-packages\nbconvert\nbconvertapp.py", line 457, in convert_notebooks
    self.convert_single_notebook(notebook_filename)
  File "C:\Users\TestUser\Anaconda3\lib\site-packages\nbconvert\nbconvertapp.py", line 428, in convert_single_notebook
    output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
  File "C:\Users\TestUser\Anaconda3\lib\site-packages\nbconvert\nbconvertapp.py", line 357, in export_single_notebook
    output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
  File "C:\Users\TestUser\Anaconda3\lib\site-packages\nbconvert\exporters\exporter.py", line 165, in from_filename
    return self.from_file(f, resources=resources, **kw)
  File "C:\Users\TestUser\Anaconda3\lib\site-packages\nbconvert\exporters\exporter.py", line 183, in from_file
    return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
  File "C:\Users\TestUser\Anaconda3\lib\site-packages\nbconvert\exporters\templateexporter.py", line 203, in from_notebook_node
    output = self.template.render(nb=nb_copy, resources=resources)
  File "C:\Users\TestUser\Anaconda3\lib\site-packages\nbconvert\exporters\templateexporter.py", line 80, in template
    self._template_cached = self._load_template()
  File "C:\Users\TestUser\Anaconda3\lib\site-packages\nbconvert\exporters\templateexporter.py", line 186, in _load_template
    raise TemplateNotFound(self.template_file)
jinja2.exceptions.TemplateNotFound: C:\Users\TestUser\AppData\Local\Temp\tmp-8044PQcO1wZI8LDB.tpl

The template references the null template.
{%- extends 'null.tpl' -%}

Perhaps that isn't installed for you?

I have one here:
C:\Users\rchiodo.REDMOND\AppData\Local\Continuum\anaconda3\envs\ErrorCollapse\Lib\site-packages\nbconvert\templates\skeleton\null.tpl

I have at least one available as well! here :
C:\Users\TestUser\Anaconda3\envs\anaconda35\Lib\site-packages\nbconvert\templates\skeleton

OK, Thanks to dear God, upgrading  the nbconvert as you suggested seem to have solved the issue!
Now, the import works just fine. however there is slight problem here, I need to open the notebooks twice for the import bar to pop up! it wont pop up the first time. I mean like this : (see  the second gif : https://github.com/Microsoft/vscode-python/issues/5069#issuecomment-498420468 )

Awesome! Glad it works now.
The import question should pop up when you open a file though. Perhaps you needed to close it first? It only happens on open.
You can also import by right clicking in the file list or by using the 'Import Notebook' or 'Import Notebook from File' commands in the command palette.

Thanks. There is something else, what if I only want to view the notebook and not run all the cells?
It seems in order to have the notebook rendered I need to execute all the cells!
Cant we just make it so, that upon being imported, all the markups and html cells get rendered and not the actual cells? This is  the default behavior of jupyter!
Currently what crosses my mind is to comment out all code cells and run the markup cells. this however, wont render the previously saved results ( as they do not exist in the imported file! )

So in our insider's build, the behavior you want is mostly there. When opening an ipynb file, we 'preview' the contents of the notebook in the interactive pane without running anything. We just read in the contents of the file.
If you want to just have the code, then you'd import the file.

It's this issue here:
#5790

Closing out issues that cannot be answered without more information.

On MacOS (Mojave 10.14.5):

vscode > file explorer > {right click on test.ipynb} > import jupyter notebook:
creates a new empty Untitled-1.py file
vscode > file explorer > {double click on test.ipynb}:
opens test.ipynb but as an css source (no conversion to interactive python)

The newest vscode Python extension installed, and active Python env with jupyter installation (conda).
Any idea what to do?
Many thanks in advance,
Andy

There is no support for double-clicking an ipynb file. VS code doesn't support alternative editors for files. https://github.com/microsoft/vscode/issues/12176
Importing from right click is the only thing you can do.

OK, but at the moment I don't know how/can't import jupyter notebook at all
(my description is not a "new feature requests").
I'm new to vscode, and have a plenty of jupyter notebooks. I've
successfully created one from scratch in vscode (just a python file with
appropriate #%% comments viewed in Python Interactive mode), but can't
import my own notebooks. "Right-click > import Jupyter" just generates a
new empty file...
So, probably I don't do it correctly. Any advise?
Many thanks for your help in advance,
Andy
pon., 5 sie 2019 o 20:22 Rich Chiodo<EMAIL_ADDRESS>napisał(a):

There is no support for double-clicking an ipynb file. VS code doesn't
support alternative editors for files. microsoft/vscode#12176
https://github.com/microsoft/vscode/issues/12176
Importing from right click is the only thing you can do.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode-python/issues/5069?email_source=notifications&email_token=ADNPDDLTAMHP5ZABTENGTMTQDBVWVA5CNFSM4HC3Y32KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3SU5TA#issuecomment-518344396,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADNPDDIFS3ESGCOK6TW3IP3QDBVWVANCNFSM4HC3Y32A
.

--
Andrzej Wodecki, PhD, MBA;
mob.: +48 600 82 82 65
http://bit.ly/wodeckiAI
https://github.com/wodecki

Q: Why is this email five sentences or less?
A: http://five.sentenc.es

That sounds like a bug then. Import should generate a python file with the contents of your notebook in it.
Can you go to 'Help | Toggle Developer Tools', click on the console tab, right click, save as, and upload the log? That should give us some idea of what happened.
Internally we use nbconvert with a jinja template file to do the import. You can try using nbconvert from the command line too to see if you get an errors.

hi,
please find the log attached.
I have nbconvert installed in the python env I activate, but still doesn't
work,
Many thanks for help :)
Andy
wt., 6 sie 2019 o 17:05 Rich Chiodo<EMAIL_ADDRESS>napisał(a):

That sounds like a bug then. Import should generate a python file with the
contents of your notebook in it.
Can you go to 'Help | Toggle Developer Tools', click on the console tab,
right click, save as, and upload the log? That should give us some idea of
what happened.
Internally we use nbconvert https://github.com/jupyter/nbconvert with a
jinja template file to do the import. You can try using nbconvert from the
command line too to see if you get an errors.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode-python/issues/5069?email_source=notifications&email_token=ADNPDDI5N2YULAVMPQ6ODW3QDGHJ5A5CNFSM4HC3Y32KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3VOIVI#issuecomment-518710357,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADNPDDIX4N6HCE6VPHCWJOLQDGHJ5ANCNFSM4HC3Y32A
.

--
Andrzej Wodecki, PhD, MBA;
mob.: +48 600 82 82 65
http://bit.ly/wodeckiAI
https://github.com/wodecki

Q: Why is this email five sentences or less?
A: http://five.sentenc.es

I don't believe your attachment worked.

sorry, replied from e-mail...
Now should work :)
-1565112759957.log

It doesn't look like you ran the import command?

And did you select a python interpreter? It's hard to tell if one is picked or not.

Yes.
I've selected my conda env with all my data science packages and jupyter
(with nbviewer) installed.
If you want, I can record a video and put it on Youtube.
Andy
wt., 6 sie 2019 o 19:43 Rich Chiodo<EMAIL_ADDRESS>napisał(a):

And did you select a python interpreter? It's hard to tell if one is
picked or not.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode-python/issues/5069?email_source=notifications&email_token=ADNPDDOP5GV6CNJSO3QGI2TQDGZ3LA5CNFSM4HC3Y32KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3V5LEA#issuecomment-518772112,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADNPDDKOS2M7XEVWPUQLFGDQDGZ3LANCNFSM4HC3Y32A
.

--
Andrzej Wodecki, PhD, MBA;
mob.: +48 600 82 82 65
http://bit.ly/wodeckiAI
https://github.com/wodecki

Q: Why is this email five sentences or less?
A: http://five.sentenc.es

The log is not showing the import command running at all. A video or gif might help.
I would have expected at least this to be there:
console.ts:134 [Extension Host] Info Python Extension: 2019-08-07 08:12:13: > ~\AppData\Local\Continuum\miniconda3\envs\jupyter\python.exe -m jupyter nbconvert --version

If that failed, then we should be showing an error message. If that worked, then this command is what would have done the translation:
console.ts:134 [Extension Host] Info Python Extension: 2019-08-07 08:12:14: > ~\AppData\Local\Continuum\miniconda3\envs\jupyter\python.exe -m jupyter nbconvert d:\Training\SnakePython\bar.ipynb --to python --stdout --template C:\Users\RCHIOD~1.RED\AppData\Local\Temp\tmp-34648J4KJsepws0H.tpl

FYI: removing jupyter_nbconvert_config.json solved this for me. See https://github.com/jupyter/nbconvert/issues/526#issuecomment-277552771

I confirm: removing jupyter_nbconvert_config.json solved the problem.
Many thanks :)


Adding my community

Hello! I have added my community Microsoft Learn Student Ambassadors- Islamabad for the Global Azure 2023.

@EmanAmjad  Check some of the in-line comments I have made.


Can't join :(

Subject: Can't join :(
Description:
I allowed everything on my browsers (Firefox and LibreWolf).
Results:
It still says that i haven't chosen a location.
I've retyped everything a dozen times now. I'm done. Let me know if you want me to join.
ps I love cooperative rather than corporate, community groups. Good luck!
<EMAIL_ADDRESS>Backend version: develop-bf8528d9
Frontend version: develop-bf8528d9
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0
Page: https://couchers.org/signup
User:

forwarded to support


No error for incorrect url strings

Display error message on incorrect url string insertion for command ticket.url

Resolved. db query was outside try block


Unable to submit a request for a BORO ID

Describe the Bug:
Mike: I have been unable to submit a request for a BORO ID so far. I’m assuming it has something to do with the fact that I did 3 ^ (registered with 2 operators) but I will reset my DB this weekend and find out.
Probability (how likely the bug is to happen, scored from 1-5):
(For example, probability of 5 is something like "it happens to all users every time they log in."
Probability of 1 "only happens to certain users when a really specific and unlikely path is followed.")
Effect (how bad the bug is when it does happen, scored from 1-5):
(For example, effect of 5 is "the entire app crashes and makes it unusable for all users" or "the bug causes the wrong data to be saved, with critical information (e.g. payment) being affected."
Effect of 1 is "It makes some styling look a little bit weird.")
Steps to reproduce the behaviour:
Screenshots:

Additional information:

OS: [e.g. iOS]
Browser: [e.g. chrome, safari]
Version: [e.g. 22]
Additional context

Based on the screenshots, it looks like Bug Hunter MV was trying to "submit" an Operation while signed in with his IDIR (as an internal user). Only external users should be allowed to request a BORO ID for an Operation.
I don't think anything can be done with this at the moment. There might not be any work to do at all.

Re: Refinement discussion - Closing as suggested by @dleard and @andrea-williams


Setting badnwidth for networkset

Scenario/Intent
Configure NetworkSet with TypicalBandwidth and MaximumBandwidth
Environment Details

Module Version: 4.80
Ansible Version: [Version of Ansible for which you are encountering the issue]
OneView Appliance Version: [Version of the OneView appliance you're interacting with]
OneView Client API Version: [API version listed in your configuration file or dictionary]
Python Version: [Version of Python in your environment]
python-hpOneView SDK Version: [Version of the python-hpOneView SDK in your environment]
Platform: [OS distribution and release version]

Steps to Reproduce
Set Bandwidth list with typical and maximumbandwidth in playbook ( follow example of network)
Expected Result
Should set bandwidth on network set
Actual Result
Error when running playbook

@DungKHoang , Can you please post the error here?

Here is the error:
TASK [Create network set ecm_oam_NS] ***************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: HPOneViewException: (u'Unrecognized JSON field.', {u'errorSource': None, u'recommendedActions': [u'Check the valid fields for this JSON object and remove or correct the unrecognized field.'], u'data': {}, u'errorCode': u'UNRECOGNIZED_JSON_FIELD', u'details': u'The field named bandwidth near line 1, column 173 is not a valid field in this JSON object.', u'message': u'Unrecognized JSON field.', u'nestedErrors': []})
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File "/home/dung/.ansible/tmp/ansible-tmp-1567530578.49-239095104213204/AnsiballZ_oneview_network_set.py", line 114, in \n    _ansiballz_main()\n  File "/home/dung/.ansible/tmp/ansible-tmp-1567530578.49-239095104213204/AnsiballZ_oneview_network_set.py", line 106, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File "/home/dung/.ansible/tmp/ansible-tmp-1567530578.49-239095104213204/AnsiballZ_oneview_network_set.py", line 49, in invoke_module\n    imp.load_module('main', mod, module, MOD_DESC)\n  File "/tmp/ansible_oneview_network_set_payload_XiKK_K/main.py", line 177, in \n  File "/tmp/ansible_oneview_network_set_payload_XiKK_K/main.py", line 173, in main\n  File "/tmp/ansible_oneview_network_set_payload_XiKK_K/ansible_oneview_network_set_payload.zip/ansible/module_utils/oneview.py", line 662, in run\n  File "/tmp/ansible_oneview_network_set_payload_XiKK_K/main.py", line 139, in execute_module\n  File "/tmp/ansible_oneview_network_set_payload_XiKK_K/main.py", line 146, in __present\n  File "/tmp/ansible_oneview_network_set_payload_XiKK_K/ansible_oneview_network_set_payload.zip/ansible/module_utils/oneview.py", line 723, in resource_present\n  File "build/bdist.linux-x86_64/egg/hpOneView/resources/networking/network_sets.py", line 121, in create\n    return self._client.create(resource, timeout=timeout, default_values=self.DEFAULT_VALUES)\n  File "build/bdist.linux-x86_64/egg/hpOneView/resources/resource.py", line 1374, in create\n    return self.__do_post(uri, resource, timeout, custom_headers)\n  File "build/bdist.linux-x86_64/egg/hpOneView/resources/resource.py", line 1683, in __do_post\n    task, entity = self._connection.post(uri, resource, custom_headers=custom_headers)\n  File "build/bdist.linux-x86_64/egg/hpOneView/connection.py", line 376, in post\n    return self.__do_rest_call('POST', uri, body, custom_headers=custom_headers)\n  File "build/bdist.linux-x86_64/egg/hpOneView/connection.py", line 403, in __do_rest_call\n    raise HPOneViewException(body)\nHPOneViewException: (u'Unrecognized JSON field.', {u'errorSource': None, u'recommendedActions': [u'Check the valid fields for this JSON object and remove or correct the unrecognized field.'], u'data': {}, u'errorCode': u'UNRECOGNIZED_JSON_FIELD', u'details': u'The field named bandwidth near line 1, column 173 is not a valid field in this JSON object.', u'message': u'Unrecognized JSON field.', u'nestedErrors': []})\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

BTW, the oneview_network_set_facts does not return bandwidth
here is the result:
TASK [debug] ***************************************************************************************************************************************
ok: [localhost] => {
"network_sets": [
{
"category": "network-sets",
"connectionTemplateUri": "/rest/connection-templates/f75b922a-6dbc-4aa7-a2c8-6a3cf8273156",
"created": "2019-09-04T00:07:34.567Z",
"description": null,
"eTag": "c1aa9e0e-f40d-47a8-8cc1-73f36e3ced63",
"modified": "2019-09-04T00:07:34.570Z",
"name": "test",
"nativeNetworkUri": null,
"networkSetType": "Regular",
"networkUris": [],
"scopesUri": "/rest/scopes/resources/rest/network-sets/4230c169-237b-4e70-a0d3-ffe47314c5a6",
"state": "Active",
"status": "OK",
"type": "network-setV4",
"uri": "/rest/network-sets/4230c169-237b-4e70-a0d3-ffe47314c5a6"
}
]
}

@DungKHoang Bandwidth feature is not supported in Network_set resource as of now. We are working on this, we will update you once it is available.

Closing it because this is the duplicate issue of #380.


Docs in Portuguese

🧩 Feature request
Description
Similar to English and Spanish, would it be interesting to the project to have a Portuguese version?
Describe the solution you'd like
I can do the translation to European Portuguese, should also work for Brazilian Portuguese too.
Maybe some video tutorials could be also interesting to the community.
Describe alternatives you've considered
Check the content in English or Spanish and see what shows up in the Internet

Welcome @rmjoia.
I like the idea of adding another language to our docs, but as none in the team speaks/reads Portuguese, it would be really hard to validate your translations.
Personally, I don't like the idea to merge in docs that are not read by an extra set of eyes. If we can find someone that can validate the Portuguese translation, I would be all in for the idea.

Thank you @SanderElias, I'll keep an eye on this thread and you know how to reach me :)


Refactor services for the dynamic URL handling

Story: #673
Refactor the existing Angular2 services to use the new url handling.

Done. WorkItemService as well as IterationService is refactored. AuthN services are not space-dependent and do not need changes.


CORGI-473: Add filters for OpenLCS to show only unscanned components

@RedHatProductSecurity/corgi-devs Please review.

@juspence Thanks for the quick fix!


Automated cherry pick of #8991: fix(scheduler): clean expire cache before schedule

Cherry pick of #8991 on release/3.6.
#8991: fix(scheduler): clean expire cache before schedule

/lgtm
/approve


K3s Air-Gap install Error "Failed to find the k3s-selinux policy"

Environmental Info:
K3s Version: v1.28.3+k3s2
Node(s) CPU architecture, OS, and Version: 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 12 10:45:03 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux, RHEL 9.2 (Plow)
Cluster Configuration: Single node cluster
Describe the bug:
Try to install k3s with Air-Gap Manually Deploy Images Method
Steps To Reproduce:
Follow this toturial: https://docs.k3s.io/installation/airgap
Command for install: INSTALL_K3S_VERSION="v1.28.3+k3s2" INSTALL_K3S_SKIP_DOWNLOAD=true ./install.sh --disable=servicelb
Expected behavior:
Successful installation
Actual behavior:
$ INSTALL_K3S_VERSION="v1.28.3+k3s2" INSTALL_K3S_SKIP_DOWNLOAD=true ./install.sh --disable=servicelb
[INFO]  Skipping k3s download and verify
[INFO]  Skipping installation of SELinux RPM
[ERROR]  Failed to find the k3s-selinux policy, please install:
    dnf install -y container-selinux
   dnf install -y https://rpm.rancher.io/k3s/stable/common/centos/9/noarch/
Try to follow manual
dnf install -y container-selinux
Last metadata expiration check: 0:33:44 ago on Sat 11 Nov 2023 12:38:48 PM +03.
Package container-selinux-3:2.205.0-1.el9_2.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Any ideas how to dix it?

Fixed! Install package from
https://github.com/k3s-io/k3s-selinux/releases

Could we reopen this issue and ask them to fix the log message that says

[ERROR]  Failed to find the k3s-selinux policy, please install:
dnf install -y container-selinux
dnf install -y https://rpm.rancher.io/k3s/stable/common/centos/9/noarch/

The latter link is some kind of S3 bucket that doesn't exist or I don't have permission to. Also it is to a folder and not an RPM anyway, so running it gives error Cannot open /var/cache/dnf/commandline-0548e2de42edbce9/packages/.: Is a directory. Should it be replaced with the link you provided, which worked for me?


Extended replies

Replies to media/stickers/replies should pass content to irc.
Add captions to media messages.
Handle errors on messages passed from irc to telegram.
Docker image mzagorskadm/hskrk-lelegram:0.4

Ping @thinkofher


tcmur:fix format character on handle_writesame_check

Incorrect format characters, data overflow。
Signed-off-by: tangwenji<EMAIL_ADDRESS>

Looks good to me.
Thanks,


[BUG] Error adding OCI repo from ECR as ClusterRepo

Rancher Server Setup

Rancher version: 2.9.0/2.9.1
Installation option (Docker install/Helm Chart): helm chart

If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc): EKS

Proxy/Cert Details: NA

Information about the Cluster

Kubernetes version: 1.29
Cluster Type (Local/Downstream): local

User Information

What is the role of the user logged in? (Admin/Cluster Owner/Cluster Member/Project Owner/Project Member/Custom): Admin

If custom, define the set of permissions:

Describe the bug
Followed https://ranchermanager.docs.rancher.com/v2.9/how-to-guides/new-user-guides/helm-charts-in-rancher/oci-repositories to add a oci repo which is hosted in ECR to be added as clusterrepo. Authentication is provided via basic token. Rancher is unable to pull charts from OCI.
I have verified that I am able to login and pull oci chart using cred present in the secret

It appears that the rancher is unable to pull OCI charts from a different AWS account. I have two accounts, A and B, and the charts in both accounts are configured with permissions to allow cross-account pulling. I successfully added an OCI chart from a local AWS account, which worked as expected. However, the cross-account OCI pull is not functioning. Has anyone else encountered this issue or successfully implemented cross-account OCI chart pulling?


Add retention subsystem

Adds a retention system which builds on top of retained memory drivers to allow partitioning of areas and data integrity with magic header prefixes and checksum of stored data.

This whole system seems to make choices that are specific to mcuboot and as such should not be incorporated in the zephyr tree.
TBH most of the mcuboot/mcumgr related stuff does not belong in the zephyr tree but should be part of the mcuboot/zephyr-mcuboot repo.

This whole system seems to make choices that are specific to mcuboot and as such should not be incorporated in the zephyr tree.

Like what? A shared memory region or register with a uint8 which can be read, written to or checked? How is that mcuboot specific? For your information the nRF5 SDK bootloader uses a similar method as does a third party's QSPI-based bootloader.

TBH most of the mcuboot/mcumgr related stuff does not belong in the zephyr tree but should be part of the mcuboot/zephyr-mcuboot repo.

The mcuboot parts are part of mcuboot, as the above bot comment shows

As I said in the architecture meeting: I don't see why this should be added. What this PR adds is a specification on how to store data in the retention system and use devicetree (dts) as a means to communicate this to other applications (e.g. a bootloader).
The devicetree (dts) should not be used for this.
An application can directly use the retention system without this layer to achieve the same result.
Adding this PR will result in pollution of the dts files describing boards to add this functionality while its use will be limited to very specific cases.

The devicetree (dts) should not be used for this.

@laczen can you please clarify why you believe this? I read your comment, but it doesn't make an argument for why this is the case.

The devicetree (dts) should not be used for this.

@Laczen can you please clarify why you believe this? I read your comment, but it doesn't make an argument for why this is the case.

@mbolivar-nordic, if you look at an example from a dts:
      retention0: retention {
        compatible = "zephyr,data-retention";
        status = "okay";
        size = <64>;
        prefix = [04 fa];
        checksum = <1>;
      };

the "zephyr,data-retention" is describing the format of what is found in the retention area: a prefix, a checksum and the size (to determine the real data). This is a pure software choice. Why is this in the dts ? Because it matters for another application that is compiled with the same dts.

This is a pure software choice

This is permitted in some cases: https://docs.zephyrproject.org/latest/build/dts/bindings-upstream.html#the-zephyr-prefix
This PR seems to be using the zephyr, prefix correctly in this case.
Am I missing something?

This is a pure software choice

This is permitted in some cases: https://docs.zephyrproject.org/latest/build/dts/bindings-upstream.html#the-zephyr-prefix
This PR seems to be using the zephyr, prefix correctly in this case.
Am I missing something?

The documentation states: Therefore, as a compromise, we do allow some software configuration in Zephyr’s devicetree bindings, as long as they use this prefix to show that they are Zephyr specific., what is proposed in this PR is a complete software construct defined by devicetree bindings, a lot more than just some software configuration.
@nordicjm, could you please provide a example where the following retention data is used:

Data for a bootloader with magic "c0ffee", 4 bytes data and a 1 byte crc,
Data for the application with magic 0x61 0x70 0x70 0x64 ("appd"), 4 bytes and a 1 byte crc,
Data for the application with magic 0x6D 0x65 0x73 0x68 0x64 ("meshd"), 64 bytes and 2 byte crc,

@nordicjm, could you please provide a example where the following retention data is used:

No, there is text included already in the documentation describing how it works, how to use it and examples.

@nordicjm, could you please provide a example where the following retention data is used:

Data for a bootloader with magic "c0ffee", 4 bytes data and a 1 byte crc,
Data for the application with magic 0x61 0x70 0x70 0x64 ("appd"), 4 bytes and a 1 byte crc,
Data for the application with magic 0x6D 0x65 0x73 0x68 0x64 ("meshd"), 64 bytes and 2 byte crc,

This example would add the following to the dts:
sram@2003FFC0 {
    compatible = "zephyr,memory-region", "mmio-sram";
    reg = <0x2003FF80 128>;
    zephyr,memory-region = "RetainedMem";
    status = "okay";
    retainedmem {
      compatible = "zephyr,retained-ram";
      status = "okay";
      retention0: retention {
        compatible = "zephyr,data-retention";
        status = "okay";
        size = <11>;
        prefix = [0c 00 0f 0f 0e 0e];
        checksum = <1>;
      };
      retention1: retention {
        compatible = "zephyr,data-retention";
        status = "okay";
        size = <9>;
        prefix = [61 70 70 64];
        checksum = <1>;
      };
      retention2: retention {
        compatible = "zephyr,data-retention";
        status = "okay";
        size = <71>;
        prefix = [6D 65 73 68 64];
        checksum = <2>;
      };
    };
  };

And this is just a simple example...

@nordicjm, could you please provide a example where the following retention data is used:

Data for a bootloader with magic "c0ffee", 4 bytes data and a 1 byte crc,
Data for the application with magic 0x61 0x70 0x70 0x64 ("appd"), 4 bytes and a 1 byte crc,
Data for the application with magic 0x6D 0x65 0x73 0x68 0x64 ("meshd"), 64 bytes and 2 byte crc,

This example would add the following to the dts:
sram@2003FFC0 {
    compatible = "zephyr,memory-region", "mmio-sram";
    reg = <0x2003FF80 128>;
    zephyr,memory-region = "RetainedMem";
    status = "okay";
    retainedmem {
      compatible = "zephyr,retained-ram";
      status = "okay";
      retention0: retention {
        compatible = "zephyr,data-retention";
        status = "okay";
        size = <11>;
        prefix = [0c 00 0f 0f 0e 0e];
        checksum = <1>;
      };
      retention1: retention {
        compatible = "zephyr,data-retention";
        status = "okay";
        size = <9>;
        prefix = [61 70 70 64];
        checksum = <1>;
      };
      retention2: retention {
        compatible = "zephyr,data-retention";
        status = "okay";
        size = <71>;
        prefix = [6D 65 73 68 64];
        checksum = <2>;
      };
    };
  };

And this is just a simple example...

So?

So?

OK, if this is not bad enough explain what happens when applications want to use the retention area differently with different data (The "coffee" part is shared, as well as the "appd", but not the "meshd" part) ?

So?

OK, if this is not bad enough explain what happens when applications want to use the retention area differently with different data (The "coffee" part is shared, as well as the "appd", but not the "meshd" part) ?

So like what happens if someone builds hello world, flashes it to the mcu, then builds blinky, and flashes is to the mcu, the application code area flash is changed? Users can do whatever they want in the retention areas, that's up to them, you use each section for the intended purpose, you don't reuse it for other things.

So?

OK, if this is not bad enough explain what happens when applications want to use the retention area differently with different data (The "coffee" part is shared, as well as the "appd", but not the "meshd" part) ?

So like what happens if someone builds hello world, flashes it to the mcu, then builds blinky, and flashes is to the mcu, the application code area flash is changed? Users can do whatever they want in the retention areas, that's up to them, you use each section for the intended purpose, you don't reuse it for other things.

Each application that needs a change to the retention data will need to provide its own overlay file.

Some comments. I think it generally looks OK.
The MCUboot changes should not go with this PR.
I have used this PR to build MCUboot with just adding overlay:

You're not setting the boot partition, so that will place mcuboot at 0xc000 (if using nrf52)

An application can directly use the retention system without this layer to achieve the same result.

But the application needs to synchronize usage of retention API with other systems. Reserving space via DTS (overlays) allows to easily see how much retention using features can be used at once, depending on size of provided mem.

Adding this PR will result in pollution of the dts files describing boards to add this functionality while its use will be limited to very specific cases.

It does not seem that any DTS files get modified so far. I think it will be up to user to add all DTS entries for things they want to use with retention API.

An application can directly use the retention system without this layer to achieve the same result.

But the application needs to synchronize usage of retention API with other systems. Reserving space via DTS (overlays) allows to easily see how much retention using features can be used at once, depending on size of provided mem.

If it would be just reserving space, but this is describing the content in devicetree.

Some comments. I think it generally looks OK.
The MCUboot changes should not go with this PR.
I have used this PR to build MCUboot with just adding overlay:

You're not setting the boot partition, so that will place mcuboot at 0xc000 (if using nrf52)

Right. Fixed and it works fine!

@Laczen I'm having trouble following what your objection is.  Now it sounds like you're OK with reserving memory area base addresses and sizes in devicetree, but not their contents. Is that right?
If so, is it a personal preference, or is there a technical problem?

It  would have been easier to review / merge if everything related to bootmode was in a subsequent PR, anyway, is there a reason why it's the data_retention_X api and not the retention_X api  ? It seems more instinctive to call it the latter as all the source / headers are called retention.{h,c}

It would have been easier to review / merge if everything related to bootmode was in a subsequent PR, anyway, is there a reason why it's the data_retention_X api and not the retention_X api ? It seems more instinctive to call it the latter as all the source / headers are called retention.{h,c}

Retention is a common enough word/name that I'm concerned that it might cause name collisions with external libraries or code, we currently have that issue with some other code in the kernel and want to avoid it, but can rename to just retention if people think it won't be an issue

It's a good question though, I'll tag for dev review later and ask people's opinions

No objections or issues raised at dev review meeting to having name as just retention, if there are issues in future, will have to resolve it then, will update PR with new name when mcuboot PR is merged

@Laczen I'm having trouble following what your objection is.  Now it sounds like you're OK with reserving memory area base addresses and sizes in devicetree, but not their contents. Is that right?
If so, is it a personal preference, or is there a technical problem?

@mbolivar-nordic, to be clear: I don't want this in devicetree at all:
a. This uses devicetree as a means to communicate a software configuration,
b. It is not needed at all, there is a retention area that can be used to share information. The subsystem that used it needs to agree on what the format is.
c. It pollutes the dts files,
So it is neither a personal preference or a technical problem, this is about how to use the supplied tools.

@Laczen I am making a good faith effort to understand, but I'm failing to see your point.

@mbolivar-nordic, to be clear: I don't want this in devicetree at all:
a. This uses devicetree as a means to communicate a software configuration,

You and I have established already in previous comments that there is precedent and policy for doing software configuration in devicetree in Zephyr.
This pull request complies with the written policy in the devicetree documentation.
Therefore, unless there is a change in policy, I do not consider this a valid objection to the PR from a devicetree perspective.

Is it OK to translate this as extensions to devicetree will be accepted when they follow the policy. No discussion about this.

b. It is not needed at all, there is a retention area that can be
used to share information. The subsystem that uses it needs to agree
on what the format is.

It seems clear to me that there is a need to share retained memory between different applications, which implies a need to configure the areas where the retained data goes. So I assume you're not saying there is no need for retained data at all -- but instead the objection is about how and where it should be configured.

Please, in zephyr we define a nvs system that can contain whatever data by just pointing to a partition. This could also be done for retained data, just point to the retained memory area where it can be found.
BTW, It should be clear for everyone that this PR is not about reserving an area for shared data, this PR describes how the data in this area should look like.

c. It pollutes the dts files,

"Pollute" in this context is a pejorative and emotional/aesthetic word choice. This is not introducing a toxic chemical or trash into an environment.

Maybe I should have used different phrasing (english is not my mother tongue), I am afraid that boards dts files will be "flooded" (is this ok?) with definitions as soon as we accept uses of devicetree like in the proposed PR.
Having said this I am stopping the discussion. I won't approve and think it is a bad proposal.

Please, in zephyr we define a nvs system that can contain whatever data by just pointing to a partition. This could also be done for retained data, just point to the retained memory area where it can be found.

Right, so no different to this

BTW, It should be clear for everyone that this PR is not about reserving an area for shared data, this PR describes how the data in this area should look like.

No it does not

Maybe I should have used different phrasing (english is not my mother tongue), I am afraid that boards dts files will be "flooded" (is this ok?) with definitions as soon as we accept uses of devicetree like in the proposed PR.

Why would it become flooded? This is mostly a downstream addition, I don't envisage many in-tree boards to use this by default

Having said this I am stopping the discussion. I won't approve and think it is a bad proposal.

Great!

@nordicjm, could you show how separate subsystems (e.g. mcuboot, coredebug) can define data-retention area's independently from each other (so without knowledge of the other size or offset).

@nordicjm, could you show how separate subsystems (e.g. mcuboot, coredebug) can define data-retention area's independently from each other (so without knowledge of the other size or offset).

Did you actually look at the PR?

@nordicjm, could you show how separate subsystems (e.g. mcuboot, coredebug) can define data-retention area's independently from each other (so without knowledge of the other size or offset).

Did you actually look at the PR?

Maybe I am overlooking something, can I just create them in separate overlay files?

@nordicjm, could you show how separate subsystems (e.g. mcuboot, coredebug) can define data-retention area's independently from each other (so without knowledge of the other size or offset).

Did you actually look at the PR?

Maybe I am overlooking something, can I just create them in separate overlay files?

Yes, same as flash partitions, can define a base board with a large retained memory area then add retention partitions from overlays at specific offsets and of specified length

@nordicjm, could you show how separate subsystems (e.g. mcuboot, coredebug) can define data-retention area's independently from each other (so without knowledge of the other size or offset).

Did you actually look at the PR?

Maybe I am overlooking something, can I just create them in separate overlay files?

Yes, same as flash partitions, can define a base board with a large retained memory area then add retention partitions from overlays at specific offsets and of specified length

Flash partitions are not independent, they are coupled by offset and size. To avoid making errors they are best placed in one dts file.

I have one more comment but otherwise looks good to go to me

The proposed solution seems flawed: the retention system defines an area in a retention memory that includes a optional header and crc check to enable validating that the "retained data" is valid. However as both these are optional (and they need to be because it also supports only 1 byte of info) the validity check is not OK when header and crc are disabled. In that case the retention system should return -ENOTSUP (or something equivalent).
The validity check should thus be performed otherwise. The whole construct of header and crc check can than just as well be integrated in the code that uses the retention memory.

The proposed solution seems flawed: the retention system defines an area in a retention memory that includes a optional header and crc check to enable validating that the "retained data" is valid. However as both these are optional (and they need to be because it also supports only 1 byte of info) the validity check is not OK when header and crc are disabled. In that case the retention system should return -ENOTSUP (or something equivalent).

Thanks for spotting, fixed

The proposed solution seems flawed: the retention system defines an area in a retention memory that includes a optional header and crc check to enable validating that the "retained data" is valid. However as both these are optional (and they need to be because it also supports only 1 byte of info) the validity check is not OK when header and crc are disabled. In that case the retention system should return -ENOTSUP (or something equivalent).

Thanks for spotting, fixed

@nordicjm, the proposed fix is making -ENOTSUP a valid check for the boot_mode retention area, this is a strange choice.
It seems that the first subsystem that is making use of the data retention subsystem makes everything defined in the data retention system unnecessary, so what is the need to add the prefix and the crc ? If there are other subsystems that could benefit from it please show how several subsystems should set up the data retention system and show how they can be enabled and used independently and if needed what changes are required to use them independently (app using boot_mode, app using ..._mode, app using boot_mode + ..._mode).
BTW: the data retention system is using offset and size properties in the compatible, these should be combined in a reg property.

I successfully ran the tests on a DK, would it be worth for me to add some overlays with different retentions backends configurations? If I do this would you consider adding those commits to the PR ?

Once this is merged, sure, submit a PR to add support for more boards.

BTW: the data retention system is using offset and size properties in the compatible, these should be combined in a reg property.

Fixed

BTW: the data retention system is using offset and size properties in the compatible, these should be combined in a reg property.

Fixed

Good, still missing the sample to show how multiple subsystems (independently) can enable/disable this functionality according to their needs. If this is not possible or there are limitations it is important to understand this in the evaluation of the proposed PR.

No different than flash partitions

BTW: the data retention system is using offset and size properties in the compatible, these should be combined in a reg property.

Fixed

Good, still missing the sample to show how multiple subsystems (independently) can enable/disable this functionality according to their needs. If this is not possible or there are limitations it is important to understand this in the evaluation of the proposed PR.

No different than flash partitions

Flash partitions have a lot of limitations. There are afaik no subsystems that are making changes (e.g. inserting) to the flash partitions because it is error prone and not possible without prior knowledge. The only way that changes are applied is by deleting the complete partition layout and rebuilding it.
This is not modular at all and cannot be used by independent modules trying to use this.
So please again, show how to do it.


Added file level and folder level cleanup scripts to context menu in docs-markdown

Added right click context menu to docs-markdown for cleanup scripts

file level clean up script
folder level clean up script

#364 issue closed


Goldstone server RPM packaging part deux

Would like to have a solution similar to what @slashk has done with goldstone-agent.  Should:

use versioning format consistent with agent
integrate with CircleCI (talk to @heidecke)
build the opensource version as RPM (no compliance submodule installed)
build the enterprise version as RPM (compliance submodule installed)

Decide where to store the RPMS.  Enterprise should go to bintray (secured).  OpenSource could go to one or more of a) CircleCI artifacts, b) github releases page, c) bintray (unsecured)

Current status (circleci build 213):

ported semver.sh for consistent versioning
circle.yml updated to build gs and gse packages. packages currently at circleci artifacts.

Currently status/bugs:

versioning of packages differs between local and circleci ( local: goldstone-server-0.7.2-SNAPSHOT.498.gb8a2e5f.rpm.el7.x86_64.rpm, circleci: goldstone-server-new-SNAPSHOT.dashboard.162.gc4be4a9.rpm.el7.x86_64.rpm). i think that it is getting the -new instead of tag from pulling as a detached head. @heidecke thoughts ?
need to do real integration tests on resulting rpm -- they pass smoke tests in containers.


Programming exercises: Fix issues with exercise hints

Exercise hints have not been usable recently. This PR fixes a couple of issues so they can be used again
Checklist
General

[ ] I tested all changes and their related features with all corresponding user types on a test server.

Server

[x] I followed the coding and design guidelines.
[x] I added @PreAuthorize and checked the course groups for all new REST Calls (security).
[x] I implemented the changes with a good performance and prevented too many database calls.
[x] I documented the Java code using JavaDoc style.

Client

[x] I followed the coding and design guidelines.
[x] I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
[x] I documented the TypeScript code using JSDoc style.

Changes affecting Programming Exercises

[x] I tested all changes and their related features with all corresponding user types on Test Server 1 (Atlassian Suite).
[ ] I tested all changes and their related features with all corresponding user types on Test Server 2 (Jenkins and Gitlab).

Steps for Testing

Prerequisites:

1 Editor
1 Student
1 Programming Exercise

Create a programming exercise with categories
Navigate into programming exercise details -> Manage hints
Create some hints and link them in the problem statement into tasks
Start the exercise as student and check if the hints are displayed properly next to the tasks

Review Progress

Code Review

[x] Review 1
[x] Review 2

Manual Tests

[x] Test 1
[ ] Test 2

Test Coverage
no changes
Screenshots
no changes

Thanks to all the testers and reviewers 👍


Error with Add-ExcelName

I'm trying to use Add-ExcelName using the value in the variable $datarange for the "Range" parameter. I ma getting an error:
Add-ExcelName : Cannot bind argument to parameter 'Range' because it is null.
Here is the code used to setup the $datarange variable and use it with Add-ExcelName:
$datarange ends up with a value of "A2:A45"
$datarange = [char]34 + "A2:A" + ($concats.count + 2) + [char]34
$pltest=$xl.workbook.worksheets['Lists']
Add-ExcelName -Range $pltest.Cells[$datarange] -Rangename "Locations"
I've tried it with and without the double quotes. It works fine when I use:
Add-ExcelName -Range $pltest.Cells["A2:A3"] -Rangename "Locations"
When I did $datarange.gettype() it reports as a String with a Base Type of System.object
I also have the problem with the Name being localized to the Worksheet and not Global in the Workbook. I'm going to try this sample code that I saw in another issue to resolve this:
              $xl=Open-ExcelPackage C:\temp\Test3.xlsx
              $ws=$xl.Workbook.Worksheets["Sheet1"]
              $RangeCells=$ws.cells["A1:A5"]
              $xl.Workbook.Names.Add("MyRange",$RangeCells)
             Close-ExcelPackage $xl -Show

Thanks in advance,
--John

This works for Add-ExcelName. Names are not added to the Global space, don't have the anything for that.
$data = ConvertFrom-Csv @"
Region,State,Units,Price
West,Texas,927,923.71
North,Tennessee,466,770.67
East,Florida,520,458.68
East,Maine,828,661.24
West,Virginia,465,053.58
North,Missouri,436,235.67
South,Kansas,214,992.47
North,North Dakota,789,640.72
South,Delaware,712,508.55
"@

Remove-Item ./test.xlsx -ErrorAction 'SilentlyContinue'

$xlpkg = $data | Export-Excel -Path .\Test.xlsx -AutoSize -PassThru

$cells = "A2:A" + $data.Count
$range = $xlpkg.sheet1.cells[$cells]

Add-ExcelName -Range $range -RangeName Region

Close-ExcelPackage $xlpkg -Show

Hey Doug,
Thanks for responding. I was actually able to work around it with something I found on a similar issue. This gave the range name "Locations" a Global scope and didn't throw an error:
$wslisports = Add-Worksheet -ExcelPackage $xl -WorksheetName 'LISPorts'
$Rangecells=$wslists.cells["A2:A" + ($Locations.count + 1)]
$xl.Workbook.Names.Add("Locations",$RangeCells)
--John
From: Doug Finke @.>
Sent: Saturday, July 10, 2021 9:13 AM
To: dfinke/ImportExcel @.>
Cc: John Miller @.>; Author @.>
Subject: Re: [dfinke/ImportExcel] Error with Add-ExcelName (#1045)
You don't often get email from @.*** Learn why this is importanthttp://aka.ms/LearnAboutSenderIdentification
This works for Add-ExcelName. Names are not added to the Global space, don't have the anything for that.
$data = ConvertFrom-Csv @"
Region,State,Units,Price
West,Texas,927,923.71
North,Tennessee,466,770.67
East,Florida,520,458.68
East,Maine,828,661.24
West,Virginia,465,053.58
North,Missouri,436,235.67
South,Kansas,214,992.47
North,North Dakota,789,640.72
South,Delaware,712,508.55
"@
Remove-Item ./test.xlsx -ErrorAction 'SilentlyContinue'
$xlpkg = $data | Export-Excel -Path .\Test.xlsx -AutoSize -PassThru
$cells = "A2:A" + $data.Count
$range = $xlpkg.sheet1.cells[$cells]
Add-ExcelName -Range $range -RangeName Region
Close-ExcelPackage $xlpkg -Show

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdfinke%2FImportExcel%2Fissues%2F1045%23issuecomment-877635920&data=04|01|jmiller%40enablingtechcorp.com|2902943770db4b78b7f608d943a46c96|8567a26a337142ada2af23bee9db41dd|0|0|637615196237874643|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=18RXmLJr%2FEfCPHS6bkXF0hFoLQHvGtcNHCRcSHGnv%2FQ%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAUVXRPCGSK745PGZRBBHLPTTXBBNHANCNFSM47SVGU5Q&data=04|01|jmiller%40enablingtechcorp.com|2902943770db4b78b7f608d943a46c96|8567a26a337142ada2af23bee9db41dd|0|0|637615196237884602|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=TKhavqIvws1TZ0y23%2F8JIFNT2N20GyEnOm3w4rPfSbo%3D&reserved=0.


Lyric Syncing isn't entirely Spot on

Sometimes the Lyrics are a few lines ahead or behind. It's random every time, is there a way to fix this?

Well I think it's because of the source of the lyrics. But will be interesting implement a tempo tool and reduce or add more time

Yeah, the lyrics on minilyrics (where the program fetches from) are user submitted so they may not always be perfectly in sync due to either bad syncing on the users part or they may just have synced it to a different version of the song. If it's just off by a little bit, you can manually seek forwards or backwards a bit in spotify and it will fix it.


$translate service - need to determine if it failed

We are running $translate(ids).then(function(translation) { ... }); and are experiencing that the keys are being returned. We assume this is because the translations are not loaded in time. How can we either be notified that this failed so we can try again or make sure they get loaded first?
Running refresh has killed performance, so that is out in this case.
@clarkio

Hello, @johnpapa.
If you use the $translate service with multiple ids then it'll always return a result. In other case one failure may break translation of all other ids in this group. To determine the failure you can check the returned value against the translation keys, for example.
Probably, you might be interested to read the following docs: http://angular-translate.github.io/docs/#/guide/03_using-translate-service and http://angular-translate.github.io/docs/#/guide/18_events

I think it is good to resolve all promises, but a non-existing translation should return nothing - and not its key. Shouldn't this be changed to return undefined instead?
Nevertheless, if you need to have $translate(ids) fail if one key was not found, try this:
$q.all(ids.map(function(id) { return $translate(id); }))
	.then(function(resultArray) { ... },
		function() {
			// failed
		});

If you want to have all promises resolved, but want the missing translations to contain undefined, I have created two workarounds for this.
If an array of translations is enough, you could go with this solution:
$q.all(ids.map(createPromises))
	.then(function(resultArray) { ... });

function createPromises(id) {
	// if the translate promise fails,
	// it will now be resolved and return 'undefined' instead
	return $translate(id).catch(angular.noop);
}

If you need the translation keys, try this one:
$q.all(ids.map(createPromises))
	.then(resultToObject)
	.then(function(resultObject) { ... });

function resultToObject(results) {
	var resultObject = {}, i;
	for (i = 0; i < results.length; i++) {
		resultObject[ids[i]] = results[i];
	}
	return resultObject;
}

@JamesBoon Well, I disagree on

I think it is good to resolve all promises, but a non-existing translation should return nothing - and not its key. Shouldn't this be changed to return undefined instead?

We have a lot of different users using and requesting different behavior of "non-existing" translation keys. Therefore, you can customize the return value with a custom error handler. This is "pluggable" and the standard will return the key. If you need it differently - feel free to write the custom error handler :-).
See http://angular-translate.github.io/docs/#/guide/17_custom-error-handler

Technically: There is no final solution for a set of promises. If one promise fails, the the set will result either into a fail (reject) also or success (resolve). Also it is not being practicable to handle both responses (rejection, resolution) containing the same result. @JamesBoon If you want to know a rejection, you will have to use the "single promise" way.
Speaking of translation resolution, there is specific point of "correct" or "not correct" translation. The default of the library defines an unknown translation key as the key itself or even the provided default text. Another one will generate another default text provided by a custom error handler (mentioned by @tspaeth already)
If you have another opinion than returning the key, you are free to configure your own way, i.e. returning undefined and the need handling the default text management on your own. However, you should be aware of all consequences: This would results into  undefined  results in your templates (using the filter) which is probably not your intention. Therefore at least an empty string is a better alternative.. undoubtedly looking similar with a valid empty string.
Unless the custom error handler will not work for you, I think we can close this.

@tspaeth, @knalli ok, didn't know about the custom error handler. That is quite a cool feature, ty :smile:

Hi guys,
The error handler simply refuses to work in my case. Would you assist me please?
I have loaded the script as the last script from angular-translate.
I have added $translateProvider.useMissingTranslationHandlerLog() in my app config.
I have a non-existing key in one of my html templates in a filter.
It simply doesn't do anything, I see no activity in the console, no errors, nothing. The wrong key is just displayed as it is.
Please let me know where could I search for the problem..??
Thanks in advance!

Sorry, my bad! My warnings were disabled in the console. :D


DBZ-2681 Minor typo and format fixes needed for downstream rendering

DBZ-2681
This fixes a few glitches that I found downstream.

@Naros  As soon as this is merged and I can finish up the downstream work for ensuring that the Debezium User Guide that re-uses content from upstream master builds correctly.  Thanks!

@TovaCohen Thanks! Do you need me to backport it to 1.2?

@jpechane Thanks for merging this!
And no, no need to backport to 1.2, and I don't think that would work anyway. Thanks for checking though :-)


[UI] Add a visual cue to distinguish between anonymous and restricted content

If you are logged in as a user, you are able to see more content than someone anonymous.
Let's add some kind of visual marker to distinguish between anonymous and restricted stories and points.
@rudokemper Do you have any ideas as to what this visual marker could be?
Whoever takes on this ticket can feel free to input their design opinion as well! :)

Perhaps a lock in an unlocked position? That's something most communities everywhere have familiarity with :)


added server status to sublime status bar

@nosami @mat-mcloughlin @Jetski5822 @karlgluck you guys fancy reviewing this PR :wink:

Shouldn't be polling if that can be helped.

If I used stdout I won't know if the server is dead? Which seems to happen
a lot for some reason
On Sunday, 19 April 2015, Jason Imison<EMAIL_ADDRESS>wrote:

Shouldn't be polling if that can be helped.
--
Reply to this email directly or view it on GitHub
https://github.com/OmniSharp/omnisharp-sublime/pull/166#issuecomment-94212551
.


MIDI panic does not work

Version
alpha4d
What is the issue?
The mechanism Fred described to cut off all MIDI traffic (panic) by pressing the 4 outer corner pads simultaneously seems not to work at all. I had several situations where hanging notes were not cut off.

This has been dealt with. Mid panic is now implemented with the two octave change buttons rather than the 4 corners. It should work in scales and classic mode. Will add to other modes shortly. Previous issue was I was sending all notes off messages on all channels, but was not clearing the active note buffers. So, the next key that was pushed would hang notes if the notes were ones that had been turned off, but not cleared in the buffers.
tracking has been improved so this should be less, if not a non-existent midi panic problem.


libgeotiff dev location has moved

libgeotiff development location now lives on github at https://github.com/OSGeo/libgeotiff and the recipe should be updated. The announcement was made at https://lists.osgeo.org/pipermail/geotiff/2018-December/000847.html
Additionally, the next major release of libgeotiff is going to change the dependency relationships of these projects significantly. This is all a result of the gdalbarn.com efforts that @rouault has been grinding through. Here's a short synopsis:

PROJ 6.0 will be released with support for SQLite-based dictionaries, late-binding datum shifts, and a full implementation of a OGC Well Known Text SRS engine. PROJ will be dependent on SQLite going forward.
libgeotiff 1.5 (or 2.0) will be dependent on PROJ 6 for its dictionaries (replacing the CSV files)
GDAL 2.5 will be dependent on PROJ 6 for its dictionaries and WKT engine (replacing the CSV files)

Find out more at gdalbarn.com
Howard

Thanks for the heads up.

I believe we can close this. We are building geotiff 1.5.1 from the new source, proj4 6 has sqlite as a dependency. We are only waiting on gdal 2.5.
Thanks again @hobu!


Improve efficiency of filtering by a mix of working set IDs and partial UUIDs

See the "NOTE" in cli/src/invocation/filter.rs.

The refactor in #121 is going to make this harder to spot, but it will still be an issue.  #123 is probably necessary to fix it.

See the "NOTE" in cli/src/invocation/filter.rs.

There is no note in the cli/src/invocation/filter.rs.
~/code/taskchampion/cli/src/invocation (main)
 ◊ grep -i note *.rs
 ◊

Could you provide more context as to where this belongs?

The note was here, from #121.  And indeed, that PR did not fix it.  However, #145 did address this issue -- the working set is only read from storage once, and re-used as necessary.


Element Level Extension handling

Currently extensions are checked on a global level.
Similar to the redaction a recursive way to find all children and handle slicing has to be done.

Needs proper slicing for handling it, see issue 13

Extension URL is not part of the Structuredefinition, where do we get this from?


IMU custom_rpy  tag parsing added

Signed-off-by: Aditya<EMAIL_ADDRESS>🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸
🎉 New feature
Closes https://github.com/ignitionrobotics/ign-sensors/issues/174
Summary
According to REP 145, an IMU can report orientation with respect to the world, or some given reference frame. The method SetOrientationReference enables this, but this cannot be set via sdf currently.
The orientation_reference_frame tag ( http://sdformat.org/spec?ver=1.9&elem=sensor#imu_orientation_reference_frame) exposes this, but it is ignored currently in the Load method for the IMU sensor. This PR aims to set reference orientation when the localization tag is set to CUSTOM and custom_rpy is set to some non zero angles.
Test it
I've added a test case, but if one wants to run it independently, you can use the following sdf snippet :
<?xml version='1.0'?>
<sdf version='1.6'>
 <model name='m1'>
  <link name='link1'>
    <sensor name='imu_sensor' type='imu'>
      <topic>imu_test</topic>
      <update_rate>1</update_rate>
      <imu>
      <orientation_reference_frame>
      <localization>CUSTOM</localization>
      <custom_rpy>1.570795 0 0</custom_rpy>
      </orientation_reference_frame>
      </imu>
      <always_on>1</always_on>
      <visualize>true</visualize>
    </sensor>
  </link>
 </model>
</sdf>

After first update, if the IMU orientation is (0 0 0) by default, it should be now (-1.570795 0 0) as the reference axis has been modified in the sdf.
Checklist

[X] Signed all commits for DCO
[X] Added tests
[ ] Added example and/or tutorial
[ ] Updated documentation (as needed)
[ ] Updated migration guide (as needed)
[x] codecheck passed (See contributing)
[x] All tests passed (See test coverage)
[ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

looks good! don't forget to edit the commit message when squashing

This pull request has been mentioned on Gazebo Community. There might be relevant details there:
https://community.gazebosim.org/t/new-ignition-releases-2022-01-10/1228/1


Is mandatory url parameter?

If url paramter is mandatory, you can remove default: nil like following:
diff --git a/lib/fluent/plugin/in_sakuraio.rb b/lib/fluent/plugin/in_sakuraio.rb
index c9d48ac..7658d9d 100644
--- a/lib/fluent/plugin/in_sakuraio.rb
+++ b/lib/fluent/plugin/in_sakuraio.rb
@@ -9,7 +9,7 @@ module Fluent::Plugin

     helpers :thread

-    config_param :url, :string, default: nil
+    config_param :url, :string

     def configure(conf)
       super

Thank you for your many contributions.
It's mandatory. I'll fix soon.


algorithm optimization

code
    for {
	        // Determine the next entry to run.
	        sort.Sort(byTime(c.entries))

	       ....
    }

problem
method  sort.Sort will be called every time  in the for loop.
proposal
use min heap replace c.entries, in this way each add is in order do not need to sort.

When c.entries is already in order and add a new task, sort.Sort will use a suitable algorithm automatically to resort c.entries. this suitable algorithm is not less than heap.

When c.entries is already in order and add a new task, sort.Sort will use a suitable algorithm automatically to resort c.entries. this suitable algorithm is not less than heap.

`func main() {
arr := make([]int, 10000)
x := int(math.Sqrt(float64(len(arr))))
for i := 0; i < 1e5; i++ { // 0.20s user 0.12s system 154% cpu 0.206 total
	for j := 0; j <= x; j++ { // log n
	}
}
for i := 0; i < 1e5; i++ { // 8.99s user 0.19s system 100% cpu 9.148 total
	sort.Ints(arr)
}

}`


timeouts in all-chats

Description
Getting a lot of timeouts in all-chats this is maybe because the chats list is too large,
and looking for a way to paginate them. (like messages endpoint)
also if possible a way to get the last message with each chat
Related

Might Be Related To #1048
PRs in WA-JS Fixing This:

https://github.com/wppconnect-team/wa-js/pull/1015

https://github.com/wppconnect-team/wa-js/pull/1037

Environment

Wppconnect-server version(s): [e.g. 2.0.27, 2.2.1]
Browser: [e.g. Chrome 87, Chromium 85]
OS: [e.g. OSX 10.13.4, Windows 10]
Node version: [e.g. Node 8, Node 14]
WhatsApp version: [e.g. 2.2126.14]
MultiDevice (BETA): yes/no
config.json: [Your src/config.json file content]

Steps to Reproduce

Call all-chats
Sometimes it gets timed out.

Log Output
cURL error 28: Operation timed out after 30004 milliseconds with 0 out of -1 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://XXXXX:21465/api/WPP-SESSION/all-chats

I have already managed to work on a functional solution that will return chats paginated by pages and allow changing the quantity, etc. Tomorrow, I will try to work on the last message to release it correctly, but the paginated request turned out to be very fast.

@icleitoncosta wow, you're amazing 🚀🚀

@edgardmessias still not completely fixed

@icleitoncosta @icleitoncosta
Can you re open this?
Also, if i can get any guide on how to do it in @wppconnect-team/wppconnect would be appreciated, because i failed to understand the repo after i (with help of you both ❤) implemented it on wa-js https://github.com/wppconnect-team/wa-js/pull/1037

Hi, you can use the route list-chats.
Has examples to do this on Swagger.
This was added by commit 456070242ff78609d1187e80c7b2c6e173faebfe


[BUG] Invalid metering mode (custom)

I'm trying to use a custom metering mode for AGC/AEC and I have defined one in a tuning file, that is based on the default one. However, when trying to use this mode (while also specifying this tuning file), I get an error
ERROR: *** Invalid metering mode: dashcam ***

At first I thought it didn't recognize/find this mode, but the error for non-existing modes is different:
terminate called after throwing an instance of 'std::runtime_error'
  what():  Agc: no metering mode custom
Aborted

Here is the result of the camera-bug-report tool:
debug.txt
Here is the used tuning file (renamed file ending because of upload restrictions):
imx477_modified.txt

Hi, libcamera doesn't actually use strings to identify different modes, it creates explicit enumerations which we have match. As far as I can see, "custom" should work.You'll need to call it "custom" in the tuning file and use "custom" on the command line. What happens if you try that?

Yes, that works. Thank you!
It was just a misunderstanding of the documentation then. Reading it again it seems more obvious now.


Quickstart keys don't work.

Steps to reproduce

Using https://aihabitat.org/habitat-api/tutorials/quickstart.html script
Run with python quickstart_example.py or whatever
Try using the keys

Observed Results
Using
FORWARD_KEY="w"
LEFT_KEY="a"
RIGHT_KEY="d"
FINISH="f"

doensn't make agent move in right direction.
Expected Results
For me (and not using caps, just copied what I had written down),
 A IS FORWARD
 D IS LEFT
 F IS RIGHT

The action matches up correctly but the keys seem wrong.  Also using W for forward causes the env.episode_over to become True (so presumably that is what would correspond to F)
Relevant Code
Easy fix would be to just change the key mappings so w = 1, a = 2, d = 3, f = 0
But I dont understand much of this project yet, it seems like its possibly using
class _DefaultSimulatorActions(Enum):
    STOP = 0
    MOVE_FORWARD = 1
    TURN_LEFT = 2
    TURN_RIGHT = 3
    LOOK_UP = 4
    LOOK_DOWN = 5

but looking at the env.action_space theres only 4 options, and I dont see anything in the config or elsewhere as to why this would be 4 and not 6.

Looks like that was hard-coded for some reason and broke when we changed the action mapping.  Fix: https://github.com/facebookresearch/habitat-api/pull/147
We by default only load an agent with 4 actions, but we define a mapping between action name and action number for all 6 actions we have a config for (you can see https://github.com/facebookresearch/habitat-api/blob/master/examples/new_actions.py#L134 for how to change which action space config gets load, the "V1" config loads all 6 actions) to improve consistency between different people's models/code.

@erikwijmans hmm okay thanks for that, still trying to figure some stuff out.
Also your fix is still broken lol

Whoops!  Forgot to check to make sure the exit key worked :)

@grahamannett should fixed now. Right?

@mathfac yeah, thanks


[Comment] Reusability aka Redux Dependency

This not a bug, nor a feature request...just a comment. Discussions are welcome.
I decided not to use this component due to fact, that it uses redux as dependency.
Don't get me wrong, Redux/Flux is an adequate architectural solution for managing application state.
IMHO a reusable component should isolate its behavior and should be agnostic to any architecture pattern. Using Flux to manage a components state is not a good design decision, as it

breaks component isolation (how to deal with several mounted components?! - reinvent instance handling!)
introduces boilerplate
exposes implementation details

I cannot see any good reason why react-autosuggest uses redux.
Coincidentally, I wrote a post about it  some months ago, because I tried to apply Flux to a custom suggestion input.

I agree. Redux should not be coupled with this component.
It seems useless the way it is done, not even composable/modulable with other stores. Plus the dependency problem. You should probably get rid of it.

Yeah, and it causes a bug... redux.createStore is not a function etc etc.  Not really sure why this design decision happened.  Thinking about starting a fork @Codii @ohager

https://github.com/moroshko/react-autosuggest/issues/296

@ohager @Codii @thebigredgeek Thanks for your feedback!
redux and react-redux dependencies were removed in v8.0.0.

You're welcome. Awesome Work.


Fix TestStorageBucketPipelineRun to actually, y'know, run.

Changes
It was using the UpdateConfigMap function from Knative test, but
that assumes that configMap.Data is already a non-nil map. Since in
a normal test scenario with the default config-artifact-bucket.yaml
in config/, the relevant configMap.Data is in fact nil, the test
as written will just panic all the time.
Mind you, the test will still fail, but that'll be due to #819.
We haven't caught this, or #819, due to not running the bucket-related
tests in CI!
/assign @bobcatfish
/assign @vdemeester
/assign @dlorenc
/assign @dwnusbaum
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:

[x] Includes tests (if functionality changed/added)
[x] Includes docs (if user facing)
[x] Commit messages follow commit message best practices

See the contribution guide
for more details.
Release Notes
n/a

@abayer just checking my understanding: the test still won't actually run in CI, but I assume you verified this fix manually?

Yup, in order to reproduce #819.


reproduce Table2

Hi, thanks for the reproducibility of your code.
A little question about the result of co3d and eval_cosy.py.
I got result as follow:
  35.5Hz       Normal_l1: 0.96366      Normal_mse: 0.17515     Normal_dot: 0.26274     Normal_deviation: 37.98527      Albedo_sie: 0.07594     Albedo_l1: 0.85689      Albedo_ssim: 0.76152    Spec_l1: 0.12306        Spec_mse: 0.07565       Spec_sie: 0.04684

from which Spec_l1: 0.12306        Spec_mse: 0.07565 are different from reported results in Table 2.

Hi, I found I didn't add neural refinement during training.
Can you also provide a co3d_nr.yml for training?


Fix code quotes in Readme

The URL wasn't being rendered because it was inside code quote. Swapped them around, and also changed a bit of wording.

Wehay, thanks!


BinanceDexApiError[code=404,message=account not found]

I have completed the addition of binan intelligent chain test network on metamask wallet, and I have generated the address of the response and exported the private key. I can execute the code to remove the error, what is the problem?
BinanceDexApiRestClient client = BinanceDexApiClientFactory.newInstance().newRestClient(BinanceDexEnvironment.TEST_NET.getBaseUrl());
Wallet wallet = new Wallet("e73e281c42264c5609729e57cc922e3c97a7d40bf90a3cf4ede1f1ade5296cee",BinanceDexEnvironment.TEST_NET);
client.getAccount(wallet.getAddress());

Error is as follows:

我也是这个问题，不知道怎么解决


Version on supermarket is different than version on github.

Has the version number on github been blind rev-ed?
Version 1.37.0 on github has a lwrp 'windows_http_acl'
Version 1.37.0 on the supermarket doesn't have 'windows_http_acl'
I'm not sure how this is possible, but it is bad.

sigh

I don't think this is correct: https://github.com/opscode-cookbooks/windows/tree/v1.37.0/resources
1.37.0 does not have windoes_http_acl

So as I look at this further, I see that the master branch is acting as a development branch. The readme in HEAD is newer than what was released with 1.37.0. The windows_http_acl feature was just added in this commit on may 26th. 83d20de5f42665ae1acc86491b9688fba179a057
Further confusion was added because I"m new to chef, and didn't realize that putting the git repo in my berksfile, caused berks to pull from github HEAD. Even though knife cookbook show windows  says that I have cookbook version 1.37.0, thats a lie.  I actually have 1.37.0 + everything committed to master since may 14th.
I'll have to be more careful about what I put in my berks file. One way that github could have saved me from this mistake, is if the git repo used the git-flow branching model, and only merged from dev to master when the version is bumped, then it would have saved me (and my chef noob coworkers) from making the mistake of accidentally using a non versioned cookbook.

yea, we should bump the version after a release to make it clear you're on a dev version... sorry for the confusion