Skip to content

Instantly share code, notes, and snippets.

View jalbarrang's full-sized avatar

Juan Andrés Albarrán jalbarrang

  • Personal
  • Concepción, Chile
View GitHub Profile
import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
class Shape:
def __init__(self, vertices, edges):
self.vertices = vertices
@jalbarrang
jalbarrang / PY0101EN-1-1-Types.ipynb
Created April 24, 2020 23:36
Created on Skills Network Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jalbarrang
jalbarrang / PY0101EN-1-2-Strings.ipynb
Created April 24, 2020 23:53
Created on Skills Network Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jalbarrang
jalbarrang / PY0101EN-1-2-Strings.ipynb
Created April 24, 2020 23:53
Created on Skills Network Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Convert ["a", nil, "b", "c", nil] and ["d", nil, "e", "f"] into ["af", "be", "cd"] using Ruby in one sentence
# Hint: Remember, Do it in one sentence.
# Solution:
## Remove nils from both arrays using compact
## Reverse second array
## Zip both arrays then map the resulting array joining the values in chunks of two
["a", nil, "b", "c", nil].compact.zip(["d", nil, "e", "f"].compact.reverse).map { |a, b| "#{a}#{b}" }
@jalbarrang
jalbarrang / index.html
Created January 17, 2022 19:45
Pregunta 2
<html>
<head><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css">
<script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
</head>
<body>
<div id="root"></div>
<script src="index.js" type="text/babel"></script>
</body>