How to install Basho Erlang using Kerl.
note: Instructions for other platforms are available in the Erlang docs
curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod +x kerl
#!/usr/bin/env bash | |
# shellcheck disable=SC2155 | |
## Copyright (C) 2017, Oleksandr Kucherenko | |
## Last revisit: 2023-09-30 | |
## Version: 2.0.2 | |
## License: MIT | |
## Fix: 2023-10-01, prefix for initial INIT_VERSION was not applied | |
## Fix: 2023-10-01, correct extraction of latest tag that match version pattern | |
## Added: 2023-09-30, @mrares prefix modification implemented |
How to install Basho Erlang using Kerl.
note: Instructions for other platforms are available in the Erlang docs
curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod +x kerl
# The command finds the most recent tag that is reachable from a commit. | |
# If the tag points to the commit, then only the tag is shown. | |
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
# and the abbreviated object name of the most recent commit. | |
git describe | |
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
git describe --abbrev=0 | |
# other examples |
% dev/dev1/bin/riak-admin member-status
================================= Membership ==================================
Status Ring Pending Node
-------------------------------------------------------------------------------
valid 50.0% -- 'dev1@127.0.0.1'
valid 25.0% -- 'dev2@127.0.0.1'
valid 25.0% -- 'dev3@127.0.0.1'
import collections | |
def dict_merge(dct, merge_dct): | |
""" Recursive dict merge. Inspired by :meth:``dict.update()``, instead of | |
updating only top-level keys, dict_merge recurses down into dicts nested | |
to an arbitrary depth, updating keys. The ``merge_dct`` is merged into | |
``dct``. | |
:param dct: dict onto which the merge is executed | |
:param merge_dct: dct merged into dct |
! __ ___ __ ___ ___ ___ _ _ _ __ ___ ___ ___ | |
! \ \/ / '__/ _ \/ __|/ _ \| | | | '__/ __/ _ \/ __| | |
! _ > <| | | __/\__ \ (_) | |_| | | | (_| __/\__ \ | |
!(_)_/\_\_| \___||___/\___/ \__,_|_| \___\___||___/ | |
! | |
!## Colors | |
#define S_base03 #191919 | |
#define S_base02 #073642 | |
#define S_base01 #586e75 | |
#define S_base00 #657b83 |
timestamp_to_datetime(TimeStamp) -> | |
UnixEpochGS = calendar:datetime_to_gregorian_seconds({{1970, 1, 1}, {0, 0, 0}}), | |
GregorianSeconds = (TimeStamp div 1000) + UnixEpochGS, | |
calendar:universal_time_to_local_time(calendar:gregorian_seconds_to_datetime(GregorianSeconds)). |
Redis is an in-memory network key/value store and nltk is the python natural language toolkit. We'll be using these libraries later for the lab.
import redis
import nltk
Setup our redis connection. It's on the VM, so local is fine.