Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
| set -e | |
| # A script which can be run as a cron job | |
| # which will notify you if the pipeline has failed | |
| # Input as arguments: | |
| # $1: gitlab project id | |
| # $2: ref to track, e.g. name of the branch. Default 'main' |
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
| template <typename T> | |
| class Timer { | |
| private: | |
| std::chrono::time_point<std::chrono::high_resolution_clock> start; | |
| std::chrono::time_point<std::chrono::high_resolution_clock> end; | |
| public: | |
| void start_timer() { | |
| this->start = std::chrono::high_resolution_clock::now(); | |
| } |
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
| #include <array> | |
| #include <chrono> | |
| #include <cstdlib> | |
| #include <iostream> | |
| #include <random> | |
| using Vec3D = std::array<float, 3>; | |
| int main() { | |
| std::array<Vec3D, 4> arr; |
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 | |
| if [[ $# -ne 2 ]] | |
| then | |
| echo "Usage: $0 first_dir second_dir"; | |
| echo "Both inputs are directories containing the FITS images to compare"; | |
| exit 1; | |
| 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
| env=~/.ssh/agent.env | |
| agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; } | |
| agent_start () { | |
| (umask 077; ssh-agent >| "$env") | |
| . "$env" >| /dev/null ; } | |
| agent_load_env |
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
| #ifndef SSE2NEON_H | |
| #define SSE2NEON_H | |
| // This header file provides a simple API translation layer | |
| // between SSE intrinsics to their corresponding Arm/Aarch64 NEON versions | |
| // | |
| // This header file does not yet translate all of the SSE intrinsics. | |
| // | |
| // Contributors to this work are: | |
| // John W. Ratcliff <jratcliffscarab@gmail.com> |
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
| // simple swapping without data types | |
| #include <assert.h> | |
| #include <chrono> | |
| #include <cstring> | |
| #include <iostream> | |
| #include <ratio> | |
| #include <vector> | |
| #define SIZE_CAN_FLOAT 4 |
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
| // simple swapping without data types | |
| #include <stdio.h> | |
| #define SWAP(x, y) \ | |
| tmp2 = *x; \ | |
| *x = *y; \ | |
| *y = tmp2; | |
| #define DEFINE_SWAP(FUN_SWAP, T) \ | |
| void FUN_SWAP(T *x, T *y) { \ |
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
| #include <iostream> | |
| int main(int argc, char const *argv[]) | |
| { | |
| #ifdef __amd64__ | |
| std::cout << "__amd64__ detected" << std::endl; | |
| #endif | |
| #ifdef __x86_64__ | |
| std::cout << "__x86_64__ detected" << std::endl; | |
| #endif |
NewerOlder