This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: guestbook-clone-svc | |
| labels: | |
| app: guestbook | |
| spec: | |
| ports: | |
| - port: 3000 | |
| targetPort: http-server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // declare your component | |
| import type { ComponentPropsWithoutRef } from 'react'; | |
| interface ButtonProps extends ComponentPropsWithoutRef<"button"> { | |
| label: string; | |
| } | |
| export function MyButton({ label, ...rest }: ButtonProps) { | |
| return (<button><button {...rest} /></button>); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Initializes parameters "a" and "b" randomly | |
| np.random.seed(42) | |
| a = np.random.randn(1) | |
| b = np.random.randn(1) | |
| print(a, b) | |
| # Sets learning rate | |
| lr = 1e-1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lr = 1e-1 | |
| n_epochs = 1000 | |
| torch.manual_seed(42) | |
| a = torch.randn(1, requires_grad=True, dtype=torch.float, device=device) | |
| b = torch.randn(1, requires_grad=True, dtype=torch.float, device=device) | |
| for epoch in range(n_epochs): | |
| yhat = a + b * x_train_tensor | |
| error = y_train_tensor - yhat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // remember to wrap it up in try/catch | |
| async function lookupPromise() { | |
| return new Promise((resolve, reject) => { | |
| dns.lookup("www.aWebSiteName.am", (err, address, family) => { | |
| if(err) reject(err); | |
| resolve(address); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: gateway.networking.k8s.io/v1beta1 | |
| kind: Gateway | |
| metadata: | |
| name: httpbin-gateway | |
| spec: | |
| gatewayClassName: istio | |
| listeners: | |
| - name: http | |
| #hostname: "httpbin.example.com" | |
| port: 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: gateway.networking.k8s.io/v1beta1 | |
| kind: Gateway | |
| metadata: | |
| name: httpbin-gateway | |
| spec: | |
| gatewayClassName: istio | |
| listeners: | |
| - name: http | |
| hostname: "httpbin.example.com" | |
| port: 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: gateway.networking.k8s.io/v1beta1 | |
| kind: HTTPRoute | |
| metadata: | |
| name: httpbin | |
| spec: | |
| parentRefs: | |
| - name: httpbin-gateway | |
| hostnames: ["httpbin.example.com"] | |
| rules: | |
| - matches: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{- $default := dict "boolProp" true "stringProp" "Override me" }} | |
| {{- $explicit := dict "boolProp" false "stringProp" "String value is overriden, but bool value is not!" }} | |
| $default: | |
| {{- $default | toYaml | nindent 2 }} | |
| $explicit: | |
| {{- $explicit | toYaml | nindent 2 }} | |
| # Here is the bug: `boolProp` can't be overriden with a `false` value by | |
| # `merge`. `boolProp` should be false here (the first argument to `merge` has |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| A stationary test is used in time series analysis to determine whether a given time series is stationary or not. Stationarity is a key assumption in many time series models, and if a time series is found to be non-stationary, it may need to be transformed or differenced before it can be effectively modeled. | |
| The purpose of conducting a stationary test on a time series is to assess whether the statistical properties of the series remain constant over time, such as the mean, variance, and autocorrelation. A stationary time series is one in which these properties do not change over time, meaning that the distribution of values remains the same across different time periods. | |
| There are several methods for conducting stationary tests, including visual inspection, statistical tests such as the Augmented Dickey-Fuller (ADF) test or the Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test, and time series decomposition methods such as seasonal decomposition of time series (STL). | |
| By conducting a stationary test, analys |
NewerOlder