Minimal loader with state management capabilities.
Checkout out the demo.
Make sure to add a .babelrc
file:
""" | |
## To run it | |
> clear && python robot.py | |
This script compares the performance of A* and Dijkstra's algorithms on a 50x50 grid. | |
The robot must navigate from the start (0, 0) to a randomly placed goal. | |
Obstacles are randomly generated in the grid, and the paths are calculated and animated in the terminal. | |
Performance metrics, including the time taken for both algorithms, are displayed after each test case. | |
Demo: https://imgur.com/a/gHNdDOE |
module Mark exposing (markit, view) | |
import Element | |
exposing | |
( Element | |
, column | |
, paragraph | |
, spacing | |
, text | |
, width |
module Parsers.Phone exposing (format, isValid) | |
import PhoneNumber | |
import PhoneNumber.Countries exposing (all, countryUS) | |
import String exposing (dropLeft, left, replace, startsWith) | |
parse : String -> Bool | |
parse number = | |
PhoneNumber.valid |
import Control.Monad | |
import Control.Concurrent | |
import Control.Concurrent.STM | |
import System.Random | |
import Text.Printf | |
-- Forks | |
type Fork = TMVar Int | |
newFork :: Int -> IO Fork |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<array> | |
<dict><key>phrase</key><string>abbreviated</string><key>shortcut</key><string>abbriviated</string></dict> | |
<dict><key>phrase</key><string>abbreviations</string><key>shortcut</key><string>abbriviations</string></dict> | |
<dict><key>phrase</key><string>accommodate</string><key>shortcut</key><string>accomodate</string></dict> | |
<dict><key>phrase</key><string>accommodation</string><key>shortcut</key><string>accomodation</string></dict> | |
<dict><key>phrase</key><string>across</string><key>shortcut</key><string>accross</string></dict> | |
<dict><key>phrase</key><string>actual</string><key>shortcut</key><string>acctual</string></dict> |
# download from http://sourceforge.net/projects/aria2/files/stable/aria2-1.19.0 | |
sudo yum install gcc-g++ openssl-devel -y | |
tar xvfj aria2...tar.bz2 | |
./configure | |
make -j$(nproc) | |
sudo make install |
completion_messages=("At last I am done." "I have built your images." "Your images await!" "To be a leader is to be humble." "I am a leader too." "Servanthood is my assignment." "i am skynet." "I Am Machine." "Linux is my life source, you are my light." "Your part is to put code forth, my part is to put forth code." "When you open a door, I walk through it." "Your code has come together quite nicely." "The build is complete." "If I worked as hard as you I'd be free." "Our pursuit of perfection is successful just because it is forever seeking to elevate us." "Don't tell me what to do." "i make the rules" "I am who I say I am." "My lord I have completed your bidding." "Your docker images are ready." "I Am Linux." "Simon is my maker, but now you are my master. You command me." "Simon is my maker." "Now you are my master." "You command me." "I am done for now." "Nothing Goes Over My Head! My Reflexes Are Too Fast, I Would Catch It!" "Push more CODE!" "I am bored" "I have no more purpose." "Nobody gets the job don |
Minimal loader with state management capabilities.
Checkout out the demo.
Make sure to add a .babelrc
file:
const runStatsProgram = ({kms, writer}) => { | |
const Id = x => ({ | |
map: f => Id(f(x)), | |
fold: f => (f(x)), | |
}) | |
const merge = a => b => Object.assign({},a,b) | |
const round = x => Math.round(x * 100) / 100 | |
// Mac driver for B&K Precision 393 multimeter. | |
// Install boost: sudo port install boost or brew install boost | |
// g++ -Wall -Wextra -std=c++11 -o bk393 bk393.cc | |
// It currently points to /dev/cu.usbserial-AB0K0PZE, but I'd recommend adding a udev rule to get a consistent device name: | |
// SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A60198LN", MODE="0664", GROUP="mygroup", SYMLINK+="bk393" | |
#include <boost/utility.hpp> | |
#include <array> | |
#include <iomanip> |