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 random | |
import matplotlib as plt | |
import time | |
import os | |
import struct | |
_random_source = open("/dev/random", "rb") | |
def random_bytes(len): |
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
%Auteur: Nassim BENTARKA | |
%Ecrit le 15/05/2018 | |
%INPUT: | |
%Nombre de Reynolds: R ; et Rugosité relative: K | |
%Le nombre d'itérations | |
%OUTPUT: | |
%Coefficient de friction lambda: F | |
function F=colebrook(R,K) |
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: Nassim BENTARKA (NBN) @nassimosaz | |
#You can implement this tool into your system by copying the script into ~/bin/ directory as fast-video-trim | |
if [ $# -ne 4 ]; then | |
printf "\n${0}: usage: Fast-Video-Trim.sh [BEGIN_TIME HH:MM:SS:] [END_TIME HH:MM:SS] [INPUT_FILE] [OUTPUT_FILE]\n\n" | |
exit 1 | |
fi | |
TIME1=$1 | |
TIME2=$2 | |
IN=$3 |
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
% This technique is mainly used to optimize the running time of the algorithm, it transfoms exponential time caused by the recursion | |
% into polynomial time. | |
% Run this file on Matlab (with the csv files in the same dir) | |
clear | |
clc | |
n=input("N= "); | |
memo=dlmread('data.csv'); %Read memoized values array | |
memo_index=dlmread('index.csv'); %Read indexes of the memoized values | |
fib(1)=1; | |
fib(2)=1; |