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 | |
## Taken from https://stackoverflow.com/a/28044986 | |
# 1. Create ProgressBar function | |
# 1.1 Input is currentState($1) and totalState($2) | |
function ProgressBar { | |
# Check if output is going to a tty | |
if [ -t 1 ]; then | |
# Output progress bar only if output is to tty |
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 | |
# Copyright (C) 2023 Harshula Jayasuriya | |
# https://gitlab.com/harshula/tools/decompile-binaries.sh | |
# | |
# 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 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 python | |
# Written by Manodeep Sinha, May 2025 to filter out valgrind error logs. | |
# Regex idea extended from https://stackoverflow.com/a/34407168 | |
# Untested. Use at your own risk. - Manodeep Sinha, May 19, 2025 | |
import fileinput | |
import re | |
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
<!DOCTYPE html><html lang="en"><head><title>APS report</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">@-webkit-keyframes filler{0%{width:0}}@-moz-keyframes filler{0%{width:0}}@keyframes filler{0%{width:0}}.icon[data-v-03c6e8ae]:after,.icon[data-v-03c6e8ae]:before{display:inline-block;width:1em;height:1em;line-height:1em;vertical-align:middle}.icon.menu[data-v-03c6e8ae]:after{content:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23fff"><path d="M3 3h14v3H3zM3 13h14v3H3zM3 8h14v3H3z"/></svg>')}.icon.comments[data-v-03c6e8ae]:after{content:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23fff"><path fill-rule="evenodd" clip-rule="evenodd" d="M16.5 9h1.25C18.44 9 19 8.44 19 7.75v-6.5C19 .56 18.44 0 17.75 0h-8.5C8.56 0 8 .56 8 1.25v6.5C8 8.44 8.56 9 9.25 9H14l2.5 2.5V9zm-1.982-1.5H9.5v-6h8v6h-2.25v.732l-.732-.732z"/><path d="M2.25 4H7v1.5H2.5v6h2.25v. |
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 | |
## Written by Manodeep Sinha (ACCESS-NRI, ANU) March 2025 | |
## Has made use of https://www.shellcheck.net/ to identify potential errors | |
## in the script. Other code fragments taken out of Stackoverflow and alike sites | |
## are noted inline. | |
## LICENSE: MIT | |
echo "Setting up colors and font-styles ..." |
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
import numpy as np | |
from scipy.spatial.distance import cdist | |
from distlib import pairwise_cython_blas, pairwise_cython, pairwise_cython_blas2 | |
import timeit | |
a = np.random.random(size=(10000,3)) | |
loop = 1 | |
repeat = 1 | |
funcs = ['cdist(a,a)', 'pairwise_cython(a)', 'pairwise_cython_blas(a)', 'pairwise_cython_blas2(a)'] |
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
function return_left_edge, axis, index, value | |
common tick_block, fixed_value_left_x, fixed_value_right_x | |
if value lt n_elements(fixed_value_left_x) then begin | |
tickmark = string_logexp(fixed_value_left_x[value]) | |
endif else begin | |
if value eq n_elements(fixed_right_x) then begin | |
tickmark = string_logexp(fixed_value_right_x[-1]) | |
endif else begin | |
tickmark = 'N!Dgal!N' | |
endelse |
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
[~/temp/astropy-64bit-power-of-2 @Manodeeps-MacBook-Pro] gcc -std=gnu11 -O2 -Wall -Wextra test.c | |
test.c: In function 'naive_p2': | |
test.c:227:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] | |
while(result < n) { | |
^ | |
[~/temp/astropy-64bit-power-of-2 @Manodeeps-MacBook-Pro] ./a.out | |
Running in 64 bit mode | |
Checking overflow bug | |
nbytes = 9223372036854775807 nextp2 = -9223372036854775808 (unsigned) nextp2 = 9223372036854775808 | |
nbytes = -1 nextp2 = 1 (unsigned) nextp2 = 1 |
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
/* A code to print out the data size (in bytes) corresponding to the | |
common HDF5 native datatypes | |
Author: Manodeep Sinha | |
Date: 20/11/2019 | |
Compile with ` |
NewerOlder