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 random | |
N = 4 # Number of chores | |
p = 2 # Number of players | |
preferences = [] | |
for i in range(p): | |
vs = list(range(N)) | |
random.shuffle(vs) | |
preferences.append(vs) |
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
www.youtube.com##ytd-watch-next-secondary-results-renderer.style-scope.ytd-watch-flexy | |
www.youtube.com###comments.ytd-watch-flexy.style-scope | |
www.youtube.com##ytd-browse.ytd-page-manager.style-scope[page-subtype="home"] | |
www.youtube.com##ytd-guide-renderer | |
www.youtube.com##ytd-vertical-channel-section-renderer |
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
local_commits = [ | |
{'hash': 11, 'diff': 'a'}, | |
{'hash': 12, 'diff': 'b'}, | |
{'hash': 20}, | |
{'hash': 13, 'diff': 'c'}, | |
{'hash': 14, 'diff': 'd'}, | |
{'hash': 15, 'diff': 'e'}, | |
{'hash': 16}, | |
{'hash': 17}, | |
{'hash': 18}, |
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
let v20210301 : Version = [2021, 3, 1] | |
let tr : Resource = { | |
path: "databaseAccounts/{accountName}", | |
resourceKind: ResourceType.Tracked, | |
previewVersion: v20210301, | |
properties: { | |
delegatedManagementSubnetId: { | |
description: "Subnet to attach NICs to", | |
type: StringT, |
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
type Mutability = Read | Update | Create | |
type FieldType = | |
| Bool | |
| String | |
| Int32 | |
| Int64 | |
| Float | |
| Array of FieldType | |
| Object of List<Property> |
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
> One issue I see is that you want to have a debate in your terms where the questions make sense if you already have the beliefs you have. Rosen it proposing a perspective that is different. | |
> <snip> | |
> These are not the questions that Rosen answers. He is concerned with science and examining the assumptions of physics to find ways to broaden its application to biology. His main goal was to understand what life is. That lead to fundamental work on problems in modern science. But he is first and foremost a scientist not a philosopher. | |
> The first step, as I see it, is to understand the current limitations of the modern scientific paradigm. Before worrying about whether Rosen provides a "better" alternative. Even if he only shows the problems it is of huge value. But he does much more. | |
I've only spent four or five hours digging into Rosen's work and that of his students, and I have to say that I found nothing that would encourage me to go further. I originally trained as a theoretical physicist, and then retrai |
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 sets | |
import tables | |
type | |
Direction = enum E, W, NE, NW, SE, SW | |
Point = tuple[q, r: int] | |
proc go(p: Point, d: Direction): Point = | |
var (q, r) = p | |
return case d |
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
const N = 1_000_000 | |
type ArrayRing = ref object | |
ring: array[1..N, int] | |
head: int | |
proc toHashRing(xs: openArray[int]): ArrayRing = | |
var hr: ArrayRing | |
new(hr) | |
var last = xs[0] |
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 tables | |
import streams | |
import strutils | |
import parseutils | |
const N: int = 12 | |
type Tile = array[0..9, array[0..9, bool]] | |
type Offset = tuple[x, y: int] | |
type TileSide = enum TTop, TLeft, TRight, TBottom |
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 strutils | |
type ParseState = seq[tuple[this, remaining: string]] | |
type Parser = proc(s: string): ParseState | |
proc literal(m: string): Parser = | |
return proc(s: string): ParseState = | |
if s.startsWith(m): | |
return @[(m, substr(s, len(m)))] | |
else: |
NewerOlder