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 <stdio.h> | |
#include <math.h> | |
// Memory Retrieval Operation | MHIP kernel component | |
// 1/22/2023 | |
// 6 bit address/size | |
// A B C A B C | |
// 0 3 [ ] 1 3 [ ] | |
int SAM[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,0,0,0,0,1,1,1,0,1}; |
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 <stdio.h> | |
#include <math.h> | |
// Memory Hopping Operation | MHIP kernel component | |
// 1/21/2023 | |
// 6 bit address/size | |
// A B C A B C | |
// 0 3 [ ] 1 3 [ ] | |
int SAM[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,0,0,0,0,1,1,1,0,1}; |
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 <stdio.h> | |
// Boolean Comparing Operation | MHIP kernel component | |
// Bryan Pedrosa | |
// 1/20/2023 | |
// modes: | |
//[0x0]BOOL_EQ - equal | |
//[0x1]BOOL_LT - less than | |
//[0x2]BOOL_GT - greater than |
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
https://check.torproject.org/api/ip |
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 <stdio.h> | |
// 1/8/2022 | |
// modified version of https://github.com/ApOgEE/mingw-c-socket | |
// WORKS ON Linux kali 4.19.0-kali4-686-pae #1 SMP Debian 4.19.28-2kali1 (2019-03-18) i686 GNU/Linux | |
////////////////////////////////////////////////////////////////////////// | |
// CROSS-PLATFORMING A SOCKET PROGRAM | |
// See https://stackoverflow.com/questions/28027937/cross-platform-sockets |
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 <stdio.h> | |
// 12/21/2022 | |
// calculating where to begin swapping with | |
//[0x0] LTR - left to right | |
//[0x1] RTL - right to left | |
int predict_swap(int mode, int index_mx, int start, int steps){ | |
if(mode==0x0){ | |
return (start+steps)%index_mx; | |
}else if(mode==0x1){ |
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
/angsize.htm | |
// angular size https://www.1728.org/angsize.htm | |
function angular_size(sz, r){ | |
const raddeg = 57.2957795130823; | |
var arctan = Math.atan( (.5*sz) / r ); | |
return arctan * 2 * raddeg; | |
} |
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
# https://gist.github.com/davebiagioni/1ac21feb1c2db04be4e6 | |
# https://stackoverflow.com/questions/60695284/linearly-spaced-array-in-c | |
def linspace(x1, x2, nstep): | |
step = (x2 - x1) / (nstep - 1) | |
return [round(x1 + (i * step), 8) for i in range(0, nstep)] |
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 math | |
# https://en.wikipedia.org/wiki/Unbiased_estimation_of_standard_deviation | |
def std_deviation(items, mean): | |
sum_ = sum([(i-mean)**2 for i in items]) | |
N = len(items) # the size of the population | |
return math.sqrt(sum_ / (N-1)) |
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
# https://en.wikipedia.org/wiki/Gaussian_function | |
def gaussian_func(x, a, std_dvtn, mean): | |
e = 2.718281828459045 # euler's const | |
return (a*e) ** -(((x-mean)**2) / (2*std_dvtn)**2) |
NewerOlder