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
{-# LANGUAGE ScopedTypeVariables #-} | |
-- https://stackoverflow.com/questions/2075912/generate-a-random-binary-number-with-a-variable-proportion-of-1-bits | |
import Control.Monad (replicateM) | |
import Data.Bits | |
import Data.Foldable (foldl') | |
import Data.Word (Word8) | |
import Numeric.Natural (Natural) | |
import System.Random (Random, randomIO) |
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
<?xml version="1.0"?> | |
<alloy> | |
<view> | |
<defaultnode/> | |
<defaultedge/> | |
<node> |
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
(ns pulsar-test.core | |
(:import (org.apache.pulsar.client.api PulsarClient))) | |
(defn make-consumer | |
[] | |
(let [props (doto (java.util.Properties.) | |
(.putAll {"userId" "super" | |
"password" "superpass"})) | |
client (-> (PulsarClient/builder) | |
(.serviceUrl "pulsar://localhost:6650") |
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
# Alloy is developed by the Software Design Group at MIT. | |
# See https://sdg.csail.mit.edu/ or http://alloytools.org | |
# Maintainer: Markus Legner <[email protected]> | |
# Contributor: Ivan Kuraj <kaptoxic _at_ yahoo _dot_ com > | |
# Contributor: Rodney Price <[email protected]> | |
pkgname="alloy" | |
pkgver=6.0.0 | |
pkgrel=1 | |
pkgdesc="A lightweight modelling language for software design." |
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
%%%------------------------------------------------------------------- | |
%%% @author Ahmad Baitalmal | |
%%% @copyright (C) 2017, Ahmad Baitalmal | |
%%% Permission is hereby granted, free of charge, to any person obtaining | |
%%% a copy of this software and associated documentation files | |
%%% (the “Software”), to deal in the Software without restriction, | |
%%% including without limitation the rights to use, copy, modify, merge, | |
%%% publish, distribute, sublicense, and/or sell copies of the Software, | |
%%% and to permit persons to whom the Software is furnished to do so, | |
%%% subject to the following conditions: |
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
#!/usr/bin/env python3 | |
import os | |
import paramiko | |
ssh_key_filename = os.getenv('HOME') + '/.ssh/id_rsa' | |
jumpbox_public_addr = '168.128.52.199' | |
jumpbox_private_addr = '10.0.5.10' | |
target_addr = '10.0.5.20' |
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
{- | |
An alternative to the (almost) never ending looping problem | |
using the @ContT@ monad transformer. | |
Based on the post by Drew Olson: | |
https://blog.drewolson.org/adventures-in-looping | |
-} | |
module Main 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
From Coq Require Import Lists.List. Import ListNotations. | |
Inductive Object := | |
| Wolf | |
| Goat | |
| Cabbage. | |
Inductive Direction := | |
| Right | |
| Left. |
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 Coq Require Import Lists.List. Import ListNotations. | |
Inductive Object := | |
| Wolf | |
| Goat | |
| Cabbage. | |
Inductive Direction := | |
| Right | |
| Left. |
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
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
let | |
elixir_1_12 = { mkDerivation }: | |
mkDerivation rec { | |
version = "1.12.0"; | |
sha256 = "00dc3szjn2k552jp7n1c98kjab6wac9d49v2gr43pf3yzcyv8mk1"; | |
minimumOTPVersion = "24"; |