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
#forward_build | |
set_0=['00000','00101','01011','01010', | |
'10110','10111','10001','10100', | |
'01101','01000','01110','01111', | |
'00011','00010','01100','01001', | |
'11010','11101','10011','10000', | |
'11100','11111','11001','11110', | |
'00110','00001','00111','00100', | |
'11000','11011','10101','10010'] |
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
def to_print(object): | |
for i in range(len(object)): | |
print(object[i]) | |
def bin_n_bit(dec,n): | |
return(str(format(dec,'0'+n+'b'))) | |
def bin_8bit(dec): | |
return(str(format(dec,'08b'))) |
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
def bin_n_bit(dec,n): | |
return(str(format(dec,'0'+n+'b'))) | |
def hex_n_bit(dec,n): | |
return(str(format(dec,'0'+n+'x'))) | |
def xo_set(ip_0,ip_1): | |
to_return=[] | |
for i in range(len(ip_0)): | |
to_return.append(ip_0[i] ^ ip_1[i]) |
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
def bin_theta(ip): | |
c_xz=[] | |
for i in range(5): | |
c_xz.append(ip[i] ^ ip[i+5] ^ ip[i+10] ^ ip[i+15] ^ ip[i+20]) | |
d_xz=[] | |
for i in range(5): | |
d_xz.append(c_xz[(i-1)%5] ^ rot(c_xz[(i+1)%5],1,64)) | |
for i in range(5): | |
ip[i] = ip[i] ^ d_xz[i] | |
ip[i+5] = ip[i+5] ^ d_xz[i] |
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
def conversion(str_list): | |
for i in range(len(str_list)): | |
str_list[i]=int(str_list[i]) | |
return(str_list) | |
def trim_end(a_string): | |
return(a_string[0:len(a_string)-1]) | |
def dec_shift(a_string): | |
to_build_0='' |
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
from Tkinter import * | |
import csv | |
import win32clipboard | |
import os | |
def bat_exe(): | |
''' | |
Note that both methods will execute a batch file from your home directory. | |
''' | |
#os.system("F:/Anaconda3/pdm_open.bat") |
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
#https://gist.github.com/back-seat-driver/b2f81929741cd94b1ff17086fdaad0bd | |
def bin_n_bit(dec,n): | |
return(str(format(dec,'0'+n+'b'))) | |
def hex_n_bit(dec,n): | |
return(str(format(dec,'0'+n+'x'))) | |
def xo_set(ip_0,ip_1): | |
to_return=[] |
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
def to_print(object): | |
for i in range(len(object)): | |
print(object[i]) | |
def l_s(bit_list): | |
bit_string='' | |
for i in range(len(bit_list)): | |
bit_string+=bit_list[i] | |
return(bit_string) |
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
from Tkinter import * | |
class MyFirstGUI: | |
def __init__(self, master): | |
self.master = master | |
master.title("Calculator") | |
global TEXT_VALUE | |
global TEXT_BOX | |
global GENERAL_PRECISION | |
global SPECIFIC_PRECISION |
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
def keccak_(ip): | |
for i in range(24): | |
ip=iota(chi(pi(rho(theta(ip)))),i) | |
return(ip) | |
zero=['1100110001001101000111100111110100011100011110010010000000111110', | |
'0110101100110010001101101000110101010000010100110101111110010011', | |
'1001011100010011110100011100111000001010100011111011001010001101', | |
'0000010001110000101100000100101001111011011000011110000101001101', |
NewerOlder