Skip to content
This repository was archived by the owner on Dec 28, 2019. It is now read-only.

Commit 8e9bbb0

Browse files
committed
Merge branch 'master' of https://github.com/Richienb/ROS-Code into HEAD
2 parents 2c6783a + ea06ac9 commit 8e9bbb0

8 files changed

Lines changed: 21 additions & 8 deletions

File tree

api/rospyapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33

44
def compilefile(filepath):
5-
system("run-file.py " + str(filepath))
5+
system("run-file.py " + str(filepath), shell=False)

ci/commitpush.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ then
1414
then
1515

1616
# Tell the user how many files were provided to stage
17-
echo "$(expr $# - 1) files were provided to stage."
17+
echo "$(($#-1)) files were provided to stage."
1818

1919
# For every argument after the first argument
2020
for i in "${@:2}"
@@ -59,7 +59,7 @@ then
5959
else
6060

6161
# Inform the user on the status
62-
echo "Using "$1" as the commit message."
62+
echo "Using $1 as the commit message."
6363

6464
# Check and commit
6565
git commit -m "$1"

ci/getversion.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env bash
22

33
# Return the output
4-
echo $(sed -r -e 1d -e 's/.{17}//' -ep -eq .bumpversion.cfg)
4+
sed -r -e 1d -e 's/.{17}//' -ep -eq .bumpversion.cfg

min/ros/maths.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def convertbase(number,base=10):
259259
return('' if sign==1 else '-')+res[::-1]
260260
def isnum(value):
261261
try:
262-
return bool(isinstance(value,int)or isinstance(value,float))
262+
return bool(isinstance(value,(float,int)))
263263
except BaseException:
264264
return False
265265
def quadrant(xcoord,ycoord):
@@ -307,5 +307,5 @@ def hcf(num1,num2):
307307
if((num1%i==0)and(num2%i==0)):
308308
return i
309309
def pythrule(first,second):
310-
return(a*b)/2
310+
return(first*second)/2
311311
# Created by pyminifier (https://github.com/liftoff/pyminifier)

min/ros/secure.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
"""
2+
Secure functions.
3+
"""
14
def randstring(length=1):
25
charstouse=string.ascii_letters+string.digits+string.punctuation
36
newpass=''

min/ros/string.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,13 @@ def randomstr(valuelist):
1616
return random.choice(valuelist)
1717
except IndexError:
1818
raise RuntimeError('An Error Has Occured: List Not Specified (0018)')
19+
def case(text,format='sentence'):
20+
if format=='uppercase':
21+
return str(text.upper())
22+
elif format=='lowercase':
23+
return str(text.lower())
24+
elif format=='sentence':
25+
return str(text[0].upper())+str(text[1:])
26+
elif format=='caterpillar':
27+
return str(text.lower().replace(" ","_"))
1928
# Created by pyminifier (https://github.com/liftoff/pyminifier)

src/ros/maths.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def isnum(value):
447447
"""
448448

449449
try:
450-
return bool(isinstance(value, int) or isinstance(value, float))
450+
return bool(isinstance(value, (float, int)))
451451
except BaseException:
452452
return False
453453

@@ -568,4 +568,4 @@ def pythrule(first, second):
568568
569569
"""
570570

571-
return (a * b) / 2
571+
return (first * second) / 2

src/ros/secure.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
55
"""
66

7+
78
def randstring(length=1):
89
"""
910

0 commit comments

Comments
 (0)