Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mariohm1311 on github.
  • I am mariohm1311 (https://keybase.io/mariohm1311) on keybase.
  • I have a public key ASAbsOczXkZ8O7wM2UsHTXhO3JiTbGGTipT262BJGb2c5Ao

To claim this, I am signing this object:

pragma solidity ^0.4.18;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
speed = [0, 1, 2, 5, 2, 2];
altitude = [100, 90, 70, 30, 20, 10];
max_speed = max(speed); % Returns
% speed == max_speed = [False, False, False, True, False, False]
% altitude(speed == max_speed) = 30
altitude_at_max_speed = altitude(speed == max_speed);
speed = [0, 1, 2, 5, 2, 1];
altitude = [100, 90, 70, 30, 20, 10];
% speed >=2 = [False, False, True, True, True, False]
% altitude(speed >= 2) = [70, 30, 20]
altitude_over_2_v = altitude(speed >= 2);
@mariohm1311
mariohm1311 / F_activations.py
Created January 3, 2019 11:47
CIFAR 10 model testing
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
def swish(x):
p = F.sigmoid(x)
p = p.mul(x)
return p
@mariohm1311
mariohm1311 / F_activations.py
Created January 3, 2019 11:47
CIFAR 10 model testing
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
def swish(x):
p = F.sigmoid(x)
p = p.mul(x)
return p
@mariohm1311
mariohm1311 / gist:3ebb41ecee44e3b78e8d90ab8b6db799
Created April 4, 2019 12:59
Complementary material on slides
Slide 26: Wing flex effects on the structure of an aircraft
https://www.wired.com/2010/03/boeing-787-passes-incredible-wing-flex-test/
http://www.anft.net/f-14/f14-detail-wsm.htm
Slide 27: Material comparison
http://www-materials.eng.cam.ac.uk/mpsite/interactive_charts/strength-cost/basic.html
http://www-materials.eng.cam.ac.uk/mpsite/interactive_charts/strength-toughness/NS6Chart.html
Slide 28: Machinability and weldability
https://www.unisign.com/aerospace/structural-parts-fuselage-emparage-bulkhead/
import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
case_name = 'caso1'
center_data = np.loadtxt(case_name, skiprows=4, max_rows=401, delimiter='\t')
surface_data = np.loadtxt(case_name, skiprows=408, max_rows=401, delimiter='\t')
#include <Arduino.h>
#include <Wire.h>
#include <EEPROM.h>
#include <SoftwareSerial.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BNO055.h>
// #include <Adafruit_MPL3115A2.h>
#include <utility/imumaths.h>
#include <Arduino.h>
#define CH1_SENSE A6
#define MUX_SELECT_0 4
#define MUX_SELECT_1 5
void selectInput(uint8_t n)
{
int val_select_0 = LOW;