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
| import matplotlib | |
| matplotlib.use('webagg') | |
| import numpy as np | |
| from scipy.special import binom | |
| import matplotlib.pyplot as plt | |
| from matplotlib.lines import Line2D |
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
| $ python3 -u -c "from http.server import BaseHTTPRequestHandler, HTTPServer; | |
| class S(BaseHTTPRequestHandler): | |
| def do_POST(self): | |
| l = int(self.headers['Content-Length']) | |
| print(self.rfile.read(l).decode('utf-8'), flush=True) | |
| self.send_response(200); self.end_headers() | |
| def log_message(self, format, *args): return | |
| HTTPServer(('0.0.0.0', 8099), S).serve_forever()" | tee minio.txt | |
| $ tail -f minio.txt | jq --unbuffered -r '. | | |
| "[\(.time[11:19])] \(.remotehost) | \(.api.name) " + |
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
| import asyncio | |
| import os | |
| import httpx | |
| async def get_all(url, headers): | |
| result = {} | |
| next_url = url |
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
| # coding: utf-8 | |
| """Juego de la vida de Conway. | |
| Autor: Juan Luis Cano <juanlu001@gmail.com> | |
| El tablero es un array de NumPy, donde 0 significa célula muerta y 1 célula | |
| viva. Se muestra una animación con matplotlib. | |
| """ |
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 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
| document: | |
| key1: "value1" | |
| key2: "value2" | |
| list1: | |
| - "item1" | |
| - "item2" | |
| - dictionary1: | |
| key3: "value3" | |
| key4: "value4" | |
| list2: |
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
| import asyncio | |
| import logging | |
| import os | |
| import aiormq | |
| logger = logging.getLogger(__name__) | |
| RABBITMQ_HOST = os.environ["RABBITMQ_HOST"] | |
| RABBITMQ_PORT = os.environ["RABBITMQ_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
| from astropy.time import Time | |
| from astropy.coordinates import CartesianRepresentation | |
| from matplotlib import pyplot as plt | |
| from poliastro.twobody import Orbit | |
| from poliastro.bodies import Jupiter | |
| from poliastro.frames import get_frame, Planes | |
| from poliastro.plotting.static import StaticOrbitPlotter | |
| def change_attractor(orbit, new_attractor, plane=Planes.EARTH_EQUATOR): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder