generated fixtures for download.yaml

What does this PR change?

generated fixtures for download.yaml
Fixes #140

Does the PR depend on any other PRs or Issues? If yes, please list them.

No

Checklist
I confirm, that I have...

[ ] Read and followed the contributing guide in CONTRIBUTING.md
[ ] Added tests for this PR
[ ] Formatted the code using go fmt (if applicable)
[ ] Updated documentation on the Paralus docs site (if applicable)
[ ] Updated CHANGELOG.md

@niravparikh05 You need to rebase current branch, previous commits are already merged to main that are still showing in this PR.


CDK update forgot to update the "constructs" package

Structural typing compatibility is broken.
PR that lacked the lockstep update: https://github.com/sst/sst/pull/3426
https://github.com/sst/sst/blame/fc3dd92a6f116b42f60196fd8a3ce8a2d04a9c85/packages/sst/package.json#L78

Here's the dependency graph:
devDependencies:
aws-cdk-lib 2.101.1
└── constructs 10.3.0 peer
sst 2.34.3
├─┬ @aws-cdk/aws-apigatewayv2-alpha 2.101.1-alpha.0
│ ├─┬ aws-cdk-lib 2.101.1 peer
│ │ └── constructs 10.3.0 peer
│ └── constructs 10.3.0 peer
├─┬ @aws-cdk/aws-apigatewayv2-authorizers-alpha 2.101.1-alpha.0
│ ├─┬ @aws-cdk/aws-apigatewayv2-alpha 2.101.1-alpha.0 peer
│ │ ├─┬ aws-cdk-lib 2.101.1 peer
│ │ │ └── constructs 10.3.0 peer
│ │ └── constructs 10.3.0 peer
│ ├─┬ aws-cdk-lib 2.101.1 peer
│ │ └── constructs 10.2.69 peer
│ └── constructs 10.2.69 peer
├─┬ @aws-cdk/aws-apigatewayv2-integrations-alpha 2.101.1-alpha.0
│ ├─┬ @aws-cdk/aws-apigatewayv2-alpha 2.101.1-alpha.0 peer
│ │ ├─┬ aws-cdk-lib 2.101.1 peer
│ │ │ └── constructs 10.3.0 peer
│ │ └── constructs 10.3.0 peer
│ ├─┬ aws-cdk-lib 2.101.1 peer
│ │ └── constructs 10.2.69 peer
│ └── constructs 10.2.69 peer
├─┬ aws-cdk-lib 2.101.1
│ └── constructs 10.2.69 peer
└── constructs 10.2.69

Error occurs using Alarm.addAlarmAction(SnsAction):
Argument of type 'SnsAction' is not assignable to parameter of type 'IAlarmAction'.
  Types of property 'bind' are incompatible.
    Type '(_scope: Construct, _alarm: IAlarm) => AlarmActionConfig' is not assignable to type '(scope: Construct, alarm: IAlarm) => AlarmActionConfig'.
      Types of parameters '_scope' and 'scope' are incompatible.

Was this was fixed in the latest releases?

hmm @thdxr knows this better.. afaik CDK doesn't pin constructs to a specific version — https://github.com/aws/aws-cdk/blob/v2.101.1/packages/aws-cdk-lib/package.json#L175
@closesimple-wl Can you try removing the node_modules and the lock file and install the deps again?

