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 theta_data import theta_data | |
from theta_index_data import theta_index_data | |
from theta_delta_data import theta_delta_data | |
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_8bit(dec): | |
return(str(format(dec,'08b'))) | |
def bin_32bit(dec): | |
return(str(format(dec,'032b'))) | |
def bin_4bit(dec): | |
return(str(format(dec,'04b'))) | |
def bin_64bit(dec): |
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 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
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 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
#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
''' | |
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
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
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) |
OlderNewer