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
// gcc himmelblau_simulated_annealing.c -lm && ./a.out | |
#include <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> // RAND_MAX | |
double rand01(void) | |
{ | |
return rand() / ((double) RAND_MAX); | |
} |
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 | |
# | |
# A script to sync a local directory with a remote directory through FTP. The local directory contents | |
# will overwrite the remote directory. If a file was deleted locally, it will be deleted remotely. | |
# Notes: | |
# | |
# - It excludes the content of the .git directory. | |
# - The -P flag is for parallelizing work. | |
# - 'set ssl:verify-certificate false' might not be necessary. YMMV. | |
# |
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
function set-title(){ | |
if [[ -z "$ORIG" ]]; then | |
ORIG=$PS1 | |
fi | |
TITLE="\[\e]2;$*\a\]" | |
PS1=${ORIG}${TITLE} | |
} |
OlderNewer