JaviCan
Blender Python - 022 - Rotar objeto con radianes con Python
Este es un ejercicio muy similar al 021.
Vamos a crear un objeto con modifiers.
Y luego lo vamos a girarlo usando radianes.
Link en GitHub donde esta el código que se utilizó:
https://github.com/javier-cantu/BlenderPython/blob/main/022_addModifierAndRotateObj.py
Mis Redes:
https://linktr.ee/JaviCan
013 - Python ejercicios w3 - Print a here document.
En este ejercicio vamos a imprimir en la consola un "here document" que es un texto con formato que se pone entre triple comillas.
Link de mi Jupyter Notebook en Github:
https://github.com/javier-cantu/LearningPython/blob/master/w3resource_python_ex/013%20Print%20a%20here%20document.ipynb
--------------------------
Link del ejercicio:
https://www.w3resource.com/python-exercises/python-basic-exercise-13.php
--------------------------
Jupyter ShortCuts
Insert:
a = Incert Cell Above
b = Incert Cell Below
Cell:
Shift + Enter = Run Cells and Select Below
d,d = Delete cell
Cell Type:
y = Code
m = Markdown
Kernel:
Restart = 0,0
001 - Blender - Animación - Como animar un objeto por una curva
En este video documento como animar un objeto para que siga la trayectoria de una curva.
Primero siguiendo un circulo y luego una curva bezier.
Despues vemos como "bake" la animación en keyframes para no depender de la curva.
Link de donde consegui el asset de la nave:
https://www.kenney.nl/assets/space-kit
Tutorial de donde aprendí esto:
https://youtu.be/omAoKWyG_J4
----------------------
Shortcuts para la timeline con los keyframes:
up down
change keyframe
Shift + left or right
start and end
Ctrl + I = invert selection
Shift + D = duplicas keyframe
Shift + R = repite y genera mas ketframes
Seleccionas varios keyframes
E = extend
S = Scale
Shift + T = Slide selected frames
X delete keyframe
017 - Blender - Varios - Como alinear la vista a un objeto o poligono.
En este video vemos como alinear la vista en Blender.
Primero lo básico usando los números del Numpad:
1 = Frente
3 = Lado
7 = Top
9 = toggle
Luego cuando giremos un objeto en "Object Mode"
Podemos alinear la vista relativa al objeto con:
Shift + 1 = Frente
Shift + 3 = Lado
Shift + 7 = Top
Pero si giramos el objeto dentro de "edit mode" o aplicamos su rotación, entonces ya no vamos a poder alinear la vista tan fácil.
Para eso vamos a tener que entrar a "Edit mode" seleccionar un grupo de puntos, o polígonos, y luego:
Shift + 1 = Frente
Shift + 3 = Lado
Shift + 7 = Top
Link donde explican esto:
https://blender.stackexchange.com/questions/64061/how-do-i-align-the-view-to-the-local-axis-of-an-object
012 - Python ejercicios w3 - Print the calendar of a given month and year
En este ejercicio usamos el modulo "calendar" para imprimir un calendario en la consola.
Con la función "calendar.month(año, mes)"
Se imprime un calendario en varias lineas.
Se puede determinar que tan separados se imprimen las lineas y caracteres
Con la función "calendar.month(año, mes, w=n, l=n)"
Link de mi Jupyter Notebook en Github:
https://github.com/javier-cantu/LearningPython/blob/master/w3resource_python_ex/012%20Print%20the%20calendar%20of%20a%20given%20month%20and%20year.ipynb
--------------------------
Link del ejercicio:
https://www.w3resource.com/python-exercises/python-basic-exercise-12.php
Documentación de Python sobre Calendar:
https://docs.python.org/3/library/calendar.html
--------------------------
Jupyter ShortCuts
Insert:
a = Incert Cell Above
b = Incert Cell Below
Cell:
Shift + Enter = Run Cells and Select Below
d,d = Delete cell
Cell Type:
y = Code
m = Markdown
Kernel:
Restart = 0,0
011 - Python ejercicios w3 -docstring of a function
En este ejercicio mandamos imprimir la documentación de algunas funciones por medio de __doc__
Con __doc__ se manda imprimir el "doctring" que es un string que se pone al inicio de un method, clase, función, etc.
Link de mi Jupyter Notebook en Github:
https://github.com/javier-cantu/LearningPython/blob/master/w3resource_python_ex/011%20Print%20the%20documents%20of%20Python%20built-in%20function(s).ipynb
--------------------------
Link del ejercicio:
https://www.w3resource.com/python-exercises/python-basic-exercise-11.php
Link de stack overflow donde se explica __doc__:
https://stackoverflow.com/questions/33066383/print-doc-in-python-3-script?answertab=votes#tab-top
Link a la documentación de Python:
https://docs.python.org/3/reference/datamodel.html
--------------------------
Jupyter ShortCuts
Insert:
a = Incert Cell Above
b = Incert Cell Below
Cell:
Shift + Enter = Run Cells and Select Below
d,d = Delete cell
Cell Type:
y = Code
m = Markdown
Kernel:
Restart = 0,0
010 - Python ejercicios w3 -n+nn+nnn
En este ejercicio se pide un numero "n" al usuario y se procesa la suma de "n+nn+nnn"
Link de mi Jupyter Notebook en Github:
https://github.com/javier-cantu/LearningPython/blob/master/w3resource_python_ex/010%20int%20n%20compute%20n%2Bnn%2Bnnn.ipynb
--------------------------
Link del ejercicio:
https://www.w3resource.com/python-exercises/python-basic-exercise-10.php
--------------------------
Jupyter ShortCuts
Insert:
a = Incert Cell Above
b = Incert Cell Below
Cell:
Shift + Enter = Run Cells and Select Below
d,d = Delete cell
Cell Type:
y = Code
m = Markdown
Kernel:
Restart = 0,0
009 - Python ejercicios w3 - fecha simple
En este ejercicio se imprime de diferentes maneras una fecha.
Usando textos con formato, % y .format.
Link de mi Jupyter Notebook en GitHub:
https://github.com/javier-cantu/LearningPython/blob/master/w3resource_python_ex/009%20Fecha.ipynb
--------------------------
Link del ejercicio:
https://www.w3resource.com/python-exercises/python-basic-exercise-9.php
--------------------------
Otros Links Consultados:
What's the difference between %s and %d in Python string formatting?
https://stackoverflow.com/questions/4288973/whats-the-difference-between-s-and-d-in-python-string-formatting/56382046
Python.org string — Common string operations
https://docs.python.org/3/library/string.html#format-examples
Python String format() Method
https://www.w3schools.com/python/ref_string_format.asp
Python String Formatting
https://www.w3schools.com/python/python_string_formatting.asp
PyFormat
https://pyformat.info/
---------------------------
Jupyter ShortCuts
Insert:
a = Incert Cell Above
b = Incert Cell Below
Cell:
Shift + Enter = Run Cells and Select Below
d,d = Delete cell
Cell Type:
y = Code
m = Markdown
Kernel:
Restart = 0,0
008 - Python ejercicios w3 - Primero y ultimo de la lista
En este ejercicio se tiene una lista, y se imprime su primer elemento y también su último.
El input es una lista, y el output es el primer [0] y último [-1]
Se puede hacer de diferentes maneras que se ven en el video.
Link de mi Jupyter Notebook en GitHub
https://github.com/javier-cantu/LearningPython/blob/master/w3resource_python_ex/008%20imprimir%20el%20primero%20y%20el%20ultimo%20de%20una%20lista.ipynb
Link del ejercicio:
https://www.w3resource.com/python-exercises/python-basic-exercise-8.php
Link de todos los ejercicios:
https://www.w3resource.com/python-exercises/
Mis Redes:
https://linktr.ee/JaviCan
007 - Python ejercicios w3 - File extension
En este ejercicio se le pide al usuario el nombre de un archchivo con su extension.
Y se regresa la extension
Link del ejercicio:
https://github.com/javier-cantu/LearningPython/blob/master/w3resource_python_ex/007%20separate%20file%20ext.ipynb
Link de todos los ejercicios:
https://www.w3resource.com/python-exercises/
006 - Python ejercicios w3 - Listas y Tuples
En este ejercicio se le pide un set de numeros al usuario.
Y luego ese set de numeros se convierte en una lista y en un tuple.
Y los mandamos imprimir.
Link del ejercicio:
https://www.w3resource.com/python-exercises/python-basic-exercise-6.php
Link de todos los ejercicios:
https://www.w3resource.com/python-exercises/
Repositorio de Github con todas las notebooks:
https://github.com/javier-cantu/LearningPython/tree/master/w3resource_python_ex
Coding Con Minecraft 2021 - 019 - Numeros aleatorios
Este es un ejemplo muy simple donde se demuestra como generar números aleatorios enteros entre un rango.
Utilizando la función:
random.randint(1, 100)
Página de Github con todos los Scripts:
https://github.com/javier-cantu/ejerciciosPythonEnMinecraft_Youtube
El scripts que seguimos en este video:
https://github.com/javier-cantu/ejerciciosPythonEnMinecraft_Youtube/blob/master/040_randomNumbersIntro.py
-------------------------------------
LinkTree:
https://linktr.ee/javiCan87
Redes:
Facebook: https://www.facebook.com/CodingConMinecraft
Instagram: https://www.instagram.com/codingconminecraft/
Instagram: https://www.instagram.com/leche_jc/
Discord: https://discord.gg/XrzMVvHFdc
Youtube: https://www.youtube.com/channel/UCYUDCSS1vDiDEf_q6ka1htg
Bitchute: https://www.bitchute.com/channel/yu62mHO0hzYV/
Linkedin: https://www.linkedin.com/in/javier-cant%C3%BA-9987a41a2/
Blender Python - 021 - Asignando Modifiers con Python
En este video veremos un ejemplo de como crear un ovjeto con Python.
Luego asignarle un Modifier de tipo "Subdivision surface"
Luego poner ese subdivision al nivel 2.
Todo usando Python
Link en GitHub donde esta el código que se utilizó:
https://github.com/javier-cantu/BlenderPython/blob/main/021_addModifierToObject.py
Mis Redes:
https://linktr.ee/javiCan87
Coding Con Minecraft 2021 - 018 - Nested Nested Loops
Ahora veremos como llevar mas alla a un nested loop doble
Vamos a hacer un "nested loop" triple
Un loop dentro de otro loop dentro de otro loop.
Página de Github con todos los Scripts:
https://github.com/javier-cantu/ejerciciosPythonEnMinecraft_Youtube
El scripts que seguimos en este video:
https://github.com/javier-cantu/ejerciciosPythonEnMinecraft_Youtube/blob/master/039_nestedNestedLoop.py
-------------------------------------
LinkTree:
https://linktr.ee/javiCan87
Redes:
Facebook: https://www.facebook.com/CodingConMinecraft
Instagram: https://www.instagram.com/codingconminecraft/
Instagram: https://www.instagram.com/leche_jc/
Discord: https://discord.gg/XrzMVvHFdc
Youtube: https://www.youtube.com/channel/UCYUDCSS1vDiDEf_q6ka1htg
Bitchute: https://www.bitchute.com/channel/yu62mHO0hzYV/
Linkedin: https://www.linkedin.com/in/javier-cant%C3%BA-9987a41a2/
Blender Python - 020 - Obteniendo la posicion del 3d cursor
En este video vemos como obtener la posición del 3D cursor con:
"bpy.context.scene.cursor.location"
Este comando regresa un vector que se puede separar en sus componentes wn X, Y, y Z.
variable_pos = bpy.context.scene.cursor.location
De esta manera se separa cada componente.
x = variable_pos.x
y = variable_pos.y
z = variable_pos.z
Link en GitHub donde esta el código que se utilizó:
https://github.com/javier-cantu/BlenderPython/blob/main/020_getCursorLocation.py
Links donde explican como conseguir la posicion del cursor:
https://blender.stackexchange.com/questions/5359/how-to-set-cursor-location-pivot-point-in-script?newreg=734998d69a5a4cc2b25021d81d9f9b0d
https://blender.stackexchange.com/questions/134313/cursor-location-scene-blender-2-8
Mis Redes:
https://linktr.ee/javiCan87
Blender Python - 019 - Creando objetos y guardando el script
En este video creamos algunso objetos con comandos de python.
También guardamos el archivo .py para que quedara guardado el código.
De esta manera podríamos abrir el código en otro archivo de Blender.
Link en GitHub donde esta el código que se utilizó:
https://github.com/javier-cantu/BlenderPython/blob/main/019CreandoObjetos.py
Coding Con Minecraft 2021 - 017 - Nested Loops
En este video se mostrará otra forma de utilizar ciclos o "loops"
En este caso veremos un "nested loop" o loop anidado.
Lo que significa que hay un "loop" dentro de otro "loop"
Esto nos permitirá construir cosas más complejas.
Página de Github con todos los Scripts:
https://github.com/javier-cantu/ejerciciosPythonEnMinecraft_Youtube
El scripts que seguimos en este video:
https://github.com/javier-cantu/ejerciciosPythonEnMinecraft_Youtube/blob/master/038_nestedLoop.py
-------------------------------------
LinkTree:
https://linktr.ee/javiCan87
Redes:
Facebook: https://www.facebook.com/CodingConMinecraft
Instagram: https://www.instagram.com/codingconminecraft/
Instagram: https://www.instagram.com/leche_jc/
Discord: https://discord.gg/XrzMVvHFdc
Youtube: https://www.youtube.com/channel/UCYUDCSS1vDiDEf_q6ka1htg
Bitchute: https://www.bitchute.com/channel/yu62mHO0hzYV/
Linkedin: https://www.linkedin.com/in/javier-cant%C3%BA-9987a41a2/
005 - Python ejercicios w3 - Invertir nombre
En este ejercicio se usa la funcion "input()"
Con la que se obtiene un string como input del usuario.
Ese string se puede almacenar en una variable
x = input()
Se puede poner un argumento que sera el mensaje que aparecerá en el prompt.
x = input("Mensaje para el prompt: ")
Link del ejercicio:
https://www.w3resource.com/python-exercises/python-basic-exercise-5.php
Link de todos los ejercicios:
https://www.w3resource.com/python-exercises/
Repositorio de Github con todas las notebooks:
https://github.com/javier-cantu/LearningPython/tree/master/w3resource_python_ex
Coding Con Minecraft 2021 - 016 - Construyendo casas con loops
for x in range(10):
# Codigo de la casa
En este video crearemos 10 casas usando un "for loop"
Veremos el potencial de esta herramienta que nos permite automatizar tareas repetitivas. En este caso se automatiza la construcción de un casita 10 veces, y se construye relativa a la posición del jugador.
Página de Github con todos los Scripts:
https://github.com/javier-cantu/ejerciciosPythonEnMinecraft_Youtube
El scripts que seguimos en este video:
https://github.com/javier-cantu/ejerciciosPythonEnMinecraft_Youtube/blob/master/037_casitaLoop.py
-------------------------------------
LinkTree:
https://linktr.ee/javiCan87
Redes:
Facebook: https://www.facebook.com/CodingConMinecraft
Instagram: https://www.instagram.com/codingconminecraft/
Instagram: https://www.instagram.com/leche_jc/
Discord: https://discord.gg/XrzMVvHFdc
Youtube: https://www.youtube.com/channel/UCYUDCSS1vDiDEf_q6ka1htg
Bitchute: https://www.bitchute.com/channel/yu62mHO0hzYV/
Linkedin: https://www.linkedin.com/in/javier-cant%C3%BA-9987a41a2/
Coding Con Minecraft 2021 - 015 - For Loop
for x in range(#):
# Contenido del loop
En este video comenzaremos a ver como se utilizan los loops o ciclos.
Los loops nos permiten repetir código las veces que queramos de forma sencilla.
Página de Github con todos los Scripts:
https://github.com/javier-cantu/ejerciciosPythonEnMinecraft_Youtube
El scripts que seguimos en este video:
https://github.com/javier-cantu/ejerciciosPythonEnMinecraft_Youtube/blob/master/036_introLoops.py
-------------------------------------
LinkTree:
https://linktr.ee/javiCan87
Redes:
Facebook: https://www.facebook.com/CodingConMinecraft
Instagram: https://www.instagram.com/codingconminecraft/
Instagram: https://www.instagram.com/leche_jc/
Discord: https://discord.gg/XrzMVvHFdc
Youtube: https://www.youtube.com/channel/UCYUDCSS1vDiDEf_q6ka1htg
Bitchute: https://www.bitchute.com/channel/yu62mHO0hzYV/
Linkedin: https://www.linkedin.com/in/javier-cant%C3%BA-9987a41a2/
004 - Python ejercicios w3 - Area del circulo con Pi
En este ejercicio se calcula el area de un circulo
pidiendole un input al usuario
Se necesita importar "pi" del modulo "math"
Link del ejercicio:
https://www.w3resource.com/python-exercises/python-basic-exercise-4.php
Link de todos los ejercicios:
https://www.w3resource.com/python-exercises/
Repositorio de Github con todas las notebooks:
https://github.com/javier-cantu/LearningPython/tree/master/w3resource_python_ex
003 - Python ejercicios w3 - Fecha y Hora con Python
Programa que muestre la fecha y la hora.
Y algunas variaciones.
Link del ejercicio:
https://www.w3resource.com/python-exercises/python-basic-exercise-3.php
Link de todos los ejercicios:
https://www.w3resource.com/python-exercises/
Repositorio de Github con todas las notebooks:
https://github.com/javier-cantu/LearningPython/tree/master/w3resource_python_ex
002 - Python ejercicios w3 - Version de Python
Ejercicio para identificar la version de Python que estamos utilizando.
Usamos algunas maneras diferentes para lograrlo.
Link del ejercicio:
https://www.w3resource.com/python-exercises/python-basic-exercise-2.php
Link de todos los ejercicios:
https://www.w3resource.com/python-exercises/
Repositorio de Github con todas las notebooks:
https://github.com/javier-cantu/LearningPython/tree/master/w3resource_python_ex
001 - Python ejercicios w3 - formato simple de texto
Para darle formato a los strings que se mandan imprimier con la funcion "print()"
"\n" = pasa a la siguiente linea
"\t" = indentación o tab.
Link del ejercicio:
https://www.w3resource.com/python-exercises/python-basic-exercise-1.php
Link de todos los ejercicios:
https://www.w3resource.com/python-exercises/
Repositorio de Github con todas las notebooks:
https://github.com/javier-cantu/LearningPython/tree/master/w3resource_python_ex
000 - Python ejercicios w3 - Cambiar el browser y directorio inicial para Jupyter notebooks
Como cambiar el browser en el que se abre Jupyter.
Quiero que se abra con Brave Browser
Y como cambiar su directorio inicial.
1. Abrimos Anacoda Prompt y ponemos el siguinete comando
jupyter notebook --generate-config
2. Se va a generar un archivo "jupyter_notebook_config.py"
3. Abrir "jupyter_notebook_config.py" con un editor de texto
4. Cambiar las lineas correspondientes
## Specify what command to use to invoke a web browser when opening the notebook.
# If not specified, the default browser will be determined by the `webbrowser`
# standard library module, which allows setting of the BROWSER environment
# variable to override it.
# Default: ''
c.NotebookApp.browser = u'X:/RUTA_DEL_BROWSER/browser.exe %s'
## The directory to use for notebooks and kernels.
# Default: ''
c.NotebookApp.notebook_dir = r'X:/RUTA_DEL_DIRECTORIO/directorio'
Created 4 years, 3 months ago.
52 videos
Category None
Canal sobre tecnología, programación, videojuegos, creatividad.
Otras redes:
Facebook: https://www.facebook.com/CodingConMinecraft
Instagram: https://www.instagram.com/codingconminecraft/
Instagram: https://www.instagram.com/lechonjc/
Discord: https://discord.gg/3pd9vadrNR