Skip to content

Instantly share code, notes, and snippets.

View jononon's full-sized avatar

Jonathan Damico jononon

View GitHub Profile
x = [50,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1050,1100,1150,1200,1250,1300,1350,1400,1450,1500,1550,1600,1650,1700,1750,1800,1850,1900,1950]
y = [635,633,630,627,621,612,603,597,594,594,599,614,635,644,666,694,733,747,748,748,749,749,750,750,749,749,746,738,730,722,714,706,697,690,686,682,681,681,681,681]
n = 6
p = polyfit (x, y, n)
f = polyout(p, 'x')
fplot(f, [min(x),max(x)])
activate application "Google Chrome"
set firstname to "firstname"
set lastname to "lastname"
set tel1 to "310"
set tel2 to "---"
set tel3 to "----"
set dlid to "driverslicencenumber"
set pageURL to "a?"
set locationList to {"ARLETA", "BELL GARDENS", "BELLFLOWER", "COMPTON", "CULVER CITY", "EL MONTE", "FULLERTON", "GLENDALE", "HAWTHORNE", "HOLLYWOOD", "INGLEWOOD", "LONG BEACH", "LOS ANGELES", "MONTEBELLO", "NEWHALL", "OXNARD", "PASADENA", "SAN PEDRO", "SANTA MONICA", "SANTA PAULA", "SIMI VALLEY", "THOUSAND OAKS", "TORRANCE", "VAN NUYS", "WEST COVINA", "WESTMINSTER", "WHITTIER", "WINNETKA"}
(*5 2 2 6*)
Prompt A
ClrList L₆
For(I,1,√(A))
If ((A/I)=round(A/I,0))
I→L₆(dim(L₆)+1)
End
For(I,dim(L₆),1,-1)
If (L₆(dim(L₆))≠(A/L₆(I)))
#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, in7, gyro, sensorGyro)
#pragma config(Sensor, in8, powerExpander, sensorAnalog)
#pragma config(Sensor, dgtl1, claw, sensorDigitalOut)
#pragma config(Sensor, dgtl2, cubeAuton, sensorTouch)
#pragma config(Sensor, dgtl8, leftDriveEnc, sensorQuadEncoder)
#pragma config(Sensor, dgtl10, rightDriveEnc, sensorQuadEncoder)
#pragma config(Sensor, dgtl12, liftStop, sensorTouch)
#pragma config(Sensor, I2C_1, liftEnc, sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Motor, port1, rightWheel1, tmotorVex393_HBridge, openLoop, reversed)
#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, in1, clawPot2, sensorPotentiometer)
#pragma config(Sensor, in2, clawPot1, sensorPotentiometer)
#pragma config(Sensor, dgtl1, liftBottom, sensorTouch)
#pragma config(Sensor, dgtl2, autonRL, sensorTouch)
#pragma config(Sensor, I2C_1, driveR, sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Sensor, I2C_2, driveL, sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Sensor, I2C_3, liftEncoder, sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Motor, port1, liftL3, tmotorVex393HighSpeed_HBridge, openLoop)
#pragma config(Motor, port2, leftDrive, tmotorVex393HighSpeed_MC29, openLoop, encoderPort, I2C_1)
#pragma config(Sensor, dgtl1, liftBottom, sensorTouch)
#pragma config(Motor, port1, liftRI, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port2, liftRO, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port3, liftLI, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port4, liftLO, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port5, intake1, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port6, intake2, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port7, leftDrive1, tmotorVex393HighSpeed_MC29, openLoop, driveRight)
#pragma config(Motor, port8, leftDrive2, tmotorVex393HighSpeed_MC29, openLoop)
#pragma config(Motor, port9, rightDrive1, tmotorVex393HighSpeed_MC29, openLoop, reversed)
#pragma config(Sensor, dgtl1, liftBottom, sensorTouch)
#pragma config(Motor, port1, liftL3, tmotorVex393_HBridge, openLoop, reversed)
#pragma config(Motor, port2, liftR1, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port3, liftR2, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port4, leftDrive, tmotorVex393HighSpeed_MC29, openLoop, driveLeft)
#pragma config(Motor, port5, liftL1, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port6, liftL2, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port7, rightDrive, tmotorVex393HighSpeed_MC29, openLoop, reversed, driveRight)
#pragma config(Motor, port8, , tmotorVex393HighSpeed_MC29, openLoop, reversed)
#pragma config(Motor, port9, intake, tmotorVex393_MC29, openLoop)
void setLeftWheelSpeed(int speed) {
motor[leftWheel1] = speed;
motor[leftWheel2] = speed;
motor[leftWheel3] = speed;
motor[leftWheel4] = speed;
}
void setRightWheelSpeed(int speed) {
motor[rightWheel1] = speed;
#!/bin/bash
for i in `seq 1 24`;
do
./cartLabel.py --print --label $i
done
activate application "Google Chrome"
set tabcount to 11
set firstpagetabcount to 12
set secondpagetabcount to 13
set returntocoursepagecount to 9
set moduleURL to "http://www.vdriveusa.com/moodle/mod/flash/view.php?id=111"
set AppleScript's text item delimiters to "?"
set firstTime to true
set pageURL to "a?"
set delayTime to 30