From e72caab854ae60b4fb8d514d6f68b547d32aef18 Mon Sep 17 00:00:00 2001 From: Jordan Yamada Date: Sun, 19 May 2024 08:55:49 +0000 Subject: [PATCH 1/6] working on issue with openai api key(WIP) --- .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 188 bytes .../api_app/__pycache__/admin.cpython-311.pyc | Bin 0 -> 243 bytes .../api_app/__pycache__/apps.cpython-311.pyc | Bin 0 -> 560 bytes .../__pycache__/models.cpython-311.pyc | Bin 0 -> 240 bytes .../api_app/__pycache__/urls.cpython-311.pyc | Bin 0 -> 557 bytes .../api_app/__pycache__/utils.cpython-311.pyc | Bin 0 -> 3897 bytes .../api_app/__pycache__/views.cpython-311.pyc | Bin 0 -> 1492 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 199 bytes backend/api_app/utils.py | 95 +++++++++++++++++- .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 197 bytes .../__pycache__/settings.cpython-311.pyc | Bin 0 -> 3121 bytes .../__pycache__/urls.cpython-311.pyc | Bin 0 -> 1198 bytes .../__pycache__/wsgi.cpython-311.pyc | Bin 0 -> 737 bytes backend/requirements.txt | 11 ++ 14 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 backend/api_app/__pycache__/__init__.cpython-311.pyc create mode 100644 backend/api_app/__pycache__/admin.cpython-311.pyc create mode 100644 backend/api_app/__pycache__/apps.cpython-311.pyc create mode 100644 backend/api_app/__pycache__/models.cpython-311.pyc create mode 100644 backend/api_app/__pycache__/urls.cpython-311.pyc create mode 100644 backend/api_app/__pycache__/utils.cpython-311.pyc create mode 100644 backend/api_app/__pycache__/views.cpython-311.pyc create mode 100644 backend/api_app/migrations/__pycache__/__init__.cpython-311.pyc create mode 100644 backend/deep_impact_proj/__pycache__/__init__.cpython-311.pyc create mode 100644 backend/deep_impact_proj/__pycache__/settings.cpython-311.pyc create mode 100644 backend/deep_impact_proj/__pycache__/urls.cpython-311.pyc create mode 100644 backend/deep_impact_proj/__pycache__/wsgi.cpython-311.pyc diff --git a/backend/api_app/__pycache__/__init__.cpython-311.pyc b/backend/api_app/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c7a8b7ee4a3f6ed97b5ceef147f691f708be5b09 GIT binary patch literal 188 zcmZ3^%ge<81j_S0(?IlN5CH>>P{wCAAY(d13PUi1CZpdb>KSl=ZzwLsT1w;(aOL_aApIXg8kML)41Gd{7P vKp$+AUP0wA4x8Nkl+v73yCM#t;fz3BEDIz)Ff%eT-e6F;fDIL~0aXA1#9~0A literal 0 HcmV?d00001 diff --git a/backend/api_app/__pycache__/apps.cpython-311.pyc b/backend/api_app/__pycache__/apps.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..57db576dcf82537865411614e471a3c8d4be852d GIT binary patch literal 560 zcmZutJx{|h5IrX;6xt$$0EvMCF=ZfGK|)BS6{xC&kl3OuUk(Oe&R8oW{X64mh|-WP~PktRE&<^ literal 0 HcmV?d00001 diff --git a/backend/api_app/__pycache__/models.cpython-311.pyc b/backend/api_app/__pycache__/models.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aa3969f130dd16a4b9a041daec6919807c2b22a4 GIT binary patch literal 240 zcmZ3^%ge<81j_S0(=37XV-N=hn4pZ$LO{lJh7^Vr#vF!R#wbQch7_h?22JLdAO)I? zx7c#?Q&Mw^{WO_wai(M?=B4NBr6d(G10`27d?~K-`#0O?ZM#dWqG8eF+A~v830LXwpL;wH) literal 0 HcmV?d00001 diff --git a/backend/api_app/__pycache__/urls.cpython-311.pyc b/backend/api_app/__pycache__/urls.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..82f345dbfca48c7856df3bf23277e5e629b8de7b GIT binary patch literal 557 zcmaJ-y-Ncz6i@DQceSO6&_!?&T{>u%4h|xSMJPfQ+-{NBMBDQ&IdbPmJ9TuD4uYdw zRrHVWPpIHfZgp}ixHTc#ZgD%bBHOnk;uDN4BrqqS?ZEl0?*q8~G!S?0+`bJ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V^OO-=TWv~TY=}frqto(&(hH+mp~qaON6?=g}&yGzk2@qdD}R-3p%Po z;0;1t%VC7bG$D>ho3@fOggk0mcEoVyVF&SXShxxkFZ4laVhW(O*Si{ypX#E+5S>>? z|DAvwFb5L=fzxDS(P!@LLba&#qrmfH3XUr{p5kzY4kHEM>!;rtZ|6l6OV6{ z!titTLzhSYqCgGHoF^1J_7^JxD`*Oy1dbaDQVP_6iHtXchAntj$w}ruZg9^HlOc0a zWkcc{WP@!+2?;|m7?$70l_;lI`8n{Sid38d?CKcf4w`BYjt;ui9vmH%YK6Un@~yCU z(E0Y@=%5Sj!O_*?SnHzygABqGZFKtJ_%=N9_Qcl2n~C=1^rzvO&%-mVTsN&@sI$ZH b^6pP%{k2b}F-}269s;!!tiS$2h1K#0FO_3B literal 0 HcmV?d00001 diff --git a/backend/api_app/migrations/__pycache__/__init__.cpython-311.pyc b/backend/api_app/migrations/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..826090a79a053e7b1e2e102d92ef2cc605a78c17 GIT binary patch literal 199 zcmZ3^%ge<81j_S0(?IlN5CH>>P{wCAAY(d13PUi1CZpd&ryk0@&FAkgB{FKt1RJ$Tppj9Bp6!Qa# R56p~=j2{?aL=iJk3;?C>Go1hc literal 0 HcmV?d00001 diff --git a/backend/api_app/utils.py b/backend/api_app/utils.py index c81d3e4..7394952 100644 --- a/backend/api_app/utils.py +++ b/backend/api_app/utils.py @@ -1,6 +1,7 @@ from django.core.exceptions import ValidationError import os import requests +import json from rest_framework.response import Response from rest_framework.status import ( HTTP_200_OK, @@ -8,6 +9,13 @@ from rest_framework.status import ( HTTP_201_CREATED, HTTP_400_BAD_REQUEST ) +from openai import OpenAI + + + +client = OpenAI( + api_key=os.environ.get("OPENAI_API_KEY"), +) sentry_api_key = os.environ.get("SENTRY_API_KEY") @@ -20,4 +28,89 @@ def get_sentry(): return Response(data, status=HTTP_200_OK) except ValidationError as e: print(e) - return Response(e, status=HTTP_400_BAD_REQUEST) \ No newline at end of file + return Response(e, status=HTTP_400_BAD_REQUEST) + + + +def ask_question(): + # print(request.body) + # body = json.loads(request.body) + + response = client.chat.completions.create( + model="gpt-3.5-turbo", + messages=[ + {"role": "system", "content": "You are a science teacher."}, + {"role": "user", "content": ('''Use this information:[Early Detection and Monitoring +Space-Based Telescopes: Deploying telescopes in space to continuously monitor the sky for Near-Earth Objects (NEOs). Examples include NASA’s NEOWISE mission and the upcoming NEOCam. +Ground-Based Telescopes: Utilizing a network of observatories around the world to detect and track asteroids. Projects like the Pan-STARRS and the Catalina Sky Survey are part of this effort. +Data Sharing and Coordination: International collaboration through organizations like the International Asteroid Warning Network (IAWN) and the Space Mission Planning Advisory Group (SMPAG) to share data and coordinate responses. +Deflection Techniques +Kinetic Impactor: This involves sending a spacecraft to collide with the asteroid at high speed, changing its trajectory. NASA’s Double Asteroid Redirection Test (DART) mission is an example, scheduled to test this method on the moonlet of the asteroid Didymos. + +The near-earth object everyone recognizes is Halley's Comet. With observations going back 2,000 years, the comet approaches the earth every 76 years. The comet is large, being about 48,000 ft by 26,000 ft. Thankfully the closest approach has been 0.033 AU (3 million miles), in 837 AD.] Make Ten multiple choice questions using this information. Return these in JSON format, use this example:{"question":the random question,"choice one":random choice,"choice two":random choice,"choice three":random choice,"choice four":random choice,"answer":correct answer}One of these choices will be the correct answer.''') }, + ] + ) + + quiz = response.choices[0].message.content + + data = json.loads(quiz) + print(data) + + return data + +ask_question() + + +# Gravity Tractor: A spacecraft would fly alongside the asteroid for an extended period, using its gravitational pull to gradually alter the asteroid’s path. +# Ion Beam Shepherd: This concept involves using ion thrusters to create a continuous stream of particles that push against the asteroid, slowly changing its trajectory over time. +# Disruption Techniques +# Nuclear Explosions: A nuclear device could be detonated near or on the asteroid to either vaporize a portion of it or to alter its course significantly. This is considered a last resort due to the potential for fragmenting the asteroid into multiple pieces, which might still pose a threat. +# Laser Ablation: Using high-powered lasers to vaporize the surface of the asteroid, creating jets of gas that would act as a propulsion mechanism to nudge the asteroid off course. +# Civil Protection and Mitigation +# Impact Prediction and Modeling: Improved computer models to predict impact locations, potential damage, and secondary effects like tsunamis and atmospheric changes. +# Evacuation Plans: Developing and rehearsing evacuation plans for regions identified as potential impact sites. +# Global Response Coordination: Establishing international protocols for disaster response, resource distribution, and public communication. +# General Effects on Human Civilization +# Economic Disruption: Severe damage to infrastructure, agriculture, and resources can lead to economic collapse in affected regions. +# Human Casualties: Direct impact areas would suffer heavy casualties, with potential global consequences from secondary effects like famine and disease. +# Global Cooperation and Response: Such an event would likely necessitate global cooperation for disaster response, food distribution, and potentially relocation of populations. +# International Collaboration and Policy Development +# Space Treaties and Agreements: Strengthening international treaties and agreements to ensure cooperation and shared responsibility in asteroid detection and deflection efforts. +# Funding and Research: Increasing funding for asteroid research, detection programs, and the development of deflection technologies. +# Key Missions and Programs +# NASA’s Planetary Defense Coordination Office (PDCO): Coordinates efforts to detect, track, and characterize potentially hazardous asteroids and comets. +# ESA’s Hera Mission: A follow-up to NASA’s DART mission, Hera will study the aftermath of the DART impact to gather critical data on the effectiveness of kinetic impactors. +# Space Situational Awareness (SSA) Program: Run by the European Space Agency (ESA) to detect and track objects that pose a risk to Earth or to satellites in orbit. +# Challenges and Considerations +# Timely Detection: Early detection is crucial, as deflection methods are more effective when applied well in advance of a potential impact. +# Technological Development: Many of the proposed deflection techniques are still in the research or testing phase and require further development. +# International Cooperation: Effective planetary defense requires global collaboration, as the impact of a large asteroid would have worldwide consequences.Small Meteors (up to 25 meters in diameter) +# Atmospheric Entry: These meteors typically burn up upon entering the Earth’s atmosphere, causing a bright flash and potentially a sonic boom. +# Damage: If fragments reach the ground, they may cause minor damage locally, such as breaking windows or small craters. An example is the Chelyabinsk meteor in 2013, which caused injuries mainly from broken glass. +# Medium Meteors (25 meters to 1 kilometer in diameter) +# Local Destruction: A meteor in this size range can cause significant local destruction, including fires, shockwaves, and substantial craters. +# Tsunamis: If it impacts an ocean, it can generate large tsunamis capable of affecting coastal areas over a wide region. +# Climate Effects: Dust and debris thrown into the atmosphere can lead to short-term climate changes, such as “impact winter,” where sunlight is blocked, leading to global cooling and agricultural impacts. +# Large Meteors (1 kilometer to 10 kilometers in diameter) +# Regional to Global Catastrophe: These impacts can cause massive destruction over hundreds of kilometers from the impact site. The blast, heat, and shockwave can annihilate life forms in the vicinity. +# Tsunamis: If the impact occurs in the ocean, it would generate massive tsunamis with potentially devastating global effects on coastal regions. +# Climate Disruption: The impact would throw vast amounts of dust, ash, and aerosols into the atmosphere, potentially causing global cooling for years. This can disrupt ecosystems, agriculture, and food supplies globally. +# Extinctions: Such an event can lead to mass extinctions due to the combination of immediate destruction, climatic effects, and ecological collapse. The most well-known example is the Chicxulub impactor, which contributed to the extinction of the dinosaurs 66 million years ago. +# Very Large Meteors (over 10 kilometers in diameter) +# Global Catastrophe: These are extremely rare but can cause near-instantaneous global devastation. +# Immediate Effects: Massive firestorms, shockwaves, and tsunamis would affect the entire planet. +# Long-term Effects: Severe climate changes, including extended “impact winters,” leading to mass extinctions and potentially the collapse of human civilization. +# General Effects on Human Civilization +# Economic Disruption: Severe damage to infrastructure, agriculture, and resources can lead to economic collapse in affected regions. +# Human Casualties: Direct impact areas would suffer heavy casualties, with potential global consequences from secondary effects like famine and disease. +# Global Cooperation and Response: Such an event would likely necessitate global cooperation for disaster response, food distribution, and potentially relocation of populations.Close Approaches +# How close? +# A body in space is considered a near-earth object if passing within 1.3 times the distance from the Earth to the Sun (defined as 1 astronomical unit, AU). For reference, the Earth is 93 million miles from the Sun (150 million km), and the moon is 238,900 miles (384,000 km) from Earth. +# What's the issue? +# Collision with the earth can have significant effects on the environment, ranging from local effects to global impact. +# A potential hazardous asteroid (PHA) would approach closer than 0.05 AU and a diameter of greater than 500 ft (140m). +# How often? +# Since 1900, NASA has logged 2,586 PHAs and anticipate 3,317 more out to 2200 AD. +# Examples +# In 1957, 2019 CD2 asteroid passed 46,349 mi from Earth, with a diameter of 850-1940 ft. This is relatively large, and with this asteroid's orbit around the sun it will have at least 5 more close approaches in the future (although not as close). +# In 2029, 99942 Apophis, an asteroid of around 1,115 ft in diameter, will pass 23,619 mi from the Earth. \ No newline at end of file diff --git a/backend/deep_impact_proj/__pycache__/__init__.cpython-311.pyc b/backend/deep_impact_proj/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5447ac2fe0afc08f06349bbb209c06484ed894c6 GIT binary patch literal 197 zcmZ3^%ge<81j_S0(?IlN5CH>>P{wCAAY(d13PUi1CZpd2>er~FM zR(?@RVqRrpZemKJzH@#`YCuk6Nq&Bwen3%vR%&udvA#=cYJsk2Zb4#liGEUIa&~H7 zihc@EEItz~7GD5Vs2?AnnU`4-AFo$X`HRCQH$SB`C)KWq6=)I2DaHIi;sY}yBjX1K K7*WIw6axS literal 0 HcmV?d00001 diff --git a/backend/deep_impact_proj/__pycache__/settings.cpython-311.pyc b/backend/deep_impact_proj/__pycache__/settings.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c0442845f98a4acaa91add86076cf7e149bd28da GIT binary patch literal 3121 zcmb7GOK;m&7AEx;B{8z2*oyOF5Oh+t6EZ>Lb}%U1VId( zOL3Bj5IFt~uzfehAcD0hPJ9Cx-@$+Uyhu(*;r=w|c51qJGLq7m+zvGM_g-YC6yYAl zPs@_B=ir&qPs*KxCwW>9N_8U=-6c@^Yf`!ZJq3LpWu&=tU}aBZbxCO+u%UE;V`-Md0f%&aH`rdLV_J3( zD+pV*msI+ytn~XHZDHGyw=6}+JErxdlydJ(Fmx3m4euxxW^LRVSgNzjij%?m@t%8s zR^&uUHpDNE*Fs#cgp>(WmO;l5S?R1U5H7lDu;rlp9a7ucV$0AxQt?iR^sO0{74Sq@ z2_EL)1ho@HbBJ;FtW&#(nb*g@2ywmnl0#@}=gGFxc>)>5zQ5{QztQ(oCw%xzvq{Si zEDikVN1R-)RfT%n~BFC=zy+Z@KVfu zbr$C=6^roZpzFSN4oVAu2-)bkuTN-?6Tvt1OOSmBxNpo59~<{24AZ?*%u7Dt%kK*H ziWjR?TcVfZn@u?wB^%9lwNV${n`i8}V|P^+q942vxY$b~yrm2@=Qx4T=7}Zk4>i@n zZ@3gJPR6B(mk{b})wioK36`*{$4`)sg#8qFhZOAMnLy1yRAdcOzvBf)nZ5TLM zRCQHT{PcP>rZ6pc<-ADis-fxwy@rjh(>vjR=e+#mG-^(CJOTL2c>(GJ9b0PWEJ7R` zcLuf>-DsEHBz#C9ojCW}1Qsl*n+R(*`#|kNx|ypg)==r1mz1IAc4XO$m{6qpP>VHn z(~5$1y~MZ}TQPr& z|0-npcNUMX*2OjyaVX&sGNMPVS1Xm8@R)B2UbfX}wB?Oft=y=udWCYMCCbx!-)L3A z?@;mE!g{mDw*}G5KNi=jK1!`x=KYxS(iOhV`+A68k>6-Pl$*RLK5n!s@*}=hg-t;8 zay7obw!yCna=B3v0I<3)$WjAhDzyP8sNVZi-AnkRwgg|GHXxUMoxJ&qu*z@L+A<(F zXMYdvC`yv#C_<635#cur1W66k{_l_|?wx)Q ziR*i(-%)}fv%}2CxxeRzxlxM9=Kpd3^VBCR&sKiQ-25?fb3b$Iz<*ym$lM#IMl?a^ zpGlv6@aYF%*7kFygIsAy0Yp0UjQWiJl>U5YKXv0Ebz>Mmn!EU~r7y1k^ZJVm`*U{> z=I;LY^}YNGh@hzX2q-#fhV-bIreR^)0NetRzdg)?E|;%7r@o^9O~3ePzqou*T;5xJ zbB`#DvP3~35A*Yfh2l|`84>YYbf}3Y3)Co`jVDHg-$dzLWSAZ?MB%MHA`kk<>BD*U zFkk%g?fv}iQ9POlLcfW|1HvUDePJ&zjiM1?P6d-@c=BF&(i%@L<*r7+(4#*PbH!oq jC_6VyA7w5KQ%C9CFahe)i*PE6SXka8=Etwaf%pCgXz15S literal 0 HcmV?d00001 diff --git a/backend/deep_impact_proj/__pycache__/urls.cpython-311.pyc b/backend/deep_impact_proj/__pycache__/urls.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6cdf64fc4b058462b93900bb4b30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 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -1,17 +1,28 @@ +annotated-types==0.6.0 +anyio==4.2.0 asgiref==3.8.1 certifi==2024.2.2 charset-normalizer==3.3.2 click==8.1.7 +distro==1.9.0 Django==5.0.6 django-cors-headers==4.2.0 djangorestframework==3.15.1 gunicorn==22.0.0 h11==0.14.0 +httpcore==1.0.2 +httpx==0.26.0 idna==3.7 +openai==1.12.0 packaging==24.0 +pydantic==2.6.1 +pydantic_core==2.16.2 python-dotenv==1.0.1 requests==2.31.0 +sniffio==1.3.0 sqlparse==0.5.0 +tqdm==4.66.2 +typing_extensions==4.9.0 urllib3==2.2.1 uvicorn==0.29.0 whitenoise==6.6.0 From 520a923b2bd07f395460b712c3de2c6ba5ecc1a3 Mon Sep 17 00:00:00 2001 From: Jordan Yamada Date: Sun, 19 May 2024 15:32:09 +0000 Subject: [PATCH 2/6] (WIP)made env to frontend for live deployment... working on making a quiz on frontend. --- .../api_app/__pycache__/utils.cpython-311.pyc | Bin 3897 -> 11181 bytes .../api_app/__pycache__/views.cpython-311.pyc | Bin 1492 -> 1656 bytes backend/api_app/utils.py | 155 +++++++++--------- backend/api_app/views.py | 4 +- .../__pycache__/settings.cpython-311.pyc | Bin 3121 -> 3121 bytes backend/deep_impact_proj/settings.py | 4 +- backend/{.env.sample => env.sample} | 0 frontend/.env.sample | 1 + frontend/.gitignore | 1 + frontend/package-lock.json | 12 ++ frontend/package.json | 1 + frontend/src/components/navbar.jsx | 1 + frontend/src/pages/quiz.jsx | 49 ++++++ frontend/src/pages/scenario.jsx | 2 +- frontend/src/router.jsx | 5 + 15 files changed, 156 insertions(+), 79 deletions(-) rename backend/{.env.sample => env.sample} (100%) create mode 100644 frontend/.env.sample create mode 100644 frontend/.gitignore create mode 100644 frontend/src/pages/quiz.jsx diff --git a/backend/api_app/__pycache__/utils.cpython-311.pyc b/backend/api_app/__pycache__/utils.cpython-311.pyc index 92886a271013a347f37e0dd2379894e88858d4ba..b6d9dac2f0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os(&h)bu`|zCas#TaRBh(`2*XSYKdku{r-z`Z@rI zR|~$WXK;*OUyKUa9`zIog-6!(LHFMytAC&WJ+g-O`QIaJaG(D@vdRbDe@Df>Lh;D@ z-)&A=g_jSkmpcEBO4h*egXbTeI`hF>KUx0q^1=DPeR!&Tc&dEVQyeJ%$-?H(wAnv# wbjEt-*`L4s;VVCTh6JUexGc5463QE#b$SK;!_i_3)qfbsOLo`x#^3!G$JOaK4? delta 520 zcmZ1*zEh5GIWI340}wdv@l1Q8I+0I;@!Lf8hayZ2slv;E!mB}YV8F<*nS)WEiBWU1 z1@l!_NuZecWFeLZtk;07>63r5Tx6?Z3TDvcoLs=>!z9Qyc^{kk*BM{x-7yZD%u9D0NB-zu#AQa~Z zRxUoa53CG)Iv*K$`B=Vyhz5-hatvHTS2!hSC|==|xx%S(g;S?N(z?Q>^?{j* ri|Hc+koW>38rVK?O-|QVRhD4n`@jGvOc)q>8+aP|TKF2k5Ns6y`B#MY diff --git a/backend/api_app/__pycache__/views.cpython-311.pyc b/backend/api_app/__pycache__/views.cpython-311.pyc index d9b3eb5dc03b5d44819e3a9addd9074547851567..0d710263829d9cc7104bd998c62954b821e18db5 100644 GIT binary patch delta 515 zcmcb@{ey>hIWI340}!zBdZndKkdYykB})h-2LcO(C(cuq6=7m< zXGq~{VMyUlWnae3z_1#KAs|Y0;sa?$v59{sN@z0O;z~~~i7!sgD=DhH#Q|a$mS$E> zp3T_6y^_&Sld*^gsA=V76{d-dD<^MbQsWf|@fnIFfK-v#w2i delta 470 zcmeytbA_9CIWI340}v?B_e@ir$ScWsZK8U*03$;xOO_x=90V2!OWD3HIBp-2o!6^Ts#$z)XzW(olL$v_MTj8N8RJ|JT{Ln=cQ zV+unQQwn1+gC^50HvfXuJV#GIP39tTpnQ=8h>!#kQXm3iI*26$BS4bH{6L}s4sWn< zG`JLTgB63+X^KsDV_6r#3uNA6Pt7aKEXvO-0=f4VAH-Afi3OSQ*{PL9AlE{SMz!u2 zhfQvNN@-52U6DFa3CIt{ijzHA7YWE+V30*dlNs3@%o!OuKQLet9pN8AqF=B`fqe!5 DUA$bK diff --git a/backend/api_app/utils.py b/backend/api_app/utils.py index 7394952..3bc23ba 100644 --- a/backend/api_app/utils.py +++ b/backend/api_app/utils.py @@ -14,10 +14,12 @@ from openai import OpenAI client = OpenAI( - api_key=os.environ.get("OPENAI_API_KEY"), + api_key = os.environ.get("OPENAI_API_KEY"), ) + + sentry_api_key = os.environ.get("SENTRY_API_KEY") def get_sentry(): @@ -32,85 +34,86 @@ def get_sentry(): -def ask_question(): - # print(request.body) - # body = json.loads(request.body) +def get_quiz(): + try: - response = client.chat.completions.create( - model="gpt-3.5-turbo", - messages=[ - {"role": "system", "content": "You are a science teacher."}, - {"role": "user", "content": ('''Use this information:[Early Detection and Monitoring -Space-Based Telescopes: Deploying telescopes in space to continuously monitor the sky for Near-Earth Objects (NEOs). Examples include NASA’s NEOWISE mission and the upcoming NEOCam. -Ground-Based Telescopes: Utilizing a network of observatories around the world to detect and track asteroids. Projects like the Pan-STARRS and the Catalina Sky Survey are part of this effort. -Data Sharing and Coordination: International collaboration through organizations like the International Asteroid Warning Network (IAWN) and the Space Mission Planning Advisory Group (SMPAG) to share data and coordinate responses. -Deflection Techniques -Kinetic Impactor: This involves sending a spacecraft to collide with the asteroid at high speed, changing its trajectory. NASA’s Double Asteroid Redirection Test (DART) mission is an example, scheduled to test this method on the moonlet of the asteroid Didymos. + response = client.chat.completions.create( + model="gpt-3.5-turbo", + messages=[ + {"role": "system", "content": "You are a science teacher."}, + {"role": "user", "content": ('''Use this information:[Early Detection and Monitoring + Space-Based Telescopes: Deploying telescopes in space to continuously monitor the sky for Near-Earth Objects (NEOs). Examples include NASA’s NEOWISE mission and the upcoming NEOCam. + Ground-Based Telescopes: Utilizing a network of observatories around the world to detect and track asteroids. Projects like the Pan-STARRS and the Catalina Sky Survey are part of this effort. + Data Sharing and Coordination: International collaboration through organizations like the International Asteroid Warning Network (IAWN) and the Space Mission Planning Advisory Group (SMPAG) to share data and coordinate responses. + Deflection Techniques + Kinetic Impactor: This involves sending a spacecraft to collide with the asteroid at high speed, changing its trajectory. NASA’s Double Asteroid Redirection Test (DART) mission is an example, scheduled to test this method on the moonlet of the asteroid Didymos. + Gravity Tractor: A spacecraft would fly alongside the asteroid for an extended period, using its gravitational pull to gradually alter the asteroid’s path. + Ion Beam Shepherd: This concept involves using ion thrusters to create a continuous stream of particles that push against the asteroid, slowly changing its trajectory over time. + Disruption Techniques + Nuclear Explosions: A nuclear device could be detonated near or on the asteroid to either vaporize a portion of it or to alter its course significantly. This is considered a last resort due to the potential for fragmenting the asteroid into multiple pieces, which might still pose a threat. + Laser Ablation: Using high-powered lasers to vaporize the surface of the asteroid, creating jets of gas that would act as a propulsion mechanism to nudge the asteroid off course. + Civil Protection and Mitigation + Impact Prediction and Modeling: Improved computer models to predict impact locations, potential damage, and secondary effects like tsunamis and atmospheric changes. + Evacuation Plans: Developing and rehearsing evacuation plans for regions identified as potential impact sites. + Global Response Coordination: Establishing international protocols for disaster response, resource distribution, and public communication. + General Effects on Human Civilization + Economic Disruption: Severe damage to infrastructure, agriculture, and resources can lead to economic collapse in affected regions. + Human Casualties: Direct impact areas would suffer heavy casualties, with potential global consequences from secondary effects like famine and disease. + Global Cooperation and Response: Such an event would likely necessitate global cooperation for disaster response, food distribution, and potentially relocation of populations. + International Collaboration and Policy Development + Space Treaties and Agreements: Strengthening international treaties and agreements to ensure cooperation and shared responsibility in asteroid detection and deflection efforts. + Funding and Research: Increasing funding for asteroid research, detection programs, and the development of deflection technologies. + Key Missions and Programs + NASA’s Planetary Defense Coordination Office (PDCO): Coordinates efforts to detect, track, and characterize potentially hazardous asteroids and comets. + ESA’s Hera Mission: A follow-up to NASA’s DART mission, Hera will study the aftermath of the DART impact to gather critical data on the effectiveness of kinetic impactors. + Space Situational Awareness (SSA) Program: Run by the European Space Agency (ESA) to detect and track objects that pose a risk to Earth or to satellites in orbit. + Challenges and Considerations + Timely Detection: Early detection is crucial, as deflection methods are more effective when applied well in advance of a potential impact. + Technological Development: Many of the proposed deflection techniques are still in the research or testing phase and require further development. + International Cooperation: Effective planetary defense requires global collaboration, as the impact of a large asteroid would have worldwide consequences.Small Meteors (up to 25 meters in diameter) + Atmospheric Entry: These meteors typically burn up upon entering the Earth’s atmosphere, causing a bright flash and potentially a sonic boom. + Damage: If fragments reach the ground, they may cause minor damage locally, such as breaking windows or small craters. An example is the Chelyabinsk meteor in 2013, which caused injuries mainly from broken glass. + Medium Meteors (25 meters to 1 kilometer in diameter) + Local Destruction: A meteor in this size range can cause significant local destruction, including fires, shockwaves, and substantial craters. + Tsunamis: If it impacts an ocean, it can generate large tsunamis capable of affecting coastal areas over a wide region. + Climate Effects: Dust and debris thrown into the atmosphere can lead to short-term climate changes, such as “impact winter,” where sunlight is blocked, leading to global cooling and agricultural impacts. + Large Meteors (1 kilometer to 10 kilometers in diameter) + Regional to Global Catastrophe: These impacts can cause massive destruction over hundreds of kilometers from the impact site. The blast, heat, and shockwave can annihilate life forms in the vicinity. + Tsunamis: If the impact occurs in the ocean, it would generate massive tsunamis with potentially devastating global effects on coastal regions. + Climate Disruption: The impact would throw vast amounts of dust, ash, and aerosols into the atmosphere, potentially causing global cooling for years. This can disrupt ecosystems, agriculture, and food supplies globally. + Extinctions: Such an event can lead to mass extinctions due to the combination of immediate destruction, climatic effects, and ecological collapse. The most well-known example is the Chicxulub impactor, which contributed to the extinction of the dinosaurs 66 million years ago. + Very Large Meteors (over 10 kilometers in diameter) + Global Catastrophe: These are extremely rare but can cause near-instantaneous global devastation. + Immediate Effects: Massive firestorms, shockwaves, and tsunamis would affect the entire planet. + Long-term Effects: Severe climate changes, including extended “impact winters,” leading to mass extinctions and potentially the collapse of human civilization. + General Effects on Human Civilization + Economic Disruption: Severe damage to infrastructure, agriculture, and resources can lead to economic collapse in affected regions. + Human Casualties: Direct impact areas would suffer heavy casualties, with potential global consequences from secondary effects like famine and disease. + Global Cooperation and Response: Such an event would likely necessitate global cooperation for disaster response, food distribution, and potentially relocation of populations.Close Approaches + How close? + A body in space is considered a near-earth object if passing within 1.3 times the distance from the Earth to the Sun (defined as 1 astronomical unit, AU). For reference, the Earth is 93 million miles from the Sun (150 million km), and the moon is 238,900 miles (384,000 km) from Earth. + What's the issue? + Collision with the earth can have significant effects on the environment, ranging from local effects to global impact. + A potential hazardous asteroid (PHA) would approach closer than 0.05 AU and a diameter of greater than 500 ft (140m). + How often? + Since 1900, NASA has logged 2,586 PHAs and anticipate 3,317 more out to 2200 AD. + Examples + In 1957, 2019 CD2 asteroid passed 46,349 mi from Earth, with a diameter of 850-1940 ft. This is relatively large, and with this asteroid's orbit around the sun it will have at least 5 more close approaches in the future (although not as close). + In 2029, 99942 Apophis, an asteroid of around 1,115 ft in diameter, will pass 23,619 mi from the Earth. + The near-earth object everyone recognizes is Halley's Comet. With observations going back 2,000 years, the comet approaches the earth every 76 years. The comet is large, being about 48,000 ft by 26,000 ft. Thankfully the closest approach has been 0.033 AU (3 million miles), in 837 AD.] Make Ten multiple choice questions using this information. Return these in JSON format, use this example:{"question":the random question,"choice one":random choice,"choice two":random choice,"choice three":random choice,"choice four":random choice,"answer":correct answer}One of these choices will be the correct answer.''') }, + ] + ) -The near-earth object everyone recognizes is Halley's Comet. With observations going back 2,000 years, the comet approaches the earth every 76 years. The comet is large, being about 48,000 ft by 26,000 ft. Thankfully the closest approach has been 0.033 AU (3 million miles), in 837 AD.] Make Ten multiple choice questions using this information. Return these in JSON format, use this example:{"question":the random question,"choice one":random choice,"choice two":random choice,"choice three":random choice,"choice four":random choice,"answer":correct answer}One of these choices will be the correct answer.''') }, - ] - ) + quiz = response.choices[0].message.content - quiz = response.choices[0].message.content + data = json.loads(quiz) + print(data) - data = json.loads(quiz) - print(data) + return Response(data, status=HTTP_201_CREATED) + except ValidationError as e: + print(e) + return Response(e, status=HTTP_400_BAD_REQUEST) - return data - -ask_question() +# ask_question() -# Gravity Tractor: A spacecraft would fly alongside the asteroid for an extended period, using its gravitational pull to gradually alter the asteroid’s path. -# Ion Beam Shepherd: This concept involves using ion thrusters to create a continuous stream of particles that push against the asteroid, slowly changing its trajectory over time. -# Disruption Techniques -# Nuclear Explosions: A nuclear device could be detonated near or on the asteroid to either vaporize a portion of it or to alter its course significantly. This is considered a last resort due to the potential for fragmenting the asteroid into multiple pieces, which might still pose a threat. -# Laser Ablation: Using high-powered lasers to vaporize the surface of the asteroid, creating jets of gas that would act as a propulsion mechanism to nudge the asteroid off course. -# Civil Protection and Mitigation -# Impact Prediction and Modeling: Improved computer models to predict impact locations, potential damage, and secondary effects like tsunamis and atmospheric changes. -# Evacuation Plans: Developing and rehearsing evacuation plans for regions identified as potential impact sites. -# Global Response Coordination: Establishing international protocols for disaster response, resource distribution, and public communication. -# General Effects on Human Civilization -# Economic Disruption: Severe damage to infrastructure, agriculture, and resources can lead to economic collapse in affected regions. -# Human Casualties: Direct impact areas would suffer heavy casualties, with potential global consequences from secondary effects like famine and disease. -# Global Cooperation and Response: Such an event would likely necessitate global cooperation for disaster response, food distribution, and potentially relocation of populations. -# International Collaboration and Policy Development -# Space Treaties and Agreements: Strengthening international treaties and agreements to ensure cooperation and shared responsibility in asteroid detection and deflection efforts. -# Funding and Research: Increasing funding for asteroid research, detection programs, and the development of deflection technologies. -# Key Missions and Programs -# NASA’s Planetary Defense Coordination Office (PDCO): Coordinates efforts to detect, track, and characterize potentially hazardous asteroids and comets. -# ESA’s Hera Mission: A follow-up to NASA’s DART mission, Hera will study the aftermath of the DART impact to gather critical data on the effectiveness of kinetic impactors. -# Space Situational Awareness (SSA) Program: Run by the European Space Agency (ESA) to detect and track objects that pose a risk to Earth or to satellites in orbit. -# Challenges and Considerations -# Timely Detection: Early detection is crucial, as deflection methods are more effective when applied well in advance of a potential impact. -# Technological Development: Many of the proposed deflection techniques are still in the research or testing phase and require further development. -# International Cooperation: Effective planetary defense requires global collaboration, as the impact of a large asteroid would have worldwide consequences.Small Meteors (up to 25 meters in diameter) -# Atmospheric Entry: These meteors typically burn up upon entering the Earth’s atmosphere, causing a bright flash and potentially a sonic boom. -# Damage: If fragments reach the ground, they may cause minor damage locally, such as breaking windows or small craters. An example is the Chelyabinsk meteor in 2013, which caused injuries mainly from broken glass. -# Medium Meteors (25 meters to 1 kilometer in diameter) -# Local Destruction: A meteor in this size range can cause significant local destruction, including fires, shockwaves, and substantial craters. -# Tsunamis: If it impacts an ocean, it can generate large tsunamis capable of affecting coastal areas over a wide region. -# Climate Effects: Dust and debris thrown into the atmosphere can lead to short-term climate changes, such as “impact winter,” where sunlight is blocked, leading to global cooling and agricultural impacts. -# Large Meteors (1 kilometer to 10 kilometers in diameter) -# Regional to Global Catastrophe: These impacts can cause massive destruction over hundreds of kilometers from the impact site. The blast, heat, and shockwave can annihilate life forms in the vicinity. -# Tsunamis: If the impact occurs in the ocean, it would generate massive tsunamis with potentially devastating global effects on coastal regions. -# Climate Disruption: The impact would throw vast amounts of dust, ash, and aerosols into the atmosphere, potentially causing global cooling for years. This can disrupt ecosystems, agriculture, and food supplies globally. -# Extinctions: Such an event can lead to mass extinctions due to the combination of immediate destruction, climatic effects, and ecological collapse. The most well-known example is the Chicxulub impactor, which contributed to the extinction of the dinosaurs 66 million years ago. -# Very Large Meteors (over 10 kilometers in diameter) -# Global Catastrophe: These are extremely rare but can cause near-instantaneous global devastation. -# Immediate Effects: Massive firestorms, shockwaves, and tsunamis would affect the entire planet. -# Long-term Effects: Severe climate changes, including extended “impact winters,” leading to mass extinctions and potentially the collapse of human civilization. -# General Effects on Human Civilization -# Economic Disruption: Severe damage to infrastructure, agriculture, and resources can lead to economic collapse in affected regions. -# Human Casualties: Direct impact areas would suffer heavy casualties, with potential global consequences from secondary effects like famine and disease. -# Global Cooperation and Response: Such an event would likely necessitate global cooperation for disaster response, food distribution, and potentially relocation of populations.Close Approaches -# How close? -# A body in space is considered a near-earth object if passing within 1.3 times the distance from the Earth to the Sun (defined as 1 astronomical unit, AU). For reference, the Earth is 93 million miles from the Sun (150 million km), and the moon is 238,900 miles (384,000 km) from Earth. -# What's the issue? -# Collision with the earth can have significant effects on the environment, ranging from local effects to global impact. -# A potential hazardous asteroid (PHA) would approach closer than 0.05 AU and a diameter of greater than 500 ft (140m). -# How often? -# Since 1900, NASA has logged 2,586 PHAs and anticipate 3,317 more out to 2200 AD. -# Examples -# In 1957, 2019 CD2 asteroid passed 46,349 mi from Earth, with a diameter of 850-1940 ft. This is relatively large, and with this asteroid's orbit around the sun it will have at least 5 more close approaches in the future (although not as close). -# In 2029, 99942 Apophis, an asteroid of around 1,115 ft in diameter, will pass 23,619 mi from the Earth. \ No newline at end of file diff --git a/backend/api_app/views.py b/backend/api_app/views.py index de6a3f2..9317260 100644 --- a/backend/api_app/views.py +++ b/backend/api_app/views.py @@ -10,7 +10,7 @@ from rest_framework.status import ( HTTP_201_CREATED, HTTP_400_BAD_REQUEST ) -from .utils import get_sentry +from .utils import get_sentry, get_quiz sentry_api_key = os.environ.get("SENTRY_API_KEY") @@ -23,4 +23,6 @@ class Sentry(APIView): class OpenAI(APIView): + def get(self, request): + return get_quiz() pass diff --git a/backend/deep_impact_proj/__pycache__/settings.cpython-311.pyc b/backend/deep_impact_proj/__pycache__/settings.cpython-311.pyc index c0442845f98a4acaa91add86076cf7e149bd28da..cbba63faba6b646e12b15e7b2df9c8672e2d2be2 100644 GIT binary patch delta 222 zcmdleu~C9|IWI340}$-x^h&!pkyq0wmnn*gks*aKg*k^gmnDh?%x1}9jbdeDNM%_D zRJt0Z9t;>6fMQG&GrSpDC(AG@PP{4vVNB*^gs`9zlRFtJ7+E$mF*!3zXfobn2}mr- z0Mgt!`H3m<=6{=QaPDPMa)18Zm~h+idaA#ru^c~?>S~NvPdv6 lN=}~2r6_TOfwKV&Kd><{@-%Qa^0x3c@P6Rhe3UDP5diVqHI@JX delta 199 zcmdleu~C9|IWI340}v?B_e?uKkyq0wiZO*Tg*k^QmpO`=kpakN$zjQ5jbdeFU}8vR zT?SOT8l)Z!z+%i3GrSoYC(AG@PP{4vVNB*^gs`9zlRFtJ7@0ORF*!3z_-QiUVhKnr z$pF&aIr)hx@hSNwsd;6aW0^}>nVIs7Ctu)@+5CZH1|zQ+10z=hCkWnPkeJ-VrO5w* Xje(J;fxD5ng|~tC1IOm0Tse#YS==tX diff --git a/backend/deep_impact_proj/settings.py b/backend/deep_impact_proj/settings.py index 389d485..912cd17 100644 --- a/backend/deep_impact_proj/settings.py +++ b/backend/deep_impact_proj/settings.py @@ -9,14 +9,16 @@ https://docs.djangoproject.com/en/5.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/5.0/ref/settings/ """ -import os + from pathlib import Path from dotenv import load_dotenv +import os # Load environment variables from .env file load_dotenv() + # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent diff --git a/backend/.env.sample b/backend/env.sample similarity index 100% rename from backend/.env.sample rename to backend/env.sample diff --git a/frontend/.env.sample b/frontend/.env.sample new file mode 100644 index 0000000..4898db7 --- /dev/null +++ b/frontend/.env.sample @@ -0,0 +1 @@ +VITE_REACT_APP_SERVER=<"Your Server (or server's localhost in development)"> \ No newline at end of file diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..2eea525 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1 @@ +.env \ No newline at end of file diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 60732d9..f8b850c 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -12,6 +12,7 @@ "@emotion/styled": "^11.11.5", "@mui/material": "^5.15.18", "axios": "^1.6.8", + "dotenv": "^16.4.5", "konva": "^9.3.8", "nvm": "^0.0.4", "react": "^18.2.0", @@ -2511,6 +2512,17 @@ "csstype": "^3.0.2" } }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 403c98b..2490948 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -14,6 +14,7 @@ "@emotion/styled": "^11.11.5", "@mui/material": "^5.15.18", "axios": "^1.6.8", + "dotenv": "^16.4.5", "konva": "^9.3.8", "nvm": "^0.0.4", "react": "^18.2.0", diff --git a/frontend/src/components/navbar.jsx b/frontend/src/components/navbar.jsx index b009167..fb57444 100644 --- a/frontend/src/components/navbar.jsx +++ b/frontend/src/components/navbar.jsx @@ -11,6 +11,7 @@ function NavBar() {
  • About

  • Effects

  • Defenses

  • + {/*
  • Quiz

  • */} diff --git a/frontend/src/pages/quiz.jsx b/frontend/src/pages/quiz.jsx new file mode 100644 index 0000000..ed5610d --- /dev/null +++ b/frontend/src/pages/quiz.jsx @@ -0,0 +1,49 @@ +import { useState } from "react" +import axios from 'axios'; +import { Button } from "@mui/material"; + +const Quiz = () => { + const [clicked, setClicked] = useState(false) + const [quiz,setQuiz] = useState(null) + + const handleQuiz = async() => { + setClicked(true) + try{ + const newQuiz = await axios(`${import.meta.env.VITE_REACT_APP_SERVER}/api/openai/`) + console.log("newQuiz.data :",newQuiz.data) + setQuiz(newQuiz.data) + } + catch { + alert("Could not make quiz. Try again") + } finally { + setClicked(false) + } + } + + return ( + <> +
    +
    +

    Test Your Knowledge?

    +

    Deep impact is a web-app designed to give users insight into potential danger of asteroid impact. Using the NASA NeoWs API we have created a simulation tool to visualize incoming asteroids and various methods of asteroid deflection.

    +
    +
    + +

    Our Team

    + {/*
      +
    • Daniel Smith-dePaz
    • +
    • Jordan Yamada
    • +
    • Pierre Bell
    • +
    • Michael Roy
    • +
    • Mickey Shoenberger
    • +
    • Jordan Edgington
    • +
    */} +
    +

    The Sky Is Falling!

    +

    To see learn more about Deep Impact, checkout our GitHub.

    +
    + + ) +} + +export default Quiz diff --git a/frontend/src/pages/scenario.jsx b/frontend/src/pages/scenario.jsx index ee37a8f..1c7abfd 100644 --- a/frontend/src/pages/scenario.jsx +++ b/frontend/src/pages/scenario.jsx @@ -39,7 +39,7 @@ function Scenario() { useEffect(() => { const fetchAsteroids = async (self, request) => { try { - const response = await axios.get(`http://localhost:8000/api/sentry/`); + const response = await axios.get(`${import.meta.env.VITE_REACT_APP_SERVER}/api/sentry/`); asteroidsData.current = response.data.near_earth_objects; setAsteroidData(0); // Set initial asteroid } catch (error) { diff --git a/frontend/src/router.jsx b/frontend/src/router.jsx index 295bfc4..a8dacf1 100644 --- a/frontend/src/router.jsx +++ b/frontend/src/router.jsx @@ -6,6 +6,7 @@ import Scenario from "./pages/scenario"; import About from "./pages/about"; import Effects from "./pages/effects"; import Defenses from "./pages/defenses"; +import Quiz from "./pages/quiz"; const router = createBrowserRouter([ { path: "/", @@ -30,6 +31,10 @@ const router = createBrowserRouter([ { path: 'defenses/', element: + }, + { + path: 'quiz/', + element: } ], }, From 1902c2e687dcc73a70179ed705fbf386d2662fbd Mon Sep 17 00:00:00 2001 From: Jordan Yamada Date: Sun, 19 May 2024 15:40:04 +0000 Subject: [PATCH 3/6] (WIP) resolving merge conflict --- backend/{env.sample => .env.sample} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename backend/{env.sample => .env.sample} (100%) diff --git a/backend/env.sample b/backend/.env.sample similarity index 100% rename from backend/env.sample rename to backend/.env.sample From 78a875d5b270fac565e7cfef4e4a1afd086c44d5 Mon Sep 17 00:00:00 2001 From: Jordan Yamada Date: Sun, 19 May 2024 15:49:13 +0000 Subject: [PATCH 4/6] (WIP) resolving merge conflict --- .../api_app/__pycache__/__init__.cpython-311.pyc | Bin 0 -> 188 bytes .../api_app/__pycache__/admin.cpython-311.pyc | Bin 0 -> 243 bytes backend/api_app/__pycache__/apps.cpython-311.pyc | Bin 0 -> 560 bytes .../api_app/__pycache__/models.cpython-311.pyc | Bin 0 -> 240 bytes backend/api_app/__pycache__/urls.cpython-311.pyc | Bin 0 -> 557 bytes .../api_app/__pycache__/utils.cpython-311.pyc | Bin 0 -> 1453 bytes .../api_app/__pycache__/views.cpython-311.pyc | Bin 0 -> 1492 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 199 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 197 bytes .../__pycache__/settings.cpython-311.pyc | Bin 0 -> 3121 bytes .../__pycache__/urls.cpython-311.pyc | Bin 0 -> 1198 bytes .../__pycache__/wsgi.cpython-311.pyc | Bin 0 -> 737 bytes frontend/.gitignore | 1 + 13 files changed, 1 insertion(+) create mode 100644 backend/api_app/__pycache__/__init__.cpython-311.pyc create mode 100644 backend/api_app/__pycache__/admin.cpython-311.pyc create mode 100644 backend/api_app/__pycache__/apps.cpython-311.pyc create mode 100644 backend/api_app/__pycache__/models.cpython-311.pyc create mode 100644 backend/api_app/__pycache__/urls.cpython-311.pyc create mode 100644 backend/api_app/__pycache__/utils.cpython-311.pyc create mode 100644 backend/api_app/__pycache__/views.cpython-311.pyc create mode 100644 backend/api_app/migrations/__pycache__/__init__.cpython-311.pyc create mode 100644 backend/deep_impact_proj/__pycache__/__init__.cpython-311.pyc create mode 100644 backend/deep_impact_proj/__pycache__/settings.cpython-311.pyc create mode 100644 backend/deep_impact_proj/__pycache__/urls.cpython-311.pyc create mode 100644 backend/deep_impact_proj/__pycache__/wsgi.cpython-311.pyc create mode 100644 frontend/.gitignore diff --git a/backend/api_app/__pycache__/__init__.cpython-311.pyc b/backend/api_app/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c7a8b7ee4a3f6ed97b5ceef147f691f708be5b09 GIT binary patch literal 188 zcmZ3^%ge<81j_S0(?IlN5CH>>P{wCAAY(d13PUi1CZpdb>KSl=ZzwLsT1w;(aOL_aApIXg8kML)41Gd{7P vKp$+AUP0wA4x8Nkl+v73yCM#t;fz3BEDIz)Ff%eT-e6F;fDIL~0aXA1#9~0A literal 0 HcmV?d00001 diff --git a/backend/api_app/__pycache__/apps.cpython-311.pyc b/backend/api_app/__pycache__/apps.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..57db576dcf82537865411614e471a3c8d4be852d GIT binary patch literal 560 zcmZutJx{|h5IrX;6xt$$0EvMCF=ZfGK|)BS6{xC&kl3OuUk(Oe&R8oW{X64mh|-WP~PktRE&<^ literal 0 HcmV?d00001 diff --git a/backend/api_app/__pycache__/models.cpython-311.pyc b/backend/api_app/__pycache__/models.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aa3969f130dd16a4b9a041daec6919807c2b22a4 GIT binary patch literal 240 zcmZ3^%ge<81j_S0(=37XV-N=hn4pZ$LO{lJh7^Vr#vF!R#wbQch7_h?22JLdAO)I? zx7c#?Q&Mw^{WO_wai(M?=B4NBr6d(G10`27d?~K-`#0O?ZM#dWqG8eF+A~v830LXwpL;wH) literal 0 HcmV?d00001 diff --git a/backend/api_app/__pycache__/urls.cpython-311.pyc b/backend/api_app/__pycache__/urls.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..82f345dbfca48c7856df3bf23277e5e629b8de7b GIT binary patch literal 557 zcmaJ-y-Ncz6i@DQceSO6&_!?&T{>u%4h|xSMJPfQ+-{NBMBDQ&IdbPmJ9TuD4uYdw zRrHVWPpIHfZgp}ixHTc#ZgD%bBHOnk;uDN4BrqqS?ZEl0?*q8~G!S?0+`bJSkTJd2c%aFjHMyTP`t1agWq_RN6tjIdOF>!_twwr52g9X(){((fK(nx<&ji| SB==8rl5Z}G?#Ty6voTh0+X(N|ZNS44CR}raD0Xc~!N|6&11IqDmTz#9wj_=Ow zUg8GD)IvO@s1gWO3KBx}g;XefiS`rN$Q9N}dE$vTOL?jK#H{}&=8e7Gnc3Nyx!L*6 zJ_(0I2*wvzKiv31Lg;U?=?%FnoK`_NL>97e5!qPBSjbXQ(xo<+bs4x^4A_dUw9f*? z5j&^{ZK4xmR!U!G1>I^+>jeLvrh$XF|c<>*gjALK@ z)GX#L)62U~nlYDUKu1<7FS!n<@qj<}K{mT$+?bs;mhboz-OZelSvD4zGud<|>qooF zq_Mb~PG!?e{>8Rt4ty3;OU7#Y<4@9SSwFG{)~oAAYUQ?ZC%vBQrqyN&P*I@MSxEN~ zjUum~HbRBIY+)}jaQhkkBAvft1?{89y+RKRK{|qU+}B`XcP3K*V92h5y?&7q+Q;6R zLjNHh0mR3!I%5sZATQF}A#@!vts;5j1I_+Wwium@E_oLQw!_hL(mJ$BMfw`R>+muz zqkHl?D&x4E`D$*<^Gf_3O*2dRgky3uvFYw=4s|s~xu@+W+wxuJmN|VNY>aKX_bxy^ z!adX5;qj1982xewY`HIQQqPZY>UeC==-T>GX689HHe6Lh3Eg zmIprqa$FWMJB{QApv6odQ!cDxvDnLxv@O@BTES(O>Fk-dX_?xhYtfaW>A9|>tuVJh za~{{0C@sBp+b)?oPrGa8wy9%@OG08LZO6+Od7`xEhahF6lQFvle^6oZUx8FnOA0DC zPbOY_bgLHIeEt~)3bQ`3)tJ~iAWahei(LDYT&t6r2AQdmnWj4RedW8#gZmHf9|TU+ zshU=|;uaV*T z0!B-L0KoY)-)DlWO4iMI5o1k%O^Gi_RS*><8=`!+=WA!?sg;f6qOqpLp literal 0 HcmV?d00001 diff --git a/backend/api_app/__pycache__/views.cpython-311.pyc b/backend/api_app/__pycache__/views.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..54943ddc93cba2fd4f9c6bc6858b279520890135 GIT binary patch literal 1492 zcmbVM&1(}u6rb76$0p5J?T4Q&6%h?+(uzkBY8$jFX>Ft8UdA;u)wKKN%tozv$iahx zClPw}R1yD~2qIxX5Ipr3si&TNvzyq)dU8H~^WOW-yxDp0B_FccG=g@2;`-`o4WS=O z>9=@K*!c>=CZdR98#&m-Sjn2LIl8HbvTn!B7}#_>ZpLAa*$F3UCPOZ68&1khg>u49 zJ45D>lQA<+*33FNGY9r0HSD}oFbf#5*xGRa`uB(W(*BjEwlG4UU`EXx(a=>y(=QPn zV#zHXIG8uAyc`WJ z7vap6*?F>Dxplj;QrlMV`G{ruAq$9LZooHWZUr1H-y?7}xly@SkKPnv|M@$kpl>3E zOiYofQT!5_I@RD|x=gHue(I3cKTXLhJUf#Bn<(h}0c{KBCzw$K54g%RpcFM36U<(f zNzNWOnFxe(GBve(v;4?&Sb5Fk)N(g0$D&qw&ZBI}wgS&{%S+r_WA#9k=Na?QFF3wc z56Ta$`Z@%w#;KMXuSqTr~4V+!^@>4Z`hC{pAB_CBc-Gg|Y}UbUk* zE(>(cavypn@yO#ry%`9uaw*4q=DNpOi9M?`U)8SQF-2;gkVZdqa+E^?$ts7~J@xo{ zDGWbXKXiHcFACJK%y~kwV}G$Cu!5%GN#MAlAf-V4m&kZCXxM^hm7HYmlLq(PFc~rz zRW>BPLDtzul#nn4gJIbNi;<+^DNL!BLj bS9gCZ>#sd3jd2Pp@&KrvVEy$EDy){@rN?6Q literal 0 HcmV?d00001 diff --git a/backend/api_app/migrations/__pycache__/__init__.cpython-311.pyc b/backend/api_app/migrations/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..826090a79a053e7b1e2e102d92ef2cc605a78c17 GIT binary patch literal 199 zcmZ3^%ge<81j_S0(?IlN5CH>>P{wCAAY(d13PUi1CZpd&ryk0@&FAkgB{FKt1RJ$Tppj9Bp6!Qa# R56p~=j2{?aL=iJk3;?C>Go1hc literal 0 HcmV?d00001 diff --git a/backend/deep_impact_proj/__pycache__/__init__.cpython-311.pyc b/backend/deep_impact_proj/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5447ac2fe0afc08f06349bbb209c06484ed894c6 GIT binary patch literal 197 zcmZ3^%ge<81j_S0(?IlN5CH>>P{wCAAY(d13PUi1CZpd2>er~FM zR(?@RVqRrpZemKJzH@#`YCuk6Nq&Bwen3%vR%&udvA#=cYJsk2Zb4#liGEUIa&~H7 zihc@EEItz~7GD5Vs2?AnnU`4-AFo$X`HRCQH$SB`C)KWq6=)I2DaHIi;sY}yBjX1K K7*WIw6axS literal 0 HcmV?d00001 diff --git a/backend/deep_impact_proj/__pycache__/settings.cpython-311.pyc b/backend/deep_impact_proj/__pycache__/settings.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..467f3903f1ecb6ab7abfac2e0ceaf7c55d19ba89 GIT binary patch literal 3121 zcmb7G-EZ606({vAN@8S3u@&cwL9u0O7b-#Hb{Gn8j6^$HWl0m|q~k+5TK8I_!w;3D z;+enz4cNn01ZXh~XfXs>(1#8~U-q#7WA91({3iJ&0d6bbCE`gOjkJY2)MU(>!7Wqi| zuV{@%3$J3Zeibds1#}e^a2j3nzyfILRYarZYiJo2fod6D589QWy`j;)n7o8;%FF1M zTtuvV9sVomwtNHKk#C}iM3p#o6&%AfMwSjXkDi~)4V)^ zcl(&z8R|NxYmUoVJ7*_TO$36lW^*r8eTbd^N0yCuLW2I|2VSE@lUPf2`_N}}OGOH@ zTx`A|j3idtVn_K<`~`_u#m8G4Bq!AC&1Yg&dD4_R5=rY;SJnHL8+L(86cW7(wJ}*rNo2Pr; zqj`~2CHWA)G+7IAeJ`X;n6d&ohR8}6b%Ag(ER(MU-TxqU>>a)W%~K8Ug-G9@Q&|O1 zgq09r4o=XzK{SUL=g&H`dzg81;)@X1dv7>|u63X9s@><1QT#{izV({}KXt-~zc!z= z{Lt3HkAB1{m3mEVbiDEu+r`E}ha~2=0Ti2PmSlW2$mh;<+v$+SAjEzZlz}ej3I;F5 zydTWtT%_U=-X8Y6w=Y3y<4+(PUGJSK?P((ThJFLG?*Q-JIpR~}zJX!3SBjD3W1;e) z*r<|NwbqtMN@%r|V3cgOI<;m)^6p-+h5U*q3ttEI-ls8 zi{JGaSe%Ya5t0xa8?}Z=Vhv$avIu2wOQlLa>C=kbQIoK9lzcvhA zENO16>LLj&7d_aZ_Z zoA-wf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WFmwR3N5doTNOmVVdbaEfhvJ@cp`__%YQ64YfU_6HhKB z-;+qWp`0dK>`Ppgcz}`~@GKr5DW0I9?KV$S8Asg4TD99Q-b)9U=nQGB9C9)~pjx@$ zv7wz<;v;Gh{hqa{dBT{`kqJbftFE4MigdzIvB$w0>*+(QnZQ))L4wM%L(`3!|EI`# zt4i|wU9@4b7ha>0FKxVfzE#@}o1444^{rYne6zjrwy}Bi;Qwa`3|bqjuBn#uau_-; zVVHZ`Y~ljk>V!xd(=J}wN~7*3TvWf$7zYWZL zr!Go_kPEL&W-g#m_kj4vw~ID{_2JDv0`HUm3l@LE;&3S#uDw2k#yK>G&=^&ghn3~C Q%F20V<#@hm*&P@BFT!)(HUIzs literal 0 HcmV?d00001 diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..2eea525 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1 @@ +.env \ No newline at end of file From 3452dbb26d4a57359cfd1a0b69abb95f695ab3ea Mon Sep 17 00:00:00 2001 From: Jordan Yamada Date: Sun, 19 May 2024 15:56:52 +0000 Subject: [PATCH 5/6] added live deploy in readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 95263b2..5dd973d 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ ![Deep Impact](https://dalle-image-storage.s3.amazonaws.com/1715997915066.jpeg) +## Live App +[Deep Impact](https://deep-impact.onrender.com/) + ## Overview Deep Impact is a web application designed to provide users with insights into the potential dangers of asteroid impacts. Utilizing the NASA NeoWs API, we've developed a simulation tool that visualizes incoming asteroids and explores various methods of asteroid deflection. From a560dd186ecb8ca1fe41fe2a1060dde7532dbdfa Mon Sep 17 00:00:00 2001 From: Jordan Yamada Date: Sun, 19 May 2024 16:01:20 +0000 Subject: [PATCH 6/6] (WIP) working on quiz --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5dd973d..39f31e6 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ![Deep Impact](https://dalle-image-storage.s3.amazonaws.com/1715997915066.jpeg) ## Live App + [Deep Impact](https://deep-impact.onrender.com/) ## Overview