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
inductive Balance: Nat -> Nat -> Nat -> Type where | |
| lefty : Balance n.succ n.succ.succ n | |
| mid : Balance n n.succ n | |
| righty: Balance n n.succ.succ n.succ | |
inductive Tree (a: Type u): Nat -> Type u where | |
| leaf: Tree a 0 | |
| node: Balance l n r -> Tree a l -> a -> Tree a r-> Tree a n | |
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 gi | |
gi.require_version("Gtk", "3.0") | |
from gi.repository import Gio | |
from gi.repository import GLib | |
conn = Gio.DBusProxy.new_for_bus_sync( | |
Gio.BusType.SESSION, | |
Gio.DBusProxyFlags.NONE, | |
# info | |
None, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 Either = struct | |
type ('a, 'b) t = Left of 'a | Right of 'b | |
let left v = Left v | |
let right v = Right v | |
let fold ~left ~right = function | |
| Left v -> left v | |
| Right v -> right v | |
end |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"/> | |
<title>Document</title> | |
</head> | |
<body> | |
<div class="controls"> | |
<div class="left"> | |
<div id="playButton" class="button"> |
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
fn extract_sqrt(mut n: u64) -> (u64, u64) { | |
let mut blocks = [0u8; 32]; | |
let mut i = 0; | |
let mut ret = 0u64; | |
while n != 0 { | |
blocks[i] = (n & 0b11) as u8; | |
n >>= 2; | |
i += 1; | |
} | |
let mut q = 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
//! rust port of this | |
//! https://twitter.com/gakuzzzz/status/1314499876969881602 | |
//! requires nightly | |
// just for ease | |
#![feature(bool_to_option)] | |
// mandatory | |
#![feature(type_alias_impl_trait)] | |
// code |
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
GNU GENERAL PUBLIC LICENSE | |
Version 2, June 1991 | |
Copyright (C) 1989, 1991 Free Software Foundation, Inc. | |
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
Everyone is permitted to copy and distribute verbatim copies | |
of this license document, but changing it is not allowed. | |
Preamble |
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] | |
name = "so-actix-web-reqwest" | |
version = "0.1.0" | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
actix-web = "2.0" | |
reqwest = "0.10" |
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
_require "basis.smi" | |
_require "thread.smi" |
NewerOlder