Skip to content

Instantly share code, notes, and snippets.

"""
"""
@nebil
nebil / barrtodec.py
Last active February 11, 2020 11:20
🔟 barrtodec -- turn a bitmap into a decimal integer using Python
"""
barrtodec.py -- turn a bitmap into a decimal integer using Python
This source code is licensed under a Creative Commons CC0 license.
More info at <https://creativecommons.org/publicdomain/zero/1.0/>.
"""
from functools import reduce
@nebil
nebil / releasetype.py
Last active February 11, 2020 11:10
📦 releasetype -- a function to get the release type of a version
"""
releasetype.py -- a function to get the release type of a version
This source code is licensed under a Creative Commons CC0 license.
More info at <https://creativecommons.org/publicdomain/zero/1.0/>.
"""
def get_release_type(version):
"""
@nebil
nebil / stopwatch1.py
Last active February 11, 2020 11:11
⏱️ listwatch -- a classy stopwatch for Python 3.3+
"""
stopwatch1.py -- a classy stopwatch for Python 3.3+
Copyright (c) 2020, Nebil Kawas García
This source code is subject to the terms of the Mozilla Public License.
You can obtain a copy of the MPL at <https://www.mozilla.org/MPL/2.0/>.
"""
from datetime import datetime
@nebil
nebil / maximum.py
Last active February 2, 2020 23:25
🔁 extremum -- two recursive functions written in Python
"""
maximum.py -- a recursive maximum finder using Python
This source code is licensed under a Creative Commons CC0 license.
More info at <https://creativecommons.org/publicdomain/zero/1.0/>.
"""
def get_maximum(numbers):
if len(numbers) == 1:
@nebil
nebil / remark.tex
Last active March 20, 2024 09:13
💬 remark -- a simple command to add inline notes in LaTeX
% This source code is licensed under a Creative Commons CC0 license.
% More info at <https://creativecommons.org/publicdomain/zero/1.0/>.
\documentclass[12pt]{article}
\usepackage{xcolor}
\begin{document}
% The main goal is to provide an easy way to write annotations in LaTeX.
% This simple snippet of code should serve as a minimal working example.
@nebil
nebil / caesar.py
Last active October 31, 2018 13:00
🐍 Un script que verifica si Python 3.6+ está instalado 🐍
"""
Esto es un simple script para verificar que Python 3.6+ esté instalado.
Copyright (c) 2018, Nebil Kawas García
This source code is subject to the terms of the Mozilla Public License.
You can obtain a copy of the MPL at <https://www.mozilla.org/MPL/2.0/>.
"""
from string import ascii_letters
from platform import python_version
@nebil
nebil / README.md
Last active January 21, 2020 14:05
🚀 Algunos lenguajes del nuevo milenio 🚀

Lenguajes del tercer milenio

Aquí dejaré una tabla con lenguajes de programación que aparecieron después del año 2001.
Durante los últimos años, todos ellos han alcanzado un grado significativo de notoriedad.
Podría ser interesante analizar qué novedades ofrecen con respecto a sus antecesores.

Nombre Año de aparición GitHub :octocat: Sitio web oficial
[Ceylon] 2011 [@eclipse/ceylon] https://ceylon-lang.org
@nebil
nebil / index.html
Last active July 1, 2018 21:20
🐣 Un ejemplo minimalista de HTML/CSS con JavaScript 🐣
<!DOCTYPE html>
<html lang='es'>
<head>
<meta charset='utf-8'>
<title>Ejemplo</title>
<style media='screen'>
body {
margin: 0px auto;
padding: 3ex 3em;
max-width: 680px;
@nebil
nebil / README.md
Created March 18, 2018 21:21
A script to generate a periodic time series

Script