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
use serde::Deserialize; | |
use std::{collections::HashMap, result::*}; | |
pub struct AocOptions { | |
pub api: &'static str, | |
pub cookie: &'static str, | |
} | |
pub fn deserialize_ts<'de, D>(deserializer: D) -> Result<i32, D::Error> | |
where |
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
#!/bin/zsh | |
export XDG_CACHE_HOME=${XDG_CACHE_HOME:=~/.cache} | |
typeset -A ZINIT | |
ZINIT_HOME=$XDG_CACHE_HOME/zsh/zinit | |
ZINIT[HOME_DIR]=$ZINIT_HOME | |
ZINIT[ZCOMPDUMP_PATH]=$XDG_CACHE_HOME/zsh/zcompdump | |
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' |
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
FROM ubuntu:20.04 as cuda | |
ENV TZ=Europe/Moscow | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
RUN apt-get update && apt-get install --no-install-recommends -y build-essential git \ | |
wget make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl \ | |
llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev ca-certificates gnupg | |
RUN git clone https://github.com/pyenv/pyenv.git /root/pyenv | |
RUN /root/pyenv/bin/pyenv install 3.8.0 | |
RUN ln -s /root/.pyenv/versions/3.8.0/bin/python /usr/bin/python | |
RUN ln -s /root/.pyenv/versions/3.8.0/bin/pip /usr/bin/pip |
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
#define CYCLES 30000000 | |
#include <stdlib.h> | |
#include <stdio.h> | |
static int memory[CYCLES] = {[19] = 1, [0] = 2, [5] = 3, [1] = 4, [10] = 5}; | |
int main () { | |
int i = 7; | |
int prev = 13; | |
int k; |
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
// Запрашиваем библиотеку | |
var VK = require('vk-call').VK; | |
// Указываем access_token (ключ доступа) | |
var token = '541a0b8dec33a2098882...4392ccbbd962cf'; | |
// Версию API | |
var version = '5.92'; | |
// Создаем объект для работы с api используя данные выше |
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
module Ex06e | |
//insertion-sort | |
(* Check that a list is sorted *) | |
val sorted: list int -> Tot bool | |
let rec sorted l = match l with | |
| [] -> true | |
| [x] -> true | |
| x::y::xs -> (x <= y) && (sorted (y::xs)) |
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
validateAstAndConvertToStore' : TLProgram -> Eff () [STATE TLStore] | |
validateAstAndConvertToStore' x = ?validateAstAndConvertToStore'_rhs | |
validateAstAndConvertToStore : TLProgram -> TLStore | |
validateAstAndConvertToStore x = let initStore = MkTLStore empty empty empty in | |
let test = run (validateAstAndConvertToStore' x) in | |
?hole |
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
### Keybase proof | |
I hereby claim: | |
* I am termina1 on github. | |
* I am thought_sync (https://keybase.io/thought_sync) on keybase. | |
* I have a public key whose fingerprint is 2AD6 D5B3 EFF4 288E 61F3 57CE C2C1 B06C 79D7 CD3B | |
To claim this, I am signing this object: |
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
bitsToBytes : Bits 32 -> Vect 4 (Bits 8) | |
bitsToBytes x = bitsToBytes' 4 x | |
where | |
bitsToBytes' : (n : Nat) -> Bits 32 -> Vect n (Bits 8) | |
bitsToBytes' Z x = [] | |
bitsToBytes' (S k) bits = let prevBits = bitsToBytes' k bits in | |
let shifted = shiftRightLogical bits (MkBits $ natToBits {n = nextBytes 32} k * 8) in | |
let nextByte = truncate {m = 24} {n = 8} shifted in | |
nextByte :: prevBits |
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
module crc32 | |
import Data.Bits | |
g0 : Bits 32 | |
g0 = intToBits 0xEDB88320 | |
g1 : Bits 32 | |
g1 = shiftRightLogical g0 (intToBits 1) |
NewerOlder