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 | |
# Use without download: | |
# curl -s https://gist.githubusercontent.com/raulpy271/3a05c3fd138013fcc4edb9b8cbdc6ac1/raw/ee8b56ffbe54751402c766cf15a3a13bae6f1c7c/kill_discord.sh | bash | |
process='Discord' | |
proces_exist=`pidstat | grep -i $process` | |
if [ -n "$proces_exist" ] | |
then |
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
type float_operation = float -> float -> float | |
let shift (operation: float_operation) = | |
let is_sum = operation 1.0 1.0 = 2.0 in | |
if is_sum then (-.) else (+.) | |
;; | |
let calculate_pi ?(limit=20) () : float = | |
let rec calculate_a_pi_term | |
(term: int) (acc: float) (operation: float_operation): float = |