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
| module Repro (part1) where | |
| import qualified Data.Map as Map | |
| import Data.List.Split | |
| import Data.Either | |
| import Data.Maybe | |
| import Control.Monad.ST | |
| import Data.STRef | |
| {-@ |
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
| def init_4d(n): | |
| return [[[[0 for i in range(n)] | |
| for j in range(n)] | |
| for k in range(n)] | |
| for l in range(n)] | |
| def recurrence(c,x1,y1,x2,y2): | |
| total = 0 | |
| # These two cases are always valid; even if the two paths have met at | |
| # (x1,y1), then in these cases the previous step cannot be the same, so |
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 cairo | |
| import math | |
| import itertools | |
| def base_position( i, j ): | |
| return (i * 60 + 10, j * 50 + 10) | |
| def drawGrid( ctx, i, j ): | |
| ctx.set_line_width( 1 ) | |
| ctx.set_source_rgba( 0.0, 0.0, 0.0, 1.0 ) |
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
| module Factorial | |
| open FStar.Mul // Give us * for multiplication instead of pairs | |
| open FStar.IO | |
| open FStar.Printf | |
| let rec factorial (n:nat) : nat = | |
| if n = 0 then 1 | |
| else n * factorial (n-1) |
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
| { | |
| "version": "0.1", | |
| "start": "A--B", | |
| "A; B": "B--N--A", | |
| "A--B; C": "A--D; B--D; C--D" | |
| } |
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
| apiVersion: extensions/v1beta1 | |
| kind: DaemonSet | |
| metadata: | |
| name: akita-capture | |
| namespace: superstar | |
| spec: | |
| selector: | |
| matchLabels: | |
| name: akita-capture | |
| template: |
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 z3 import * | |
| import itertools | |
| # A color type | |
| num_colors = 8 | |
| Color, color_consts = EnumSort( 'Color', | |
| [ f"{c}" for c in range(num_colors) ] ) | |
| # Edges | |
| # --0,0-- --0,1-- --0,2-- horizontal |
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
| { | |
| "version": "0.1", | |
| "start": "K[kind]; K->N [name]; N", | |
| "K[kind];": [ | |
| "K[kind]; K2[kind]; K2->N2 [name]; ", | |
| "K[kind]; K2[category]; K2->N2 [name]; K2->K2[depth 0]", | |
| "K[kind]; K2[category]; K2->N2 [name]; K2->K2[depth 1]", | |
| "K[kind]; K2[category]; K2->N2 [name]; K2->K2[depth 2]", | |
| "K[kind]; K2[mixin]; K2->N2 [name]; K2->K2[depth 0]", | |
| "K[kind]; K2[mixin]; K2->N2 [name]; K2->K2[depth 1]", |
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
| #include <primesieve.hpp> | |
| #include <iostream> | |
| // Compile with: g++ -Wall -O3 -o primes_mod_6 primes_mod_6.cpp -lprimesieve | |
| int main( int argc, char *argv[] ) { | |
| primesieve::iterator it; | |
| uint64_t prime = it.next_prime(); | |
| uint64_t count_mod_1 = 0; | |
| uint64_t count_mod_5 = 0; |
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
| { | |
| "version": "0.1", | |
| "start": "X[node]; Y[node]; Z[node]; XY[edge]; XY->X; XY->Y; YZ[edge]; YZ->Y; YZ->Z; ZX[edge]; ZX->X; ZX->Z; XY->YZ->ZX->XY [cycle]", | |
| "Z[node]; PZ[edge]; PZ->Z; ZS[edge]; ZS->Z; PZ->ZS[cycle]": | |
| "Z[node]; PZ[edge]; PZ->Z; ZS[edge]; ZS->Z; A[node]; ZA[edge]; ZA->Z; ZA->A; PZ->ZA [cycle]; B[node]; AB[edge]; AB->A; AB->B; ZA->AB [cycle]; BZ[edge]; BZ->B; BZ->Z; AB->BZ [cycle]; BZ->ZS[cycle]", | |
| "A[node]; PA[edge]; PA->A; AS[edge]; AS->A; PA->AS[cycle]; B[node]; C[node];" : | |
| "A[node]; PA[edge]; PA->A; AS[edge]; AS->A; B[node]; AB[edge]; AB->A; AB->B; PA->AB [cycle]; C[node]; BC[edge]; BC->B; BC->C; AB->BC [cycle]; CA[edge]; CA->C; CA->A; BC->CA [cycle]; CA->AS [cycle];" | |
| } |