Skip to content

Instantly share code, notes, and snippets.

View gftabor's full-sized avatar

Griffin Tabor gftabor

  • University of Utah
View GitHub Profile
@gftabor
gftabor / minimization_pytorch.py
Created May 7, 2021 19:25
time testing 10 simple minimization problems in Tensorflow 1.x. Tensorflow 2.x and pytorch. tf.1x takes 0.22s, pytorch takes 1.47s, tf2.x takes 1.62s
import torch
import numpy as np
def forward(x):
clippedTheta = torch.sigmoid(x) * 720 - 360
return clippedTheta
# -*- coding: utf-8 -*-
"""
Created on Sun May 10 21:50:41 2020
@author: tabor
"""
import numpy as np
import matplotlib.pyplot as plt
def speed(w1,w2):
x_direction_speed = max(abs(w1[0]),abs(w2[0]))
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import numpy as np
import matplotlib.pyplot as plt
#some of this code is left over from when I was going to implement different strategies for calling for a new army name
from gurobipy import *
import numpy as np
import time
dims = 10
m = Model("mip")
u = m.addVars(dims,1)
z = m.addVars(dims,1)
m.update()
u = np.array([[u[i,0]] for i in range(dims)])
@gftabor
gftabor / differential.groovy
Last active August 23, 2018 17:24
Adding new file from BowlerStudio
//Your code here
double computeGearPitch(double diameterAtCrown,double numberOfTeeth){
return ((diameterAtCrown/2)*((360.0)/numberOfTeeth)*Math.PI/180)
}
double vexGearSize = 19
double totalWidth = vexGearSize * 0.5
double vexPitch = Math.PI*1.5 * 25.4 / 36
println "pitch " + vexPitch
double pitch = vexPitch * 2
@gftabor
gftabor / motors.h
Last active March 12, 2018 20:52
Motors header file
/**
* \file vdml_motors.h
*
* \brief Contains prototypes for the motor-related thread-safe wrapper
* functions.
*
* This file contains the header info for the functions used to modify the
* status of vex motors.
*
* \copyright (c) 2017-2018, Purdue University ACM SIGBots.
odroid@odroid:~/launches/odroid$ roslaunch cam_local.launch
... logging to /home/odroid/.ros/log/6b71b3c0-092f-11e8-893c-001e06307bd2/roslaunch-odroid-13931.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://localhost:50986/
SUMMARY
========
libSDL-1.2.so.0 => /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0 (0xb6e7f000)
libv4l2.so.0 => /usr/lib/arm-linux-gnueabihf/libv4l2.so.0 (0xb6e6c000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6d85000)
/lib/ld-linux-armhf.so.3 (0xb6f21000)
libasound.so.2 => /usr/lib/arm-linux-gnueabihf/libasound.so.2 (0xb6ceb000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6c7f000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6c73000)
libpulse-simple.so.0 => /usr/lib/arm-linux-gnueabihf/libpulse-simple.so.0 (0xb6c68000)
libpulse.so.0 => /usr/lib/arm-linux-gnueabihf/libpulse.so.0 (0xb6c2f000)
libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0xb6b49000)
% 1. Title: Early stage of Indians Chronic Kidney Disease(CKD)
%
% 2. Source Information:
% (a) Source:
% Dr.P.Soundarapandian.M.D.,D.M
% (Senior Consultant Nephrologist),
% Apollo Hospitals,
% Managiri,
% Madurai Main Road,
% Karaikudi,
@gftabor
gftabor / Patient2
Last active October 30, 2017 15:39
1 gtccaagggt agccaaggat ggctgcagct tcatatgatc agttgttaaa gcaagttgag
61 gcactgaaga tggagaactc aaatcttcga caagagctag aggataattc caatcatctt
121 acaaaactgg aaactgaggc atctaatatg aaggaagtac ttaaacaact acaaggaagt
181 attgaagatg aagctatggc ttcttctgga cagattgatt tattagagcg tcttaaagag
241 cttaacttag atagcagtaa tttccctgga gtaaaactgc ggtcaaaaat gtccctccgt
301 tcttatggaa gccgggaagg atctgtatca agccgttctg gagagtgcag tcctgttcct
361 atgggttcat ttccaagaag agggtttgta aatggaagca gagaaagtac tggatattta
421 gaagaacttg agaaagagag gtcattgctt cttgctgatc ttgacaaaga agaaaaggaa
481 aaagactggt attacgctca acttcagaat ctcactaaaa gaatagatag tcttccttta
541 actgaaaatt tttccttaca aacagatatg accagaaggc aattggaata tgaagcaagg