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> | |
#include <stdexcept> | |
#include <vector> | |
/** | |
* @brief Find the best vector of costs arranged in descending order from a vector of vectors of costs. | |
* | |
* @tparam T A comparable type. | |
* @param costs A vector of vectors of prioritized costs. | |
* @param minimize Whether or not smaller values are better. |
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 | |
""" | |
Copyright 2021 Abdul Rahman Dabbour | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to | |
deal in the Software without restriction, including without limitation the | |
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
sell copies of the Software, and to permit persons to whom the Software is |
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
Checks: '-*, | |
performance-*, | |
llvm-namespace-comment, | |
modernize-redundant-void-arg, | |
modernize-use-nullptr, | |
modernize-use-default, | |
modernize-use-override, | |
modernize-loop-convert, | |
readability-named-parameter, | |
readability-redundant-smartptr-get, |
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
BasedOnStyle: Google | |
ColumnLimit: 120 | |
MaxEmptyLinesToKeep: 1 | |
SortIncludes: true | |
Standard: Auto | |
IndentWidth: 2 | |
TabWidth: 2 | |
UseTab: Never | |
AccessModifierOffset: -2 |
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
FROM ros:melodic | |
ENV NVIDIA_VISIBLE_DEVICES \ | |
${NVIDIA_VISIBLE_DEVICES:-all} | |
ENV NVIDIA_DRIVER_CAPABILITIES \ | |
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics | |
# Add essential tools | |
RUN apt-get update && apt-get install --no-install-recommends -y \ | |
apt-transport-https \ |
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
## C++ | |
# ---------------------------------------------------------------------------- | |
# Prerequisites | |
*.d | |
# Compiled Object files | |
*.slo | |
*.lo | |
*.o | |
*.obj |
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 | |
from pathlib import Path | |
from argparse import ArgumentParser | |
if __name__ == "__main__": | |
PARSER = ArgumentParser() | |
PARSER.add_argument( | |
"--install_manifest", | |
"-m", |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
struct cpu_data_t { | |
int user, nice, system, idle, iowait, irq, softirq, steal, guest, guest_nice; | |
}; | |
// based on answer here: https://stackoverflow.com/a/23376195/8295404 |
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 | |
# -*- coding: utf-8 -*- | |
### | |
# git-recursive | |
# | |
# This script will execute a given command recursively on every git repository | |
# found under the current directory. | |
# | |
# Copyright 2022 Abdul Rahman Dabbour |
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
#!/bin/bash | |
# A simple logging 'library' for bash scripts. | |
# | |
# There are three basic things to set: | |
# - Minimum log level [default: info] (debug < info < warn < error < critical) | |
# - Node name [default: unidentified] | |
# - Log path [default: $HOME/.local/log/$LOGGER_NODE_NAME.log] | |
# | |
# Example usage: |
OlderNewer