alistarse para python

Ace your homework & exams now with Quizwiz!

que usamos para manejar dates

arrow

ventajas de package managment system in linux

automaticament update el programa e instala todas las dependencias

interpreted language

como python, no hay que compilar, no hay que translate into machine level language (hehadeximal and binary), assembly language. usan un interpreter

como saber que version de python tenemos

en a terminal o command prompt python --version

que es y para que se usa shebang

extra line para evitar tener que escribir python3 en linux cada vez que queremos run un script. le dice al operating system que command se quiere usar para ejecutar el script: #!/usr/bin/env python3

pillow

from PIL import Image

como usar pil in windows

from PIL import Image p = Image.open('pika.jpg') <-- crear objeto en p print(p.size) usar atributo size

como instalar python in windows

ir al oficial website e instalar el paquete from there (executable installer): encontrar el installer en el oficial website for windows y download the executable installer for python 3 64-bit architecture. 1. download executalbe installer 2. run it as the administrator user y antes de instalar chequear la casilla para add python to PATH. the PATH varible le dice al os donde buscar programas o executables. we want to have to box chequed so that python interpreter gets executed when we invoke it from the command line. (dice includes IDLE,pip and documentation) obtner el paquete de store usar package management system como chocolatey

donde se puede ver que modulos estan disponibles

los modulos estan publicados en PypI, python package Index. los modulos externos son manejados con a command line tool llamado pip. pip is a cross platform tool se puede usar para instalr upfate y remove external modulos en cualquier operating system.. para ver comandos en powershell type:pip --help . para ver que modulos externos tengo usar pip freeze o pip list

como instalar en linux

package management system::apt yum dnfde acuerdo a la distribucion, Debian Ubuntu red hat fedora ejemplo :sudo apt install python3-pil en este caso estamos insalando modulo. hay modulos provided by the package management system(apt) y se pueden instalar usando apt como en caso anterior. cuando hay versiones de modulos mas nuevas de las que vienen con la distribucion y las queremos instalar, o modulos que no estan el la distribucion se usa pip. primero asegurarse que es la version 3, instalandolo con apt: sudo apt install python3-pip y luego: pip3 install pandas

que modulo de python se puede usar en data analisis

pandas;

cual es el equivalente de pip in macos

pip3

cual esel standard PACKAGE manager for Python

pip: maneja 3rd party libraries and packages.pip connects to an online repository of public packages called python package index

proque hay que escribir ./

porque el escript isnt located in any of the directories listed in the path variable.this variable tells operating system where to find progrmas to execute, the dot in the dot slash expression represents the current directory

how to create python module

put module script in seeparate file, to import the module we use that name, we can access each function,class and variable defined in the file by using dot natation we use Import command to import any module located in the PATH directory, we can also use import impor as to assign a local name variable to the imported module cuando un directorio es el modulo hay que crear un file __init__.py (puede estar vacio) so the directory be trated as a module

que external module se puede usar para obtener info de un web site

requests.

en linux que se necesita para run the scrip directly without having to call the interpreter everytime( es decir escribir python3 y el nombre del script)

shebang line hacer the file executable usando chmod command, para cambiar file permisions: chmod +x hello_world.py: making the script as executable means taht we can mow run the file by just prefixing it with a dot slash.this approach works the same for mac Os

os

softeate que maneja todo lo que sucede en el computador;lee, escribe y borra archivos del hard drive. maneja como los procesos empiezan , como interactuan con otros y como terminan, maneja como la memoria se le asigna a los procesos, como se envien los paquetes en la red y como se reciven y como cada program accede el hardware.. hay dos partes en el os: the kernel and the user space. el kernel le habla al hardware y maneja los recursos

como instalar requests

usando pip pip install requests. se puede usar the get function para obtener el contenido de web site: r=request.get('http://www.gogle.com") y ver que tan largo es: len(r.text)

que es python standard library

viene como parte de phyton installation y tiene modolos para las tareas mas comunes in python. apate de esto hay extenal modules; siven para generar pdgf, starting web pages, compress files, interacting con el email..ejemplos de modulos en python standard kubrary: datetime,math, random, re, os,io,copy, json


Related study sets

Module 10. Developmental Issues, Prenatal Development, And The Newborn

View Set

Concept 20/21: SB Assignment - The Use and Abuse of Alcohol and Other Drugs

View Set

Networking Chapter 10 Security in Network Design

View Set

Chapter 13 How Humans Evolved: Physical Anthropology

View Set

Biology Unit 4: When a Bug Gives You the Runs

View Set

Elsevier Adaptive Quizzing for Pediatrics

View Set