... with raspbian OS
Written after trying a number of other techniques which failed. (2018-08-31)
By default, because of a bug, Network-Manager doesn't manage wifi. It can be worked around though.
Output can be text or png (png requires graphviz). Can produce regular binary Collatz tree or Collatz-like trees without even numbers.
# Collatz tree generator. Output as text or png (png requires graphviz). | |
# Produces regular binary collatz tree or trees without even numbers. | |
# | |
# Note: The tree starts at 8 to avoid the 4-2-1 loop. | |
# Note': See the end of the file for two example text trees. | |
# | |
# Setup - on linux or wsl: | |
# ```shell | |
# sudo apt install python3-pip ipython3 graphviz | |
# sudo -H pip3 install anytree |
#!/bin/sh | |
# | |
# download-buidl-and-install-ghdl.sh | |
# | |
# It took about 5 minutes on my laptop (2018-09-28). | |
sudo apt update | |
sudo apt install -y git make gnat zlib1g-dev | |
git clone https://github.com/ghdl/ghdl | |
cd ghdl |
key::::00000000000000000000000000000000 | |
block::00000000000000000000000000000000 | |
crypt::66e94bd4ef8a2c3b884cfa59ca342b2e | |
block::ffffffffffffffffffffffffffffffff | |
crypt::3f5b8cc9ea855a0afa7347d23e8d664e | |
block::0000000000000000ffffffffffffffff | |
crypt::747cb9267e59fa9e4e615668db0909bc |
#!/usr/bin/env python3 | |
# | |
# Fill a circle with 0 and 1's | |
# The circle is made of half as many lines as it is made of columns. | |
# This way, it usually appears round (with most terminal fonts at least). | |
# Accept the circle's width-radius as argument. See the default radius r, below. | |
r = 15 | |
from sys import argv | |
if len(argv) > 1: |
#!/bin/bash | |
# test-shell-default-variables.sh | |
# Usage examples (you might want to `sudo apt install zsh ksh`): | |
# | |
# ./test-shell-default-variables.sh dash bash | |
# ./test-shell-default-variables.sh dash bash zsh ksh | |
# ./test-shell-default-variables.sh dash bash zsh ksh | less -R |
# stackoverflow.com/q/3485475/can-i-create-a-view-on-a-python-list | |
# This solution is based on python 3 range ability to be sliced and indexed | |
# in constant time. | |
# | |
# It supports slicing, equality comparsion, string casting, and reproducers, | |
# but doesn't support assigment (and I don't plan to add support for it). | |
# | |
# Creating a SliceableSequenceView of a SliceableSequenceView won't slow down | |
# access times as this case is detected. |
-- Mathieu CAROFF | |
-- 2018-11-20 | |
-- util_str.vhd | |
-- Utilitary functions to convert std_logic_vector(s) to strings | |
-- Test: | |
-- ```bash | |
-- ghdl -a util_str.vhd | |
-- ghdl -r util_str_tb | |
-- ``` |
git config --global user.name "Mathieu CAROFF"
git config --global user.email "[email protected]"