Skip to content

Commit

Permalink
more programs added
Browse files Browse the repository at this point in the history
  • Loading branch information
hearues-zueke-github committed Mar 4, 2018
1 parent dd15a8c commit ec3dbee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 5 additions & 5 deletions matrix_modulo/binary_matrix_data_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ def find_universal_matrix_A(n):

def get_new_X_T(n, m, length):
A = np.random.random((n, m))*2.-1.
X = np.random.random((length, n))
X = np.random.random((length, n))*2-1

T = np.dot(X*2.-1., A)
T = np.dot(X, A)
T_sig = 1 / (1+np.exp(-T))

T_round = T.copy().astype(np.int)
T_round[T<0.] = 0
T_round[T>=0.] = 1
T_round = T.copy()
T_round[T<0.] = 0.
T_round[T>=0.] = 1.

return X, T_sig, T_round

Expand Down
6 changes: 6 additions & 0 deletions test_programs/execv_in_python.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /usr/bin/python2.7

import os

if __name__ == "__main__":
os.execvp("htop", ("htop", ))

0 comments on commit ec3dbee

Please sign in to comment.