Skip to content

Instantly share code, notes, and snippets.

View oleksis's full-sized avatar
💭
Be Happy!

Oleksis Fraga Menéndez oleksis

💭
Be Happy!
View GitHub Profile
@oleksis
oleksis / python-frozen-hello.md
Last active March 20, 2024 11:26
Python Hello World with Emojis
  1. CPython fork: https://github.com/oleksis/cpython

  2. Clone and setup

git clone https://github.com/oleksis/cpython.git
cd cpython
# git remote add upstream https://github.com/python/cpython
# git config --local branch.main.remote upstream
# git remote set-url --push upstream git@github.com:/cpython.git
@oleksis
oleksis / Git-push-error-HTTP-400.md
Created March 7, 2024 11:15
Git push error: HTTP 400

The error you're encountering is often due to issues with the HTTP version or the size of the data being pushed. Here are a few potential solutions:

  1. Switch to HTTP/1.1: The error message points to an issue with HTTP/2. You can force Git to use HTTP/1.1 with the following command¹:
git config --global http.version HTTP/1.1
  1. Increase the post buffer size: If you're pushing data larger than the postBuffer size, you may encounter this error. Increase the post buffer size with the following command¹³⁴:
@oleksis
oleksis / Linux-5.11-song.md
Last active March 4, 2024 12:26
Linux song

FOSS-community-Linux_f3ce803a-a674-40f7-ab90-90b94d35aded

Yeah, yeah, yeah

This is the Linux 5.11 song

Dedicated to all the developers who worked hard on this release

Let's go!

@oleksis
oleksis / Bisiesto.md
Last active March 1, 2024 04:43
The year 2024 is a leap year

Gregorian calendar

The year 2024 is a leap year, or bisiesto in Spanish. According to the Gregorian calendar, a year is considered a leap year if it is divisible by 4, except for end-of-century years which must be divisible by 400. This means that the year 2024, which is divisible by 4, has 366 days including the extra day, February 29.

This system keeps our calendar year synchronized with the solar year.

JavaScript application

@oleksis
oleksis / los-gatos-samurai.md
Last active February 25, 2024 11:55
Los Gatos Samurái, una historia sobre los gatos samurái en la industria tecnológica haciendo desarrollo de software con Python.

24-02-22 10-32-12 3401

Los gatos samurái eran tres hermanos que trabajaban en una empresa de tecnología llamada Pizzabyte. Ellos se encargaban de desarrollar aplicaciones web con Python, usando frameworks como Django y Flask. Su jefe era el Gran Queso, un ratón que les exigía mucho y les pagaba poco.

Un día, los gatos samurái recibieron un encargo especial: crear una plataforma de inteligencia artificial que pudiera predecir el comportamiento de los clientes y optimizar las ventas de pizza. El Gran Queso les dijo que era una oportunidad única para demostrar su talento y que si lo hacían bien, les daría un gran premio.

Los gatos samurái se pusieron manos a la obra y empezaron a programar con Python. Usaron librerías como NumPy, pandas, scikit-learn y TensorFlow para crear un modelo de aprendizaje automático que analizara los datos de los pedidos de pizza y generara recomendaci

@oleksis
oleksis / Azure-AI-Speech-Service.md
Created November 25, 2023 09:48
Captioning with speech to text with Azure AI - Speech service

Azure AI - Speech service

Captioning with speech to text Automatically caption your content in real-time and offline by transcribing the audio of films, videos, live events, and more. Display the resulting text on a screen to provide an accessible experience.

Common use cases:

  • Captioning for video content such as films, live television, sports matches
  • Transcribing audio-only content like podcasts or phone conversations
  • Technologies used
    • (Speech SDK)
    • Speech to text
@oleksis
oleksis / BPDevs-Codespaces.md
Last active March 11, 2024 10:53
BPDevs Codespaces

BPDevs Codespaces

Dev Container for the Black Python Developers website

Topics

  • Devcontainer (Dockerfile, Codespaces BPDevs)
    • DevContainers-Codespaces.md
    • Build (use containerd for pulling and storing images):
      • docker buildx build -f .github\.devcontainer\Dockerfile --push -t ghcr.io/oleksis/blackpythondevs.com:latest .
@oleksis
oleksis / BPDevs
Last active November 17, 2023 09:04
Black Python Developers Profile for Visual Studio Code
{"name":"BPDevs","icon":"flame","settings":"{\"settings\":\"{\\r\\n \\\"workbench.colorTheme\\\": \\\"GitHub Dark\\\",\\r\\n \\\"python.analysis.typeCheckingMode\\\": \\\"basic\\\",\\r\\n \\\"editor.accessibilitySupport\\\": \\\"off\\\",\\r\\n \\\"git.autofetch\\\": true,\\r\\n \\\"redhat.telemetry.enabled\\\": false,\\r\\n \\\"editor.fontFamily\\\": \\\"'FiraCode NFM', Consolas, 'Courier New', monospace\\\",\\r\\n \\\"[python]\\\": {\\r\\n \\\"editor.formatOnType\\\": true,\\r\\n \\\"editor.defaultFormatter\\\": \\\"ms-python.black-formatter\\\"\\r\\n },\\r\\n \\\"[yaml]\\\": {\\r\\n \\\"editor.defaultFormatter\\\": \\\"redhat.vscode-yaml\\\"\\r\\n },\\r\\n \\\"[html]\\\": {\\r\\n \\\"editor.defaultFormatter\\\": \\\"vscode.html-language-features\\\"\\r\\n },\\r\\n \\\"[jsonc]\\\": {\\r\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\"\\r\\n },\\r\\n \\\"[json]\\\": {\\r\\n \\\"editor.defaultFormatter\\\":
@oleksis
oleksis / DevContainers-Codespaces.md
Last active November 17, 2023 08:30
DevContainers and Codespaces

DevContainers and Codespaces

In this conversation, I explained the following topics to you:

  • What is a Dockerfile and how to write one for a Jekyll project that uses Python and Playwright.
  • How to speed up the build and run the container when using Codespaces, by using multi-stage builds, .dockerignore files, prebuilds, and usage monitoring.
  • How to update the devcontainer.json file to use the prebuild feature on Codespaces, and how to define different variants of the dev container image.

Dockerfile

@oleksis
oleksis / pyscript.html
Last active November 12, 2023 05:07
Hello Word PyScript
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Hello World PyScript</title>
<script type="module" src="https://pyscript.net/releases/2023.11.1/core.js"></script>
</head>
<body>
<script type="py">