Thanks guys for looking into this.  Upon further inspection, this appears to only be an issue in VS Code's TypeScript compiler...?
The local and CI build works before and after deleting the old "node_modules".  I wonder what could be wrong with VS Code...  Not even the magical TypeScript: Restart TS Server command makes a difference (as it shouldn't).  Anyway, seems to not be an issue with SST.
I guess the good news, to your point, is, at least at the moment, the CDK doesn't have a semantic versioning bug.

I spoke too soon.  Remembered we're not verifying types on build.  This is an issue when running the tsc compiler, so I'm going to reopen this issue.
It's possible the bug is upstream.  Or not.

So I think the problem is the CDK isn't paying enough attention to/testing thoroughly for semantic versioning bugs across its wonderful constructs dependency.  And/or they don't really understand how structural typing (yay TypeScript...) is vastly different than nominal typing.
It's clear that CDK's https://github.com/aws/aws-cdk/blob/v2.101.1/packages/aws-cdk-lib/package.json#L175 isn't actually semantic, otherwise this error wouldn't be occurring.  AWS needs to figure out how all versions of major version 10 constructs should interoperate, at compile-time at least.
Yes the CDK is a huge conglomeration of projects.  But that's not my problem; they need to figure this out.
But the problem remains: The user can pin an arbitrary 10-ish version via overrides to workaround this problem to the extent that their combination of used CDK features and arbitrary choice happen to work, as I have.
However, since SST is a conceptual layer on top of the CDK mess, shouldn't SST not pin its constructs version, and instead do a ^10.2.69 thing, specifying the minimal version you need, for whatever reason that need is.  It might not functionally affect this, but semantically SST is not an application; SST is a library.  Libraries need to accept more version combinations, and therefore libraries should only rarely ever be "pinning" any dependency.

We are transition this repo to https://github.com/sst/v2 and are closing this issue for now. If it is still relevant please reopen it there - sorry for the trouble


beer-song: Add canonical data

Add canonical data for Beer Song.
Problem Description: here
Closes: https://github.com/exercism/todo/issues/71

The PR is missing a link to the problem description.

@petertseng I think the array approach is slightly easier to view. But I don't necessarily feel that this PR should be updated accordingly.

Looks like y'all don't mind, so we merge as-is.
Thanks!


set up on a new dataset and predict on new data points

hi @asolin @wil-j-wil !!
Really interested in the models and i am trying to set up the models on the new dataset.
can you please just review the below to see if what I'm doing makes sense.
import sys
sys.path.insert(0, '../')
import numpy as np
from jax.experimental import optimizers
import matplotlib.pyplot as plt
import time
from sde_gp import SDEGP
import approximate_inference as approx_inf
import priors
import likelihoods
from utils import softplus_list, plot
from sklearn.preprocessing import StandardScaler

plot_intermediate = False

import yfinance as yf

Y = np.array(yf.download("SPY", start="2008-01-01", end="2020-12-30")['Close'])

X=np.linspace(1,100,len(Y)).reshape(len(Y),1)

Y=Y.reshape(len(Y),1)

print('loading data ...')
#D = np.loadtxt('../../data/mcycle.csv', delimiter=',')
#X = D[:, 1:2]
#Y = D[:, 2:]
N = X.shape[0]

# Standardize
X_scaler = StandardScaler().fit(X)
y_scaler = StandardScaler().fit(Y)
Xall = X_scaler.transform(X)
Yall = y_scaler.transform(Y)

# Load cross-validation indices
cvind = np.loadtxt('../experiments/heteroscedastic/cvind.csv').astype(int)

# 10-fold cross-validation setup
nt = np.floor(cvind.shape[0]/10).astype(int)
cvind = np.reshape(cvind[:10*nt], (10, nt))

np.random.seed(123)
fold = 0

# Get training and test indices
test = cvind[fold, :]
train = np.setdiff1d(cvind, test)

# Set training and test data
X = Xall[train, :]
Y = Yall[train, :]
XT = Xall[test, :]
YT = Yall[test, :]

plt.figure(1, figsize=(12, 5))
plt.clf()
plt.plot(X_scaler.inverse_transform(X), y_scaler.inverse_transform(Y), 'k.', label='train')
plt.plot(X_scaler.inverse_transform(XT), y_scaler.inverse_transform(YT), 'r.', label='test')
plt.legend()
plt.xlabel('time (milliseconds)')
plt.ylabel('accelerometer reading');

Hi @andrewcztrack
Glad to see you are trying things out. Everything looks OK except that you're using the cross-validation indices that we stored specifically for a different (smaller) data set. So you've truncated your data (I assume unintentionally).
To generate your own train/test split, you could use the code below:
# 10-fold cross-validation setup
ind_shuffled = np.random.permutation(N)
ind_split = np.stack(np.split(ind_shuffled, 10))  # 10 random batches of data indices
fold = 0
# Get training and test indices
test = ind_split[fold]
train = np.concatenate(ind_split[np.arange(10) != fold])

Any other questions, let me know.
Will

Hi @wil-j-wil !!! thank you so much! you are so generous with your time!!
so generally speaking i want the model to be trained and then predict into the future.
So be trained on 90 days and predict forward for the next 10 days.
Also to understand the cross validation experiment with your code below.
Essentially two experiments with the models.
I assume that it would be advantageous to standardise the values with X and Y values as it non stationary heteroscedastic data?
Is my logic correct?
To note i tried to code below but I am getting an error.
import sys
sys.path.insert(0, '../')
import numpy as np
from jax.experimental import optimizers
import matplotlib.pyplot as plt
import time
from sde_gp import SDEGP
import approximate_inference as approx_inf
import priors
import likelihoods
from utils import softplus_list, plot
from sklearn.preprocessing import StandardScaler

plot_intermediate = False

import yfinance as yf

Y = np.array(yf.download("SPY", start="2008-12-01", end="2020-12-30")['Close'])

X=np.linspace(1,100,len(Y)).reshape(len(Y),1)

Y=Y.reshape(len(Y),1)

print('loading data ...')
#D = np.loadtxt('../../data/mcycle.csv', delimiter=',')
#X = D[:, 1:2]
#Y = D[:, 2:]
N = X.shape[0]

# Standardize
X_scaler = StandardScaler().fit(X)
y_scaler = StandardScaler().fit(Y)
Xall = X_scaler.transform(X)
Yall = y_scaler.transform(Y)

# 10-fold cross-validation setup
ind_shuffled = np.random.permutation(N)
ind_split = np.stack(np.array_split(ind_shuffled, 5))  # 10 random batches of data indices
fold = 0
# Get training and test indices
test = ind_split[fold]
train = np.concatenate(ind_split[np.arange(10) != fold])

# Get training and test indices
#test = cvind[fold, :]
#train = np.setdiff1d(cvind, test)

# Set training and test data
X = Xall[train, :]
Y = Yall[train, :]
XT = Xall[test, :]
YT = Yall[test, :]

plt.figure(1, figsize=(12, 5))
plt.clf()
plt.plot(X_scaler.inverse_transform(X), y_scaler.inverse_transform(Y), 'k.', label='train')
plt.plot(X_scaler.inverse_transform(XT), y_scaler.inverse_transform(YT), 'r.', label='test')
plt.legend()
plt.xlabel('time (milliseconds)')
plt.ylabel('accelerometer reading');

[*********************100%***********************]  1 of 1 completed
loading data ...
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-27-68ca1431719f> in <module>
     38 # 10-fold cross-validation setup
     39 ind_shuffled = np.random.permutation(N)
---> 40 ind_split = np.stack(np.array_split(ind_shuffled, 5))  # 10 random batches of data indices
     41 fold = 0
     42 # Get training and test indices

<__array_function__ internals> in stack(*args, **kwargs)

~/miniconda3/envs/myenv1/lib/python3.8/site-packages/numpy/core/shape_base.py in stack(arrays, axis, out)
    423     shapes = {arr.shape for arr in arrays}
    424     if len(shapes) != 1:
--> 425         raise ValueError('all input arrays must have the same shape')
    426
    427     result_ndim = arrays[0].ndim + 1

ValueError: all input arrays must have the same shape

That error is because the data does not divide evenly into 5 batches. You could truncate the data slightly to fix it.
However, didn't you say that you wanted to train on the past and then predict into the future? In this case, you want to just set the first 90 days to be the training data and the last 10 to be test, so you don't need this random split any more.
Standardising the data might be fine, but just remember that this means the input will no longer be the exact time stamp.


Extending the PublicActivity::Activity model

Hi there, I'm wanting to extend the model, in my case, with the unread gem and pundit. I've tried something like this:
class PublicActivity::Activity
	acts_as_readable :on => :created_at

	def self.policy_class
    ActivityPolicy
  end
end

In my models directory but it doesn't seem to get picked up. Should I be monkey patching a different class? I tried making my own class and inheriting from it, but public_activity doesn't seem to be designed with this in mind as there are some hard coded references to PublicActivity::Activity etc...

Looks like you've already answered this question here:
https://github.com/chaps-io/public_activity/issues/222
Sorry to bother you :D


#7574 improve js autotranslation

breaks doc/python/AutoTranslation.ipynb
also make sure all files have a copyright banner.


Combobox: Cancel mouseDown bubble from listbox div tag in order to help scrollbar

Fixes #1818
@Prophetess Please see if this fixes your issue. I'm thinking this should work due to the order that events fire:

https://stackoverflow.com/questions/34804719/detect-mousedown-click-event-on-browsers-scrollbar
https://stackoverflow.com/questions/50895064/handling-blur-click-and-focus-events-of-dropdown-input-suggestion-lists-in-react
https://codepen.io/mudassir0909/pen/eIHqB

I'm not seeing the issue in Chrome on my Mac at all and I am able to click the scrollbar in this example http://design-system-react-components.herokuapp.com/?selectedKind=SLDSCombobox&selectedStory=Readonly Multiple Selection&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel. Are you testing in Windows? What OS and browser are you seeing the scrollbar bug in?
I don't think this should interfere with clicks on the menu items, since this event.preventDefault is on the listbox div and not on the listitem themselves. I think this should work. Generally, we haven't done much testing for SLDS on touch devices, so it's difficult to tell.

CONTRIBUTOR checklist (do not remove)
Please complete for every pull request

[ ] First-time contributors should sign the Contributor License Agreement.  If you haven't before, wait a few minutes and a bot will comment on this pull request with instructions.
[ ] npm run lint:fix has been run and linting passes.
[ ] Mocha, Jest (Storyshots), and components/component-docs.json CI tests pass (npm test).
[ ] Tests have been added for new props to prevent regressions in the future. See readme.
[ ] Review the appropriate Storybook stories. Open http://localhost:9001/.
[ ] The Accessibility panel of each Storybook story has 0 violations (aXe). Open http://localhost:9001/.
[ ] Review tests are passing in the browser. Open http://localhost:8001/.
[ ] Review markup conforms to SLDS by looking at DOM snapshot strings.

REVIEWER checklist (do not remove)

[ ] TravisCI tests pass. This includes linting, Mocha, Jest, Storyshots, and components/component-docs.json tests.
[ ] Tests have been added for new props to prevent regressions in the future. See readme.
[ ] Review the appropriate Storybook stories. Open http://localhost:9001/.
[ ] The Accessibility panel of each Storybook story has 0 violations (aXe). Open http://localhost:9001/.
[ ] Review tests are passing in the browser. Open http://localhost:8001/.
[ ] Review markup conforms to SLDS by looking at DOM snapshot strings.

Required only if there are markup / UX changes

[ ] Add year-first date and commit SHA to last-slds-markup-review in package.json and push.
[ ] Request a review of the deployed Heroku app by the Salesforce UX Accessibility Team.
[ ] Add year-first review date, and commit SHA, last-accessibility-review, to package.json and push.
[ ] While the contributor's branch is checked out, run npm run local-update within locally cloned site repo to confirm the site will function correctly at the next release.

@Prophetess Here is a deploy of Storybook to test out the event update https://design-system-react-co-pr-1911.herokuapp.com/?selectedKind=SLDSCombobox&selectedStory=Readonly Multiple Selection&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel


ability to run in the client

I wanted to decode the token on the client side.
But due to dependency on joi which has no client side support, I can not use node-jsonwebtoken on the client side.
Please remove dependency on joi library to resolve this.

I used jwt-decode to accomplish my use case.

Thanks @ehartford I had this exact same problem, wanted to do a simple check to see if it's first expired before sending requests to the APIs.

Thanks @ehartford for letting us know the solution as well :)
I close the issue, be free to reopen it if needed.