Skip to content

Instantly share code, notes, and snippets.

View Cj1m's full-sized avatar

Christopher McKay Cj1m

  • Scotland
View GitHub Profile
class NNSpectrogramModel(nn.Module):
def __init__(self):
super().__init__()
self.input_layer = 3968
h1 = 2645
h2 = 1024
encoding_size = 240
num_classes = 1
self.fc1 = nn.Linear(self.input_layer, encoding_size)
a23 = np.matrix([math.cos(link2_angle[0]), 0, math.sin(link2_angle[0]), 0],
[0, 1, 0, 0],
[-math.sin(link2_angle[0]), 0, math.cos(link2_angle[0]), 0],
[0,0,0,1])
a34 = np.matrix([1,0,0,0],
[0, math.cos(link3_angle[1]), -math.sin(link3_angle[1]), 0],
[0, math.sin(link3_angle[1]), math.cos(link3_angle[1]), 3],
[0,0,0,1])
public void runTimer(){
if(snake.isAlive()){
ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
executor.schedule(runTimer(), 1, TimeUnit.SECONDS);
executor.shutdown();
}
}
$('#swimmer-submit').on('click', function(e) {
e.preventDefault();
var values = {
swimmer : {
swimmer_forename: $('input[name="swimmer_forename"]').val(),
swimmer_surname: $('input[name="swimmer_surname"]').val(),
swimmer_dob: $('input[name="swimmer_dob"]').val(),
swimmer_gender: $('select[name="swimmer_gender"]').val(),
}
};