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 NoMonomorphismRestriction #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE OverloadedRecordDot #-} | |
import Data.List.NonEmpty (NonEmpty(..)) | |
import Diagrams.Prelude | |
import qualified Diagrams.Color.XKCD as CX | |
import Diagrams.Backend.SVG.CmdLine |
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
data "aws_ami" "latest_spotfire" { | |
most_recent = true | |
owners = ["aws-marketplace"] | |
filter { | |
name = "product-code" | |
values = ["2c7dxpxtbfm3wc7iik24lbll2"] | |
} | |
} | |
resource "aws_instance" "spotfire" { |
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 os | |
import sys | |
import matplotlib | |
import matplotlib.pyplot as plt | |
from matplotlib.widgets import TextBox | |
matplotlib.use('QTAgg') | |
matplotlib.rcParams['toolbar'] = 'toolmanager' |
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 dogcrypt2. | |
:- interface. | |
:- import_module io. | |
:- pred main(io::di, io::uo) is det. | |
:- implementation. | |
:- import_module int, list, string, solutions. | |
main(!IO) :- |
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
let Block = { level: Natural, list: List Text } | |
let blacklist: List Block = | |
[ { level = 0 | |
, list = | |
[ "reddit.com" | |
, "old.reddit.com" | |
, "www.reddit.com" | |
, "twitter.com" | |
, "x.com" | |
, "nitter.poast.org" |
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
# Copyright (c) 2024 dwt | terminus, LLC | |
# 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: | |
# The above copyright notice and this permission notice shall be included in all |
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
#include <cstdio> | |
const std::size_t num_buttons = 16; | |
const std::size_t total_buttons = num_buttons + 4; | |
#define FOR_EACH_NUMBER(n) "Button " #n, | |
const char* english[total_buttons] = { | |
#include "numbers.def" | |
"Hat Up", | |
"Hat Down", |
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
#include <cstddef> | |
#include <cstdio> | |
#include <utility> | |
constexpr std::size_t num_digits(unsigned char n) noexcept | |
{ | |
if (n < 10) | |
return 1; | |
if (n < 100) | |
return 2; |
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
# Copyright (c) 2023 dwt | terminus, LLC | |
# 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: | |
# The above copyright notice and this permission notice shall be included in all |
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 strict"; | |
const input = [1.0, 2.0, 3.0, 4.0, 5.0]; | |
const code = document.getElementById('code'); | |
const output = document.getElementById('output'); | |
let timeoutId; | |
async function init() { | |
let pyodide = await loadPyodide(); | |
await pyodide.loadPackage('numpy'); |
NewerOlder