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
[Unit] | |
Description=Offload /home/deck/.var/app/ | |
[email protected] | |
[email protected] | |
[Mount] | |
What=/run/media/mmcblk0p1/deck/.var/ | |
Where=/home/deck/.var/ | |
Type=none | |
Options=bind,nofail | |
[Install] |
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
package main | |
import ( | |
"fmt" | |
) | |
// newtype Cont r a = Cont ((a -> r) -> r) | |
type Cont[Result any, A any] func(func(A) Result) Result |
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
package main | |
import "fmt" | |
// Haskell: data R a = R (R a) | E a | |
type R [Result any] func() (R[Result], Result) | |
// Haskell: Cont (R Result) T | |
type Cont [T any, Result any] func(T) (R[Result], Result) |
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
package main | |
import "fmt" | |
// Haskell: data R a = R (R a) | E a | |
type R func() (R, []int) | |
// Haskell: Cont (R [a]) [a] | |
type Cont func([]int) (R, []int) |
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 Control.Monad.Trans.Cont | |
import Data.Function | |
data R a = R (R a) | E a | |
-- This function is called from 'shift' and 'shift' returns immediately | |
-- (without calling further continuation) because result is already here - 'R' | |
-- value. Continuation 'k' will be called later, when evaluation of returned | |
-- 'R' value is forced in 'run'. |
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
package main | |
import ( | |
"fmt" | |
"sync" | |
"net/http" | |
"bytes" | |
) | |
func worker(i int, ch <-chan interface{}) { |
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
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#include <Windows.h> | |
using namespace std; | |
vector<string> splitToBlocks(const string& text, size_t blockSize) { | |
vector<string> blocks; |
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
# cat /etc/systemd/system/test.timer | |
[Timer] | |
OnCalendar= | |
OnCalendar=*-*-* *:*:00 | |
RandomizedDelaySec=0 | |
Unit=test.target | |
[Install] | |
Also=test.target |
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 traceback | |
n = 6 | |
# Рекурсия. | |
def summa_n1(x): | |
global n_calls | |
global max_stack | |
n_calls += 1 |
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 dis | |
import cProfile | |
import timeit | |
def f1(): | |
global y | |
global x | |
k = y / x |
NewerOlder