- Vectors are written with arrows:
$\vec{A}, \vec{B}$ - Components of vectors are written as small letters:
$a_i, b_i$ where$i = 1,2,3$ - Basis is
$(\vec{e_1}, \vec{e_2}, \vec{e_3})$
| Notation | Meaning | Expansion (Cartesian coordinates) |
|---|
| import React, { type PropsWithChildren } from "react"; | |
| type Props = { | |
| with: () => boolean; | |
| } & PropsWithChildren | |
| const Protected: React.FC<Props> = props => | |
| props.with() ? <>{props.children}</> : <UserLogin />; | |
| cmake_minimum_required(VERSION 3.30) | |
| project(project_cpp VERSION 0.1.0) | |
| set(CMAKE_CXX_STANDARD 20) | |
| set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
| SET(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror" CACHE PATH "" FORCE) | |
| set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/test/lib) | |
| set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/test/lib) |
| ThisBuild / version := "0.1.0-SNAPSHOT" | |
| ThisBuild / scalaVersion := "3.4.0" | |
| lazy val fpsCode = (project in file(".")) | |
| .settings( | |
| name := "fps-code", | |
| idePackagePrefix := Some("ge.zgharbi.study.fps"), | |
| libraryDependencies ++= Seq( | |
| "org.scalameta" %% "munit" % "0.7.29" % Test, |
| align.preset = none | |
| # From https://scalameta.org/scalafmt/docs/configuration.html | |
| # | |
| # Keep in mind that 80 characters fit perfectly on a split laptop | |
| # screen with regular resolution. | |
| # | |
| # GitHub mobile view only shows 80 characters and sometimes you might | |
| # review code on your phone. | |
| # | |
| # Consider refactoring your code before choosing a value above 100. |
| FROM alpine:3.10 | |
| ARG SPARK_VERSION=3.0.0-preview | |
| ARG HADOOP_VERSION_SHORT=3.2 | |
| ARG HADOOP_VERSION=3.2.0 | |
| ARG AWS_SDK_VERSION=1.11.375 | |
| RUN apk add --no-cache bash openjdk8-jre python3 | |
| # Download and extract Spark |
| import math | |
| from dataclasses import dataclass | |
| from math import sqrt | |
| """ | |
| Scala-like case class pattern mathing in python >= 3.10 | |
| """ | |
| @dataclass(frozen=True) |
| import $ivy.`dev.zio::zio:1.0.0-RC8-12` | |
| import $ivy.`dev.zio::zio-streams:1.0.0-RC8-12` | |
| import zio._, zio.stream._ | |
| object Step1 { | |
| import java.nio.file.{Files, Paths, Path} | |
| import scala.collection.JavaConverters._ | |
| import zio.blocking._ |
| import matplotlib.pyplot as plt | |
| import pandas as pd | |
| from pandas import DataFrame | |
| from pandas.io.common import urlopen | |
| import numpy as np | |
| URL = "https://covidtracking.com/api/v1/states/daily.json" | |
| ALPHA = 0.1 | |
| LOGARITHMIC = False |
| # Number of veterans in Russia | |
| import matplotlib.pyplot as plt | |
| import pandas as pd | |
| from matplotlib.axes import Axes | |
| from matplotlib.figure import Figure | |
| raw_data_source = "https://twower.livejournal.com/2408991.html" |