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
open Core | |
open Async | |
let add_all file = | |
Reader.file_contents file >>= fun contents -> | |
let ls = String.split_lines contents in | |
let ss = String.split_on_chars (String.concat ls) ~on:[','] in | |
let ns = List.map ss ~f:Int.of_string in | |
let sum = List.fold_left ns ~init:0 ~f:(+) in | |
printf "%d\n" sum; |
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
open Core | |
open Async | |
let parse contents = String.split_lines contents | |
|> String.concat | |
|> String.split_on_chars ~on:[','] | |
|> List.map ~f:Int.of_string | |
let read_then_sort fs = | |
let ds = List.map ~f:Reader.file_contents fs |
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
{-# OPTIONS --without-K #-} | |
open import Data.Empty | |
open import Data.Sum | |
open import Function | |
open import Relation.Binary.PropositionalEquality | |
open import Relation.Nullary | |
_∙_ = trans | |
∙-unitʳ : ∀ {A : Set} {x y : A} (p : x ≡ y) → p ∙ refl ≡ p |
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
{-# OPTIONS --cubical #-} | |
open import Cubical.Core.Everything | |
refl₍_₎ : {A : Set} (x : A) → x ≡ x | |
refl₍ x ₎ = λ i → x | |
refl : {A : Set} {x : A} → x ≡ x | |
refl = refl₍ _ ₎ | |
sym : {A : Set} {x y : A} → x ≡ y → y ≡ x |
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
{-# OPTIONS --cubical #-} | |
open import Cubical.Core.Everything hiding (_,_) | |
data Ty : Set where | |
ι : Ty | |
_⇒_ : Ty → Ty → Ty | |
data Con : Set where | |
· : Con | |
_,_ : Con → Ty → Con |
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
{-# OPTIONS --cubical #-} | |
open import Cubical.Core.Everything hiding (_,_) | |
data Ty : Set where | |
ι : Ty | |
_⇒_ : Ty → Ty → Ty | |
data Con : Set where | |
· : Con | |
_,_ : Con → Ty → Con |
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
{-# OPTIONS --cubical #-} | |
module Term where | |
open import Cubical.Core.Everything hiding (_,_) | |
data Ty : Set where | |
ι : Ty | |
_⇒_ : Ty → Ty → Ty | |
infixl 5 _,_ | |
data Con : Set where |
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
------------------------------------------------------------------------ | |
An execution plan has been generated and is shown below. | |
Resource actions are indicated with the following symbols: | |
~ update in-place | |
Terraform will perform the following actions: | |
# module.buildkite-east1-compute.aws_iam_user_policy.buildkite_aws_policy will be updated in-place | |
~ resource "aws_iam_user_policy" "buildkite_aws_policy" { |
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
function is_synced { | |
local sync_status=$(mina client status | grep "Sync status" | cut -d":" -f2) | |
if [ $? -ne 0 ]; | |
then | |
echo Fail to fetch sync status | |
return 0 | |
fi | |
if [ $sync_status != "Synced" ]; | |
then | |
echo Nodes not synced |
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 requests | |
import json | |
import time | |
query = """query { | |
pooledUserCommands { | |
hash | |
} | |
}""" |
OlderNewer