View pwcpp_mm.cpp
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
/******************************************************************************* | |
* BSD 3-Clause License | |
* | |
* Copyright (c) 2020, Ugo Varetto | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* 1. Redistributions inputFile source code must retain the above copyright |
View pwcp.cpp
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
/******************************************************************************* | |
* BSD 3-Clause License | |
* | |
* Copyright (c) 2020, Ugo Varetto | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* 1. Redistributions inputFile source code must retain the above copyright |
View csiro_license.txt
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
CSIRO Open Source Software License Agreement (variation of the BSD / MIT License) | |
Copyright (c) 2016, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230. | |
All rights reserved. CSIRO is willing to grant you a license to this tool named PSL:Proof Strategy Language on the following terms, except where otherwise indicated for third party material. | |
Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | |
* Neither the name of CSIRO nor the names of its contributors may be used to endorse or promote products derived from this software without specific p |
View tomlparse.cpp
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
// Parse TOML file with standard regex module, no validation | |
// Author: Ugo Varetto | |
#include <fstream> | |
#include <iostream> | |
#include <regex> | |
#include <string> | |
#include <unordered_map> | |
using namespace std; |
View gnuplot_dsl.nim
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
# Generate gnuplot string from NIM DSL with variable substitution | |
# Author: Ugo Varetto | |
import macros, sets, sequtils, strutils, strformat, sugar | |
proc genCommands(node: NimNode, | |
stmts: var seq[seq[string]], | |
cur: var seq[string], | |
commands: HashSet[string], | |
subst: bool = false): bool = |
View cflags_qt_gnuplot.sh
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
#sudo apt install qt5-default | |
#sudo apt install libqt5svg5-dev | |
#-fPIC !!! | |
export pre="/usr/include/x86_64-linux-gnu/qt5" | |
export QT_CFLAGS="-I $pre/QtSvg -I $pre/QtConcurrent -I $pre/QtConcurrent -I $pre/QtDBus -I $pre/QtNetwork -I $pre/QtOpenGLExtensions -I $pre/QtPrintSupport -I $pre/QtTest -I $pre/QtCore -I $pre/QtGui -I $pre/QtOpenGL -I $pre/QtPlatformHeaders -I $pre/QtSql -I $pre/QtWidgets -I $pre/QtXml -I $pre -fPIC" |
View hello_fibers.cr
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
# Author: Ugo Varetto | |
# Fiber test: parallel update of array elements in arrays larger than 2^32 | |
# build with 'crystal build -Dpreview_mt --release hello_fibers.cr' | |
require "process" | |
unless ARGV.size > 0 | |
p "#{PROGRAM_NAME} <size> <num threads> <channel buffer size>" | |
exit 1 | |
end |
View mount_s3_bucket.sh
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
#credentials are read from .aws/credentials, configure with 'aws configure' first | |
#use_path_request_style is always required when mounting non-Amazon Web Services resources | |
#note: large files are uploaded in parallel: | |
#-o parallel_count (default="5") | |
# number of parallel request for uploading big objects. s3fs uploads large object (over 20MB) by multipart post request, and sends parallel requests. This option limits parallel request count which | |
# s3fs requests at once. It is necessary to set this value depending on a CPU and a network band. | |
#-o multipart_size (default="10") | |
# part size, in MB, for each multipart request. The minimum value is 5 MB and the maximum value is 5 GB. | |
s3fs uv-bucket-3 ./magenta -o url="https://nimbus.pawsey.org.au:8080" -o profile=ceph -o use_path_request_style |
View instance_descriptors.py
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
### Per-instance descriptors | |
### Author: Ugo Varetto | |
### for standard basic descriptors see: | |
### https://www.datacamp.com/community/tutorials/python-descriptors | |
### Instance descriptor through overloading __getattribute__, __setattr__ | |
def make_getattr(cls, n): | |
def custom_getattr(self, name): | |
get = lambda i, n: type(i).__bases__[0].__getattribute__(i, n) |
View rocm-c_cpp_properties.json
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
{ | |
"env": { | |
"myDefaultIncludePath": ["${workspaceFolder}"] | |
}, | |
"configurations": [ | |
{ | |
"name": "ROCm", | |
"intelliSenseMode": "clang-x64", | |
"includePath": ["${myDefaultIncludePath}", "/opt/rocm/hip/include"], | |
"compilerPath": "/opt/rocm/hip/bin/hipcc", |