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 | |
# Copyright: Pawsey Supercomputing Research Centre | |
# Author: Cristian Di Pietrantonio | |
# NOTE!! Must be run on a compute node with at least one GPU for it to detect the architecture. | |
AMBER_SRC_DIR=$MYSCRATCH/amber_src | |
BUILD_DIR=$MYSCRATCH/amber_build_automated | |
INSTALL_DIR=$MYSCRATCH/amber_install_automated | |
amber_tools_src=$AMBER_SRC_DIR/AmberTools22jlmrcc.tar.bz2 | |
amber_src=$AMBER_SRC_DIR/Amber22.tar.bz2 |
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 | |
import os | |
import os.path | |
from contextlib import suppress | |
import argparse | |
def visit(path, state): | |
if os.path.isdir(path): |
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 | |
import os | |
import subprocess | |
def process_ldd_out(output): | |
libs = [] | |
for line in output.splitlines(): | |
line = line.strip() | |
if line == '' or line == 'statically linked': continue |
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 functools import reduce | |
def __convert_time(timeString): | |
if timeString.endswith("ms"): | |
return float(timeString[:-2]) | |
elif timeString.endswith("us"): | |
return float(timeString[:-2])/1e3 | |
elif timeString.endswith("ns"): | |
return float(timeString[:-2])/1e6 |
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 <stdlib.h> | |
// | |
// bin2hex | |
// Returns the hexadecimal representation of a bytes sequence. | |
// Parameters | |
// - bin: array of bytes | |
// - size: number of bytes in bin. | |
// Returns | |
// A string containing the hex representation of bin. | |
// |
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
import time | |
class Timer: | |
def __enter__(self): | |
self.__start = time.time() | |
def __exit__(self, exType, exValue, exTraceback): | |
self.__elapsed = time.time() - self.__start |
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
""" | |
Giacenza media N26 | |
------------------ | |
Script Python che calcola la giacenza media a partire dalla | |
lista di transazioni che è possibile scaricare dal sito web. | |
Licenza: | |
-------- | |
Copyright 2019 Cristian Di Pietrantonio | |
Permission is hereby granted, free of charge, to any person obtaining |
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: Cristian Di Pietrantonio | |
Doodle scheduler | |
""" | |
import json | |
import requests | |
import datetime | |
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 | |
# This script converts a tex source to azw3 format using htlatex and ebook-convert (from calibre) | |
# to set the resolution of math images edit this file | |
# sudo gedit /usr/share/texmf/tex4ht/tex4ht.env | |
# in the section <dvipng> modify the DPI parameter (-D) of the two commands (I use 100) | |
# do the operation in a temporary directory. htlatex produces a lot of files (and we can't set an output dir) | |
currdir=`pwd` |
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 | |
################################################################################################### | |
# | |
# Author: Cristian Di Pietrantonio (https://github.com/Halolegend94) | |
# | |
# Description: Install easly the last version of JModelica. | |
# ATTENTION: set manually the requested variables in "manual setting" section before launching this | |
# Script. | |
# | |
################################################################################################### |