| Symbol | Meaning | Example | Notes |
|---|---|---|---|
\mathcal{C}, \mathcal{D}, \mathcal{E} |
Categories | Calligraphic uppercase letters for categories. Multi-letter names allowed. In LaTeX, use 'calrsfs' package for better multi-letters. | |
A, B, X, Y |
Objects | Plain uppercase letters. Subscripts indicate which |
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
| import React, { type PropsWithChildren } from "react"; | |
| type Props = { | |
| with: () => boolean; | |
| } & PropsWithChildren | |
| const Protected: React.FC<Props> = props => | |
| props.with() ? <>{props.children}</> : <UserLogin />; | |
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
| 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) |
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
| 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, |
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
| 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. |
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
| 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 |
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
| import math | |
| from dataclasses import dataclass | |
| from math import sqrt | |
| """ | |
| Scala-like case class pattern mathing in python >= 3.10 | |
| """ | |
| @dataclass(frozen=True) |
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
| 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._ |
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
| 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 |
NewerOlder