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
#include <algorithm> | |
using std::for_each; | |
using std::reverse; | |
#include <cmath> | |
using std::modf; | |
#include <iomanip> | |
using std::left; | |
using std::setprecision; |
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
#include <future> | |
#include <iostream> | |
#include <thread> | |
template <typename T> | |
class PromiseFuture { | |
private: | |
std::promise<T> promise; | |
std::future<T> future; | |
public: |
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
#include <algorithm> | |
using std::for_each; | |
using std::reverse; | |
#include <cmath> | |
using std::modf; | |
#include <iomanip> | |
using std::left; | |
using std::setprecision; |
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 python3 | |
"""Notify admins about failed services.""" | |
from argparse import ArgumentParser, Namespace | |
from pathlib import Path | |
from typing import Iterator, List | |
from configlib import loadcfg | |
from emaillib import EMail, Mailer |
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
#include <iostream> | |
#include <string> | |
using std::cin; | |
using std::cout; | |
using std::endl; | |
using std::string; | |
static unsigned short readMarks(string const & prompt) | |
{ |
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
#include <iostream> | |
#include <vector> | |
using std::cout; | |
using std::endl; | |
using std::vector; | |
int main() | |
{ | |
vector<int> v = {1,2,3,5,9,7}; |
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 python3 | |
"""Fun with magic dunder methods.""" | |
from pathlib import Path | |
class Domain(str): | |
"""Represents a domain name.""" | |
def __rmatmul__(self, user: str) -> str: |
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 python3 | |
# | |
# db_backup - Backup local MySQL databases. | |
# Copyright (C) 2021 HOMEINFO - Digitale Informationssysteme GmbH | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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 python3 | |
# ddnssupdate.py - Script to update DynDNS hosts registered at ddnss.de. | |
# | |
# Copyright (C) 2020 Richard Neumann <mail at richard dash neumann period de> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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 python3 | |
# coroproperty.py - Coroutine-based two-in-one properties. | |
# | |
# Copyright (C) 2020 Richard Neumann <mail at richard dash neumann period de> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |