-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Data Science Machine learning la Serena Summer School and thermodynam…
…ics 2023
- Loading branch information
1 parent
2234b77
commit 0df366a
Showing
243 changed files
with
224,132 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#Parte 2 | ||
|
||
from potencial import get_yuka#Importo la funcion definida antes en el programa anterior | ||
import matplotlib.pylab as plt | ||
import numpy as np | ||
|
||
|
||
#Ahora se nos pide hacer un grafico, una curva de este, defino r como un array | ||
rad = np.linspace(0.01,0.1,100) | ||
|
||
plt.plot(rad,get_yuka(rad)) | ||
plt.show() | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from potencial import get_yuka | ||
import matplotlib.pyplot as plt | ||
import numpy as np | ||
|
||
#Ahora se nos pide hacer un grafico, una curva de este, defino r como un array | ||
rad = np.linspace(0.01,0.1,100) | ||
|
||
plt.figure() | ||
|
||
for j in range(10): | ||
|
||
k = 10 * (j+1) | ||
potenciales = get_yuka(rad,k) | ||
plt.plot(rad,potenciales) | ||
plt.legend(str(k)) | ||
|
||
|
||
|
||
plt.show() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import numpy as np | ||
|
||
g = 1 | ||
k = 1 | ||
m = 1 | ||
|
||
#Calculo r en base a las coordenadas, esto lo hago con otra funcion creada | ||
def get_r(x,y): | ||
return np.sqrt(x*2 + y*2) | ||
|
||
#Defino la funcion que utilizare | ||
def get_yuka(r,k=1): | ||
return -g**2 * (np.exp(-k*m*r))/(r) | ||
|
||
def calcularYuka(): | ||
x_pos = input("Ingrese coordenada x: ") | ||
y_pos = input("Ingrese coordenada y: ") | ||
|
||
r = get_r(x_pos,y_pos) | ||
yukaw = get_yuka(r) | ||
|
||
print(yukaw) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Las diferencias entre los resultados se deben a como los metodos | ||
se aproximan al problema | ||
Mientras la regla del trapezoide creo figuras en base a la base | ||
de la funcion, eje x; la regla de simpson tomo una aproximacion | ||
de acercar curvas cuadraticas a mi funcion; | ||
en el caso de simpson llego a 7.599999 excelente resultado y aproximacion | ||
mientras que la del trapezoide por efecto de la baja cantidad de figuras | ||
acabo con numeros de más, 7.640000; si hacemos la integral en papel.. | ||
es 7.6 | ||
|
||
-fabian trigo| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
|
||
# coding: utf-8 | ||
|
||
# In[24]: | ||
|
||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
|
||
datosP = np.loadtxt("/tmp/guest-cxgqie/Fabian Trigo/PRS_Valpo_WRF.dat") | ||
datosT = np.loadtxt("/tmp/guest-cxgqie/Fabian Trigo/TMP_Valpo_WRF.dat") | ||
#Pasamos de Kelvin a Celsius | ||
datosT = datosT - 273.15 | ||
|
||
|
||
#Creamos el grafico de calor | ||
plt.imshow(datosT,origin="lower") | ||
plt.title("Grafico Temperatura de Valparaiso") | ||
plt.xlabel("Tiempo en horas") | ||
plt.ylabel("Altura") | ||
#Hacemos una barrita para saber a que temperatura se refiere cada color | ||
plt.colorbar(label="Celcius") | ||
plt.show() | ||
|
||
|
||
# In[25]: | ||
|
||
plt.imshow(datosP,origin="lower") | ||
plt.title("Presion del Aire en Valparaiso") | ||
plt.xlabel("Tiempo en horas") | ||
plt.ylabel("Altura") | ||
plt.colorbar(label="Hecto Pascales") | ||
plt.show() | ||
|
||
|
||
# In[31]: | ||
|
||
def densidadA(P,T): | ||
R = 286.9 | ||
return P/(R*T) | ||
|
||
#Calculo la densidad del aire con todos los datos, tendra las mismas dimensiones | ||
densidad = densidadA(datosP,datosT) | ||
|
||
#Y ya es crear el grafico de calor simplemente y darle los nombres | ||
plt.imshow(densidad,origin="lower") | ||
plt.title("Densidad del Aire en Valparaiso") | ||
plt.xlabel("Tiempo en horas") | ||
plt.ylabel("Altura") | ||
plt.colorbar(label="hPa*J / kg") | ||
plt.show() | ||
|
||
|
||
# In[41]: | ||
|
||
#Funcion a integrar | ||
def funcion(x): | ||
return x**3 + 3*x - 1.2 | ||
|
||
#Limites de integracion | ||
lim_inf = 0.0 | ||
lim_sup = 2.0 | ||
#Cantidad de figuras | ||
N = 10 | ||
|
||
#Definiremos el grosor de cada figura | ||
dx = (lim_sup - lim_inf)/N | ||
|
||
|
||
# In[42]: | ||
|
||
#Integrar por trapezoide | ||
#I(a,b) = dx(0.5(f(a)+f(b) + sumatoria desde i=1 a i=N-1) | ||
|
||
#Realizaremos la sumatoria y requeriremos donde guardar | ||
suma = 0.0 #Sera nuestro place holder | ||
for i in range(1,N): #Es sumatoria de 1 a N-1 | ||
suma += funcion(lim_inf + i*dx) #f(a+i*dx) | ||
IntegralT = dx*(0.5*(funcion(lim_inf)+funcion(lim_sup))+suma) | ||
|
||
print("Integral por trapezoides: ", IntegralT) | ||
|
||
|
||
# In[59]: | ||
|
||
#Integrar por Simpson | ||
#I(a,b) = 1/3 * dx((f(a)+f(b) + | ||
# 4*sum(k=1 to N/2)(f(a + (2k-1)*dx)) | ||
# + 2*sum(k=1 to N/2 -1)(f(a + 2*k*dx)) | ||
suma1 = 0.0 | ||
for i in range(1, int(N/2)+1): #Ira de 1 a N/2 siendo entero | ||
suma1 += funcion(lim_inf + (2*i -1 )*dx) | ||
|
||
suma2 = 0.0 | ||
for i in range(1, int(N/2)): #De 1 a N/2 - 1 | ||
suma2 += funcion(lim_inf + 2*i*dx) | ||
|
||
trd = 0.3333333 #Calculo de antes un 1/3 aprox | ||
I=trd*dx*(funcion(lim_inf)+funcion(lim_sup)+4.0*suma1+2.0*suma2) | ||
|
||
|
||
|
||
print("Integral por Simspn: ",I) | ||
|
||
|
||
# In[ ]: | ||
|
||
|
||
|
210 changes: 210 additions & 0 deletions
210
1y2s - Compu 2 - 2018/1009 prueba/fabiantrigo_prueba2.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
Binary file not shown.
Binary file added
BIN
+284 KB
2y2s - Termodinamica - 2023 - Villanueva/LFIS 224 Termodinámica (C).docx
Binary file not shown.
Binary file added
BIN
+25.7 MB
...Villanueva/Libros/An Introduction to the Study of Stellar Structure, S. Chandrasekhar.pdf
Binary file not shown.
Binary file added
BIN
+7.51 MB
... - Termodinamica - 2023 - Villanueva/Libros/Calor y Termodinamica - Zemansky, Dittman.pdf
Binary file not shown.
Binary file added
BIN
+1.84 MB
... - Termodinamica - 2023 - Villanueva/Libros/Equilibrium thermodynamics, C. J. Adkins.djvu
Binary file not shown.
Binary file added
BIN
+3.79 MB
2y2s - Termodinamica - 2023 - Villanueva/Libros/Termodinamica, Sears_Salinger(1).docx
Binary file not shown.
Binary file added
BIN
+3.79 MB
2y2s - Termodinamica - 2023 - Villanueva/Libros/Termodinamica, Sears_Salinger(2).docx
Binary file not shown.
Binary file added
BIN
+3.79 MB
2y2s - Termodinamica - 2023 - Villanueva/Libros/Termodinamica, Sears_Salinger(3).docx
Binary file not shown.
Binary file added
BIN
+3.79 MB
2y2s - Termodinamica - 2023 - Villanueva/Libros/Termodinamica, Sears_Salinger.docx
Binary file not shown.
Binary file added
BIN
+20.3 MB
2y2s - Termodinamica - 2023 - Villanueva/Libros/Termodinamica, Sears_Salinger.pdf
Binary file not shown.
Binary file added
BIN
+1.52 MB
... - 2023 - Villanueva/Libros/The Concepts of Classical Thermodynamics, H. A. Buchdahl.djvu
Binary file not shown.
Binary file added
BIN
+631 KB
...3 - Villanueva/Libros/Thermodynamics and an Introduction to Thermostatistics, Callen.docx
Binary file not shown.
Binary file added
BIN
+80.3 MB
...23 - Villanueva/Libros/Thermodynamics and an Introduction to Thermostatistics, Callen.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+2.9 MB
...2023 - tutoria/Brown J., Churchill R. - Complex variables and applications-MGH (2008).pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+541 KB
2y2s- MMF/2023 - tutoria/Ejercicios Churchill 9ed para 1era Prueba.docx
Binary file not shown.
Binary file added
BIN
+398 KB
2y2s- MMF/2023 - tutoria/Ejercicios Churchill 9ed para 1era Prueba.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.4 KB
2y2s- MMF/2023 - tutoria/Procedimiento de acompañamiento estudiantil TUTORÍAS PAR.docx
Binary file not shown.
Binary file added
BIN
+578 KB
2y2s- MMF/2023 - tutoria/Sesiones/1012_Preguntas de Termodinamica.docx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
Lightweight technology of virtualization | ||
- dosent use Hypervisor | ||
- I want to only focus in the application | ||
|
||
## docker image | ||
- Base image (OS) | ||
- build basic programs and drives on it (more images) | ||
|
||
## concepts | ||
- Dockerfile: | ||
- Plain text that contains docker commands | ||
- allows creation of image | ||
- Docker Hub and Registries: | ||
- Where to share the image as a repository | ||
- Harbor (open source) | ||
- Azure Container Registry | ||
- AWS | ||
- Artifact Registry | ||
|
||
# Dockerfile | ||
Example of running commands in docker and how to run a node shell command | ||
```dockerfile | ||
FROM node:17-alpine | ||
WORKDIR /app | ||
COPY package*.json . | ||
RUN npm install --production | ||
COPY . . | ||
RUN npm run build | ||
CMD ["node","dist/index.js"] | ||
``` | ||
|
||
## Why docker | ||
Its professional and may be mandatory | ||
- **Reproducible Research** | ||
- AI and Machine Learning | ||
- *Field Study* | ||
- Bioinformatics | ||
- High performance computing | ||
- *Scientific Simulations* | ||
- **Collaboration** | ||
- *Cloud Computing* | ||
- Custom Software | ||
- *Legacy Software Preservation* | ||
|
||
# Running docker | ||
`docker run hello-world` verify good instalation | ||
`docker pull nginx` gets the image | ||
|
||
```bash | ||
docker run -d -p 80:80 -v $(pwd):/usr/share/nginx/html --name my_container nginx | ||
``` | ||
|
||
- `-d` detach, | ||
- `-p 80:80` map port 80 of image to 80 port of system | ||
- `-v $(pwd):/usr/share/nginx/html` mounts this file into the directory | ||
|
||
___ | ||
# Basic usage | ||
`docker images` | ||
see the available images | ||
|
||
`docker inspect nginx` | ||
Gives me information about the image called `nginx` | ||
|
||
`docker tag nginx my_custom_nginx:latest` | ||
Rename an image | ||
|
||
`docker rmi nginx` | ||
Remove the docker image to free disk space | ||
|
||
`docker history nginx` | ||
|
||
## Manage Containers | ||
`docker ps` | ||
Show all container running | ||
- add `-a` for all container, even stopped ones | ||
|
||
`docker start <container_id_or_image>` | ||
Start and stopped cotainer | ||
|
||
`docker stop <container_ir_or_image>` | ||
|
||
`docker rm <container-id_or_name>` | ||
after stopping a container | ||
|
||
`docker container prune` | ||
**Dangerous** | ||
Remove all stopped containers | ||
|
||
`docker logs <container_id_name>` | ||
|
||
|
||
___ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
We can add to the docker file a command for when it instarts | ||
```dockerfile | ||
RUN pip install pandas matplotlib | ||
CMD ["jupyter","notebook"] | ||
``` | ||
|
||
- All Dockerfile starts with base image | ||
`FROM jupyter/minimal-notebook` | ||
|
||
- Environment configuration | ||
`END NODE_ENV=production` | ||
|
||
- Copying files | ||
`COPY . /app` | ||
|
||
- Running commands, install packages and many | ||
`RUN npm install` | ||
|
||
- Exposing ports | ||
`EXPOSE 8889` | ||
- indicates that the container listens that port | ||
|
||
- Container Execution Command or Entry point | ||
`CMD ["node","app.js"]` | ||
Command when the container starts | ||
|
||
___ | ||
We run this in command line | ||
|
||
- Build the image | ||
`docker build -t jupyter-server .` | ||
This will create a docker image | ||
|
||
- Running the image | ||
`docker run -p 8889:8889 jupyter-server` | ||
we use an exposed port | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Kubernets (higher level, special configs) | ||
- Docker swamp | ||
- Docker Compose |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.