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
####TESTING###### | |
''' | |
CRYPTO PROOFS | |
''' | |
''' | |
def SUB_PROOF(sub_set,theta_input): | |
#This function is checking if each index location contained in subset is either | |
#a set of 1's or 0's in theta's input. | |
to_check=[] |
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
i = 2 | |
n_0 = 4 | |
while True==True: | |
v_2 = (float(1)/float((i*4)-3)) | |
v_3 = (float(1)/float((i*4)-5)) | |
n_1 = float(n_0) + (4 * (v_2 - v_3)) | |
n_0 = float(n_1) | |
i+=1 | |
print(n_1) |
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 reverse(LIST): | |
to_return=[] | |
for i in range(1,len(LIST)+1): | |
to_return.append(LIST[-i]) | |
return(to_return) | |
def initialized_set(n): | |
set_multiple = int(0.5*(2**n)) | |
return([[0]]*set_multiple + [[1]]*set_multiple) |
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
import win32api | |
def name_return(): | |
#Will return computer str name | |
return(win32api.GetComputerName()) | |
def send_email(): | |
import smtplib | |
from email.MIMEMultipart import MIMEMultipart |
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
''' | |
Tree decision method with != operator. | |
''' | |
def unique_variables(LIST): | |
to_iter = len(LIST) | |
total_items = [] | |
for i in range(to_iter): | |
insert = LIST[i] | |
total_items.append(insert) |
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 Primes_Under_1_000_000 import prime_list | |
#from random import randint | |
##from rsa_list import rsa | |
## | |
##from UNIQUE_VARIABLES import U_V | |
def gcd(x,y): | |
while y!=0: | |
(x,y)=(y,x%y) |
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 Primes_Under_1_000_000 import prime_list | |
''' | |
To return the prime factorization of a number | |
''' | |
def is_div(v,n): | |
if v%n==0: | |
return(True) | |
return(False) |
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
import numpy | |
import itertools | |
from GREY_CODE import G_C | |
def sb(size,num): | |
to_return=[] | |
for i in range(num): | |
to_return.append(str_build(list(numpy.random.randint(2,size=(size,))))) | |
return(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
from PIL import Image | |
import numpy as np | |
import hashlib | |
import scipy.misc | |
def S_L(string_name_list,LIST): | |
f = open(string_name_list + '.py', 'w') | |
simplejson.dump(LIST,f) | |
f.close() |
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='' |