Skip to content

Commit 2f7d258

Browse files
committed
Add bulk of sample projects, LMS and resources
Import a large set of projects and resources into the repository: added an LMS application (Python scripts, DB, assets), multiple Sample Projects (games, utilities, tutorials), DataCamp project notebook and datasets, northeastern workshop materials, and numerous zipped Java/Spring example apps (BookClub, DaikichiPathVariables, DojosNinjas) including their build files and artifacts. Also include assorted images, icons, and metadata (.DS_Store entries). This is a bulk import to populate the repo with example projects and supporting assets.
1 parent 39de09e commit 2f7d258

146 files changed

Lines changed: 14869 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

0 Bytes
Binary file not shown.

BuildRobotz_controller1.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
"""
2+
Your autonomous controller implementation.
3+
Edit the get_control() method to implement your driving algorithm!
4+
"""
5+
import math
6+
7+
class Controller:
8+
def __init__(self):
9+
# PID parameters - tune these!
10+
self.Kp = 0.015
11+
self.Ki = 0.0002
12+
self.Kd = 0.10
13+
14+
# PID state
15+
self.previous_error = 0.0
16+
self.integral = 0.0
17+
18+
def get_control(self, car, sensor_readings):
19+
"""
20+
Calculate steering, throttle, and brake.
21+
22+
Args:
23+
car: Dictionary with x, y, theta, velocity
24+
sensor_readings: List of 16 distance values
25+
26+
Returns:
27+
[steering, throttle, brake]
28+
"""
29+
# Calculate error from center
30+
error = self.calculate_center_error(sensor_readings)
31+
32+
# PID steering
33+
steering = self.pid_control(error)
34+
35+
# Simple speed control (reduced for better control)
36+
throttle = 0.25
37+
brake = 0.0
38+
39+
return [steering, throttle, brake]
40+
41+
def calculate_center_error(self, sensor_readings):
42+
"""Calculate lateral error from track center."""
43+
mid = len(sensor_readings) // 2
44+
left_avg = sum(sensor_readings[:mid]) / mid
45+
right_avg = sum(sensor_readings[mid:]) / mid
46+
return right_avg - left_avg
47+
48+
def pid_control(self, error):
49+
"""PID controller for steering."""
50+
dt = 1.0 / 60.0
51+
52+
# P term
53+
p_term = self.Kp * error
54+
55+
# I term
56+
self.integral += error * dt
57+
self.integral = max(-100, min(100, self.integral))
58+
i_term = self.Ki * self.integral
59+
60+
# D term
61+
d_term = self.Kd * (error - self.previous_error) / dt
62+
self.previous_error = error
63+
64+
return p_term + i_term + d_term
65+
66+
def reset(self):
67+
"""Reset controller state."""
68+
self.previous_error = 0.0
69+
self.integral = 0.0
6 KB
Binary file not shown.
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
year,degrees_celsius
2+
1850,7.74
3+
1851,8.09
4+
1852,7.97
5+
1853,7.93
6+
1854,8.19
7+
1855,8.12
8+
1856,7.9
9+
1857,7.71
10+
1858,8.13
11+
1859,8.2
12+
1860,7.78
13+
1861,7.81
14+
1862,7.49
15+
1863,8.15
16+
1864,7.94
17+
1865,8.13
18+
1866,8.19
19+
1867,8.28
20+
1868,8.09
21+
1869,8.32
22+
1870,8.08
23+
1871,8.05
24+
1872,8.12
25+
1873,8.24
26+
1874,8.38
27+
1875,7.87
28+
1876,7.99
29+
1877,8.49
30+
1878,8.78
31+
1879,8.14
32+
1880,8.06
33+
1881,8.22
34+
1882,8.1
35+
1883,7.95
36+
1884,7.77
37+
1885,7.9
38+
1886,7.9
39+
1887,7.87
40+
1888,8.06
41+
1889,8.29
42+
1890,7.95
43+
1891,8.01
44+
1892,8.05
45+
1893,8.05
46+
1894,8.15
47+
1895,8.15
48+
1896,8.22
49+
1897,8.29
50+
1898,8.19
51+
1899,8.4
52+
1900,8.5
53+
1901,8.52
54+
1902,8.28
55+
1903,8.2
56+
1904,8.08
57+
1905,8.21
58+
1906,8.38
59+
1907,7.93
60+
1908,8.16
61+
1909,8.16
62+
1910,8.21
63+
1911,8.16
64+
1912,8.15
65+
1913,8.29
66+
1914,8.58
67+
1915,8.59
68+
1916,8.23
69+
1917,8.03
70+
1918,8.13
71+
1919,8.37
72+
1920,8.34
73+
1921,8.56
74+
1922,8.4
75+
1923,8.39
76+
1924,8.48
77+
1925,8.51
78+
1926,8.72
79+
1927,8.51
80+
1928,8.62
81+
1929,8.22
82+
1930,8.6
83+
1931,8.69
84+
1932,8.69
85+
1933,8.33
86+
1934,8.63
87+
1935,8.51
88+
1936,8.54
89+
1937,8.68
90+
1938,8.86
91+
1939,8.76
92+
1940,8.77
93+
1941,8.76
94+
1942,8.72
95+
1943,8.74
96+
1944,8.83
97+
1945,8.57
98+
1946,8.67
99+
1947,8.79
100+
1948,8.74
101+
1949,8.58
102+
1950,8.36
103+
1951,8.62
104+
1952,8.64
105+
1953,8.88
106+
1954,8.56
107+
1955,8.62
108+
1956,8.28
109+
1957,8.73
110+
1958,8.78
111+
1959,8.73
112+
1960,8.58
113+
1961,8.8
114+
1962,8.75
115+
1963,8.86
116+
1964,8.41
117+
1965,8.53
118+
1966,8.61
119+
1967,8.7
120+
1968,8.51
121+
1969,8.59
122+
1970,8.71
123+
1971,8.61
124+
1972,8.51
125+
1973,8.95
126+
1974,8.47
127+
1975,8.74
128+
1976,8.35
129+
1977,8.86
130+
1978,8.7
131+
1979,8.74
132+
1980,8.98
133+
1981,9.18
134+
1982,8.65
135+
1983,9.04
136+
1984,8.7
137+
1985,8.66
138+
1986,8.84
139+
1987,9.01
140+
1988,9.21
141+
1989,8.93
142+
1990,9.25
143+
1991,9.19
144+
1992,8.84
145+
1993,8.87
146+
1994,9.04
147+
1995,9.36
148+
1996,9.04
149+
1997,9.21
150+
1998,9.53
151+
1999,9.29
152+
2000,9.2
153+
2001,9.41
154+
2002,9.56
155+
2003,9.52
156+
2004,9.32
157+
2005,9.7
158+
2006,9.52
159+
2007,9.73
160+
2008,9.42
161+
2009,9.49
162+
2010,9.7
163+
2011,9.51
164+
2012,9.5
165+
2013,9.6
166+
2014,9.56
167+
2015,9.82
168+
2016,10.02
28.4 KB
Loading
32.1 KB
Loading

