forked from PYLP-UNaM/ex-PYLP
-
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.
added dockerfile for unidad_4 and completed some other stuffs
- Loading branch information
Showing
17 changed files
with
203 additions
and
17 deletions.
There are no files selected for viewing
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,30 @@ | ||
FROM ubuntu:latest | ||
|
||
ARG home_dir=/home | ||
|
||
ENV WEB_DOCUMENT_ROOT=$home_dir | ||
|
||
ENV TERM=xterm\ | ||
TZ=America/Argentina/Cordoba\ | ||
DEBIAN_FRONTEND=noninteractive | ||
|
||
WORKDIR $home_dir | ||
|
||
RUN apt-get update | ||
|
||
RUN apt-get install -y \ | ||
curl\ | ||
hugs\ | ||
swi-prolog | ||
|
||
|
||
# Instalando node | ||
RUN curl --silent --location https://deb.nodesource.com/setup_12.x | bash - \ | ||
&& apt-get install --yes nodejs \ | ||
&& apt-get install --yes build-essential | ||
|
||
|
||
# RUN groupadd -r curso && useradd --no-log-init -r -g curso curso | ||
# USER curso | ||
|
||
ENTRYPOINT ["tail", "-f", "/dev/null"] |
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
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 |
---|---|---|
@@ -1,20 +1,18 @@ | ||
FROM ubuntu:latest | ||
|
||
RUN groupadd -r curso --gid=999 && useradd -r -g curso -p curso --uid=999 curso | ||
|
||
ARG web_document_root=/home/curso | ||
ARG web_document_root=/home | ||
|
||
ENV WEB_DOCUMENT_ROOT=$web_document_root | ||
|
||
WORKDIR $web_document_root | ||
|
||
RUN apt-get --yes -qq update \ | ||
&& apt-get --yes -qq upgrade | ||
RUN apt-get update -y | ||
|
||
COPY /bin/pfc2-0.9.40.x86_64.tar.gz /usr/local/bin | ||
|
||
RUN tar -xvf /usr/local/bin/pfc2-0.9.40.x86_64.tar.gz -C /usr/local/bin/ | ||
|
||
RUN su - curso | ||
# RUN groupadd -r curso && useradd --no-log-init -r -g curso curso | ||
# USER curso | ||
|
||
ENTRYPOINT ["tail", "-f", "/dev/null"] |
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
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
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
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,59 @@ | ||
# Referencias Rapidas | ||
|
||
Esta es una referencia ultra liviana de los componentes principales de PascalFC debe descartarse como referencia principal para cualquier busqueda profunda referirse a: | ||
- [Manual del Lenguaje](./docs/) | ||
- [Guía de Usuario](./docs/) | ||
|
||
# Ciclo de vida de un proceso | ||
|
||
![](./img/process_lifecycle.png) | ||
|
||
## creación | ||
|
||
un proceso se crea con su definicion formal. | ||
|
||
```pascal | ||
// sintaxix de la definicion de un proceso | ||
process type <nombre>[argumentos]; | ||
begin | ||
secuencia de instrucciones | ||
end; | ||
// ejemplo | ||
process type proceso; | ||
begin | ||
writeln('soy un proceso'); | ||
end; | ||
``` | ||
|
||
## ejecución | ||
|
||
un proceso entra en estado ejecutable cuando se hace define una variable y se realiza la invocación de la misma. | ||
|
||
```pascal | ||
// programa principal | ||
var | ||
proceso_1 : proceso; | ||
begin | ||
cobegin | ||
proceso_1; | ||
coend; | ||
end; | ||
``` | ||
|
||
# Semaforos | ||
|
||
## Declaracion e Inicializacion | ||
|
||
## Utilizacion | ||
|
||
# Otras Referencias rapidas | ||
|
||
```pascal | ||
// declaracion de un array | ||
// array index_type{index_type} of type | ||
var p: array[1..max] of proc; | ||
``` |
Binary file not shown.
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.
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
Empty file.
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
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,34 @@ | ||
# OpenMP | ||
|
||
es un ... | ||
|
||
## Componentes del estandar | ||
|
||
## Funciones | ||
|
||
|
||
## Tipos de datos | ||
|
||
|
||
## Constantes | ||
|
||
|
||
## compilando los archivos | ||
|
||
para compilar el archivo fuente `.cpp` se debe ejecutar el comando `mpicxx`. | ||
|
||
debemos usar la opcion `-fopenmp` para indicarle que es un archivo que usa `OpenMP` | ||
|
||
con la opcion `-o` le damos el nombre que queremos al ejecutable. | ||
|
||
```sh | ||
mpicxx -fopenmp <archivo_fuente.cpp> -o <archivo_ejecutable> | ||
``` | ||
|
||
## Ejecutando los archivos | ||
|
||
Para ejecutar los programas corremos : | ||
|
||
```sh | ||
./<nombre_archivo> | ||
``` |
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 @@ | ||
#include <omp.h> | ||
#include <iostream> | ||
|
||
int main (){ | ||
|
||
int nthreads; | ||
int thread; | ||
int NuevoValor = 222; | ||
|
||
omp_set_num_threads(10); | ||
#pragma omp parallel private(nthreads, thread) firstprivate(NuevoValor) | ||
{ | ||
|
||
thread = omp_get_thread_num(); | ||
|
||
nthreads = omp_get_num_threads(); | ||
|
||
std::cout<<"Hola Mundo soy la hebra ="<< thread <<" de "<<nthreads<<" que somos"<< " Esta es la variable nueva = "<<NuevoValor<<std::endl; | ||
|
||
} | ||
|
||
} |
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 @@ | ||
console.log("hola desde nodeJS"); |
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,19 @@ | ||
{ | ||
"name": "pylp", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/SuichiM/PYLP.git" | ||
}, | ||
"author": "SuichiM", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/SuichiM/PYLP/issues" | ||
}, | ||
"homepage": "https://github.com/SuichiM/PYLP#readme" | ||
} |