"i did it at home"
This commit is contained in:
1 parent
90e0d7638b
commit
a4fac93e3b
5 files changed
+207
No files matched your search
@@ -0,0 +1,23 @@
|
||||
# bro has a nonfunctioning computer
|
||||
|
||||
be fr
|
||||
|
||||
## BRO DONT EVEN HAVE PYTHON
|
||||
|
||||
[downloader](https://www.python.org/downloads/)
|
||||
|
||||
> [!IMPORTANT]
|
||||
> remember the PATH thing
|
||||
|
||||
## bro dont even have jupyter
|
||||
|
||||
if you want to use pip then cry please place this on the command line:
|
||||
|
||||
```sh
|
||||
pip install jupyter
|
||||
```
|
||||
|
||||
then you can open jupyterlab and good work
|
||||
|
||||
and if you dont want to cry in despair from using pip then
|
||||
please use some other package managers like idfk conda pipx poetry uv
|
||||
@@ -482,6 +482,50 @@
|
||||
"\n",
|
||||
"try ctrl space the just imported np object. snoop around. its complicated. theres so much. we dont use much of it tho.\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"my undeclared var is obviously undeclared\n",
|
||||
"this will print\n",
|
||||
"this will also print\n",
|
||||
"2 + 3 = 5\n",
|
||||
"1 is not a bad number\n",
|
||||
"2 is not a bad number\n",
|
||||
"3 is not a bad number\n",
|
||||
"5 is not a bad number\n",
|
||||
"6 is not a bad number\n",
|
||||
"8 is not a bad number\n",
|
||||
"9 is not a bad number\n",
|
||||
"BungeeTuple(t=2.0, dt=2, vt=19.6133)\n",
|
||||
"hello lda!\n",
|
||||
"instance: 3\n",
|
||||
"class: 1\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"38.20507559806905"
|
||||
]
|
||||
},
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from tutorial import bungee_jumper\n",
|
||||
"\n",
|
||||
"bungee_jumper(t=5, mass=68.1, drag_coeff=0.25)\n",
|
||||
"# dir()"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# 1b
|
||||
|
||||
## the first one
|
||||
|
||||
is at [2/bis.py](../../2/bis.py)
|
||||
|
||||
## the second one
|
||||
|
||||
is a while loop if you have def f(x) and def df(x) do it yourself broski
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Bungee Plotter\n",
|
||||
"\n",
|
||||
"i loooooove this example this example is peam\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import math\n",
|
||||
"import matplotlib.pyplot as plt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"my undeclared var is obviously undeclared\n",
|
||||
"this will print\n",
|
||||
"this will also print\n",
|
||||
"2 + 3 = 5\n",
|
||||
"1 is not a bad number\n",
|
||||
"2 is not a bad number\n",
|
||||
"3 is not a bad number\n",
|
||||
"5 is not a bad number\n",
|
||||
"6 is not a bad number\n",
|
||||
"8 is not a bad number\n",
|
||||
"9 is not a bad number\n",
|
||||
"BungeeTuple(t=2.0, dt=2, vt=19.6133)\n",
|
||||
"hello lda!\n",
|
||||
"instance: 3\n",
|
||||
"class: 1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# how do i import file\n",
|
||||
"# shit i shot myself in the foot here, gotta consult github.com/ldlda/unipy\n",
|
||||
"def why_so_ass():\n",
|
||||
" # import importlib\n",
|
||||
" import importlib.util\n",
|
||||
" from pathlib import Path\n",
|
||||
" from sys import modules\n",
|
||||
"\n",
|
||||
" ## name goes here\n",
|
||||
" tutofile = Path(\"../../0/tutorial.py\")\n",
|
||||
" tutoname = \"tutorial1\"\n",
|
||||
" tutonamesys = \"tutorial\"\n",
|
||||
" # over\n",
|
||||
"\n",
|
||||
" if not tutofile.is_file():\n",
|
||||
" raise FileNotFoundError(\"where bro pointing to\")\n",
|
||||
" tutofile = tutofile.resolve(True)\n",
|
||||
" spec = importlib.util.spec_from_file_location(name=tutoname, location=tutofile)\n",
|
||||
"\n",
|
||||
" tuto = importlib.util.module_from_spec(spec)\n",
|
||||
" modules[tutonamesys] = tuto # !!\n",
|
||||
" spec.loader.exec_module(tuto)\n",
|
||||
" ## this line right here\n",
|
||||
" ## why do i need it to exec EVER WHY no i dont WHYYYYY\n",
|
||||
" # if i do from tutorial import bungee_jumper in tutorial2.ipynb it dont do that # oh it does\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"why_so_ass()\n",
|
||||
"del why_so_ass"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"38.20507559806905"
|
||||
]
|
||||
},
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from tutorial import bungee_jumper # surefire way to make all ides scream and cry\n",
|
||||
"\n",
|
||||
"bungee_jumper(t=5, mass=68.1, drag_coeff=0.25)\n",
|
||||
"# dir()"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.12.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
# system solver
|
||||
|
||||
we getting harder
|
||||
|
||||
use `from math import factorial`
|
||||
Reference in new issue
Block a user