Introduction to DataCamp Projects/notebook.ipynb

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

LMS/.gitignore

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
db.sqlite3
58+
59+
# Flask stuff:
60+
instance/
61+
.webassets-cache
62+
63+
# Scrapy stuff:
64+
.scrapy
65+
66+
# Sphinx documentation
67+
docs/_build/
68+
69+
# PyBuilder
70+
target/
71+
72+
# Jupyter Notebook
73+
.ipynb_checkpoints
74+
75+
# pyenv
76+
.python-version
77+
78+
# celery beat schedule file
79+
celerybeat-schedule
80+
81+
# SageMath parsed files
82+
*.sage.py
83+
84+
# Environments
85+
.env
86+
.venv
87+
env/
88+
venv/
89+
ENV/
90+
env.bak/
91+
venv.bak/
92+
93+
# Spyder project settings
94+
.spyderproject
95+
.spyproject
96+
97+
# Rope project settings
98+
.ropeproject
99+
100+
# mkdocs documentation
101+
/site
102+
103+
# mypy
104+
.mypy_cache/

LMS/48-512.png

13.3 KB
Loading

LMS/Add_Books.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
from tkinter import *
2+
from tkinter import messagebox
3+
import sqlite3
4+
from sqlite3 import Error
5+
import os
6+
import sys
7+
py = sys.executable
8+
9+
#creating window
10+
class Add(Tk):
11+
def __init__(self):
12+
super().__init__()
13+
self.iconbitmap(r'libico.ico')
14+
self.maxsize(500, 500)
15+
self.minsize(500, 500)
16+
self.title('Add Book')
17+
a = StringVar()
18+
b = StringVar()
19+
c = StringVar()
20+
#verifying Input
21+
def b_q():
22+
if len(a.get()) == 0 or len(b.get()) == 0:
23+
messagebox.showerror("Error","Please Enter The Details")
24+
else:
25+
g = 1
26+
try:
27+
self.conn = sqlite3.connect('library_administration.db')
28+
self.myCursor = self.conn.cursor()
29+
self.myCursor.execute("Insert into books values (?,?,?,?)",[a.get(),b.get(),c.get(),g])
30+
self.conn.commit()
31+
messagebox.showinfo('Info', 'Succesfully Added')
32+
ask = messagebox.askyesno("Confirm", "Do you want to add another book?")
33+
if ask:
34+
self.destroy()
35+
os.system('%s %s' % (py, 'Add_Books.py'))
36+
else:
37+
self.destroy()
38+
except Error:
39+
messagebox.showerror("Error","Check The Details")
40+
#creating input box and label
41+
Label(self, text='').pack()
42+
Label(self, text='Book Details', fg='red', font=('Arial', 25, 'bold')).pack()
43+
Label(self, text='').pack()
44+
Label(self, text='Book Id:', font=('Comic Scan Ms', 10, 'bold')).place(x=100, y=130)
45+
Entry(self, textvariable=a, width=30).place(x=230, y=132)
46+
Label(self, text='Book Name:', font=('Comic Scan Ms', 10, 'bold')).place(x=100, y=180)
47+
Entry(self, textvariable=b, width=30).place(x=230, y=182)
48+
Label(self, text='Book Author:', font=('Comic Scan Ms', 10, 'bold')).place(x=100, y=230)
49+
Entry(self, textvariable=c, width=30).place(x=230, y=232)
50+
Button(self, text="Submit", command=b_q).place(x=260, y=330)
51+
Add().mainloop()

0 commit comments

Comments
 (0)