Skip to content

Instantly share code, notes, and snippets.

@nebil
nebil / barrtodec.py
Last active Feb 11, 2020
🔟 barrtodec -- turn a bitmap into a decimal integer using Python
View barrtodec.py
"""
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 Feb 11, 2020
📦 releasetype -- a function to get the release type of a version
View releasetype.py
"""
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 Feb 11, 2020
⏱️ listwatch -- a classy stopwatch for Python 3.3+
View stopwatch1.py
"""
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 Feb 2, 2020
🔁 extremum -- two recursive functions written in Python
View maximum.py
"""
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 Jan 14, 2022
💬 remark -- a simple command to add inline notes in LaTeX
View remark.tex
% 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 Oct 31, 2018
🐍 Un script que verifica si Python 3.6+ está instalado 🐍
View caesar.py
"""
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 Jan 21, 2020
🚀 Algunos lenguajes del nuevo milenio 🚀
View README.md

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 Jul 1, 2018
🐣 Un ejemplo minimalista de HTML/CSS con JavaScript 🐣
View index.html
<!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 Mar 18, 2018
A script to generate a periodic time series