This file contains hidden or 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
| *&---------------------------------------------------------------------* | |
| *& Report YMHCROBJONLOAN | |
| *& | |
| *&---------------------------------------------------------------------* | |
| *& | |
| *&---------------------------------------------------------------------* | |
| REPORT YMHCROBJONLOAN. | |
| *********************************************************************** | |
| * PROGRAM....... YMHCROBJONLOAN * | |
| * TITLE......... OBJECTS ON LOAN * |
This file contains hidden or 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
| # Recordatorio para actualizar la autenticacion via proxy en APT | |
| sudo nano /etc/apt/apt.conf | |
| # Editar | |
| Acquire::http::proxy “http://<user>:<pass>@<proxy>:<port>/”; | |
| Acquire::https::proxy “http://<user>:<pass>@<proxy>:<port>/”; |
This file contains hidden or 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
| ' Conversion de números decimales (dec) a números binarios (bin). | |
| Public Function bin2dec(bin) | |
| len_ec = Len(bin) ' Se mide la longitud del numero entero | |
| ReDim matriz(0, len_ec - 1) | |
| indice = 0 | |
| potencia = len_ec - 1 |
This file contains hidden or 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
| ' Conversión de números binarios (bin) a números decimales (dec). | |
| Function dec2bin(dec) | |
| base_bin = 2 | |
| base_dec = 10 | |
| frac_dec = dec / base_dec |
This file contains hidden or 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
| ### List comprehension | |
| people = ['Dra. Christopher Brooks', 'Dr. Kevyn Collins-Thompson', 'Dr. VG Vinod Vydiswaran', 'Dr. Daniel Romero'] | |
| def split_title_and_name(person): | |
| return person.split()[0] + ' ' + person.split()[-1] | |
| #option 2 con funcion intermedia | |
| map(lambda person: split_title_and_name(person), people) |
This file contains hidden or 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
| use SQL::Abstract; | |
| ... | |
| my @rows = @{$dbh->do("SELECT foo, bar ...", { Slice => {} }, @bind); | |
| foreach my $row (@rows) { say "Got: ".$row->{foo}." -> ".$row->{bar}; } | |
| ... |
This file contains hidden or 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
| lsblk -o NAME,SIZE,FSTYPE,TYPE,MOUNTPOINT | |
| sudo mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd | |
| cat /proc/mdstat | |
| sudo mkfs.ext4 -F /dev/md0 | |
| sudo mkdir -p /mnt/md0 | |
| sudo mount /dev/md0 /mnt/md0 | |
| df -h -x devtmpfs -x tmpfs | |
| sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf | |
| sudo update-initramfs -u | |
| echo '/dev/md0 /mnt/md0 ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| # Pseudo implementacion del algoritmo de Karatsuba | |
| import math | |
| #from random import randrange | |
| def multiply(x, y): | |
| # Caso Base: el algoritmo descarta enteros con una longitud menor a 10 | |
| if (x < 10) or (y < 10): | |
| return x * y |
This file contains hidden or 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
| /* Se procede a crear y utilizar la base de datos historial */ | |
| CREATE DATABASE IF NOT EXISTS historial; | |
| USE historial; | |
| /* Se procede a crear la tabla empleados */ | |
| CREATE TABLE empleados | |
| ( | |
| dni INT(8), /* Se cambia el tipo de dato */ | |
| nombre VARCHAR(10), | |
| apellido1 VARCHAR(15), | |
| apellido2 VARCHAR(15), |
This file contains hidden or 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
| /* Inicio: definición de datos (DDL) */ | |
| CREATE DATABASE IF NOT EXISTS pedidos; | |
| USE pedidos; | |
| CREATE TABLE articulo ( | |
| CodArt VARCHAR(20) NOT NULL, | |
| DesArt VARCHAR(50) NOT NULL, | |
| PVPArt DECIMAL(12,2) NOT NULL, | |
| PRIMARY KEY (CodArt) |