These are issues by the City of Cape Town which might cause service disruptions to multiple residents
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 hashlib | |
# Input parameters | |
invoice_number = "<invoice number of bill goes here" | |
epru_uct_salt = "<salt value goes here>" | |
invoice_number_hash_string = str.encode(invoice_number + epru_uct_salt) | |
invoice_number_hashed = hashlib.sha256(invoice_number_hash_string).hexdigest() | |
print(f"{invoice_number} -> {invoice_number_hashed}") |
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 branca | |
import jinja2 | |
class FloatDiv(branca.element.MacroElement): | |
"""Adds a floating div in HTML canvas on top of the map.""" | |
_template = jinja2.Template(""" | |
{% macro header(this,kwargs) %} | |
<style> | |
#{{this.get_name()}} { | |
position:absolute; |
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 folium | |
# Map pointing at Cape Town | |
m = folium.Map( | |
location=[-33.918861, 18.423300], | |
zoom_start=12 | |
) | |
# HTML Div with style information | |
desc_html = f'<div style="white-space: normal"> This is a line,<br> this is another line </div>' |
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
#!/usr/bin/env bash | |
SEARCH_ROOT=/opt/gitlab/ | |
find "$SEARCH_ROOT" -name *.yml | while read line; do echo $line | ruby -e "require 'yaml';filename=STDIN.read.strip; YAML.load_file filename; puts filename"; done |