This file contains 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
library(tidyverse) | |
bind_rows( | |
trig = enframe(list(a = sin, b = cos)), | |
other = enframe(list(a = log, b = sqrt)), | |
.id = 'id') %>% | |
group_by(id, name) %>% | |
summarise(x = seq(1,10,len=100), | |
y = value[[1]](x), | |
.groups = 'drop') %>% |
This file contains 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
lemma lt_aux_two (a b : mynat) : succ a ≤ b → a ≤ b ∧ ¬ (b ≤ a) := | |
begin | |
intro h, | |
split, | |
exact le_trans _ _ _ (le_succ_self a) h, | |
intro h2, | |
exact not_succ_le_self _ (le_trans _ _ _ h h2), | |
end |
This file contains 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
library(serial) | |
# See https://www.arduino.cc/reference/en/language/functions/communication/serial/begin/ | |
# SERIAL_8N1 (default) = n,8,1 | |
con <- serialConnection(name = "test", | |
port = "COM3", | |
mode = "9600,n,8,1", | |
newline = 0, | |
translation = "binary") |
This file contains 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
dir | |
ls | |
ls *.py | |
cd Docs/ | |
ls | |
cd Python/ | |
ls | |
%load test.py |
This file contains 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
static void Foo() | |
{ | |
//Action<Action<int>, Action<string>> a = (a1, a2) => Example(3, a1, a2); | |
//var aa = a.MergeYields().AsEnumerable(); | |
var x = MergeYields<int, string>((a1, a2) => Example(3, a1, a2)); | |
Func<int, IEnumerable<Either<int, string>>> f = n => | |
MergeYields<int, string>((a1, a2) => Example(n, a1, a2)) | |
.AsEnumerable(); | |
var tb = new TransformManyBlock<int, Either<int, string>>(f); | |
ITargetBlock<int> intSink = null; |
This file contains 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
\documentclass[11pt]{article} | |
\title{Hello World} | |
\begin{document} | |
This is a test $x^2$. A real test | |
\[ | |
\int_0^1 e^{-t}dt. | |
\] | |
\end{document} |
This file contains 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 System.Random | |
rollDice = getStdRandom (randomR (1,6)) | |
main = do roll <- rollDice | |
print roll | |
sg <- getStdGen | |
let rl = randomRs (1,6) sg | |
print $ take 5 rl |
This file contains 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
public class Test { | |
public static void main(String[] args) throws Exception { | |
System.out.println("Hello world!"); | |
} | |
} |