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 multiprocessing | |
| import random | |
| import sys | |
| rangemin = 1 | |
| rangemax = 9 | |
| def randomGen(num): | |
| values = [] | |
| for i in range(0, num): |
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 Foundation | |
| import TensorFlow | |
| struct MAuto: Parameterized { | |
| // Define constants | |
| static let imageSize: Int32 = 28 | |
| static let inputSize: Int32 = imageSize * imageSize | |
| static let hiddenLength: Int32 = 512 | |
| static let coderLength: Int32 = 256 |
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 as np | |
| import csv | |
| import sys | |
| from scipy.spatial.distance import cosine | |
| vec_file = list(csv.reader(open("en_de_model_2.vec"), delimiter=" ")) | |
| vec_file = [i[0:-1] for i in vec_file[1:]] | |
| words = [i[0] for i in vec_file] | |
| vectors = [list(map(float, i[1:])) for i in vec_file] |
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
| using Flux.Tracker | |
| using Flux.Tracker: update! | |
| using ProgressMeter | |
| euclidean_distance(p1, p2) = sqrt((p1[1] - p2[1]) ^ 2 + (p1[2] - p2[2]) ^ 2) | |
| squared_error(expected, output) = (expected - output) ^ 2 | |
| function trilateration_error(r1, r2, r3, expected_distances, prediction) | |
| prediction_r1 = euclidean_distance(prediction, r1) |
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
| using Flux.Tracker | |
| using Flux.Tracker: update! | |
| using ProgressMeter | |
| euclidean_distance(p1, p2) = sqrt((p1[1] - p2[1]) ^ 2 + (p1[2] - p2[2]) ^ 2) | |
| squared_error(expected, output) = (expected - output) ^ 2 | |
| function trilateration_error(r1, r2, r3, expected_distances, pred) | |
| pred_r1 = euclidean_distance(r1, pred) |
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 SwiftUI | |
| struct ContentView : View { | |
| var body: some View { | |
| Text("Hello World") | |
| } | |
| } | |
| #if DEBUG | |
| struct ContentView_Previews : PreviewProvider { |
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
| Text("Hello World") | |
| .font(.largeTitle) | |
| .bold() |
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
| VStack { | |
| Text("Hello World") | |
| .font(.largeTitle) | |
| .bold() | |
| Text("This is my test app.") | |
| } |
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
| VStack(alignment: .leading) { | |
| Text("Hello World") | |
| .font(.largeTitle) | |
| .bold() | |
| Text("This is my test app.") | |
| } |
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
| struct ContentView : View { | |
| @State var stackLocation: CGPoint = .zero | |
| var body: some View { | |
| VStack(alignment: .leading) { | |
| Text("Hello World") | |
| .font(.largeTitle) | |
| .bold() | |
| Text("This is my test app.") | |
| } |
OlderNewer