Skip to content

Instantly share code, notes, and snippets.

View DopamineDriven's full-sized avatar
🎯
cloud hopping

Andrew Ross DopamineDriven

🎯
cloud hopping
View GitHub Profile
@DopamineDriven
DopamineDriven / dependencies
Created June 30, 2020 02:17
dependencies and dev dependencies
$ npm i --save express mongodb && npm i --save-dev @types/express @types/mongodb @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser dotenv eslint nodemon ts-node typescript
$ mkdir server && cd server && npm init -y
{
"javascript.updateImportsOnFileMove.enabled": "always",
"prettier.useTabs": true,
"typescript.updateImportsOnFileMove.enabled": "always",
"prettier.trailingComma": "none",
"eslint.alwaysShowStatus": true,
"eslint.debug": true,
"eslint.validate": [
"javascript",
"javascriptreact",
@DopamineDriven
DopamineDriven / Solving for the Magnitude of Force and Theta in degrees
Created January 5, 2019 03:21
Determining the Magnitude and Angle of Force using Vector components Fx and Fy
import math
print("Solving for theta of force components x and y.")
x=input("input force component x:")
y=input("input force component y:")
x=float(x)
y=float(y)
z=math.atan(y/x)
theta=math.degrees(z)
w=((x**2+y**2)**0.5)
print(w)
@DopamineDriven
DopamineDriven / Solving for Theta in degrees
Created January 5, 2019 03:16
Determining the angle theta using force components Fx and Fy
import math
print("Solving for theta of force components x and y.")
x=input("input force component x:")
y=input("input force component y:")
x=float(x)
y=float(y)
z=math.atan(y/x)
theta=math.degrees(z)
print(theta)
@DopamineDriven
DopamineDriven / Hypotenuse of a right triangle
Created January 4, 2019 23:42
Hypotenuse of a right triangle
print("Solving for the hypotenuse, c, of a right triangle.")
a=input("input length of a:")
b=input("input length of b:")
a=float(a)
b=float(b)
c=((a**2+b**2)**0.5)
print(c)