View aoc.hsfiles
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
{-# START_FILE stack.yaml #-} | |
resolver: lts-18.18 | |
packages: | |
- '.' | |
extra-deps: | |
- astar-0.3.0.0@sha256:8bf6350542e9db9451490e8993560ee843dc48a61d46a206985430f9b62461c8,967 | |
- git: https://github.com/dustin/aoc.git | |
commit: 60b4a01f9c09863d16833bcd766daf8855281d26 |
View threadcounter.hs
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 NamedFieldPuns #-} | |
{-# LANGUAGE RecordWildCards #-} | |
module Main where | |
import Data.List (intercalate, sortOn) | |
import Data.Map.Strict (Map) | |
import qualified Data.Map.Strict as Map | |
import GHC.RTS.Events | |
import System.Environment (getArgs) |
View Starlink.json
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"$$hashKey": "object:100", | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", |
View BenchmarkEncoding.hs
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 OverloadedLabels #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main (main) where | |
import Criterion (bench, bgroup, whnf) | |
import Criterion.Main (Benchmark) | |
import qualified Data.ByteString as BS | |
import Data.ByteString.Builder (toLazyByteString) | |
import Data.ByteString.Lazy (toStrict) |
View dps-box.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View nma.hs
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 OverloadedStrings #-} | |
module NMA where | |
import Control.Lens | |
import Control.Monad (guard) | |
import Data.Semigroup ((<>)) | |
import Network.Wreq (post, FormParam(..), responseBody, responseStatus, statusCode) | |
import Text.Read (readEither) | |
import qualified Data.ByteString as BS |
View Dockerfile
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 arm32v7/debian:stretch | |
FROM resin/rpi-raspbian:stretch | |
ENV QEMU_SET_ENV=QEMU_CPU=cortex-a9 | |
RUN apt-get update | |
RUN apt-get install -y netbase curl llvm-3.7 # haskell-stack | |
RUN curl -sSL https://get.haskellstack.org/ | sh | |
COPY stack-entry /bin/stack-entry | |
VOLUME /root |
View cura-pla.ini
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
[profile] | |
layer_height = 0.2 | |
wall_thickness = 1.2 | |
retraction_enable = True | |
solid_layer_thickness = 0.9 | |
fill_density = 15 | |
print_speed = 40 | |
print_temperature = 200 | |
print_temperature2 = 0 | |
print_temperature3 = 0 |
View ...and results with inlining disabled:
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
$ go test -gcflags=-l -bench=. | |
testing: warning: no tests to run | |
PASS | |
BenchmarkDirect-4 500000000 3.36 ns/op | |
BenchmarkInterface-4 1000000000 3.46 ns/op | |
ok misc/intb 5.830s |
View timeout.c
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
volatile bool tx_sumd = false; | |
volatile bool timedout = false; | |
// Set tx_sumd = true every 10ms | |
void initSUMDTimer() { | |
cli(); | |
TCCR1A = 0; | |
TCCR1B = 0; | |
TCNT1 = 0; |
NewerOlder