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
joshua@josh-320:~/Desktop/Stuff/github/repos/PyTe$ python upload.py -s http://codereview.joshashby.com --base_url [email protected]:JoshAshby/PyTe.git | |
The following files are not added to version control: | |
keyboard.pyc | |
upload.py | |
virtkeyboard.pyc | |
Are you sure to continue?(y/N) y | |
Upload server: http://codereview.joshashby.com (change with -s/--server) | |
New issue subject: test | |
Email (login for uploading to http://codereview.joshashby.com) [[email protected]]: | |
Password for [email protected]: |
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
//------------------------------------------- | |
/* | |
main.c | |
2010 - Josh Ashby | |
[email protected] | |
http://joshashby.com | |
http://github.com/JoshAshby | |
freenode/#linuxandsci - JoshAshby | |
*/ | |
//------------------------------------------- |
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
void pwm_ramp1A(int value, int speed) | |
{ | |
if (value == 0) {//safe gaurd to prevent i from over flowing | |
pwm1A(0); | |
} | |
else { | |
if (value > pwm_value_old1A){//determine if it should ramp up or down | |
TCCR1A |= (1<<COM1A1); | |
unsigned int i = pwm_value_old1A; | |
while (i<=value) {//ramp up |
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
uint8_t ultrasound_filter(char pin) { | |
filt = (average>>1); | |
adc = ADCH; | |
for (j = 0; j <= 16; j++){ | |
if (ADCH > average + 100) | |
{ | |
adc = (ADCH>>1) + filt; | |
} | |
if (ADCH < average - 100){ |
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
Inside of the editor class I have the local variable CurrentfileName | |
and the function: | |
def getTitle(self): | |
return self.CurrentfileName | |
in the main code I have a function which parses each tabs elements for the one called editor, which is the editor object that belongs to that tab. After I have found editor I can simply call getTitle() and boom, the two are talking. | |
def printChildren(self, obj, indent): | |
children=obj.children() | |
if children==None: |
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
Traceback (most recent call last): | |
File "./pyte.py", line 184, in save | |
self.Tabfile(self.mainTabWidget, "", 'saveFile') | |
File "./pyte.py", line 257, in Tabfile | |
self.Tabfile(child, indent + " ", action_type) | |
File "./pyte.py", line 225, in Tabfile | |
child.save() | |
File "/home/joshua/Desktop/Stuff/github/repos/PyTe/editor.py", line 126, in save | |
self.f.write(str(self.editor.text())) | |
UnicodeEncodeError: 'ascii' codec can't encode characters in position 608-610: ordinal not in range(128) |
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
Server error! | |
The server encountered an internal error and was unable to complete your request. | |
Error message: | |
Global symbol "$name" requires explicit package name at database.pm line 46. Global symbol "$description" requires explicit package name at database.pm line 46. Global symbol "$barcode" requires explicit package name at database.pm line 46. Global symbol "$quantity" requires explicit package name at database.pm line 46. Global symbol "$flag" requires explicit package name at database.pm line 46. Global symbol "$average_days_left" requires explicit package name at database.pm line 46. Global symbol "$name" requires explicit package name at database.pm line 49. Global symbol "$description" requires explicit package name at database.pm line 49. Global symbol "$barcode" requires explicit package name at database.pm line 49. Global symbol "$quantity" requires explicit package name at database.pm line 49. Global symbol "$flag" requires explicit package name at database.pm line 49. Global symbol "$averag |
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
library(ggplot2) | |
data = read.csv("/home/joshua/Downloads/test_data.csv", header = TRUE) | |
plot = ggplot(mydata, aes(x, y)) + geom_point() + ylab('Quantity') + xlab('Days') | |
m = length(data$x) | |
theta = matrix(c(0,0), nrow=1) | |
x = matrix(c(rep(1,m), data$x), ncol=2) | |
y = matrix(data$y, ncol=1) | |
theta = solve(t(x) %*% x) %*% (t(x) %*% y) |
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
Have: | |
x,y | |
0,30 | |
1,29 | |
1,28 | |
2,27 | |
2,26 | |
3,25 | |
3,24 |
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
library(ggplot2) | |
mydata = read.csv("/home/joshua/Downloads/test_data.csv", header = TRUE) | |
m = length(mydata$x) | |
theta = matrix(c(0,0), nrow=1) | |
ux = matrix(c(rep(1,m), mydata$x), ncol=2) | |
uy= matrix(mydata$y, ncol=1) | |
for (i in 0:m) { | |
j = (m - i) |