This file contains hidden or 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
# open all files with .h in directory | |
# add #ifndef _[FILENAME_H]_\n#define _[FILENAME_H]_ in the beginning of the file | |
# add #endif at the end of the file | |
import glob, os, sys | |
def name_header_creator(filename): | |
name = filename.split('.')[0].upper() | |
header_name = f'_{name}_H_' | |
res = f'#ifndef {header_name}\n#define {header_name}' | |
return res |
This file contains hidden or 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
# | |
# This file MUST be edited with the 'visudo' command as root. | |
# | |
# Please consider adding local content in /etc/sudoers.d/ instead of | |
# directly modifying this file. | |
# | |
# See the man page for details on how to write a sudoers file. | |
# | |
Defaults env_reset | |
Defaults mail_badpass |
This file contains hidden or 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 | |
help(){ | |
__usage=" SYNOPSIS | |
./make_namespace -n <new-namespace-name> -t <template-namespacce-name> [-b branch name]" | |
echo "$__usage" | |
} | |
PARSED_OPTIONS=$(getopt -n "$0" -o ht:n:b: --long "help, template, branch, new-namespace" -- "$@") |
This file contains hidden or 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
Computer Information: | |
Manufacturer: LENOVO | |
Model: LNVNB161216 | |
Form Factor: Laptop | |
No Touch Input Detected | |
Processor Information: | |
CPU Vendor: GenuineIntel | |
CPU Brand: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz | |
CPU Family: 0x6 |
This file contains hidden or 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 | |
get_etc_hosts_contents() { | |
hosts_lines=$(cat /etc/hosts | wc -l) | |
grep "virsh-auto-hosts-updater" /etc/hosts -B $hosts_lines | |
if [[ $? -eq 1 ]]; then | |
contents=$(cat /etc/hosts) | |
contents="$contents\n\n\n#### virsh-auto-hosts-updater: Lines below are updated automatically. DO NOT EDIT THIS LINE\n" | |
printf "$contents" | |
fi |
This file contains hidden or 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
### Note: This is a modified version of provided driver code. This code has not been tested, and it is highly probable that won't work. However it can be used as a guide on how to incorporate MOM6 with SmartSim to run on a single machine (single server or a laptop) | |
### Note: Do not forget to change MOM6_EXE value | |
""" | |
Driver script for the execution of SmartSim enabled | |
MOM6 simulations with the OM4_05 configuration. | |
Note: certain parameters and calls will need to | |
be updated depending on the resources of the | |
system. |